2016-04-01 21:16:34 +02:00
cmake_minimum_required ( VERSION 2.8.7 )
project ( SeriousEngine )
# Set @rpath for Mac OS X shared library install names.
2016-04-03 03:54:38 +02:00
#cmake_policy(SET CMP0042 NEW)
2016-04-01 21:16:34 +02:00
2016-04-12 07:21:25 +02:00
# Use system SDL2 is on by default
2016-04-20 00:16:45 +02:00
option ( USE_SYSTEM_SDL2 "Use systems sdl2 development files" On )
option ( USE_SYSTEM_ZLIB "Use systems zlib development files" On )
2016-04-12 07:21:25 +02:00
2016-04-15 23:01:30 +02:00
# fallback for cmake versions without add_compile_options # RAKE! Borrowed from dhewm3 project
if ( NOT COMMAND add_compile_options )
function ( add_compile_options )
foreach ( arg ${ ARGN } )
set ( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${arg}" PARENT_SCOPE )
set ( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${arg}" PARENT_SCOPE )
endforeach ( )
endfunction ( )
endif ( )
2016-04-12 07:21:25 +02:00
set ( CMAKE_MODULE_PATH ${ CMAKE_MODULE_PATH } "${CMAKE_SOURCE_DIR}/cmake" )
2016-04-15 23:01:30 +02:00
include ( CheckCXXCompilerFlag )
2016-04-12 07:21:25 +02:00
2016-04-21 17:40:42 +02:00
# ssam expects the libs to be in Debug/
set ( CMAKE_LIBRARY_OUTPUT_DIRECTORY ${ PROJECT_BINARY_DIR } /Debug )
2016-04-12 07:21:25 +02:00
# Use systemwide SDL2 or custom build
# RAKE!: Find a way to use their custom built library if
# they want to use that instead or if their system only
2016-04-19 03:46:10 +02:00
# allows for a setup like this. Maybe use a SDL2_DIR var or
# some thing set in the system enviroment.
2016-04-12 07:21:25 +02:00
if ( NOT USE_SYSTEM_SDL2 )
include_directories ( ${ CMAKE_SOURCE_DIR } /External/SDL2 )
else ( )
find_package ( SDL2 REQUIRED )
if ( SDL2_FOUND )
include_directories ( ${ SDL2_INCLUDE_DIR } )
else ( )
2016-04-20 00:16:45 +02:00
message ( FATAL_ERROR "Error USE_SYSTEM_SDL2 is set but neccessary developer files are missing" )
endif ( )
endif ( )
if ( USE_SYSTEM_ZLIB )
find_package ( ZLIB REQUIRED )
if ( ZLIB_FOUND )
include_directories ( ${ ZLIB_INCLUDE_DIRS } )
else ( )
message ( FATAL_ERROR "Error! USE_SYSTEM_ZLIB is set but neccessary developer files are missing" )
2016-04-12 07:21:25 +02:00
endif ( )
endif ( )
2016-04-01 21:16:34 +02:00
2016-04-19 10:25:38 +02:00
# RAKE! Where to install the binaries.
2016-04-19 10:43:59 +02:00
if ( CMAKE_INSTALL_PREFIX STREQUAL "/usr/local" OR CMAKE_INSTALL_PREFIX STREQUAL "" ) # Only works for linux since I don't
# know what default is for windows/macos/freebsd.
2016-04-19 10:25:38 +02:00
set ( CMAKE_INSTALL_PREFIX "${CMAKE_SOURCE_DIR}/../" ) # set install path to project root directory since
# since one wasn't set during config
set ( LOCAL_INSTALL TRUE )
endif ( )
2016-04-01 21:16:34 +02:00
# Set up some sanity stuff...
2016-04-05 02:34:34 +02:00
if ( CMAKE_SYSTEM_NAME STREQUAL "Linux" OR CMAKE_SYSTEM_NAME MATCHES "GNU|kFreeBSD" )
2016-04-01 21:16:34 +02:00
SET ( LINUX TRUE )
endif ( )
2016-04-12 19:21:10 +02:00
if ( CMAKE_SYSTEM_NAME STREQUAL "FreeBSD" )
SET ( FREEBSD TRUE )
endif ( )
2016-04-01 21:16:34 +02:00
if ( APPLE )
SET ( MACOSX TRUE )
endif ( )
if ( MSVC )
SET ( WINDOWS TRUE )
endif ( )
if ( NOT CMAKE_BUILD_TYPE )
set ( CMAKE_BUILD_TYPE Debug CACHE STRING "None Debug Release RelWithDebInfo MinSizeRel" FORCE )
endif ( )
SET ( DEBUG FALSE )
if ( CMAKE_BUILD_TYPE STREQUAL "Debug" )
SET ( DEBUG TRUE )
endif ( )
2016-04-15 23:01:30 +02:00
## ** RAKE! start compiler specific flags section **
## ** RAKE! Borrowed from dhewm3 project, need to **
## ** RAKE! clean up for SeriousEngine use. Also **
## ** RAKE! need to make this pandora safe. **
# compiler specific flags
if ( CMAKE_COMPILER_IS_GNUCC OR CMAKE_C_COMPILER_ID STREQUAL "Clang" )
2016-04-16 04:54:34 +02:00
# This section and the like are for flags/defines that can be shared between
# c and c++ compile options
2016-04-15 23:01:30 +02:00
add_compile_options ( -Wall )
add_compile_options ( -pipe )
add_compile_options ( -fPIC )
add_compile_options ( -march=native )
2016-04-20 00:16:45 +02:00
add_compile_options ( -fno-strict-aliasing )
2016-04-15 23:01:30 +02:00
add_definitions ( -D_REENTRANT=1 )
add_definitions ( -D_MT=1 )
2016-04-20 00:16:45 +02:00
## Add your custom C and CXX flags on the command line aka -DCMAKE_C_FLAGS=-std=c98 or -DCMAKE_CXX_FLAGS=-std=c++11
2016-04-15 23:01:30 +02:00
## For C flags
2016-04-20 00:16:45 +02:00
set ( CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS} -g -D_DEBUG=1 -DDEBUG=1 -O0" )
set ( CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS} -DNDEBUG=1 -D_NDEBUG=1 -O3 -fno-unsafe-math-optimizations" )
set ( CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS} -DNDEBUG=1 -D_NDEBUG=1 -g -O3 -fno-unsafe-math-optimizations" )
set ( CMAKE_C_FLAGS_MINSIZEREL "${CMAKE_C_FLAGS} -DNDEBUG=1 -D_NDEBUG=1 -Os -fno-unsafe-math-optimizations" )
2016-04-15 23:01:30 +02:00
## For C++ flags
2016-04-20 00:16:45 +02:00
set ( CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS} -g -D_DEBUG=1 -DDEBUG=1 -O0" )
set ( CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS} -DNDEBUG=1 -D_NDEBUG=1 -O3 -fno-unsafe-math-optimizations" )
set ( CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS} -DNDEBUG=1 -D_NDEBUG=1 -g -O3 -fno-unsafe-math-optimizations" ) ## RAKE! Does -DNDEBUG=1 and -D_NDEBUG=1 mess with RelWithDebInfo?
set ( CMAKE_CXX_FLAGS_MINSIZEREL "${CMAKE_CXX_FLAGS} -DNDEBUG=1 -D_NDEBUG=1 -Os -fno-unsafe-math-optimizations" )
2016-04-15 23:01:30 +02:00
# TODO fix these warnings
add_compile_options ( -Wno-sign-compare )
add_compile_options ( -Wno-switch )
add_compile_options ( -Wno-format-security )
2016-04-21 17:40:42 +02:00
add_definitions ( -Wno-logical-op-parentheses )
MESSAGE ( WARNING, "re-enable -Wlogical-op-parentheses some day!" )
2016-04-15 23:01:30 +02:00
if ( MACOSX )
add_definitions ( -DPLATFORM_UNIX=1 )
add_definitions ( -DPLATFORM_MACOSX=1 )
add_definitions ( -DPRAGMA_ONCE=1 )
elseif ( WINDOWS )
add_definitions ( -DPLATFORM_WIN32=1 )
add_definitions ( -DPRAGMA_ONCE=1 )
2016-04-20 00:16:45 +02:00
add_definitions ( -D_CRT_SECURE_NO_WARNINGS=1 )
add_definitions ( -D_CRT_SECURE_NO_DEPRECATE=1 )
2016-04-15 23:01:30 +02:00
elseif ( LINUX )
set ( CMAKE_SKIP_RPATH ON CACHE BOOL "Skip RPATH" FORCE )
add_definitions ( -DPLATFORM_UNIX=1 )
add_definitions ( -D_FILE_OFFSET_BITS=64 )
add_definitions ( -D_LARGEFILE_SOURCE=1 )
add_definitions ( -DPRAGMA_ONCE=1 )
elseif ( FREEBSD )
set ( CMAKE_SKIP_RPATH ON CACHE BOOL "Skip RPATH" FORCE )
add_definitions ( -DPLATFORM_UNIX=1 )
add_definitions ( -DPLATFORM_FREEBSD=1 )
add_definitions ( -D_FILE_OFFSET_BITS=64 )
add_definitions ( -D_LARGEFILE_SOURCE=1 )
add_definitions ( -DPRAGMA_ONCE=1 )
include_directories ( "/usr/local/include" )
endif ( )
2016-04-20 00:16:45 +02:00
if ( MACOSX OR LINUX OR FREEBSD )
2016-04-15 23:01:30 +02:00
add_compile_options ( -pthread )
2016-04-20 00:16:45 +02:00
add_compile_options ( -fsigned-char )
2016-04-15 23:01:30 +02:00
endif ( )
if ( CMAKE_COMPILER_IS_GNUCC )
# !!! FIXME: turn a bunch of these off, this is just for now. I hope. --ryan.
add_compile_options ( -Wno-invalid-offsetof )
endif ( )
if ( CMAKE_CXX_COMPILER_ID MATCHES "Clang" )
# !!! FIXME: turn a bunch of these off, this is just for now. I hope. --ryan.
add_compile_options ( -Wno-unused-value )
add_compile_options ( -Wno-switch )
add_compile_options ( -Wno-tautological-undefined-compare )
add_compile_options ( -Wno-c++11-compat-deprecated-writable-strings )
add_definitions ( -Wno-logical-op-parentheses )
MESSAGE ( WARNING "reenable -Wlogical-op-parentheses some day!" )
endif ( )
2016-04-19 03:46:10 +02:00
elseif ( MSVC ) # RAKE! I don't know if this will build with MSVC
2016-04-15 23:01:30 +02:00
add_compile_options ( /W4 )
add_compile_options ( /wd4100 ) # unreferenced formal parameter
add_compile_options ( /wd4127 ) # conditional expression is constant
add_compile_options ( /wd4244 ) # possible loss of data
add_compile_options ( /wd4245 ) # signed/unsigned mismatch
add_compile_options ( /wd4267 ) # possible loss of data
add_compile_options ( /wd4714 ) # 'function' marked as __forceinline not inlined
add_compile_options ( /wd4996 ) # 'function': was declared deprecated
add_compile_options ( /wd4068 ) # unknown pragma
2016-04-19 03:46:10 +02:00
set ( CMAKE_C_FLAGS_DEBUG "-D_DEBUG /Od /Zi /MDd" )
2016-04-15 23:01:30 +02:00
set ( CMAKE_C_FLAGS_RELEASE "/Ox /Oy /MD" )
set ( CMAKE_C_FLAGS_RELWITHDEBINFO "/Ox /Oy /Zi /MD" )
set ( CMAKE_C_FLAGS_MINSIZEREL "/Ox /Oy /Os /MD" )
else ( )
message ( FATAL_ERROR "Unsupported compiler" )
endif ( )
## ** RAKE! end compiler specific flags section **
2016-04-01 21:16:34 +02:00
if ( DEBUG )
set ( DEBUGSUFFIX "D" )
else ( )
set ( DEBUGSUFFIX "" )
endif ( )
2016-04-21 17:40:42 +02:00
# This should not be needed anymore, but might be faster on 32bit x86
option ( USE_I386_ASM "Use X86 ASM" FALSE )
2016-04-01 21:16:34 +02:00
if ( USE_I386_ASM )
# You need the Netwide Assembler (NASM) to build this on Intel systems.
# http://nasm.sf.net/
add_definitions ( -DUSE_I386_ASM=1 )
if ( MACOSX )
set ( ASMOBJFMT "macho" )
list ( APPEND ASMFLAGS --prefix _ )
elseif ( WINDOWS )
set ( ASMOBJFMT "win32" )
else ( )
set ( ASMOBJFMT "elf" )
endif ( )
2016-04-21 17:40:42 +02:00
MESSAGE ( STATUS "Using i386 assembler" )
2016-04-01 21:16:34 +02:00
else ( )
add_definitions ( -DUSE_PORTABLE_C=1 )
2016-04-21 17:40:42 +02:00
MESSAGE ( STATUS "Using portable C instead of ASM" )
2016-04-01 21:16:34 +02:00
endif ( )
2016-04-06 13:31:53 +02:00
option ( PANDORA "Compile for Pandora" FALSE )
if ( PANDORA )
2016-04-06 19:40:08 +02:00
add_definitions ( -DPLATFORM_PANDORA=1 )
2016-04-06 13:31:53 +02:00
endif ( )
2016-04-01 21:16:34 +02:00
2016-04-06 13:31:53 +02:00
option ( USE_TREMOR "Use Tremor instead of Vorbis" FALSE )
if ( USE_TREMOR )
add_definitions ( -DUSE_TREMOR=1 )
endif ( )
2016-04-08 00:11:36 +02:00
option ( TFE "Compile a The First Encounter version" FALSE )
if ( TFE )
add_definitions ( -DFIRST_ENCOUNTER=1 )
set ( MP "" )
else ( )
set ( MP "MP" )
endif ( )
2016-04-01 21:16:34 +02:00
# !!! FIXME: I currently force this, but you shouldn't _have_ to.
2016-04-12 22:29:39 +02:00
option ( USE_SINGLE_THREAD "Use Single Threaded version" TRUE )
if ( USE_SINGLE_THREAD )
add_definitions ( -DSINGLE_THREADED=1 )
endif ( )
2016-04-01 21:16:34 +02:00
include_directories (
.
2016-04-12 07:21:25 +02:00
$ { C M A K E _ S O U R C E _ D I R } / E x t e r n a l / l i b o g g / i n c l u d e
2016-04-01 21:16:34 +02:00
)
2016-04-06 13:31:53 +02:00
if ( USE_TREMOR )
if ( PANDORA )
include_directories ( /mnt/utmp/codeblocks/usr/include/tremor )
else ( )
# !!!Do something here!
endif ( )
else ( )
include_directories ( External/libvorbis/include )
endif ( )
2016-04-01 21:16:34 +02:00
# We build ECC, then use it to generate C++ code for the game entities...
macro ( add_parser_and_scanner _PARSER _SCANNER )
add_custom_command (
O U T P U T " $ { C M A K E _ C U R R E N T _ S O U R C E _ D I R } / $ { _ S C A N N E R } . c p p "
M A I N _ D E P E N D E N C Y " $ { C M A K E _ C U R R E N T _ S O U R C E _ D I R } / $ { _ S C A N N E R } . l "
W O R K I N G _ D I R E C T O R Y " $ { C M A K E _ C U R R E N T _ S O U R C E _ D I R } "
C O M M A N D f l e x
A R G S - o $ { _ S C A N N E R } . c p p $ { _ S C A N N E R } . l
)
add_custom_command (
O U T P U T " $ { C M A K E _ C U R R E N T _ S O U R C E _ D I R } / $ { _ P A R S E R } . c p p " " $ { C M A K E _ C U R R E N T _ S O U R C E _ D I R } / $ { _ P A R S E R } . h p p "
M A I N _ D E P E N D E N C Y " $ { C M A K E _ C U R R E N T _ S O U R C E _ D I R } / $ { _ P A R S E R } . y "
W O R K I N G _ D I R E C T O R Y " $ { C M A K E _ C U R R E N T _ S O U R C E _ D I R } "
C O M M A N D b i s o n
A R G S - o $ { _ P A R S E R } . c p p $ { _ P A R S E R } . y - d
)
add_custom_command (
O U T P U T " $ { C M A K E _ C U R R E N T _ S O U R C E _ D I R } / $ { _ P A R S E R } . h "
M A I N _ D E P E N D E N C Y " $ { C M A K E _ C U R R E N T _ S O U R C E _ D I R } / $ { _ P A R S E R } . h p p "
W O R K I N G _ D I R E C T O R Y " $ { C M A K E _ C U R R E N T _ S O U R C E _ D I R } "
C O M M A N D $ { C M A K E _ C O M M A N D }
A R G S - E c o p y $ { _ P A R S E R } . h p p $ { _ P A R S E R } . h
)
endmacro ( )
2016-04-05 18:06:18 +02:00
# Build ECC from source if there wasn't a prebuilt-one specified on the command line.
# Normally we build it here, but we might need a prebuilt, native binary if
# we're cross-compiling the rest of the game.
if ( NOT ECC )
add_parser_and_scanner ( "Ecc/Parser" "Ecc/Scanner" )
add_executable ( ecc Ecc/Main.cpp Ecc/Parser.cpp Ecc/Parser.h Ecc/Scanner.cpp )
set ( ECC "ecc" )
endif ( )
2016-04-01 21:16:34 +02:00
macro ( entity _NAME )
add_custom_command (
O U T P U T " $ { C M A K E _ C U R R E N T _ S O U R C E _ D I R } / $ { _ N A M E } . c p p " " $ { C M A K E _ C U R R E N T _ S O U R C E _ D I R } / $ { _ N A M E } . h " " $ { C M A K E _ C U R R E N T _ S O U R C E _ D I R } / $ { _ N A M E } _ t a b l e s . h "
M A I N _ D E P E N D E N C Y " $ { C M A K E _ C U R R E N T _ S O U R C E _ D I R } / $ { _ N A M E } . e s "
2016-04-05 18:06:18 +02:00
D E P E N D S $ { E C C }
2016-04-01 21:16:34 +02:00
W O R K I N G _ D I R E C T O R Y " $ { C M A K E _ C U R R E N T _ S O U R C E _ D I R } "
2016-04-05 18:06:18 +02:00
C O M M A N D $ { E C C }
2016-04-01 21:16:34 +02:00
A R G S " $ { _ N A M E } . e s "
)
list ( APPEND ENTITIES_CPP "${CMAKE_CURRENT_SOURCE_DIR}/${_NAME}.cpp" )
list ( APPEND ENTITIES_H "${CMAKE_CURRENT_SOURCE_DIR}/${_NAME}.h" )
list ( APPEND ENTITIES_H "${CMAKE_CURRENT_SOURCE_DIR}/${_NAME}_tables.h" )
endmacro ( )
set ( ENTITIES_CPP "" )
set ( ENTITIES_H "" )
entity ( Engine/Classes/BaseEvents )
entity ( Engine/Classes/MovableBrushEntity )
entity ( Engine/Classes/MovableEntity )
entity ( Engine/Classes/MovableModelEntity )
entity ( Engine/Classes/PlayerEntity )
set ( ENGINE_ENTITIES_CPP ${ ENTITIES_CPP } )
set ( ENTITIES_CPP "" )
2016-04-08 00:11:36 +02:00
if ( TFE )
entity ( Entities/Acid )
entity ( Entities/AirWave )
entity ( Entities/AmmoItem )
entity ( Entities/AmmoPack )
entity ( Entities/AnimationChanger )
entity ( Entities/AnimationHub )
entity ( Entities/ArmorItem )
entity ( Entities/BackgroundViewer )
entity ( Entities/BasicEffects )
entity ( Entities/Beast )
entity ( Entities/BigHead )
entity ( Entities/BlendController )
entity ( Entities/BloodSpray )
entity ( Entities/Boneman )
entity ( Entities/Bouncer )
entity ( Entities/Bullet )
entity ( Entities/Camera )
entity ( Entities/CameraMarker )
entity ( Entities/CannonBall )
entity ( Entities/Catman )
entity ( Entities/Copier )
entity ( Entities/Counter )
entity ( Entities/CrateRider )
entity ( Entities/CyborgBike )
entity ( Entities/Cyborg )
entity ( Entities/Damager )
entity ( Entities/Debris )
entity ( Entities/DestroyableArchitecture )
entity ( Entities/Devil )
entity ( Entities/DevilMarker )
entity ( Entities/DevilProjectile )
entity ( Entities/DoorController )
entity ( Entities/Dragonman )
entity ( Entities/EffectMarker )
entity ( Entities/Effector )
entity ( Entities/Elemental )
entity ( Entities/EnemyBase )
entity ( Entities/EnemyCounter )
entity ( Entities/EnemyDive )
entity ( Entities/EnemyFly )
entity ( Entities/EnemyMarker )
entity ( Entities/EnemyRunInto )
entity ( Entities/EnemySpawner )
entity ( Entities/EnvironmentBase )
entity ( Entities/EnvironmentMarker )
entity ( Entities/Eruptor )
entity ( Entities/Eyeman )
entity ( Entities/Fish )
entity ( Entities/Fishman )
entity ( Entities/Flame )
entity ( Entities/FogMarker )
#entity(Entities/GhostBusterRay)
entity ( Entities/Gizmo )
entity ( Entities/Global )
entity ( Entities/GradientMarker )
entity ( Entities/GravityMarker )
entity ( Entities/GravityRouter )
entity ( Entities/HazeMarker )
entity ( Entities/Headman )
entity ( Entities/HealthItem )
entity ( Entities/Huanman )
entity ( Entities/Item )
entity ( Entities/KeyItem )
entity ( Entities/Light )
entity ( Entities/Lightning )
entity ( Entities/LightStyle )
entity ( Entities/Mamut )
entity ( Entities/Mamutman )
entity ( Entities/Mantaman )
entity ( Entities/Marker )
entity ( Entities/MessageHolder )
entity ( Entities/MessageItem )
entity ( Entities/MirrorMarker )
entity ( Entities/ModelDestruction )
entity ( Entities/ModelHolder2 )
entity ( Entities/ModelHolder )
entity ( Entities/MovingBrush )
entity ( Entities/MovingBrushMarker )
entity ( Entities/MusicChanger )
entity ( Entities/MusicHolder )
entity ( Entities/NavigationMarker )
entity ( Entities/ParticlesHolder )
entity ( Entities/Pendulum )
entity ( Entities/Pipebomb )
entity ( Entities/PlayerActionMarker )
entity ( Entities/PlayerAnimator )
entity ( Entities/Player )
entity ( Entities/PlayerMarker )
entity ( Entities/PlayerView )
entity ( Entities/PlayerWeaponsEffects )
entity ( Entities/PlayerWeapons )
entity ( Entities/Projectile )
entity ( Entities/PyramidSpaceShip )
entity ( Entities/PyramidSpaceShipMarker )
entity ( Entities/Reminder )
entity ( Entities/RobotDriving )
entity ( Entities/RobotFixed )
entity ( Entities/RobotFlying )
entity ( Entities/RollingStone )
entity ( Entities/Scorpman )
entity ( Entities/Ship )
entity ( Entities/ShipMarker )
entity ( Entities/SoundHolder )
entity ( Entities/StormController )
entity ( Entities/Switch )
entity ( Entities/Teleport )
entity ( Entities/TouchField )
entity ( Entities/Trigger )
entity ( Entities/Twister )
entity ( Entities/VoiceHolder )
entity ( Entities/Walker )
entity ( Entities/Watcher )
entity ( Entities/WatchPlayers )
entity ( Entities/Water )
entity ( Entities/WeaponItem )
entity ( Entities/Werebull )
entity ( Entities/Woman )
entity ( Entities/WorldBase )
entity ( Entities/WorldLink )
entity ( Entities/WorldSettingsController )
else ( )
entity ( EntitiesMP/AirElemental )
entity ( EntitiesMP/AirShockwave )
entity ( EntitiesMP/AmmoItem )
entity ( EntitiesMP/AmmoPack )
entity ( EntitiesMP/AnimationChanger )
entity ( EntitiesMP/AnimationHub )
entity ( EntitiesMP/AreaMarker )
entity ( EntitiesMP/ArmorItem )
entity ( EntitiesMP/BackgroundViewer )
entity ( EntitiesMP/BasicEffects )
entity ( EntitiesMP/Beast )
entity ( EntitiesMP/BigHead )
entity ( EntitiesMP/BlendController )
entity ( EntitiesMP/BloodSpray )
entity ( EntitiesMP/Boneman )
entity ( EntitiesMP/Bouncer )
entity ( EntitiesMP/Bullet )
entity ( EntitiesMP/Camera )
entity ( EntitiesMP/CameraMarker )
entity ( EntitiesMP/CannonBall )
entity ( EntitiesMP/CannonRotating )
entity ( EntitiesMP/CannonStatic )
entity ( EntitiesMP/ChainsawFreak )
entity ( EntitiesMP/Copier )
entity ( EntitiesMP/Counter )
entity ( EntitiesMP/CrateBus )
entity ( EntitiesMP/CrateRider )
entity ( EntitiesMP/CreditsHolder )
entity ( EntitiesMP/Damager )
entity ( EntitiesMP/Debris )
entity ( EntitiesMP/DebugEntityStatesDisplay )
entity ( EntitiesMP/Demon )
entity ( EntitiesMP/DestroyableArchitecture )
entity ( EntitiesMP/Devil )
entity ( EntitiesMP/DevilMarker )
entity ( EntitiesMP/DevilProjectile )
entity ( EntitiesMP/DoorController )
entity ( EntitiesMP/Dragonman )
entity ( EntitiesMP/EffectMarker )
entity ( EntitiesMP/Effector )
entity ( EntitiesMP/Elemental )
entity ( EntitiesMP/EnemyBase )
entity ( EntitiesMP/EnemyCounter )
entity ( EntitiesMP/EnemyDive )
entity ( EntitiesMP/EnemyFly )
entity ( EntitiesMP/EnemyMarker )
entity ( EntitiesMP/EnemyRunInto )
entity ( EntitiesMP/EnemySpawner )
entity ( EntitiesMP/EnvironmentBase )
entity ( EntitiesMP/EnvironmentMarker )
entity ( EntitiesMP/EnvironmentParticlesHolder )
entity ( EntitiesMP/Eruptor )
entity ( EntitiesMP/ExotechLarva )
entity ( EntitiesMP/ExotechLarvaBattery )
entity ( EntitiesMP/ExotechLarvaCharger )
entity ( EntitiesMP/Eyeman )
entity ( EntitiesMP/Fireworks )
entity ( EntitiesMP/Fish )
entity ( EntitiesMP/Flame )
entity ( EntitiesMP/FogMarker )
entity ( EntitiesMP/Gizmo )
entity ( EntitiesMP/Global )
entity ( EntitiesMP/GradientMarker )
entity ( EntitiesMP/GravityMarker )
entity ( EntitiesMP/GravityRouter )
entity ( EntitiesMP/Grunt )
entity ( EntitiesMP/GruntSka )
entity ( EntitiesMP/Guffy )
entity ( EntitiesMP/HazeMarker )
entity ( EntitiesMP/Headman )
entity ( EntitiesMP/HealthItem )
entity ( EntitiesMP/HudPicHolder )
entity ( EntitiesMP/Item )
entity ( EntitiesMP/KeyItem )
entity ( EntitiesMP/LarvaOffspring )
entity ( EntitiesMP/Light )
entity ( EntitiesMP/Lightning )
entity ( EntitiesMP/Marker )
entity ( EntitiesMP/MessageHolder )
entity ( EntitiesMP/MessageItem )
entity ( EntitiesMP/MeteorShower )
entity ( EntitiesMP/MirrorMarker )
entity ( EntitiesMP/ModelDestruction )
entity ( EntitiesMP/ModelHolder )
entity ( EntitiesMP/ModelHolder2 )
entity ( EntitiesMP/ModelHolder3 )
entity ( EntitiesMP/MovingBrush )
entity ( EntitiesMP/MovingBrushMarker )
entity ( EntitiesMP/MusicChanger )
entity ( EntitiesMP/MusicHolder )
entity ( EntitiesMP/NavigationMarker )
entity ( EntitiesMP/ParticlesHolder )
entity ( EntitiesMP/Pendulum )
entity ( EntitiesMP/PhotoAlbum )
entity ( EntitiesMP/Pipebomb )
entity ( EntitiesMP/Player )
entity ( EntitiesMP/PlayerActionMarker )
entity ( EntitiesMP/PlayerAnimator )
entity ( EntitiesMP/PlayerMarker )
entity ( EntitiesMP/PlayerView )
entity ( EntitiesMP/PlayerWeapons )
entity ( EntitiesMP/PlayerWeaponsEffects )
entity ( EntitiesMP/PowerUpItem )
entity ( EntitiesMP/Projectile )
entity ( EntitiesMP/PyramidSpaceShip )
entity ( EntitiesMP/PyramidSpaceShipMarker )
entity ( EntitiesMP/Reminder )
entity ( EntitiesMP/RollingStone )
entity ( EntitiesMP/Santa )
entity ( EntitiesMP/Scorpman )
entity ( EntitiesMP/ScrollHolder )
entity ( EntitiesMP/SeriousBomb )
entity ( EntitiesMP/Ship )
entity ( EntitiesMP/ShipMarker )
entity ( EntitiesMP/Shooter )
entity ( EntitiesMP/SoundHolder )
entity ( EntitiesMP/SpawnerProjectile )
entity ( EntitiesMP/Spinner )
entity ( EntitiesMP/StormController )
entity ( EntitiesMP/Summoner )
entity ( EntitiesMP/SummonerMarker )
entity ( EntitiesMP/Switch )
entity ( EntitiesMP/TacticsChanger )
entity ( EntitiesMP/TacticsHolder )
entity ( EntitiesMP/Teleport )
entity ( EntitiesMP/Terrain )
entity ( EntitiesMP/TextFXHolder )
entity ( EntitiesMP/TimeController )
entity ( EntitiesMP/TouchField )
entity ( EntitiesMP/Trigger )
entity ( EntitiesMP/Twister )
entity ( EntitiesMP/VoiceHolder )
entity ( EntitiesMP/Walker )
entity ( EntitiesMP/WatchPlayers )
entity ( EntitiesMP/Watcher )
entity ( EntitiesMP/Water )
entity ( EntitiesMP/WeaponItem )
entity ( EntitiesMP/Werebull )
entity ( EntitiesMP/Woman )
entity ( EntitiesMP/WorldBase )
entity ( EntitiesMP/WorldLink )
entity ( EntitiesMP/WorldSettingsController )
endif ( )
2016-04-01 21:16:34 +02:00
2016-04-05 18:06:18 +02:00
add_custom_target ( ParseEntities DEPENDS ${ ENTITIES_H } )
2016-04-01 21:16:34 +02:00
2016-04-08 00:11:36 +02:00
set ( ENTITIESMPLIB "Entities${MP}${DEBUGSUFFIX}" )
if ( TFE )
add_library ( ${ ENTITIESMPLIB } SHARED
$ { E N T I T I E S _ C P P }
E n t i t i e s / C o m m o n / C o m m o n . c p p
E n t i t i e s / C o m m o n / D e b r i s . c p p
E n t i t i e s / C o m m o n / P a r t i c l e s . c p p
E n t i t i e s / C o m m o n / S t a t s . c p p
E n t i t i e s / C o m m o n / P a t h F i n d i n g . c p p
E n t i t i e s / C o m m o n / H U D . c p p
)
else ( )
add_library ( ${ ENTITIESMPLIB } SHARED
$ { E N T I T I E S _ C P P }
E n t i t i e s M P / C o m m o n / C o m m o n . c p p
E n t i t i e s M P / C o m m o n / P a r t i c l e s . c p p
E n t i t i e s M P / C o m m o n / E m a n a t i n g P a r t i c l e s . c p p
E n t i t i e s M P / C o m m o n / P a t h F i n d i n g . c p p
E n t i t i e s M P / C o m m o n / H U D . c p p
)
endif ( )
2016-04-01 21:16:34 +02:00
if ( MACOSX )
target_link_libraries ( ${ ENTITIESMPLIB } "-undefined dynamic_lookup" )
endif ( )
2016-04-05 18:06:18 +02:00
add_dependencies ( ${ ENTITIESMPLIB } ParseEntities )
2016-04-01 21:16:34 +02:00
2016-04-08 00:11:36 +02:00
set ( GAMEMPLIB "Game${MP}${DEBUGSUFFIX}" )
2016-04-01 21:16:34 +02:00
add_library ( ${ GAMEMPLIB } SHARED
G a m e M P / C a m e r a . c p p
G a m e M P / C o m p M e s s a g e . c p p
G a m e M P / C o m p M o d e l s . c p p
G a m e M P / C o m p u t e r . c p p
G a m e M P / C o n s o l e . c p p
G a m e M P / C o n t r o l s . c p p
G a m e M P / G a m e . c p p
G a m e M P / L C D D r a w i n g . c p p
G a m e M P / L o a d i n g H o o k . c p p
G a m e M P / M a p . c p p
G a m e M P / S e s s i o n P r o p e r t i e s . c p p
G a m e M P / W E D I n t e r f a c e . c p p
)
if ( MACOSX )
target_link_libraries ( ${ GAMEMPLIB } "-undefined dynamic_lookup" )
endif ( )
2016-04-05 18:06:18 +02:00
add_dependencies ( ${ GAMEMPLIB } ParseEntities )
2016-04-01 21:16:34 +02:00
set ( SHADERSLIB "Shaders${DEBUGSUFFIX}" )
add_library ( ${ SHADERSLIB } SHARED
S h a d e r s / A d d S h a d e r . c p p
S h a d e r s / A d d S h a d e r D S . c p p
S h a d e r s / B a s e S h a d e r . c p p
S h a d e r s / B a s e S h a d e r D S . c p p
S h a d e r s / B a s e T r a n s p a r e n t . c p p
S h a d e r s / B a s e T r a n s p a r e n t D S . c p p
S h a d e r s / C o l o r S h a d e r . c p p
S h a d e r s / C o m m o n . c p p
S h a d e r s / D e t a i l S h a d e r . c p p
S h a d e r s / D i s p l a c e S h a d e r . c p p
S h a d e r s / I n v i s i b l e S h a d e r . c p p
S h a d e r s / M u l t i L a y e r S h a d e r . c p p
S h a d e r s / R e f l e c t i o n . c p p
S h a d e r s / R e f l e c t i o n D S . c p p
S h a d e r s / R e f t e c t i o n A n d S p e c u l a r . c p p
S h a d e r s / R e f t e c t i o n A n d S p e c u l a r D S . c p p
S h a d e r s / S p e c u l a r . c p p
S h a d e r s / S p e c u l a r D S . c p p
S h a d e r s / S t d H . c p p
S h a d e r s / T r a n s l u c e n t . c p p
)
if ( MACOSX )
target_link_libraries ( ${ SHADERSLIB } "-undefined dynamic_lookup" )
endif ( )
2016-04-05 18:06:18 +02:00
add_dependencies ( ${ SHADERSLIB } ParseEntities )
2016-04-01 21:16:34 +02:00
add_parser_and_scanner ( "Engine/Base/Parser" "Engine/Base/Scanner" )
add_parser_and_scanner ( "Engine/Ska/smcPars" "Engine/Ska/smcScan" )
if ( USE_I386_ASM )
add_custom_command (
O U T P U T " S o u n d M i x e r 3 8 6 . o "
M A I N _ D E P E N D E N C Y " $ { C M A K E _ C U R R E N T _ S O U R C E _ D I R } / E n g i n e / S o u n d / S o u n d M i x e r 3 8 6 . a s m "
C O M M A N D n a s m
A R G S $ { A S M F L A G S } - f $ { A S M O B J F M T } - o S o u n d M i x e r 3 8 6 . o $ { C M A K E _ C U R R E N T _ S O U R C E _ D I R } / E n g i n e / S o u n d / S o u n d M i x e r 3 8 6 . a s m
)
list ( APPEND ADDITIONAL_ENGINE_SRCS SoundMixer386.o )
endif ( )
2016-04-12 22:29:39 +02:00
if ( USE_SINGLE_THREAD )
set ( SYNCHRO_SRCS
E n g i n e / B a s e / N u l l S y n c h r o n i z a t i o n . c p p # single threaded.
)
else ( )
#!! TODO Win32/Linux case
set ( SYNCHRO_SRCS
E n g i n e / B a s e / U n i x / U n i x S y n c h r o n i z a t i o n . c p p # multithreaded Unix.
#Engine/Base/SDL/SDLSynchronization.cpp
#Engine/Base/SDL/SDLThreadLocalStorage.cpp # multithreaded Unix.
)
#Engine/Base/Registry.cpp # Windows only.
#Engine/Base/StackDump.cpp # Windows only.
#Engine/Base/Win32/Win32Synchronization.cpp # Windows only.
endif ( )
2016-04-20 00:16:45 +02:00
set ( ZLIB_SRCS "" )
if ( NOT USE_SYSTEM_ZLIB )
set ( ZLIB_SRCS
E n g i n e / z l i b / i n f l a t e . c
E n g i n e / z l i b / a d l e r 3 2 . c
E n g i n e / z l i b / i n f b l o c k . c
E n g i n e / z l i b / i n f f a s t . c
E n g i n e / z l i b / i n f t r e e s . c
E n g i n e / z l i b / t r e e s . c
E n g i n e / z l i b / c o m p r e s s . c
E n g i n e / z l i b / z u t i l . c
E n g i n e / z l i b / d e f l a t e . c
E n g i n e / z l i b / i n f c o d e s . c
E n g i n e / z l i b / i n f u t i l . c
E n g i n e / z l i b / u n c o m p r . c )
endif ( )
2016-04-03 03:55:48 +02:00
set ( ENGINE_SRCS
2016-04-01 21:16:34 +02:00
$ { E N G I N E _ E N T I T I E S _ C P P }
E n g i n e / E n g i n e . c p p
E n g i n e / B a s e / A n i m . c p p
E n g i n e / B a s e / C R C . c p p
E n g i n e / B a s e / C R C T a b l e . c p p
E n g i n e / B a s e / C h a n g e a b l e . c p p
E n g i n e / B a s e / C o n s o l e . c p p
E n g i n e / B a s e / D i r e c t o r y . c p p
E n g i n e / B a s e / E r r o r R e p o r t i n g . c p p
E n g i n e / B a s e / F i l e N a m e . c p p
E n g i n e / B a s e / I n p u t . c p p
E n g i n e / B a s e / L i s t s . c p p
E n g i n e / B a s e / M e m o r y . c p p
E n g i n e / B a s e / P r o f i l i n g . c p p
E n g i n e / B a s e / P r o g r e s s H o o k . c p p
E n g i n e / B a s e / P r o t e c t i o n . c p p
E n g i n e / B a s e / R e l a t i o n s . c p p
E n g i n e / B a s e / R e p l a c e F i l e . c p p
E n g i n e / B a s e / S e r i a l . c p p
E n g i n e / B a s e / S h e l l . c p p
E n g i n e / B a s e / S h e l l T y p e s . c p p
E n g i n e / B a s e / S t a t i s t i c s . c p p
E n g i n e / B a s e / S t r e a m . c p p
E n g i n e / B a s e / T i m e r . c p p
E n g i n e / B a s e / T r a n s l a t i o n . c p p
E n g i n e / B a s e / U n z i p . c p p
E n g i n e / B a s e / U p d a t e a b l e . c p p
E n g i n e / B a s e / C T S t r i n g . c p p
E n g i n e / B a s e / S c a n n e r . c p p
E n g i n e / B a s e / P a r s e r . c p p
E n g i n e / B a s e / P a r s e r . h
E n g i n e / B a s e / I F e e l . c p p
E n g i n e / B a s e / U n i x / U n i x F i l e S y s t e m . c p p
E n g i n e / B a s e / U n i x / U n i x D y n a m i c L o a d e r . c p p
E n g i n e / B a s e / S D L / S D L T i m e r . c p p
E n g i n e / B a s e / S D L / S D L I n p u t . c p p
E n g i n e / B a s e / S D L / S D L E v e n t s . c p p
2016-04-12 22:29:39 +02:00
$ { S Y N C H R O _ S R C S }
2016-04-01 21:16:34 +02:00
E n g i n e / B r u s h e s / B r u s h . c p p
E n g i n e / B r u s h e s / B r u s h I O . c p p
E n g i n e / B r u s h e s / B r u s h S h a d o w s . c p p
E n g i n e / B r u s h e s / B r u s h T r i a n g u l a r i z e . c p p
E n g i n e / B r u s h e s / B r u s h A r c h i v e . c p p
E n g i n e / B r u s h e s / B r u s h I m p o r t . c p p
E n g i n e / B r u s h e s / B r u s h M i p . c p p
E n g i n e / B r u s h e s / B r u s h P o l y g o n . c p p
E n g i n e / B r u s h e s / B r u s h E x p o r t . c p p
E n g i n e / B r u s h e s / B r u s h S e c t o r . c p p
E n g i n e / E n t i t i e s / E n t i t y . c p p
E n g i n e / E n t i t i e s / N e a r e s t P o l y g o n . c p p
E n g i n e / E n t i t i e s / E n t i t y P r o p e r t i e s . c p p
E n g i n e / E n t i t i e s / P l a y e r C h a r a c t e r . c p p
E n g i n e / E n t i t i e s / E n t i t y C l a s s . c p p
E n g i n e / E n t i t i e s / F i e l d B S P T e s t i n g . c p p
E n g i n e / E n t i t i e s / E n t i t y C o l l i s i o n . c p p
E n g i n e / E n t i t i e s / E n t i t y C o p y i n g . c p p
E n g i n e / E n t i t i e s / L a s t P o s i t i o n s . c p p
E n g i n e / M a t h / P r o j e c t i o n _ I s o m e t r i c . c p p
E n g i n e / M a t h / O b j e c t 3 D . c p p
E n g i n e / M a t h / P r o j e c t i o n _ P a r a l l e l . c p p
E n g i n e / M a t h / P r o j e c t i o n _ P e r s p e c t i v e . c p p
E n g i n e / M a t h / F l o a t . c p p
E n g i n e / M a t h / O b j e c t 3 D _ C S G . c p p
E n g i n e / M a t h / P r o j e c t i o n _ S i m p l e . c p p
E n g i n e / M a t h / P r o j e c t i o n _ S i m p l e _ D O U B L E . c p p
E n g i n e / M a t h / F u n c t i o n s . c p p
E n g i n e / M a t h / O b j e c t S e c t o r . c p p
E n g i n e / M a t h / P l a c e m e n t . c p p
E n g i n e / M a t h / T e x t u r e M a p p i n g . c p p
E n g i n e / M a t h / G e o m e t r y . c p p
E n g i n e / M a t h / P r o j e c t i o n . c p p
E n g i n e / M a t h / G e o m e t r y _ D O U B L E . c p p
#Engine/Math/Object3D_IO.cpp # Exploration 3D support.
#Engine/Models/EditModel.cpp
E n g i n e / M o d e l s / M o d e l . c p p
E n g i n e / M o d e l s / R e n d e r M o d e l _ V i e w . c p p
E n g i n e / M o d e l s / N o r m a l s . c p p
E n g i n e / M o d e l s / V e r t e x G e t t i n g . c p p
E n g i n e / M o d e l s / R e n d e r M o d e l . c p p
E n g i n e / M o d e l s / M i p M a k e r . c p p
E n g i n e / M o d e l s / M o d e l P r o f i l e . c p p
E n g i n e / M o d e l s / R e n d e r M o d e l _ M a s k . c p p
E n g i n e / L i g h t / L a y e r M a k e r . c p p
E n g i n e / L i g h t / L a y e r M i x e r . c p p
E n g i n e / L i g h t / L i g h t S o u r c e . c p p
E n g i n e / G r a p h i c s / A d a p t e r . c p p
E n g i n e / G r a p h i c s / R a s t e r . c p p
E n g i n e / G r a p h i c s / G f x L i b r a r y . c p p
E n g i n e / G r a p h i c s / B e n c h m a r k . c p p
E n g i n e / G r a p h i c s / G f x P r o f i l e . c p p
E n g i n e / G r a p h i c s / C o l o r . c p p
E n g i n e / G r a p h i c s / S h a d o w M a p . c p p
E n g i n e / G r a p h i c s / D e p t h C h e c k . c p p
E n g i n e / G r a p h i c s / T e x t u r e . c p p
E n g i n e / G r a p h i c s / D i s p l a y M o d e . c p p
E n g i n e / G r a p h i c s / G f x _ O p e n G L . c p p
E n g i n e / G r a p h i c s / G f x _ O p e n G L _ T e x t u r e s . c p p
E n g i n e / G r a p h i c s / T e x t u r e E f f e c t s . c p p
E n g i n e / G r a p h i c s / D r a w P o r t . c p p
E n g i n e / G r a p h i c s / G f x _ w r a p p e r . c p p
E n g i n e / G r a p h i c s / D r a w P o r t _ P a r t i c l e s . c p p
E n g i n e / G r a p h i c s / G r a p h i c s . c p p
E n g i n e / G r a p h i c s / V i e w P o r t . c p p
E n g i n e / G r a p h i c s / D r a w P o r t _ R e n d e r S c e n e . c p p
E n g i n e / G r a p h i c s / I m a g e I n f o . c p p
E n g i n e / G r a p h i c s / F o g . c p p
E n g i n e / G r a p h i c s / M u l t i M o n i t o r . c p p
E n g i n e / G r a p h i c s / F o n t . c p p
E n g i n e / G r a p h i c s / S h a d e r . c p p
E n g i n e / G r a p h i c s / S t e r e o . c p p
E n g i n e / G r a p h i c s / S D L / S D L O p e n G L . c p p
E n g i n e / G r a p h i c s / S D L / S D L A d a p t e r . c p p
E n g i n e / N e t w o r k / A c t i o n B u f f e r . c p p
E n g i n e / N e t w o r k / N e t w o r k M e s s a g e . c p p
E n g i n e / N e t w o r k / S e r v e r . c p p
E n g i n e / N e t w o r k / B u f f e r . c p p
E n g i n e / N e t w o r k / N e t w o r k P r o f i l e . c p p
E n g i n e / N e t w o r k / S e s s i o n S t a t e . c p p
E n g i n e / N e t w o r k / P l a y e r B u f f e r . c p p
E n g i n e / N e t w o r k / M e s s a g e D i s p a t c h e r . c p p
E n g i n e / N e t w o r k / P l a y e r S o u r c e . c p p
E n g i n e / N e t w o r k / C o m p r e s s i o n . c p p
E n g i n e / N e t w o r k / N e t w o r k . c p p
E n g i n e / N e t w o r k / P l a y e r T a r g e t . c p p
E n g i n e / N e t w o r k / C P a c k e t . c p p
E n g i n e / N e t w o r k / C l i e n t I n t e r f a c e . c p p
E n g i n e / N e t w o r k / C o m m u n i c a t i o n I n t e r f a c e . c p p
E n g i n e / N e t w o r k / D i f f . c p p
E n g i n e / G a m e A g e n t / G a m e A g e n t . c p p
E n g i n e / T e r r a i n / A r r a y H o l d e r . c p p
E n g i n e / T e r r a i n / T e r r a i n . c p p
E n g i n e / T e r r a i n / T e r r a i n A r c h i v e . c p p
E n g i n e / T e r r a i n / T e r r a i n E d i t i n g . c p p
E n g i n e / T e r r a i n / T e r r a i n L a y e r . c p p
E n g i n e / T e r r a i n / T e r r a i n M i s c . c p p
E n g i n e / T e r r a i n / T e r r a i n R a y C a s t i n g . c p p
E n g i n e / T e r r a i n / T e r r a i n R e n d e r . c p p
E n g i n e / T e r r a i n / T e r r a i n T i l e . c p p
E n g i n e / R e n d e r i n g / R e n d e r . c p p
E n g i n e / R e n d e r i n g / R e n d e r P r o f i l e . c p p
E n g i n e / R e n d e r i n g / S e l e c t O n R e n d e r . c p p
E n g i n e / S k a / A n i m S e t . c p p
E n g i n e / S k a / R M R e n d e r . c p p
E n g i n e / S k a / S k e l e t o n . c p p
E n g i n e / S k a / M o d e l I n s t a n c e . c p p
E n g i n e / S k a / S t r i n g T a b l e . c p p
E n g i n e / S k a / M e s h . c p p
E n g i n e / S k a / R M R e n d e r M a s k . c p p
E n g i n e / S k a / s m c P a r s . c p p
E n g i n e / S k a / s m c P a r s . h
E n g i n e / S k a / s m c S c a n . c p p
E n g i n e / S o u n d / S o u n d D e c o d e r . c p p
E n g i n e / S o u n d / S o u n d O b j e c t . c p p
E n g i n e / S o u n d / S o u n d L i b r a r y . c p p
E n g i n e / S o u n d / S o u n d P r o f i l e . c p p
E n g i n e / S o u n d / S o u n d D a t a . c p p
E n g i n e / S o u n d / W a v e . c p p
E n g i n e / S o u n d / S o u n d M i x e r . c p p
E n g i n e / T e m p l a t e s / S t o c k _ C A n i m D a t a . c p p
E n g i n e / T e m p l a t e s / S t o c k _ C A n i m S e t . c p p
E n g i n e / T e m p l a t e s / S t o c k _ C E n t i t y C l a s s . c p p
E n g i n e / T e m p l a t e s / S t o c k _ C M e s h . c p p
E n g i n e / T e m p l a t e s / S t o c k _ C M o d e l D a t a . c p p
E n g i n e / T e m p l a t e s / S t o c k _ C S k e l e t o n . c p p
E n g i n e / T e m p l a t e s / S t o c k _ C S o u n d D a t a . c p p
E n g i n e / T e m p l a t e s / S t o c k _ C T e x t u r e D a t a . c p p
E n g i n e / T e m p l a t e s / S t o c k _ C S h a d e r . c p p
E n g i n e / T e m p l a t e s / N a m e T a b l e _ C T F i l e N a m e . c p p
E n g i n e / T e m p l a t e s / N a m e T a b l e _ C T r a n s l a t i o n P a i r . c p p
E n g i n e / T e m p l a t e s / B S P . c p p
E n g i n e / W o r l d / W o r l d C S G . c p p
E n g i n e / W o r l d / P h y s i c s P r o f i l e . c p p
E n g i n e / W o r l d / W o r l d C o l l i s i o n . c p p
E n g i n e / W o r l d / W o r l d I O . c p p
E n g i n e / W o r l d / W o r l d R a y C a s t i n g . c p p
E n g i n e / W o r l d / W o r l d . c p p
E n g i n e / W o r l d / W o r l d C o l l i s i o n G r i d . c p p
E n g i n e / W o r l d / W o r l d E d i t i n g P r o f i l e . c p p
$ { A D D I T I O N A L _ E N G I N E _ S R C S }
2016-04-20 00:16:45 +02:00
$ { Z L I B _ S R C S }
2016-04-01 21:16:34 +02:00
)
2016-04-06 13:31:53 +02:00
add_executable ( ssam
2016-04-03 03:55:48 +02:00
$ { E N G I N E _ S R C S }
2016-04-01 21:16:34 +02:00
S e r i o u s S a m / L e v e l I n f o . c p p
S e r i o u s S a m / C m d L i n e . c p p
S e r i o u s S a m / S e r i o u s S a m . c p p
S e r i o u s S a m / V a r L i s t . c p p
S e r i o u s S a m / C r e d i t s . c p p
S e r i o u s S a m / G L S e t t i n g s . c p p
S e r i o u s S a m / L C D D r a w i n g . c p p
S e r i o u s S a m / S p l a s h S c r e e n . c p p
S e r i o u s S a m / M a i n W i n d o w . c p p
2016-04-04 22:09:41 +02:00
S e r i o u s S a m / M e n u . c p p
S e r i o u s S a m / M e n u G a d g e t s . c p p
S e r i o u s S a m / M e n u P r i n t i n g . c p p
2016-04-01 21:16:34 +02:00
)
2016-04-06 13:31:53 +02:00
add_dependencies ( ssam ParseEntities )
2016-04-12 20:42:39 +02:00
# Make symbols in the main executable available to dynamic objects
set_target_properties ( ssam PROPERTIES ENABLE_EXPORTS ON )
2016-04-01 21:16:34 +02:00
2016-04-03 03:55:48 +02:00
# !!! FIXME: this is an option because you have to recompile the entire engine twice.
# !!! FIXME: If we can put the engine in a static library and not lose symbols,
# !!! FIXME: that's a better plan and we can remove the toggle here.
option ( BUILD_DEDICATED_SERVER "Compile the dedicated server, too" FALSE )
if ( BUILD_DEDICATED_SERVER )
add_executable ( SeriousSamDedicated ${ ENGINE_SRCS } DedicatedServer/DedicatedServer.cpp )
2016-04-05 18:06:18 +02:00
add_dependencies ( SeriousSamDedicated ParseEntities )
2016-04-12 20:42:39 +02:00
# Make symbols in the main executable available to dynamic objects
set_target_properties ( SeriousSamDedicated PROPERTIES ENABLE_EXPORTS ON )
2016-04-03 04:55:53 +02:00
endif ( )
2016-04-01 21:16:34 +02:00
if ( MACOSX )
2016-04-21 17:40:42 +02:00
target_link_libraries ( ssam ${ ZLIB_LIBRARIES } )
if ( USE_SYSTEM_SDL2 ) # use sdl2 framework on system
target_link_libraries ( ssam ${ SDL2_LIBRARY } )
else ( ) # use local libsdl2
find_library ( COCOA_FRAMEWORK Cocoa )
target_link_libraries ( ssam "${COCOA_FRAMEWORK}" )
target_link_libraries ( ssam "${CMAKE_CURRENT_SOURCE_DIR}/lib/macosx/libSDL2-2.0.0.dylib" )
endif ( )
2016-04-03 03:55:48 +02:00
if ( BUILD_DEDICATED_SERVER )
2016-04-21 17:40:42 +02:00
target_link_libraries ( SeriousSamDedicated ${ ZLIB_LIBRARIES } )
if ( USE_SYSTEM_SDL2 )
target_link_libraries ( SeriousSamDedicated ${ SDL2_LIBRARY } )
else ( )
target_link_libraries ( SeriousSamDedicated "${COCOA_FRAMEWORK}" )
target_link_libraries ( SeriousSamDedicated "${CMAKE_CURRENT_SOURCE_DIR}/lib/macosx/libSDL2-2.0.0.dylib" )
endif ( )
2016-04-03 03:55:48 +02:00
endif ( )
2016-04-01 21:16:34 +02:00
endif ( )
if ( LINUX )
2016-04-06 13:31:53 +02:00
set_target_properties ( ssam PROPERTIES LINK_FLAGS "-Wl,-rpath,$ORIGIN" )
target_link_libraries ( ssam "m" )
target_link_libraries ( ssam "dl" )
2016-04-16 04:54:34 +02:00
target_link_libraries ( ssam "pthread" )
2016-04-15 23:01:30 +02:00
target_link_libraries ( ssam ${ SDL2_LIBRARY } )
2016-04-20 00:16:45 +02:00
target_link_libraries ( ssam ${ ZLIB_LIBRARIES } )
2016-04-06 13:31:53 +02:00
if ( PANDORA )
2016-04-15 23:01:30 +02:00
target_link_libraries ( ssam "rt" )
2016-04-06 13:31:53 +02:00
endif ( )
2016-04-03 03:55:48 +02:00
if ( BUILD_DEDICATED_SERVER )
set_target_properties ( SeriousSamDedicated PROPERTIES LINK_FLAGS "-Wl,-rpath,$ORIGIN" )
target_link_libraries ( SeriousSamDedicated "m" )
target_link_libraries ( SeriousSamDedicated "dl" )
target_link_libraries ( SeriousSamDedicated "pthread" )
2016-04-10 06:54:23 +02:00
target_link_libraries ( SeriousSamDedicated ${ SDL2_LIBRARY } )
2016-04-20 00:16:45 +02:00
target_link_libraries ( SeriousSamDedicated ${ ZLIB_LIBRARIES } )
2016-04-03 03:55:48 +02:00
endif ( )
2016-04-01 21:16:34 +02:00
endif ( )
2016-04-12 19:21:10 +02:00
if ( FREEBSD )
set_target_properties ( ssam PROPERTIES LINK_FLAGS "-Wl,-rpath,$ORIGIN" )
target_link_libraries ( ssam "m" )
target_link_libraries ( ssam "pthread" )
target_link_libraries ( ssam ${ SDL2_LIBRARY } )
2016-04-20 00:16:45 +02:00
target_link_libraries ( ssam ${ ZLIB_LIBRARIES } )
2016-04-12 19:21:10 +02:00
if ( BUILD_DEDICATED_SERVER )
set_target_properties ( SeriousSamDedicated PROPERTIES LINK_FLAGS "-Wl,-rpath,$ORIGIN" )
target_link_libraries ( SeriousSamDedicated "m" )
target_link_libraries ( SeriousSamDedicated "pthread" )
target_link_libraries ( SeriousSamDedicated ${ SDL2_LIBRARY } )
2016-04-20 00:16:45 +02:00
target_link_libraries ( SeriousSamDedicated ${ ZLIB_LIBRARIES } )
2016-04-12 19:21:10 +02:00
endif ( )
endif ( )
2016-04-08 00:11:36 +02:00
if ( TFE )
set_target_properties ( ssam PROPERTIES OUTPUT_NAME "ssam-tfe" )
endif ( )
2016-04-19 10:25:38 +02:00
# RAKE! Install Section.
if ( DEBUG ) # RAKE! Will this work with TFE?
install ( TARGETS ssam ${ SHADERSLIB } ${ GAMEMPLIB } ${ ENTITIESMPLIB }
R U N T I M E D E S T I N A T I O N " $ { C M A K E _ I N S T A L L _ P R E F I X } / B i n "
L I B R A R Y D E S T I N A T I O N " $ { C M A K E _ I N S T A L L _ P R E F I X } / B i n / D e b u g "
P E R M I S S I O N S O W N E R _ R E A D O W N E R _ W R I T E O W N E R _ E X E C U T E G R O U P _ R E A D G R O U P _ W R I T E G R O U P _ E X E C U T E W O R L D _ R E A D W O R L D _ E X E C U T E )
if ( BUILD_DEDICATED_SERVER )
install ( TARGETS SeriousSamDedicated
R U N T I M E D E S T I N A T I O N $ { C M A K E _ I N S T A L L _ P R E F I X } / B i n
P E R M I S S I O N S O W N E R _ R E A D O W N E R _ W R I T E O W N E R _ E X E C U T E G R O U P _ R E A D G R O U P _ W R I T E G R O U P _ E X E C U T E W O R L D _ R E A D W O R L D _ E X E C U T E )
endif ( )
else ( )
install ( TARGETS ssam ${ SHADERSLIB } ${ GAMEMPLIB } ${ ENTITIESMPLIB }
R U N T I M E D E S T I N A T I O N " $ { C M A K E _ I N S T A L L _ P R E F I X } / B i n "
L I B R A R Y D E S T I N A T I O N " $ { C M A K E _ I N S T A L L _ P R E F I X } / B i n "
P E R M I S S I O N S O W N E R _ R E A D O W N E R _ W R I T E O W N E R _ E X E C U T E G R O U P _ R E A D G R O U P _ W R I T E G R O U P _ E X E C U T E W O R L D _ R E A D W O R L D _ E X E C U T E )
if ( BUILD_DEDICATED_SERVER )
install ( TARGETS SeriousSamDedicated
R U N T I M E D E S T I N A T I O N " $ { C M A K E _ I N S T A L L _ P R E F I X } / B i n "
P E R M I S S I O N S O W N E R _ R E A D O W N E R _ W R I T E O W N E R _ E X E C U T E G R O U P _ R E A D G R O U P _ W R I T E G R O U P _ E X E C U T E W O R L D _ R E A D W O R L D _ E X E C U T E )
endif ( )
endif ( )
2016-04-01 21:16:34 +02:00
2016-04-19 10:25:38 +02:00
# RAKE! If CMAKE_INSTALL_PREFIX was set during config then its not a local install
# and SE1_10.gro needs to be installed to Games root dir.
if ( NOT LOCAL_INSTALL )
install ( FILES ${ CMAKE_SOURCE_DIR } /../SE1_10.gro
D E S T I N A T I O N $ { C M A K E _ I N S T A L L _ P R E F I X }
P E R M I S S I O N S O W N E R _ R E A D O W N E R _ W R I T E O W N E R _ E X E C U T E G R O U P _ R E A D G R O U P _ W R I T E G R O U P _ E X E C U T E W O R L D _ R E A D W O R L D _ E X E C U T E )
endif ( )
# end of CMakeLists.txt ...