Buildsystem: Update CMakeLists to use the proper check, not the old one...

--HG--
branch : trunk
This commit is contained in:
click
2010-08-28 19:24:50 +02:00
parent dcaeceaf6b
commit 2930c02198
7 changed files with 20 additions and 20 deletions
+2 -2
View File
@@ -53,8 +53,8 @@ execute_process(
# turn off PCH totally if enabled (hidden setting, mainly for devs) # turn off PCH totally if enabled (hidden setting, mainly for devs)
if( NOPCH ) if( NOPCH )
set(WITH_COREPCH 0) set(USE_COREPCH 0)
set(WITH_SCRIPTPCH 0) set(USE_SCRIPTPCH 0)
endif() endif()
# set default buildoptions and print them # set default buildoptions and print them
+3 -3
View File
@@ -15,11 +15,11 @@ file(GLOB_RECURSE sources_realms Realms/*.cpp Realms/*.h)
file(GLOB_RECURSE sources_server Server/*.cpp Server/*.h) file(GLOB_RECURSE sources_server Server/*.cpp Server/*.h)
file(GLOB sources_localdir *.cpp *.h) file(GLOB sources_localdir *.cpp *.h)
if( GAMEPCH ) if( USE_COREPCH )
include_directories(${CMAKE_CURRENT_BINARY_DIR}) include_directories(${CMAKE_CURRENT_BINARY_DIR})
endif() endif()
if ( GAMEPCH AND MSVC ) if ( USE_COREPCH AND MSVC )
set(authserver_SRCS set(authserver_SRCS
PrecompiledHeaders/authPCH.cpp PrecompiledHeaders/authPCH.cpp
PrecompiledHeaders/authPCH.h PrecompiledHeaders/authPCH.h
@@ -118,7 +118,7 @@ elseif( WIN32 )
endif() endif()
# Generate precompiled header # Generate precompiled header
if( GAMEPCH ) if( USE_COREPCH )
if(CMAKE_COMPILER_IS_GNUCXX) if(CMAKE_COMPILER_IS_GNUCXX)
add_precompiled_header(authserver ${CMAKE_CURRENT_SOURCE_DIR}/PrecompiledHeaders/authPCH.h) add_precompiled_header(authserver ${CMAKE_CURRENT_SOURCE_DIR}/PrecompiledHeaders/authPCH.h)
elseif(MSVC) elseif(MSVC)
+3 -3
View File
@@ -8,7 +8,7 @@
# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the # WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
if( GAMEPCH ) if( USE_COREPCH )
include_directories(${CMAKE_CURRENT_BINARY_DIR}) include_directories(${CMAKE_CURRENT_BINARY_DIR})
endif() endif()
@@ -17,7 +17,7 @@ file(GLOB_RECURSE sources_Maps Maps/*.cpp Maps/*.h)
file(GLOB_RECURSE sources_Models Models/*.cpp Models/*.h) file(GLOB_RECURSE sources_Models Models/*.cpp Models/*.h)
file(GLOB sources_localdir *.cpp *.h) file(GLOB sources_localdir *.cpp *.h)
if( GAMEPCH AND MSVC ) if( USE_COREPCH AND MSVC )
set(collision_STAT_SRCS set(collision_STAT_SRCS
PrecompiledHeaders/collisionPCH.cpp PrecompiledHeaders/collisionPCH.cpp
PrecompiledHeaders/collisionPCH.h PrecompiledHeaders/collisionPCH.h
@@ -54,7 +54,7 @@ include_directories(
add_library(collision STATIC ${collision_STAT_SRCS}) add_library(collision STATIC ${collision_STAT_SRCS})
# Generate precompiled header # Generate precompiled header
if( GAMEPCH ) if( USE_COREPCH )
if(CMAKE_COMPILER_IS_GNUCXX) if(CMAKE_COMPILER_IS_GNUCXX)
add_precompiled_header(collision ${CMAKE_CURRENT_SOURCE_DIR}/PrecompiledHeaders/collisionPCH.h) add_precompiled_header(collision ${CMAKE_CURRENT_SOURCE_DIR}/PrecompiledHeaders/collisionPCH.h)
elseif(MSVC) elseif(MSVC)
+3 -3
View File
@@ -8,7 +8,7 @@
# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the # WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
if( GAMEPCH ) if( USE_COREPCH )
include_directories(${CMAKE_CURRENT_BINARY_DIR}) include_directories(${CMAKE_CURRENT_BINARY_DIR})
endif() endif()
@@ -50,7 +50,7 @@ file(GLOB_RECURSE sources_World World/*.cpp World/*.h)
# Create game-libary # Create game-libary
if( GAMEPCH AND MSVC ) if( USE_COREPCH AND MSVC )
set(game_STAT_SRCS set(game_STAT_SRCS
PrecompiledHeaders/gamePCH.cpp PrecompiledHeaders/gamePCH.cpp
PrecompiledHeaders/gamePCH.h PrecompiledHeaders/gamePCH.h
@@ -194,7 +194,7 @@ add_library(game STATIC ${game_STAT_SRCS})
add_dependencies(game genrev) add_dependencies(game genrev)
# Generate precompiled header # Generate precompiled header
if( GAMEPCH ) if( USE_COREPCH )
if(CMAKE_COMPILER_IS_GNUCXX) if(CMAKE_COMPILER_IS_GNUCXX)
add_precompiled_header(game ${CMAKE_CURRENT_SOURCE_DIR}/PrecompiledHeaders/gamePCH.h) add_precompiled_header(game ${CMAKE_CURRENT_SOURCE_DIR}/PrecompiledHeaders/gamePCH.h)
elseif(MSVC) elseif(MSVC)
+3 -3
View File
@@ -18,13 +18,13 @@ file(GLOB_RECURSE scripts_examples Examples/*.cpp Examples/*.h)
file(GLOB_RECURSE scripts_outdoorpvp OutdoorPvP/*.cpp OutdoorPvP/*.h) file(GLOB_RECURSE scripts_outdoorpvp OutdoorPvP/*.cpp OutdoorPvP/*.h)
# Enable precompiled headers when using the GCC compiler. # Enable precompiled headers when using the GCC compiler.
if( SCRIPTPCH ) if( USE_SCRIPTPCH )
include_directories( include_directories(
${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_BINARY_DIR}
) )
endif() endif()
if( SCRIPTPCH AND MSVC ) if( USE_SCRIPTPCH AND MSVC )
set(scripts_STAT_SRCS set(scripts_STAT_SRCS
PrecompiledHeaders/ScriptPCH.cpp PrecompiledHeaders/ScriptPCH.cpp
PrecompiledHeaders/ScriptPCH.h PrecompiledHeaders/ScriptPCH.h
@@ -145,7 +145,7 @@ add_library(scripts STATIC ${scripts_STAT_SRCS})
add_dependencies(scripts genrev) add_dependencies(scripts genrev)
# Generate precompiled header # Generate precompiled header
if( SCRIPTPCH ) if( USE_SCRIPTPCH )
if(CMAKE_COMPILER_IS_GNUCXX) if(CMAKE_COMPILER_IS_GNUCXX)
add_precompiled_header(scripts ${CMAKE_CURRENT_SOURCE_DIR}/PrecompiledHeaders/ScriptPCH.h) add_precompiled_header(scripts ${CMAKE_CURRENT_SOURCE_DIR}/PrecompiledHeaders/ScriptPCH.h)
elseif(MSVC) elseif(MSVC)
+3 -3
View File
@@ -8,7 +8,7 @@
# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the # WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
if( GAMEPCH ) if( USE_COREPCH )
include_directories(${CMAKE_CURRENT_BINARY_DIR}) include_directories(${CMAKE_CURRENT_BINARY_DIR})
endif() endif()
@@ -28,7 +28,7 @@ file(GLOB sources_localdir *.cpp *.h)
# Build shared sourcelist # Build shared sourcelist
# #
if( GAMEPCH AND MSVC ) if( USE_COREPCH AND MSVC )
set(shared_STAT_SRCS set(shared_STAT_SRCS
PrecompiledHeaders/sharedPCH.cpp PrecompiledHeaders/sharedPCH.cpp
PrecompiledHeaders/sharedPCH.h PrecompiledHeaders/sharedPCH.h
@@ -89,7 +89,7 @@ else()
endif() endif()
# Generate precompiled header # Generate precompiled header
if( GAMEPCH ) if( USE_COREPCH )
if(CMAKE_COMPILER_IS_GNUCXX) if(CMAKE_COMPILER_IS_GNUCXX)
add_precompiled_header(shared ${CMAKE_CURRENT_SOURCE_DIR}/PrecompiledHeaders/sharedPCH.h) add_precompiled_header(shared ${CMAKE_CURRENT_SOURCE_DIR}/PrecompiledHeaders/sharedPCH.h)
elseif(MSVC) elseif(MSVC)
+3 -3
View File
@@ -14,11 +14,11 @@ file(GLOB_RECURSE sources_TCSoap TCSoap/*.cpp TCSoap/*.h)
file(GLOB_RECURSE sources_WorldThread WorldThread/*.cpp WorldThread/*.h) file(GLOB_RECURSE sources_WorldThread WorldThread/*.cpp WorldThread/*.h)
file(GLOB sources_localdir *.cpp *.h) file(GLOB sources_localdir *.cpp *.h)
if( GAMEPCH ) if( USE_COREPCH )
include_directories(${CMAKE_CURRENT_BINARY_DIR}) include_directories(${CMAKE_CURRENT_BINARY_DIR})
endif() endif()
if ( GAMEPCH AND MSVC ) if ( USE_COREPCH AND MSVC )
set(worldserver_SRCS set(worldserver_SRCS
PrecompiledHeaders/worldPCH.cpp PrecompiledHeaders/worldPCH.cpp
PrecompiledHeaders/worldPCH.h PrecompiledHeaders/worldPCH.h
@@ -220,7 +220,7 @@ elseif( WIN32 )
endif() endif()
# Generate precompiled header # Generate precompiled header
if( GAMEPCH ) if( USE_COREPCH )
if(CMAKE_COMPILER_IS_GNUCXX) if(CMAKE_COMPILER_IS_GNUCXX)
add_precompiled_header(worldserver ${CMAKE_CURRENT_SOURCE_DIR}/PrecompiledHeaders/worldPCH.h) add_precompiled_header(worldserver ${CMAKE_CURRENT_SOURCE_DIR}/PrecompiledHeaders/worldPCH.h)
elseif(MSVC) elseif(MSVC)