aboutsummaryrefslogtreecommitdiff
path: root/src/server/worldserver
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/worldserver')
-rw-r--r--src/server/worldserver/CMakeLists.txt34
1 files changed, 13 insertions, 21 deletions
diff --git a/src/server/worldserver/CMakeLists.txt b/src/server/worldserver/CMakeLists.txt
index 45442123258..13679cce866 100644
--- a/src/server/worldserver/CMakeLists.txt
+++ b/src/server/worldserver/CMakeLists.txt
@@ -14,15 +14,9 @@ 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( USE_COREPCH )
- include_directories(${CMAKE_CURRENT_BINARY_DIR})
-endif()
-
-if ( USE_COREPCH AND MSVC )
- set(worldserver_SRCS
- PrecompiledHeaders/worldPCH.cpp
- PrecompiledHeaders/worldPCH.h
- )
+if (USE_COREPCH)
+ set(worldserver_PCH_HDR PrecompiledHeaders/worldPCH.h)
+ set(worldserver_PCH_SRC PrecompiledHeaders/worldPCH.cpp)
endif()
set(worldserver_SRCS
@@ -144,17 +138,21 @@ include_directories(
${OPENSSL_INCLUDE_DIR}
)
-set(worldserver_LINK_FLAGS "")
-
-add_executable(worldserver ${worldserver_SRCS})
+add_executable(worldserver
+ ${worldserver_SRCS}
+ ${worldserver_PCH_SRC}
+)
if( NOT WIN32 )
- add_definitions(-D_TRINITY_CORE_CONFIG='"${CONF_DIR}/worldserver.conf"')
+ set_target_properties(worldserver PROPERTIES
+ COMPILE_DEFINITIONS _TRINITY_CORE_CONFIG="${CONF_DIR}/worldserver.conf"
+ )
endif()
add_dependencies(worldserver revision.h)
-if( UNIX )
+
+if( UNIX AND NOT NOJEM )
set(worldserver_LINK_FLAGS "-pthread -lncurses ${worldserver_LINK_FLAGS}")
endif()
@@ -174,9 +172,7 @@ target_link_libraries(worldserver
${ACE_LIBRARY}
${MYSQL_LIBRARY}
${OPENSSL_LIBRARIES}
- ${OPENSSL_EXTRA_LIBRARIES}
${ZLIB_LIBRARIES}
- ${OSX_LIBS}
)
if( WIN32 )
@@ -196,9 +192,5 @@ endif()
# Generate precompiled header
if( USE_COREPCH )
- 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()
+ add_cxx_pch(worldserver ${worldserver_PCH_HDR} ${worldserver_PCH_SRC})
endif()