-
Notifications
You must be signed in to change notification settings - Fork 29
/
Copy pathCMakeLists.txt
50 lines (36 loc) · 1.65 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# ------------------------------------------------------------------------------------------------ #
# This file is part of CosmoScout VR #
# ------------------------------------------------------------------------------------------------ #
# SPDX-FileCopyrightText: German Aerospace Center (DLR) <[email protected]>
# SPDX-License-Identifier: MIT
# build library ------------------------------------------------------------------------------------
file(GLOB SOURCE_FILES *.cpp */*.cpp)
# Header files are only added in order to make them available in your IDE.
file(GLOB HEADER_FILES *.hpp */*.hpp)
# Shader files are also only added in order to make them available in your IDE.
set(RESOURCE_SHADER_DIR ${CMAKE_SOURCE_DIR}/resources/shaders/)
file(GLOB SHADER_FILES ${RESOURCE_SHADER_DIR}* ${RESOURCE_SHADER_DIR}*/*)
source_group("src/shaders" FILES ${SHADER_FILES})
add_library(cs-graphics SHARED
${SOURCE_FILES}
${HEADER_FILES}
${SHADER_FILES}
)
target_link_libraries(cs-graphics
PUBLIC
gli::gli
cs-utils
)
if(COSMOSCOUT_USE_PRECOMPILED_HEADERS)
target_precompile_headers(cs-graphics PRIVATE precompiled.pch)
endif()
# Make directory structure available in your IDE.
source_group(TREE "${CMAKE_CURRENT_SOURCE_DIR}" PREFIX "src" FILES
${SOURCE_FILES} ${HEADER_FILES}
)
# install the library ------------------------------------------------------------------------------
install(TARGETS cs-graphics DESTINATION lib)
# export header ------------------------------------------------------------------------------------
generate_export_header(cs-graphics
EXPORT_FILE_NAME cs_graphics_export.hpp
)