BuilSystem: Clean up some small but annoying things from my earlier commits:

- return to using default CMake buildconfiguration (release, relwithdebinfo, debug, minsizerel
  Note: These are not yet populated as buildmodes : relwithdebinfo / minsizerel (will be created later)
- change it so that genrev creates revision.h properly (after genrev has been compiled successfully)
- split scripts/game PCH creation depending on which part a user wants to compile (default on) (thanks shauren)

--HG--
branch : trunk
This commit is contained in:
click
2010-08-09 23:14:16 +02:00
parent 5709c8be0d
commit 816acb11a4
4 changed files with 26 additions and 26 deletions
+5 -4
View File
@@ -16,15 +16,16 @@ add_executable(genrev
)
if( CMAKE_GENERATOR MATCHES "Visual Studio" )
add_custom_command(TARGET genrev ALL
add_custom_command(TARGET genrev
POST_BUILD
COMMAND ${CMAKE_BINARY_DIR}/bin/$(ConfigurationName)/genrev ${CMAKE_SOURCE_DIR}
WORKING_DIRECTORY "${CMAKE_BINARY_DIR}"
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
)
else()
add_custom_command(TARGET genrev ALL
add_custom_command(TARGET genrev
POST_BUILD
COMMAND ${CMAKE_BINARY_DIR}/src/genrevision/genrev ${CMAKE_SOURCE_DIR}
WORKING_DIRECTORY "${CMAKE_BINARY_DIR}"
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
)
endif()
+2 -5
View File
@@ -8,10 +8,7 @@
# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
######## game ########
# Enable precompiled headers when using the GCC compiler.
if(PCH)
if( GAMEPCH )
include_directories(${CMAKE_CURRENT_BINARY_DIR})
endif()
@@ -195,7 +192,7 @@ add_library(game STATIC ${game_STAT_SRCS})
add_dependencies(game genrev)
# Generate precompiled header
if(PCH)
if( GAMEPCH )
if(CMAKE_COMPILER_IS_GNUCXX)
add_precompiled_header(game ${CMAKE_SOURCE_DIR}/src/server/game/PrecompiledHeaders/gamePCH.h)
elseif(MSVC)
+2 -2
View File
@@ -18,7 +18,7 @@ file(GLOB_RECURSE scripts_examples Examples/*.cpp Examples/*.h)
file(GLOB_RECURSE scripts_outdoorpvp OutdoorPvP/*.cpp OutdoorPvP/*.h)
# Enable precompiled headers when using the GCC compiler.
if(PCH)
if( SCRIPTPCH )
include_directories(
${CMAKE_CURRENT_BINARY_DIR}
)
@@ -142,7 +142,7 @@ add_library(scripts STATIC ${scripts_STAT_SRCS})
add_dependencies(scripts genrev)
# Generate precompiled header
if(PCH)
if( SCRIPTPCH )
if(CMAKE_COMPILER_IS_GNUCXX)
add_precompiled_header(scripts ${CMAKE_SOURCE_DIR}/src/server/scripts/PrecompiledHeaders/ScriptPCH.h)
elseif(MSVC)