mirror of
https://github.com/kevinbentley/Descent3.git
synced 2025-01-22 19:55:23 +00:00
c2b71b8147
lowercase function names, blocks indent
112 lines
2.7 KiB
CMake
112 lines
2.7 KiB
CMake
|
|
add_definitions (-DCHECKSUM=2273873307UL)
|
|
set(HEADERS)
|
|
set(CPPS)
|
|
if(UNIX)
|
|
set (CPPS
|
|
linux_lib.cpp)
|
|
endif()
|
|
|
|
set(SCRIPTS
|
|
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)
|
|
|
|
foreach(SCRIPT ${SCRIPTS})
|
|
add_library(${SCRIPT} SHARED ${CPPS} "${SCRIPT}.cpp")
|
|
set_target_properties(${SCRIPT} PROPERTIES PREFIX "")
|
|
if(UNIX)
|
|
add_custom_command(
|
|
TARGET ${SCRIPT}
|
|
POST_BUILD
|
|
COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:${SCRIPT}> "${CMAKE_SOURCE_DIR}/scripts/data/linuxfullhog/"
|
|
COMMENT "Copying file ${SCRIPT} to hogfile directory..."
|
|
)
|
|
add_custom_command(
|
|
TARGET ${SCRIPT}
|
|
POST_BUILD
|
|
COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:${SCRIPT}> "${CMAKE_SOURCE_DIR}/scripts/data/linuxdemohog/"
|
|
)
|
|
endif()
|
|
endforeach()
|
|
|
|
if(UNIX AND NOT APPLE)
|
|
set(HOGBUILDCMD "${CMAKE_SOURCE_DIR}/scripts/hogutils/hogUtils-i686")
|
|
set(HOGARCH "linux")
|
|
|
|
add_custom_target("FullLinuxHog"
|
|
ALL
|
|
COMMAND ${HOGBUILDCMD} "--makehog" "d3linuxfullhog.txt"
|
|
COMMAND ${CMAKE_COMMAND} -E remove "${CMAKE_SOURCE_DIR}/scripts/data/linuxfullhog/d3-${HOGARCH}.hog"
|
|
COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_SOURCE_DIR}/scripts/data/linuxfullhog/new.hog" "${CMAKE_SOURCE_DIR}/scripts/data/linuxfullhog/d3-${HOGARCH}.hog"
|
|
COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_SOURCE_DIR}/scripts/data/linuxfullhog/d3-${HOGARCH}.hog" "${CMAKE_BINARY_DIR}"
|
|
COMMAND ${CMAKE_COMMAND} -E remove "${CMAKE_SOURCE_DIR}/scripts/data/linuxfullhog/new.hog"
|
|
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}/scripts/data/linuxfullhog/"
|
|
DEPENDS ${SCRIPTS}
|
|
COMMENT "Building platform specific hog."
|
|
)
|
|
add_custom_target("DemoLinuxHog"
|
|
ALL
|
|
COMMAND ${HOGBUILDCMD} "--makehog" "d3linuxdemohog.txt"
|
|
COMMAND ${CMAKE_COMMAND} -E remove "${CMAKE_SOURCE_DIR}/scripts/data/linuxdemohog/d3-${HOGARCH}.hog"
|
|
COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_SOURCE_DIR}/scripts/data/linuxdemohog/new.hog" "${CMAKE_SOURCE_DIR}/scripts/data/linuxdemohog/d3-${HOGARCH}.hog"
|
|
COMMAND ${CMAKE_COMMAND} -E remove "${CMAKE_SOURCE_DIR}/scripts/data/linuxdemohog/new.hog"
|
|
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}/scripts/data/linuxdemohog/"
|
|
DEPENDS ${SCRIPTS}
|
|
COMMENT "Building platform specific hog."
|
|
)
|
|
endif()
|