Debian Codegraph @

scripts/CMakeLists.txt

raw ◀ ▶
1 Debian patch touch this file
1 set(CMAKE_FOLDER "scripts")
2
3 set(HEADERS
4 AIGame3_External.h
5 linux_lib.h
6 osiris_common.h
7 osiris_import.h
8 osiris_vector.h)
9 set(CPPS
10 $<$<PLATFORM_ID:Darwin,Linux>:
11 linux_lib.cpp
12 >
13 )
14
15 set(SCRIPTS
16 aigame2
17 AIGame3
18 aigame4
19 AIGame
20 barney
21 BatteriesIncluded
22 BossCamera
23 CanyonsCTF
24 CellTestLevel
25 ChrisTest
26 clutter
27 generic
28 Geodomes
29 HalfPipe
30 InfernalBolt
31 Inversion
32 LEVEL0
33 level10
34 level11
35 Level12
36 level13
37 level14
38 LEVEL15
39 Level16
40 level17
41 level1
42 level2
43 level3
44 level4
45 level5
46 Level6
47 level7
48 level8
49 Level9
50 LevelS1
51 levelS2
52 Merc02
53 Merc1
54 Merc3
55 Merc4
56 merc5
57 Merc6
58 Merc7
59 myPowerHouse
60 Mysterious_Isle
61 orbital
62 Paranoia
63 PiccuStation
64 Polaris
65 Quadsomniac
66 RudeAwakening
67 SewerRat
68 testscript
69 TrainingMission
70 Y2K)
71
72 #add_custom_target(HogDemo-copy
73 # COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_SOURCE_DIR}/scripts/data/demohog ${CMAKE_BINARY_DIR}/scripts/data/demohog/
74 # COMMENT "Copy script/data/demohog directory"
75 #)
76
77 foreach(SCRIPT ${SCRIPTS})
78 add_library(${SCRIPT} MODULE ${CPPS} ${HEADERS} "${SCRIPT}.cpp")
79 target_link_libraries(${SCRIPT}
80 fix
81 misc
82 )
83 set_target_properties(${SCRIPT} PROPERTIES PREFIX "")
84 set_target_properties(${SCRIPT} PROPERTIES CXX_VISIBILITY_PRESET "hidden")
•85 set_target_properties(${SCRIPT} PROPERTIES LINK_OPTIONS -s)
86 if(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
87 set_target_properties(${SCRIPT} PROPERTIES SUFFIX ".dylib")
88 endif()
89 endforeach()
90
91 if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
92 set(HOG_NAME "linux")
93 elseif(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
94 set(HOG_NAME "osx")
95 elseif(CMAKE_SYSTEM_NAME STREQUAL "Windows")
96 set(HOG_NAME "win")
97 endif()
98
99 add_custom_target(HogFull
100 COMMAND $<TARGET_FILE:HogMaker>
101 "$<TARGET_FILE_DIR:Descent3>/d3-${HOG_NAME}.hog"
102 "${CMAKE_SOURCE_DIR}/scripts/data/fullhog/d3-${HOG_NAME}-fullhog.txt"
103 "$<TARGET_FILE_DIR:AIGame>"
104 DEPENDS ${SCRIPTS} HogMaker data/fullhog/d3-${HOG_NAME}-fullhog.txt
105 COMMENT "Generate fullhog/d3-${HOG_NAME}.hog"
106 )
107
108 # Place file next to Descent3 executable on installation
109 install(FILES "$<TARGET_FILE_DIR:Descent3>/d3-${HOG_NAME}.hog" DESTINATION ${CMAKE_INSTALL_DATADIR})
110
111 # FIXME: there may be only one d3-linux.hog, need deal with demo somehow.
112 # add_custom_target(HogLinuxDemo
113 # COMMAND $<TARGET_FILE:HogMaker>
114 # "${CMAKE_BINARY_DIR}/scripts/data/demohog/d3-${HOG_NAME}.hog"
115 # "${CMAKE_BINARY_DIR}/scripts/data/demohog/d3-${HOG_NAME}-demohog.txt"
116 # "${CMAKE_BINARY_DIR}/scripts/"
117 # DEPENDS ${SCRIPTS} HogMaker data/fullhog/d3-${HOG_NAME}-demohog.txt
118 # COMMENT "Generate linuxdemohog/d3-${HOG_NAME}.hog"
119 # )