diff options
| author | click <none@none> | 2010-08-16 12:14:10 +0200 |
|---|---|---|
| committer | click <none@none> | 2010-08-16 12:14:10 +0200 |
| commit | 105e4e16cc1475468d51cae37aa3362b1d36f9e6 (patch) | |
| tree | 34b1c882b211644f0aaee1c4dce88fc1831cf06c /src/server/collision | |
| parent | 29c2520506e12bbae669fbd190901443eca2f2a5 (diff) | |
Buildsystem: Add PCH-support for targets shared, collision, authserver and worldserver (your mileage may vary, feedback needed)
- The active configuration for these to be active is GAMEPCH, so don't expect turbospeed if not enabled.
--HG--
branch : trunk
Diffstat (limited to 'src/server/collision')
| -rw-r--r-- | src/server/collision/CMakeLists.txt | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/server/collision/CMakeLists.txt b/src/server/collision/CMakeLists.txt index 18d45074e98..f5860647c55 100644 --- a/src/server/collision/CMakeLists.txt +++ b/src/server/collision/CMakeLists.txt @@ -8,12 +8,24 @@ # WITHOUT ANY WARRANTY, to the extent permitted by law; without even the # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +if( GAMEPCH ) + include_directories(${CMAKE_CURRENT_BINARY_DIR}) +endif() + file(GLOB_RECURSE sources_Management Management/*.cpp Management/*.h) file(GLOB_RECURSE sources_Maps Maps/*.cpp Maps/*.h) file(GLOB_RECURSE sources_Models Models/*.cpp Models/*.h) file(GLOB sources_localdir *.cpp *.h) +if( GAMEPCH AND MSVC ) + set(collision_STAT_SRCS + PrecompiledHeaders/collisionPCH.cpp + PrecompiledHeaders/collisionPCH.h + ) +endif() + set(collision_STAT_SRCS + ${collision_STAT_SRCS} ${sources_Management} ${sources_Maps} ${sources_Models} @@ -37,3 +49,13 @@ include_directories( ) add_library(collision STATIC ${collision_STAT_SRCS}) + +# Generate precompiled header +if( GAMEPCH ) + if(CMAKE_COMPILER_IS_GNUCXX) + add_precompiled_header(collision ${CMAKE_CURRENT_SOURCE_DIR}/PrecompiledHeaders/collisionPCH.h) + elseif(MSVC) + add_native_precompiled_header(collision ${CMAKE_CURRENT_SOURCE_DIR}/PrecompiledHeaders/collisionPCH) + endif() +endif() + |
