| 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 |
if(CMAKE_SYSTEM_NAME STREQUAL "Darwin") |
| 86 |
set_target_properties(${SCRIPT} PROPERTIES SUFFIX ".dylib") |
| 87 |
endif() |
| 88 |
endforeach() |
| 89 |
|
| 90 |
if(CMAKE_SYSTEM_NAME STREQUAL "Linux") |
| 91 |
set(HOG_NAME "linux") |
| 92 |
elseif(CMAKE_SYSTEM_NAME STREQUAL "Darwin") |
| 93 |
set(HOG_NAME "osx") |
| 94 |
elseif(CMAKE_SYSTEM_NAME STREQUAL "Windows") |
| 95 |
set(HOG_NAME "win") |
| 96 |
endif() |
| 97 |
|
| 98 |
add_custom_target(HogFull |
| 99 |
COMMAND $<TARGET_FILE:HogMaker> |
| 100 |
"$<TARGET_FILE_DIR:Descent3>/d3-${HOG_NAME}.hog" |
| 101 |
"${CMAKE_SOURCE_DIR}/scripts/data/fullhog/d3-${HOG_NAME}-fullhog.txt" |
| 102 |
"$<TARGET_FILE_DIR:AIGame>" |
| 103 |
DEPENDS ${SCRIPTS} HogMaker data/fullhog/d3-${HOG_NAME}-fullhog.txt |
| 104 |
COMMENT "Generate fullhog/d3-${HOG_NAME}.hog" |
| 105 |
) |
| 106 |
|
| 107 |
# Place file next to Descent3 executable on installation |
| 108 |
install(FILES "$<TARGET_FILE_DIR:Descent3>/d3-${HOG_NAME}.hog" DESTINATION ${CMAKE_INSTALL_DATADIR}) |
| 109 |
|
| 110 |
# FIXME: there may be only one d3-linux.hog, need deal with demo somehow. |
| 111 |
# add_custom_target(HogLinuxDemo |
| 112 |
# COMMAND $<TARGET_FILE:HogMaker> |
| 113 |
# "${CMAKE_BINARY_DIR}/scripts/data/demohog/d3-${HOG_NAME}.hog" |
| 114 |
# "${CMAKE_BINARY_DIR}/scripts/data/demohog/d3-${HOG_NAME}-demohog.txt" |
| 115 |
# "${CMAKE_BINARY_DIR}/scripts/" |
| 116 |
# DEPENDS ${SCRIPTS} HogMaker data/fullhog/d3-${HOG_NAME}-demohog.txt |
| 117 |
# COMMENT "Generate linuxdemohog/d3-${HOG_NAME}.hog" |
| 118 |
# ) |