aboutsummaryrefslogtreecommitdiff
path: root/src/server/worldserver
diff options
context:
space:
mode:
authorclick <none@none>2010-08-16 12:14:10 +0200
committerclick <none@none>2010-08-16 12:14:10 +0200
commit105e4e16cc1475468d51cae37aa3362b1d36f9e6 (patch)
tree34b1c882b211644f0aaee1c4dce88fc1831cf06c /src/server/worldserver
parent29c2520506e12bbae669fbd190901443eca2f2a5 (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/worldserver')
-rw-r--r--src/server/worldserver/CMakeLists.txt21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/server/worldserver/CMakeLists.txt b/src/server/worldserver/CMakeLists.txt
index e322ec31eaa..54bb72266d7 100644
--- a/src/server/worldserver/CMakeLists.txt
+++ b/src/server/worldserver/CMakeLists.txt
@@ -14,7 +14,19 @@ file(GLOB_RECURSE sources_TCSoap TCSoap/*.cpp TCSoap/*.h)
file(GLOB_RECURSE sources_WorldThread WorldThread/*.cpp WorldThread/*.h)
file(GLOB sources_localdir *.cpp *.h)
+if( GAMEPCH )
+ include_directories(${CMAKE_CURRENT_BINARY_DIR})
+endif()
+
+if ( GAMEPCH AND MSVC )
+ set(worldserver_SRCS
+ PrecompiledHeaders/worldPCH.cpp
+ PrecompiledHeaders/worldPCH.h
+ )
+endif()
+
set(worldserver_SRCS
+ ${worldserver_SRCS}
${sources_CommandLine}
${sources_RemoteAccess}
${sources_TCSoap}
@@ -206,3 +218,12 @@ elseif( WIN32 )
install(TARGETS worldserver DESTINATION "${CMAKE_INSTALL_PREFIX}")
install(FILES worldserver.conf.dist DESTINATION "${CMAKE_INSTALL_PREFIX}")
endif()
+
+# Generate precompiled header
+if( GAMEPCH )
+ if(CMAKE_COMPILER_IS_GNUCXX)
+ add_precompiled_header(worldserver ${CMAKE_CURRENT_SOURCE_DIR}/PrecompiledHeaders/worldPCH.h)
+ elseif(MSVC)
+ add_native_precompiled_header(worldserver ${CMAKE_CURRENT_SOURCE_DIR}/PrecompiledHeaders/worldPCH)
+ endif()
+endif()