2024-05-02 18:45:12 +00:00
|
|
|
set(CPPS
|
|
|
|
$<$<PLATFORM_ID:Darwin,Linux>:
|
|
|
|
linux_lib.cpp
|
|
|
|
>
|
|
|
|
)
|
2024-04-16 03:43:29 +00:00
|
|
|
|
2024-04-20 12:35:20 +00:00
|
|
|
set(SCRIPTS
|
2024-04-21 09:02:27 +00:00
|
|
|
aigame2
|
|
|
|
AIGame3
|
|
|
|
aigame4
|
|
|
|
AIGame
|
|
|
|
barney
|
|
|
|
BatteriesIncluded
|
|
|
|
BossCamera
|
|
|
|
CanyonsCTF
|
|
|
|
CellTestLevel
|
|
|
|
ChrisTest
|
|
|
|
clutter
|
|
|
|
GameGauge
|
|
|
|
generic
|
|
|
|
Geodomes
|
|
|
|
HalfPipe
|
|
|
|
InfernalBolt
|
|
|
|
Inversion
|
|
|
|
LEVEL0
|
|
|
|
level10
|
|
|
|
level11
|
|
|
|
Level12
|
|
|
|
level13
|
|
|
|
level14
|
|
|
|
LEVEL15
|
|
|
|
Level16
|
|
|
|
level17
|
|
|
|
level1
|
|
|
|
level2
|
|
|
|
level3
|
|
|
|
level4
|
|
|
|
level5
|
|
|
|
Level6
|
|
|
|
level7
|
|
|
|
level8
|
|
|
|
Level9
|
|
|
|
LevelS1
|
|
|
|
levelS2
|
|
|
|
Merc02
|
|
|
|
Merc1
|
|
|
|
Merc3
|
|
|
|
Merc4
|
|
|
|
merc5
|
|
|
|
Merc6
|
|
|
|
Merc7
|
|
|
|
myPowerHouse
|
|
|
|
Mysterious_Isle
|
|
|
|
orbital
|
|
|
|
Paranoia
|
|
|
|
PiccuStation
|
|
|
|
Polaris
|
|
|
|
Quadsomniac
|
|
|
|
RudeAwakening
|
|
|
|
SewerRat
|
|
|
|
testscript
|
|
|
|
TrainingMission
|
|
|
|
Y2K)
|
2024-04-16 03:43:29 +00:00
|
|
|
|
2024-05-02 18:45:12 +00:00
|
|
|
#add_custom_target(HogDemo-copy
|
|
|
|
# COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_SOURCE_DIR}/scripts/data/demohog ${CMAKE_BINARY_DIR}/scripts/data/demohog/
|
|
|
|
# COMMENT "Copy script/data/demohog directory"
|
2024-04-21 01:05:26 +00:00
|
|
|
#)
|
|
|
|
|
2024-04-20 12:35:20 +00:00
|
|
|
foreach(SCRIPT ${SCRIPTS})
|
2024-04-22 01:48:47 +00:00
|
|
|
add_library(${SCRIPT} MODULE ${CPPS} "${SCRIPT}.cpp")
|
2024-04-26 23:50:10 +00:00
|
|
|
target_link_libraries(${SCRIPT} fix)
|
2024-04-21 09:02:27 +00:00
|
|
|
set_target_properties(${SCRIPT} PROPERTIES PREFIX "")
|
2024-05-07 16:18:49 +00:00
|
|
|
if(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
|
2024-04-22 01:48:47 +00:00
|
|
|
set_target_properties(${SCRIPT} PROPERTIES SUFFIX ".dylib")
|
2024-05-07 16:18:49 +00:00
|
|
|
endif()
|
|
|
|
endforeach()
|
2024-04-21 01:05:26 +00:00
|
|
|
|
2024-05-02 18:45:12 +00:00
|
|
|
if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
|
|
|
set(HOG_NAME "linux")
|
|
|
|
elseif(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
|
|
|
|
set(HOG_NAME "osx")
|
|
|
|
endif()
|
2024-04-16 03:43:29 +00:00
|
|
|
|
2024-05-02 18:45:12 +00:00
|
|
|
add_custom_target(HogFull
|
2024-05-07 16:18:49 +00:00
|
|
|
COMMAND $<TARGET_FILE:HogMaker>
|
|
|
|
"$<TARGET_FILE_DIR:Descent3>/d3-${HOG_NAME}.hog"
|
|
|
|
"${CMAKE_SOURCE_DIR}/scripts/data/fullhog/d3-${HOG_NAME}-fullhog.txt"
|
|
|
|
"${CMAKE_BINARY_DIR}/scripts/"
|
|
|
|
DEPENDS ${SCRIPTS} HogMaker data/fullhog/d3-${HOG_NAME}-fullhog.txt
|
2024-05-02 18:45:12 +00:00
|
|
|
COMMENT "Generate fullhog/d3-${HOG_NAME}.hog"
|
|
|
|
)
|
2024-04-16 03:43:29 +00:00
|
|
|
|
2024-05-02 18:45:12 +00:00
|
|
|
# FIXME: there may be only one d3-linux.hog, need deal with demo somehow.
|
|
|
|
# add_custom_target(HogLinuxDemo
|
2024-05-07 16:18:49 +00:00
|
|
|
# COMMAND $<TARGET_FILE:HogMaker>
|
|
|
|
# "${CMAKE_BINARY_DIR}/scripts/data/demohog/d3-${HOG_NAME}.hog"
|
|
|
|
# "${CMAKE_BINARY_DIR}/scripts/data/demohog/d3-${HOG_NAME}-demohog.txt"
|
|
|
|
# "${CMAKE_BINARY_DIR}/scripts/"
|
|
|
|
# DEPENDS ${SCRIPTS} HogMaker data/fullhog/d3-${HOG_NAME}-demohog.txt
|
2024-05-02 18:45:12 +00:00
|
|
|
# COMMENT "Generate linuxdemohog/d3-${HOG_NAME}.hog"
|
|
|
|
# )
|