BuildSystem/Windows: Add RelWithDebInfo configuration-type (reverts previous commit for fixups with RelWithDebInfo buildtype)
+ Stuff revision.h in under genrev project (yay, another project removed from projectlist) --HG-- branch : trunk
This commit is contained in:
+2
-7
@@ -19,11 +19,11 @@ cmake_minimum_required(VERSION 2.6)
|
|||||||
cmake_policy(SET CMP0005 OLD)
|
cmake_policy(SET CMP0005 OLD)
|
||||||
|
|
||||||
#
|
#
|
||||||
# Override configuration-types - we don't use anything else than debug and release
|
# Override configuration-types
|
||||||
#
|
#
|
||||||
|
|
||||||
if(CMAKE_CONFIGURATION_TYPES)
|
if(CMAKE_CONFIGURATION_TYPES)
|
||||||
set(CMAKE_CONFIGURATION_TYPES Release Debug)
|
set(CMAKE_CONFIGURATION_TYPES Release RelWitDebInfo Debug)
|
||||||
set(CMAKE_CONFIGURATION_TYPES "${CMAKE_CONFIGURATION_TYPES}" CACHE STRING
|
set(CMAKE_CONFIGURATION_TYPES "${CMAKE_CONFIGURATION_TYPES}" CACHE STRING
|
||||||
"Reset the configurations to what we need"
|
"Reset the configurations to what we need"
|
||||||
FORCE)
|
FORCE)
|
||||||
@@ -219,11 +219,6 @@ if( DEBUG )
|
|||||||
add_definitions(-DTRINITY_DEBUG)
|
add_definitions(-DTRINITY_DEBUG)
|
||||||
if(CMAKE_COMPILER_IS_GNUCXX)
|
if(CMAKE_COMPILER_IS_GNUCXX)
|
||||||
add_definitions(-g)
|
add_definitions(-g)
|
||||||
elseif(MSVC)
|
|
||||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /Zi")
|
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /Zi")
|
|
||||||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /DEBUG")
|
|
||||||
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /DEBUG")
|
|
||||||
endif()
|
endif()
|
||||||
else()
|
else()
|
||||||
message("* Build in debug-mode : No (default)")
|
message("* Build in debug-mode : No (default)")
|
||||||
|
|||||||
@@ -16,18 +16,15 @@ add_executable(genrev
|
|||||||
)
|
)
|
||||||
|
|
||||||
if( CMAKE_GENERATOR MATCHES "Visual Studio" )
|
if( CMAKE_GENERATOR MATCHES "Visual Studio" )
|
||||||
add_custom_target("revision.h" ALL
|
add_custom_command(TARGET genrev ALL
|
||||||
COMMAND "${CMAKE_BINARY_DIR}/bin/$(ConfigurationName)/genrev"
|
POST_BUILD
|
||||||
${CMAKE_SOURCE_DIR}
|
COMMAND ${CMAKE_BINARY_DIR}/bin/$(ConfigurationName)/genrev ${CMAKE_SOURCE_DIR}
|
||||||
WORKING_DIRECTORY "${CMAKE_BINARY_DIR}"
|
WORKING_DIRECTORY "${CMAKE_BINARY_DIR}"
|
||||||
DEPENDS genrev
|
|
||||||
)
|
)
|
||||||
else()
|
else()
|
||||||
add_custom_target("revision.h" ALL
|
add_custom_command(TARGET genrev ALL
|
||||||
COMMAND "${CMAKE_BINARY_DIR}/src/genrevision/genrev"
|
COMMAND ${CMAKE_BINARY_DIR}/src/genrevision/genrev ${CMAKE_SOURCE_DIR}
|
||||||
${CMAKE_SOURCE_DIR}
|
|
||||||
WORKING_DIRECTORY "${CMAKE_BINARY_DIR}"
|
WORKING_DIRECTORY "${CMAKE_BINARY_DIR}"
|
||||||
DEPENDS genrev
|
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ add_executable(authserver
|
|||||||
${authserver_SRCS}
|
${authserver_SRCS}
|
||||||
)
|
)
|
||||||
|
|
||||||
add_dependencies(authserver revision.h)
|
add_dependencies(authserver genrev)
|
||||||
|
|
||||||
if( NOT WIN32 )
|
if( NOT WIN32 )
|
||||||
add_definitions(-D_TRINITY_REALM_CONFIG='"${CONF_DIR}/authserver.conf"')
|
add_definitions(-D_TRINITY_REALM_CONFIG='"${CONF_DIR}/authserver.conf"')
|
||||||
|
|||||||
@@ -192,7 +192,7 @@ include_directories(
|
|||||||
|
|
||||||
add_library(game STATIC ${game_STAT_SRCS})
|
add_library(game STATIC ${game_STAT_SRCS})
|
||||||
|
|
||||||
add_dependencies(game revision.h)
|
add_dependencies(game genrev)
|
||||||
|
|
||||||
# Generate precompiled header
|
# Generate precompiled header
|
||||||
if(PCH)
|
if(PCH)
|
||||||
|
|||||||
@@ -139,6 +139,8 @@ include_directories(
|
|||||||
|
|
||||||
add_library(scripts STATIC ${scripts_STAT_SRCS})
|
add_library(scripts STATIC ${scripts_STAT_SRCS})
|
||||||
|
|
||||||
|
add_dependencies(scripts genrev)
|
||||||
|
|
||||||
# Generate precompiled header
|
# Generate precompiled header
|
||||||
if(PCH)
|
if(PCH)
|
||||||
if(CMAKE_COMPILER_IS_GNUCXX)
|
if(CMAKE_COMPILER_IS_GNUCXX)
|
||||||
|
|||||||
@@ -66,7 +66,7 @@ include_directories(
|
|||||||
|
|
||||||
add_library(shared STATIC ${shared_STAT_SRCS})
|
add_library(shared STATIC ${shared_STAT_SRCS})
|
||||||
|
|
||||||
add_dependencies(shared revision.h)
|
add_dependencies(shared genrev)
|
||||||
|
|
||||||
if(WIN32)
|
if(WIN32)
|
||||||
target_link_libraries(shared
|
target_link_libraries(shared
|
||||||
|
|||||||
@@ -135,7 +135,7 @@ if( NOT WIN32 )
|
|||||||
add_definitions(-D_TRINITY_CORE_CONFIG='"${CONF_DIR}/worldserver.conf"')
|
add_definitions(-D_TRINITY_CORE_CONFIG='"${CONF_DIR}/worldserver.conf"')
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
add_dependencies(worldserver revision.h)
|
add_dependencies(worldserver genrev)
|
||||||
|
|
||||||
if( UNIX )
|
if( UNIX )
|
||||||
set(worldserver_LINK_FLAGS "-pthread ${worldserver_LINK_FLAGS}")
|
set(worldserver_LINK_FLAGS "-pthread ${worldserver_LINK_FLAGS}")
|
||||||
|
|||||||
Reference in New Issue
Block a user