Move the game include directory to the build system

Don't include based on a preprocessor symbol, let the build
system make the correct decision.
This commit is contained in:
dhewg 2011-12-16 18:03:58 +01:00
parent 8ca99602aa
commit e5ec63ce06
3 changed files with 6 additions and 7 deletions

View file

@ -718,6 +718,7 @@ if (GAME)
add_library(game${cpu} SHARED ${src_game} ${src_idlib})
set_target_properties(game${cpu} PROPERTIES PREFIX "")
set_target_properties(game${cpu} PROPERTIES COMPILE_DEFINITIONS "GAME_DLL")
set_target_properties(game${cpu} PROPERTIES COMPILE_FLAGS "-I${CMAKE_CURRENT_SOURCE_DIR}/game")
set_target_properties(game${cpu} PROPERTIES LINK_FLAGS "${ldflags}")
set_target_properties(game${cpu} PROPERTIES INSTALL_NAME_DIR "@executable_path")
endif()
@ -726,6 +727,7 @@ if (D3XP)
add_library(game${cpu}-d3xp SHARED ${src_d3xp} ${src_idlib})
set_target_properties(game${cpu}-d3xp PROPERTIES PREFIX "")
set_target_properties(game${cpu}-d3xp PROPERTIES COMPILE_DEFINITIONS "GAME_DLL;_D3XP;CTF")
set_target_properties(game${cpu}-d3xp PROPERTIES COMPILE_FLAGS "-I${CMAKE_CURRENT_SOURCE_DIR}/d3xp")
set_target_properties(game${cpu}-d3xp PROPERTIES LINK_FLAGS "${ldflags}")
set_target_properties(game${cpu}-d3xp PROPERTIES INSTALL_NAME_DIR "@executable_path")
endif()

View file

@ -151,13 +151,7 @@ const int MAX_EXPRESSION_REGISTERS = 4096;
#ifndef _D3SDK
#ifdef GAME_DLL
#if defined(_D3XP)
#include "../d3xp/Game_local.h"
#else
#include "../game/Game_local.h"
#endif
#include "Game_local.h"
#else
#include "../framework/DemoChecksum.h"

View file

@ -97,6 +97,9 @@ for i in range( len( game_list ) ):
local_env = g_game_env.Clone()
if ( local_d3xp ):
local_env.Append( CPPDEFINES = [ '_D3XP', 'CTF' ] )
local_env.Append( CPPFLAGS = [ '-Id3xp' ] )
else:
local_env.Append( CPPFLAGS = [ '-Igame' ] )
if ( local_demo == 1 ):
local_env.Append( CPPDEFINES = [ 'ID_DEMO_BUILD' ] )