diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/char/CMakeLists.txt | 7 | ||||
-rw-r--r-- | src/char_sql/CMakeLists.txt | 7 | ||||
-rw-r--r-- | src/common/CMakeLists.txt | 25 | ||||
-rw-r--r-- | src/login/sql/CMakeLists.txt | 7 | ||||
-rw-r--r-- | src/login/txt/CMakeLists.txt | 7 | ||||
-rw-r--r-- | src/map/sql/CMakeLists.txt | 9 | ||||
-rw-r--r-- | src/map/txt/CMakeLists.txt | 9 | ||||
-rw-r--r-- | src/tool/CMakeLists.txt | 35 |
8 files changed, 40 insertions, 66 deletions
diff --git a/src/char/CMakeLists.txt b/src/char/CMakeLists.txt index 1f6f1ea11..9e0cbd9f4 100644 --- a/src/char/CMakeLists.txt +++ b/src/char/CMakeLists.txt @@ -36,10 +36,11 @@ add_executable( char-server ${SOURCE_FILES} ) add_dependencies( char-server ${DEPENDENCIES} ) target_link_libraries( char-server ${LIBRARIES} ${DEPENDENCIES} ) set_target_properties( char-server PROPERTIES COMPILE_DEFINITIONS "${DEFINITIONS}" ) -if( INSTALL_RUN_DATA ) +if( WITH_COMPONENT_RUNTIME ) + cpack_add_component( Runtime_charserver_txt DESCRIPTION "char-server (txt version)" DISPLAY_NAME "char-server" GROUP Runtime ) install( TARGETS char-server - DESTINATION ${CMAKE_INSTALL_PREFIX} - COMPONENT "char-server" ) + DESTINATION "." + COMPONENT Runtime_charserver_txt ) endif() message( STATUS "Creating target char-server - done" ) set( HAVE_char-server ON CACHE BOOL "char-server target is available" ) diff --git a/src/char_sql/CMakeLists.txt b/src/char_sql/CMakeLists.txt index 7d3b7ad7e..f2d1cd0f0 100644 --- a/src/char_sql/CMakeLists.txt +++ b/src/char_sql/CMakeLists.txt @@ -42,10 +42,11 @@ add_executable( char-server_sql ${SOURCE_FILES} ) add_dependencies( char-server_sql ${DEPENDENCIES} ) target_link_libraries( char-server_sql ${LIBRARIES} ${DEPENDENCIES} ) set_target_properties( char-server_sql PROPERTIES COMPILE_DEFINITIONS "${DEFINITIONS}" ) -if( INSTALL_RUN_DATA ) +if( WITH_COMPONENT_RUNTIME ) + cpack_add_component( Runtime_charserver_sql DESCRIPTION "char-server (sql version)" DISPLAY_NAME "char-server_sql" GROUP Runtime ) install( TARGETS char-server_sql - DESTINATION ${CMAKE_INSTALL_PREFIX} - COMPONENT "char-server_sql" ) + DESTINATION "." + COMPONENT Runtime_charserver_sql ) endif() message( STATUS "Creating target char-server_sql - done" ) set( HAVE_char-server_sql ON CACHE BOOL "char-server_sql target is available" ) diff --git a/src/common/CMakeLists.txt b/src/common/CMakeLists.txt index 0241dfbca..21feb53f9 100644 --- a/src/common/CMakeLists.txt +++ b/src/common/CMakeLists.txt @@ -1,22 +1,8 @@ -##################################################################### -# Find svnversion -# -message( STATUS "Detecting svnversion" ) -find_program( SVNVERSION_EXECUTABLE svnversion ) -mark_as_advanced( SVNVERSION_EXECUTABLE ) -message( STATUS "Detecting svnversion - done" ) - - # # Create svnversion.h # message( STATUS "Creating svnversion.h" ) -if( SVNVERSION_EXECUTABLE ) - execute_process( COMMAND ${SVNVERSION_EXECUTABLE} ${PROJECT_SOURCE_DIR} - OUTPUT_VARIABLE SVNVERSION - OUTPUT_STRIP_TRAILING_WHITESPACE ) -endif() if( SVNVERSION ) file( WRITE ${CMAKE_CURRENT_BINARY_DIR}/svnversion.h "#ifndef SVNVERSION\n#define SVNVERSION ${SVNVERSION}\n#endif\n" ) @@ -26,11 +12,14 @@ endif() set( GLOBAL_INCLUDE_DIRS ${GLOBAL_INCLUDE_DIRS} ${CMAKE_CURRENT_BINARY_DIR} CACHE INTERNAL "" ) set( SVNVERSION ${SVNVERSION} CACHE STRING "SVN version of the source code" ) -if( INSTALL_BUILD_DATA ) - install( FILES ${CMAKE_CURRENT_BINARY_DIR}/svnversion.h DESTINATION ${CMAKE_INSTALL_PREFIX}/src/common ) +if( WITH_COMPONENT_DEVELOPMENT ) + install( FILES ${CMAKE_CURRENT_BINARY_DIR}/svnversion.h + DESTINATION "src/common" + COMPONENT Development_base ) endif() message( STATUS "Creating svnversion.h - done" ) + ##################################################################### # setup # @@ -65,7 +54,7 @@ set( COMMON_MINI_DEFINITIONS MINICORE CACHE INTERNAL "" ) # # common_base # -if( USE_ZLIB ) +if( WITH_ZLIB ) message( STATUS "Creating target common_base" ) set( COMMON_BASE_HEADERS ${COMMON_ALL_HEADERS} @@ -126,7 +115,7 @@ endif() # # common_sql # -if( HAVE_common_base AND USE_MYSQL ) +if( HAVE_common_base AND WITH_MYSQL ) message( STATUS "Creating target common_sql" ) set( COMMON_SQL_HEADERS ${COMMON_ALL_HEADERS} diff --git a/src/login/sql/CMakeLists.txt b/src/login/sql/CMakeLists.txt index 50bf256e2..ac7d464c9 100644 --- a/src/login/sql/CMakeLists.txt +++ b/src/login/sql/CMakeLists.txt @@ -28,10 +28,11 @@ add_executable( login-server_sql ${SOURCE_FILES} ) add_dependencies( login-server_sql ${DEPENDENCIES} ) target_link_libraries( login-server_sql ${LIBRARIES} ${DEPENDENCIES} ) set_target_properties( login-server_sql PROPERTIES COMPILE_DEFINITIONS "${DEFINITIONS}" ) -if( INSTALL_RUN_DATA ) +if( WITH_COMPONENT_RUNTIME ) + cpack_add_component( Runtime_loginserver_sql DESCRIPTION "login-server (sql version)" DISPLAY_NAME "login-server_sql" GROUP Runtime ) install( TARGETS login-server_sql - DESTINATION ${CMAKE_INSTALL_PREFIX} - COMPONENT "login-server_sql" ) + DESTINATION "." + COMPONENT Runtime_loginserver_sql ) endif() message( STATUS "Creating target login-server_sql - done" ) set( HAVE_login-server_sql ON CACHE BOOL "login-server_sql target is available" ) diff --git a/src/login/txt/CMakeLists.txt b/src/login/txt/CMakeLists.txt index dff7d322c..9d57103e9 100644 --- a/src/login/txt/CMakeLists.txt +++ b/src/login/txt/CMakeLists.txt @@ -28,10 +28,11 @@ add_executable( login-server ${SOURCE_FILES} ) add_dependencies( login-server ${DEPENDENCIES} ) target_link_libraries( login-server ${LIBRARIES} ${DEPENDENCIES} ) set_target_properties( login-server PROPERTIES COMPILE_DEFINITIONS "${DEFINITIONS}" ) -if( INSTALL_RUN_DATA ) +if( WITH_COMPONENT_RUNTIME ) + cpack_add_component( Runtime_loginserver_txt DESCRIPTION "login-server (txt version)" DISPLAY_NAME "login-server" GROUP Runtime ) install( TARGETS login-server - DESTINATION ${CMAKE_INSTALL_PREFIX} - COMPONENT "login-server" ) + DESTINATION "." + COMPONENT Runtime_loginserver_txt ) endif() message( STATUS "Creating target login-server - done" ) set( HAVE_login-server ON CACHE BOOL "login-server target is available" ) diff --git a/src/map/sql/CMakeLists.txt b/src/map/sql/CMakeLists.txt index c7922f276..74598423a 100644 --- a/src/map/sql/CMakeLists.txt +++ b/src/map/sql/CMakeLists.txt @@ -81,7 +81,7 @@ set( DEPENDENCIES common_sql ) set( LIBRARIES ${GLOBAL_LIBRARIES} ) set( INCLUDE_DIRS ${GLOBAL_INCLUDE_DIRS} ) set( DEFINITIONS ${GLOBAL_DEFINITIONS} ) -if( USE_PCRE ) +if( WITH_PCRE ) message( STATUS "Using PCRE" ) list( APPEND LIBRARIES ${PCRE_LIBRARIES} ) list( APPEND INCLUDE_DIRS ${PCRE_INCLUDE_DIRS} ) @@ -95,10 +95,11 @@ add_executable( map-server_sql ${SOURCE_FILES} ) add_dependencies( map-server_sql ${DEPENDENCIES} ) target_link_libraries( map-server_sql ${LIBRARIES} ${DEPENDENCIES} ) set_target_properties( map-server_sql PROPERTIES COMPILE_DEFINITIONS "${DEFINITIONS}" ) -if( INSTALL_RUN_DATA ) +if( WITH_COMPONENT_RUNTIME ) + cpack_add_component( Runtime_mapserver_sql DESCRIPTION "map-server (sql version)" DISPLAY_NAME "map-server_sql" GROUP Runtime ) install( TARGETS map-server_sql - DESTINATION ${CMAKE_INSTALL_PREFIX} - COMPONENT "map-server_sql" ) + DESTINATION "." + COMPONENT Runtime_mapserver_sql ) endif() message( STATUS "Creating target map-server_sql - done" ) set( HAVE_map-server_sql ON CACHE BOOL "map-server_sql target is available" ) diff --git a/src/map/txt/CMakeLists.txt b/src/map/txt/CMakeLists.txt index 544e00c87..d58866f96 100644 --- a/src/map/txt/CMakeLists.txt +++ b/src/map/txt/CMakeLists.txt @@ -81,7 +81,7 @@ set( DEPENDENCIES common_base ) set( LIBRARIES ${GLOBAL_LIBRARIES} ) set( INCLUDE_DIRS ${GLOBAL_INCLUDE_DIRS} ) set( DEFINITIONS ${GLOBAL_DEFINITIONS} TXT_ONLY ) -if( USE_PCRE ) +if( WITH_PCRE ) message( STATUS "Using PCRE" ) list( APPEND LIBRARIES ${PCRE_LIBRARIES} ) list( APPEND INCLUDE_DIRS ${PCRE_INCLUDE_DIRS} ) @@ -95,10 +95,11 @@ add_executable( map-server ${SOURCE_FILES} ) add_dependencies( map-server ${DEPENDENCIES} ) target_link_libraries( map-server ${LIBRARIES} ${DEPENDENCIES} ) set_target_properties( map-server PROPERTIES COMPILE_DEFINITIONS "${DEFINITIONS}" ) -if( INSTALL_RUN_DATA ) +if( WITH_COMPONENT_RUNTIME ) + cpack_add_component( Runtime_mapserver_txt DESCRIPTION "map-server (txt version)" DISPLAY_NAME "map-server" GROUP Runtime ) install( TARGETS map-server - DESTINATION ${CMAKE_INSTALL_PREFIX} - COMPONENT "map-server" ) + DESTINATION "." + COMPONENT Runtime_mapserver_txt ) endif() message( STATUS "Creating target map-server - done" ) set( HAVE_map-server ON CACHE BOOL "map-server target is available" ) diff --git a/src/tool/CMakeLists.txt b/src/tool/CMakeLists.txt index e39b174dd..a23637e3d 100644 --- a/src/tool/CMakeLists.txt +++ b/src/tool/CMakeLists.txt @@ -1,30 +1,8 @@ -# setup -set( COMMON_SOURCES - "${COMMON_SOURCE_DIR}/core.c" -# "${COMMON_SOURCE_DIR}/db.c" -# "${COMMON_SOURCE_DIR}/ers.c" - "${COMMON_SOURCE_DIR}/grfio.c" -# "${COMMON_SOURCE_DIR}/lock.c" - "${COMMON_SOURCE_DIR}/malloc.c" -# "${COMMON_SOURCE_DIR}/mapindex.c" -# "${COMMON_SOURCE_DIR}/md5calc.c" -# "${COMMON_SOURCE_DIR}/nullpo.c" -# "${COMMON_SOURCE_DIR}/plugins.c" -# "${COMMON_SOURCE_DIR}/random.c" - "${COMMON_SOURCE_DIR}/showmsg.c" -# "${COMMON_SOURCE_DIR}/socket.c" - "${COMMON_SOURCE_DIR}/strlib.c" -# "${COMMON_SOURCE_DIR}/timer.c" - "${COMMON_SOURCE_DIR}/utils.c" - ) -set( MAPCACHE_SOURCES - mapcache.c - ) - - +# # mapcache -if( USE_ZLIB ) +# +if( WITH_ZLIB ) message( STATUS "Creating target mapcache" ) set( COMMON_HEADERS ${COMMON_MINI_HEADERS} @@ -49,10 +27,11 @@ add_executable( mapcache ${SOURCE_FILES} ) include_directories( ${INCLUDE_DIRS} ) target_link_libraries( mapcache ${ZLIB_LIBRARIES} ) set_target_properties( mapcache PROPERTIES COMPILE_DEFINITIONS "${DEFINITIONS}" ) -if( INSTALL_RUN_DATA ) +if( WITH_COMPONENT_RUNTIME ) + cpack_add_component( Runtime_mapcache DESCRIPTION "mapcache generator" DISPLAY_NAME "mapcache" GROUP Runtime ) install( TARGETS mapcache - DESTINATION ${CMAKE_INSTALL_PREFIX} - COMPONENT "mapcache" ) + DESTINATION "." + COMPONENT Runtime_mapcache ) endif() message( STATUS "Creating target mapcache - done" ) set( HAVE_mapcache ON CACHE BOOL "mapcache target is available" ) |