2010-06-21 07:17:26 +02:00
|
|
|
# Copyright (C) 2008-2010 Trinity <http://www.trinitycore.org/>
|
2010-06-09 15:39:34 +02:00
|
|
|
#
|
|
|
|
|
# This file is free software; as a special exception the author gives
|
|
|
|
|
# unlimited permission to copy and/or distribute it, with or without
|
|
|
|
|
# modifications, as long as this notice is preserved.
|
|
|
|
|
#
|
|
|
|
|
# This program is distributed in the hope that it will be useful, but
|
|
|
|
|
# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
|
|
|
|
|
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
|
|
|
|
|
|
|
|
########### authserver ###############
|
2009-01-17 09:23:33 -05:00
|
|
|
|
2010-07-29 21:08:16 +02:00
|
|
|
file(GLOB_RECURSE sources_authentication Authentication/*.cpp Authentication/*.h)
|
|
|
|
|
file(GLOB_RECURSE sources_realms Realms/*.cpp Realms/*.h)
|
|
|
|
|
file(GLOB_RECURSE sources_server Server/*.cpp Server/*.h)
|
2010-08-08 04:08:18 +02:00
|
|
|
file(GLOB sources_localdir *.cpp *.h)
|
2010-07-29 21:08:16 +02:00
|
|
|
|
2010-08-28 19:24:50 +02:00
|
|
|
if( USE_COREPCH )
|
2010-08-16 12:14:10 +02:00
|
|
|
include_directories(${CMAKE_CURRENT_BINARY_DIR})
|
|
|
|
|
endif()
|
|
|
|
|
|
2010-08-28 19:24:50 +02:00
|
|
|
if ( USE_COREPCH AND MSVC )
|
2010-08-16 12:14:10 +02:00
|
|
|
set(authserver_SRCS
|
|
|
|
|
PrecompiledHeaders/authPCH.cpp
|
|
|
|
|
PrecompiledHeaders/authPCH.h
|
|
|
|
|
)
|
|
|
|
|
endif()
|
|
|
|
|
|
2010-06-21 07:17:26 +02:00
|
|
|
set(authserver_SRCS
|
2010-08-16 12:14:10 +02:00
|
|
|
${authserver_SRCS}
|
2010-07-29 21:08:16 +02:00
|
|
|
${sources_authentication}
|
|
|
|
|
${sources_realms}
|
|
|
|
|
${sources_server}
|
2010-08-08 04:08:18 +02:00
|
|
|
${sources_localdir}
|
2009-01-17 09:23:33 -05:00
|
|
|
)
|
|
|
|
|
|
2010-07-29 21:08:16 +02:00
|
|
|
if( WIN32 )
|
|
|
|
|
set(authserver_SRCS
|
|
|
|
|
${authserver_SRCS}
|
2010-08-11 16:59:36 +02:00
|
|
|
${sources_Debugging}
|
2010-07-29 21:08:16 +02:00
|
|
|
authserver.rc
|
|
|
|
|
)
|
|
|
|
|
endif()
|
|
|
|
|
|
2010-04-06 15:53:27 +02:00
|
|
|
include_directories(
|
|
|
|
|
${CMAKE_BINARY_DIR}
|
2010-06-06 13:47:00 +02:00
|
|
|
${CMAKE_SOURCE_DIR}/src/server/shared
|
|
|
|
|
${CMAKE_SOURCE_DIR}/src/server/shared/Database
|
2010-08-18 07:17:04 +02:00
|
|
|
${CMAKE_SOURCE_DIR}/src/server/shared/Debugging
|
2010-06-08 01:20:06 +02:00
|
|
|
${CMAKE_SOURCE_DIR}/src/server/shared/Packets
|
|
|
|
|
${CMAKE_SOURCE_DIR}/src/server/shared/Cryptography
|
|
|
|
|
${CMAKE_SOURCE_DIR}/src/server/shared/Cryptography/Authentication
|
|
|
|
|
${CMAKE_SOURCE_DIR}/src/server/shared/Logging
|
2010-08-18 07:17:04 +02:00
|
|
|
${CMAKE_SOURCE_DIR}/src/server/shared/Threading
|
2010-06-08 01:20:06 +02:00
|
|
|
${CMAKE_SOURCE_DIR}/src/server/shared/Utilities
|
2010-08-17 02:14:20 +02:00
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}
|
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/Authentication
|
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/Realms
|
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/Server
|
2010-08-16 09:51:37 +02:00
|
|
|
${ACE_INCLUDE_DIR}
|
|
|
|
|
${MYSQL_INCLUDE_DIR}
|
|
|
|
|
${OPENSSL_INCLUDE_DIR}
|
2010-04-06 15:53:27 +02:00
|
|
|
)
|
|
|
|
|
|
2010-06-21 07:17:26 +02:00
|
|
|
set(authserver_LINK_FLAGS "")
|
2009-03-21 01:42:46 +01:00
|
|
|
|
2010-06-21 07:17:26 +02:00
|
|
|
add_executable(authserver
|
|
|
|
|
${authserver_SRCS}
|
2009-01-17 09:23:33 -05:00
|
|
|
)
|
2010-06-14 02:00:30 +02:00
|
|
|
|
2010-09-25 21:42:11 +02:00
|
|
|
add_dependencies(authserver revision.h)
|
2010-06-25 18:00:51 +02:00
|
|
|
|
2010-06-30 18:46:55 +02:00
|
|
|
if( NOT WIN32 )
|
2010-06-30 13:10:13 +02:00
|
|
|
add_definitions(-D_TRINITY_REALM_CONFIG='"${CONF_DIR}/authserver.conf"')
|
|
|
|
|
endif()
|
2009-04-06 21:14:51 +02:00
|
|
|
|
2010-06-30 18:46:55 +02:00
|
|
|
if( UNIX )
|
|
|
|
|
set(authserver_LINK_FLAGS "-pthread ${authserver_LINK_FLAGS}")
|
|
|
|
|
endif()
|
2009-01-17 09:23:33 -05:00
|
|
|
|
2010-06-30 18:46:55 +02:00
|
|
|
if( CMAKE_SYSTEM_NAME MATCHES "Darwin" )
|
2010-06-21 07:17:26 +02:00
|
|
|
set(authserver_LINK_FLAGS "-framework Carbon ${authserver_LINK_FLAGS}")
|
|
|
|
|
endif()
|
|
|
|
|
|
|
|
|
|
set_target_properties(authserver PROPERTIES LINK_FLAGS "${authserver_LINK_FLAGS}")
|
2009-04-06 21:14:51 +02:00
|
|
|
|
2010-08-30 22:58:37 +02:00
|
|
|
target_link_libraries(authserver
|
|
|
|
|
shared
|
|
|
|
|
${MYSQL_LIBRARY}
|
|
|
|
|
${OPENSSL_LIBRARIES}
|
|
|
|
|
${OPENSSL_EXTRA_LIBRARIES}
|
|
|
|
|
${OSX_LIBS}
|
|
|
|
|
)
|
2009-01-17 09:23:33 -05:00
|
|
|
|
2010-08-09 20:18:31 +02:00
|
|
|
if( WIN32 )
|
|
|
|
|
add_custom_command(TARGET authserver
|
|
|
|
|
POST_BUILD
|
2010-08-10 23:11:40 +02:00
|
|
|
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/authserver.conf.dist ${CMAKE_BINARY_DIR}/bin/$(ConfigurationName)/
|
2010-08-09 20:18:31 +02:00
|
|
|
)
|
|
|
|
|
endif()
|
|
|
|
|
|
2010-06-30 16:51:37 +02:00
|
|
|
if( UNIX )
|
|
|
|
|
install(TARGETS authserver DESTINATION bin)
|
|
|
|
|
install(FILES authserver.conf.dist DESTINATION etc)
|
2010-08-11 20:55:14 +02:00
|
|
|
elseif( WIN32 )
|
|
|
|
|
install(TARGETS authserver DESTINATION "${CMAKE_INSTALL_PREFIX}")
|
|
|
|
|
install(FILES authserver.conf.dist DESTINATION "${CMAKE_INSTALL_PREFIX}")
|
2010-06-30 16:51:37 +02:00
|
|
|
endif()
|
2010-08-16 12:14:10 +02:00
|
|
|
|
|
|
|
|
# Generate precompiled header
|
2010-08-28 19:24:50 +02:00
|
|
|
if( USE_COREPCH )
|
2010-08-16 12:14:10 +02:00
|
|
|
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()
|
|
|
|
|
|