aboutsummaryrefslogtreecommitdiff
path: root/src/server/authserver
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/authserver
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/authserver')
-rw-r--r--src/server/authserver/CMakeLists.txt22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/server/authserver/CMakeLists.txt b/src/server/authserver/CMakeLists.txt
index 17e5fd08450..d0ea82fb8a7 100644
--- a/src/server/authserver/CMakeLists.txt
+++ b/src/server/authserver/CMakeLists.txt
@@ -15,7 +15,19 @@ file(GLOB_RECURSE sources_realms Realms/*.cpp Realms/*.h)
file(GLOB_RECURSE sources_server Server/*.cpp Server/*.h)
file(GLOB sources_localdir *.cpp *.h)
+if( GAMEPCH )
+ include_directories(${CMAKE_CURRENT_BINARY_DIR})
+endif()
+
+if ( GAMEPCH AND MSVC )
+ set(authserver_SRCS
+ PrecompiledHeaders/authPCH.cpp
+ PrecompiledHeaders/authPCH.h
+ )
+endif()
+
set(authserver_SRCS
+ ${authserver_SRCS}
${sources_authentication}
${sources_realms}
${sources_server}
@@ -102,3 +114,13 @@ elseif( WIN32 )
install(TARGETS authserver DESTINATION "${CMAKE_INSTALL_PREFIX}")
install(FILES authserver.conf.dist DESTINATION "${CMAKE_INSTALL_PREFIX}")
endif()
+
+# Generate precompiled header
+if( GAMEPCH )
+ if(CMAKE_COMPILER_IS_GNUCXX)
+ add_precompiled_header(authserver ${CMAKE_CURRENT_SOURCE_DIR}/PrecompiledHeaders/authPCH.h)
+ elseif(MSVC)
+ add_native_precompiled_header(authserver ${CMAKE_CURRENT_SOURCE_DIR}/PrecompiledHeaders/authPCH)
+ endif()
+endif()
+