This repository has been archived by the owner on May 14, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
46 lines (34 loc) · 1.69 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
# ------------------------------------------------------------------------------------------------ #
# This file is part of CosmoScout VR #
# and may be used under the terms of the MIT license. See the LICENSE file for details. #
# Copyright: (c) 2019 German Aerospace Center (DLR) #
# ------------------------------------------------------------------------------------------------ #
option(CSP_RINGS "Enable compilation of this plugin" ON)
if (NOT CSP_RINGS)
return()
endif()
# build plugin -------------------------------------------------------------------------------------
file(GLOB SOURCE_FILES src/*.cpp)
# Resoucre files and header files are only added in order to make them available in your IDE.
file(GLOB HEADER_FILES src/*.hpp)
file(GLOB_RECURSE RESOUCRE_FILES textures/*)
add_library(csp-rings SHARED
${SOURCE_FILES}
${HEADER_FILES}
${RESOUCRE_FILES}
)
target_link_libraries(csp-rings
PUBLIC
cs-core
)
# Add this Plugin to a "plugins" folder in your IDE.
set_property(TARGET csp-rings PROPERTY FOLDER "plugins")
# We mark all resource files as "header" in order to make sure that no one tries to compile them.
set_source_files_properties(${RESOUCRE_FILES} PROPERTIES HEADER_FILE_ONLY TRUE)
# Make directory structure available in your IDE.
source_group(TREE "${CMAKE_CURRENT_SOURCE_DIR}" FILES
${SOURCE_FILES} ${HEADER_FILES} ${RESOUCRE_FILES}
)
# install plugin -----------------------------------------------------------------------------------
install(TARGETS csp-rings DESTINATION "share/plugins")
install(DIRECTORY "textures" DESTINATION "share/resources")