Buildsystem: Overhaul of the CMake buildsystem:
- utilize CMake for completely generating revision.h (kills off genrev and revision.h targets): - pull and set correct revision-ID/hash from Mercurial (hg) when using regular repository sourcetree - pull and set correct revision-ID/hash from archived releases (when pulled from googlecode) - set and use _BUILD_DIRECTIVE definition (earlier part of revision.h) as compiletime definition - delete genrev and related buildsystems (now deprecated) - Move some files around to adhere to buildsystem structure Thanks to Shauren for figuring out the definition-behaviour for MSVC while he was in the shower --HG-- branch : trunk rename : cmake_uninstall.cmake.in => cmake/platform/unix/cmake_uninstall.in.cmake
This commit is contained in:
@@ -68,10 +68,8 @@ add_executable(authserver
|
||||
${authserver_SRCS}
|
||||
)
|
||||
|
||||
add_dependencies(authserver revision.h)
|
||||
|
||||
if( NOT WIN32 )
|
||||
add_definitions(-D_TRINITY_REALM_CONFIG='"${CONF_DIR}/authserver.conf"')
|
||||
add_definitions(-D_TRINITY_REALM_CONFIG="${CONF_DIR}/authserver.conf")
|
||||
endif()
|
||||
|
||||
if( UNIX )
|
||||
|
||||
@@ -198,8 +198,6 @@ include_directories(
|
||||
|
||||
add_library(game STATIC ${game_STAT_SRCS})
|
||||
|
||||
add_dependencies(game revision.h)
|
||||
|
||||
# Generate precompiled header
|
||||
if( USE_COREPCH )
|
||||
if(CMAKE_COMPILER_IS_GNUCXX)
|
||||
|
||||
@@ -141,8 +141,6 @@ include_directories(
|
||||
|
||||
add_library(scripts STATIC ${scripts_STAT_SRCS})
|
||||
|
||||
add_dependencies(scripts genrev)
|
||||
|
||||
# Generate precompiled header
|
||||
if( USE_SCRIPTPCH )
|
||||
if(CMAKE_COMPILER_IS_GNUCXX)
|
||||
|
||||
@@ -76,8 +76,6 @@ include_directories(
|
||||
|
||||
add_library(shared STATIC ${shared_STAT_SRCS})
|
||||
|
||||
add_dependencies(shared revision.h)
|
||||
|
||||
target_link_libraries(shared
|
||||
${ACE_LIBRARY}
|
||||
)
|
||||
|
||||
@@ -146,11 +146,9 @@ set(worldserver_LINK_FLAGS "")
|
||||
add_executable(worldserver ${worldserver_SRCS})
|
||||
|
||||
if( NOT WIN32 )
|
||||
add_definitions(-D_TRINITY_CORE_CONFIG='"${CONF_DIR}/worldserver.conf"')
|
||||
add_definitions(-D_TRINITY_CORE_CONFIG="${CONF_DIR}/worldserver.conf")
|
||||
endif()
|
||||
|
||||
add_dependencies(worldserver revision.h)
|
||||
|
||||
if( UNIX )
|
||||
set(worldserver_LINK_FLAGS "-pthread -lncurses ${worldserver_LINK_FLAGS}")
|
||||
endif()
|
||||
|
||||
Reference in New Issue
Block a user