always set cmake $CONF_DIR and add in preprocessor defines
This commit is contained in:
@@ -14,3 +14,5 @@ if(WIN32)
|
|||||||
elseif(UNIX)
|
elseif(UNIX)
|
||||||
include("${CMAKE_SOURCE_DIR}/src/cmake/platform/unix/settings.cmake")
|
include("${CMAKE_SOURCE_DIR}/src/cmake/platform/unix/settings.cmake")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
include("${CMAKE_SOURCE_DIR}/src/cmake/platform/after_platform.cmake")
|
||||||
|
|||||||
@@ -0,0 +1,4 @@
|
|||||||
|
if( NOT CONF_DIR )
|
||||||
|
set(CONF_DIR ${CMAKE_INSTALL_PREFIX})
|
||||||
|
message(STATUS "Using installation path for configuration files")
|
||||||
|
endif()
|
||||||
@@ -11,8 +11,11 @@ message("")
|
|||||||
message("* Install core to : ${CMAKE_INSTALL_PREFIX}")
|
message("* Install core to : ${CMAKE_INSTALL_PREFIX}")
|
||||||
if( UNIX )
|
if( UNIX )
|
||||||
message("* Install libraries to : ${LIBSDIR}")
|
message("* Install libraries to : ${LIBSDIR}")
|
||||||
message("* Install configs to : ${CONF_DIR}")
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
message("* Install configs to : ${CONF_DIR}")
|
||||||
|
add_definitions(-D_CONF_DIR="\\"${CONF_DIR}\\"")
|
||||||
|
|
||||||
message("")
|
message("")
|
||||||
|
|
||||||
# Show infomation about the options selected during configuration
|
# Show infomation about the options selected during configuration
|
||||||
|
|||||||
@@ -98,12 +98,12 @@ endif()
|
|||||||
|
|
||||||
if( UNIX )
|
if( UNIX )
|
||||||
install(TARGETS authserver DESTINATION bin)
|
install(TARGETS authserver DESTINATION bin)
|
||||||
install(FILES authserver.conf.dist DESTINATION ${CONF_DIR})
|
|
||||||
elseif( WIN32 )
|
elseif( WIN32 )
|
||||||
install(TARGETS authserver DESTINATION "${CMAKE_INSTALL_PREFIX}")
|
install(TARGETS authserver DESTINATION "${CMAKE_INSTALL_PREFIX}")
|
||||||
install(FILES authserver.conf.dist DESTINATION "${CMAKE_INSTALL_PREFIX}")
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
install(FILES authserver.conf.dist DESTINATION ${CONF_DIR})
|
||||||
|
|
||||||
# Generate precompiled header
|
# Generate precompiled header
|
||||||
if (USE_COREPCH)
|
if (USE_COREPCH)
|
||||||
add_cxx_pch(authserver ${authserver_PCH_HDR} ${authserver_PCH_SRC})
|
add_cxx_pch(authserver ${authserver_PCH_HDR} ${authserver_PCH_SRC})
|
||||||
|
|||||||
@@ -198,12 +198,12 @@ endif()
|
|||||||
|
|
||||||
if( UNIX )
|
if( UNIX )
|
||||||
install(TARGETS worldserver DESTINATION bin)
|
install(TARGETS worldserver DESTINATION bin)
|
||||||
install(FILES worldserver.conf.dist DESTINATION ${CONF_DIR})
|
|
||||||
elseif( WIN32 )
|
elseif( WIN32 )
|
||||||
install(TARGETS worldserver DESTINATION "${CMAKE_INSTALL_PREFIX}")
|
install(TARGETS worldserver DESTINATION "${CMAKE_INSTALL_PREFIX}")
|
||||||
install(FILES worldserver.conf.dist DESTINATION "${CMAKE_INSTALL_PREFIX}")
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
install(FILES worldserver.conf.dist DESTINATION ${CONF_DIR})
|
||||||
|
|
||||||
# Generate precompiled header
|
# Generate precompiled header
|
||||||
if( USE_COREPCH )
|
if( USE_COREPCH )
|
||||||
add_cxx_pch(worldserver ${worldserver_PCH_HDR} ${worldserver_PCH_SRC})
|
add_cxx_pch(worldserver ${worldserver_PCH_HDR} ${worldserver_PCH_SRC})
|
||||||
|
|||||||
Reference in New Issue
Block a user