* CMake: Added options BUILD_TXT_SERVERS, BUILD_SQL_SERVERS, BUILD_MAPCACHE.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@14921 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
parent
1cae2ede8e
commit
a39699098f
@ -1,5 +1,7 @@
|
||||
Date Added
|
||||
|
||||
2011/07/22
|
||||
* CMake: Added options BUILD_TXT_SERVERS, BUILD_SQL_SERVERS, BUILD_MAPCACHE. [FlavioJS]
|
||||
2011/07/21
|
||||
* CMake: Only install template files if they don't already exist. [FlavioJS]
|
||||
* CMake: Added plugin targets.
|
||||
|
@ -1,5 +1,23 @@
|
||||
|
||||
#
|
||||
# setup and static libraries
|
||||
#
|
||||
add_subdirectory( common )
|
||||
if( HAVE_common_base )
|
||||
option( BUILD_TXT_SERVERS "build txt server executables" ON )
|
||||
else()
|
||||
message( STATUS "Disabled txt server targets (requires common_base)" )
|
||||
endif()
|
||||
if( HAVE_common_sql )
|
||||
option( BUILD_SQL_SERVERS "build sql server executables" ON )
|
||||
else()
|
||||
message( STATUS "Disabled sql server targets (requires common_sql)" )
|
||||
endif()
|
||||
|
||||
|
||||
#
|
||||
# targets
|
||||
#
|
||||
add_subdirectory( login )
|
||||
add_subdirectory( char )
|
||||
add_subdirectory( char_sql )
|
||||
|
@ -8,7 +8,7 @@ set( TXT_CHAR_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR} CACHE INTERNAL "" )
|
||||
#
|
||||
# char txt
|
||||
#
|
||||
if( HAVE_common_base )
|
||||
if( BUILD_TXT_SERVERS )
|
||||
message( STATUS "Creating target char-server" )
|
||||
set( TXT_CHAR_HEADERS
|
||||
"${TXT_CHAR_SOURCE_DIR}/char.h"
|
||||
@ -50,6 +50,4 @@ if( INSTALL_COMPONENT_RUNTIME )
|
||||
endif( INSTALL_COMPONENT_RUNTIME )
|
||||
set( TARGET_LIST ${TARGET_LIST} char-server CACHE INTERNAL "" )
|
||||
message( STATUS "Creating target char-server - done" )
|
||||
else()
|
||||
message( STATUS "Skipping target char-server (requires common_base)" )
|
||||
endif()
|
||||
endif( BUILD_TXT_SERVERS )
|
||||
|
@ -8,7 +8,7 @@ set( SQL_CHAR_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR} CACHE INTERNAL "" )
|
||||
#
|
||||
# char sql
|
||||
#
|
||||
if( HAVE_common_sql )
|
||||
if( BUILD_SQL_SERVERS )
|
||||
message( STATUS "Creating target char-server_sql" )
|
||||
set( SQL_CHAR_HEADERS
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/char.h"
|
||||
@ -55,6 +55,4 @@ if( INSTALL_COMPONENT_RUNTIME )
|
||||
COMPONENT Runtime_charserver_sql )
|
||||
endif( INSTALL_COMPONENT_RUNTIME )
|
||||
message( STATUS "Creating target char-server_sql - done" )
|
||||
else()
|
||||
message( STATUS "Skipping target char-server_sql (requires common_sql)" )
|
||||
endif()
|
||||
endif( BUILD_SQL_SERVERS )
|
||||
|
@ -103,8 +103,7 @@ add_library( common_base ${SOURCE_FILES} )
|
||||
target_link_libraries( common_base ${LIBRARIES} )
|
||||
set_target_properties( common_base PROPERTIES COMPILE_FLAGS "${DEFINITIONS}" )
|
||||
include_directories( ${INCLUDE_DIRS} )
|
||||
set( HAVE_common_base ON CACHE BOOL "common_base target is available" )
|
||||
mark_as_advanced( HAVE_common_base )
|
||||
set( HAVE_common_base ON CACHE INTERNAL "" )
|
||||
set( TARGET_LIST ${TARGET_LIST} common_base CACHE INTERNAL "" )
|
||||
message( STATUS "Creating target common_base - done" )
|
||||
else()
|
||||
@ -136,8 +135,7 @@ add_dependencies( common_sql ${DEPENDENCIES} )
|
||||
target_link_libraries( common_sql ${LIBRARIES} ${DEPENDENCIES} )
|
||||
set_target_properties( common_sql PROPERTIES COMPILE_FLAGS "${DEFINITIONS}" )
|
||||
include_directories( ${INCLUDE_DIRS} )
|
||||
set( HAVE_common_sql ON CACHE BOOL "common_sql target is available" )
|
||||
mark_as_advanced( HAVE_common_sql )
|
||||
set( HAVE_common_sql ON CACHE INTERNAL "" )
|
||||
set( TARGET_LIST ${TARGET_LIST} common_sql CACHE INTERNAL "" )
|
||||
message( STATUS "Creating target common_sql - done" )
|
||||
else()
|
||||
|
@ -2,7 +2,7 @@
|
||||
#
|
||||
# login sql
|
||||
#
|
||||
if( HAVE_common_sql )
|
||||
if( BUILD_SQL_SERVERS )
|
||||
message( STATUS "Creating target login-server_sql" )
|
||||
set( SQL_LOGIN_HEADERS
|
||||
"${SQL_LOGIN_SOURCE_DIR}/account.h"
|
||||
@ -36,6 +36,4 @@ if( INSTALL_COMPONENT_RUNTIME )
|
||||
endif( INSTALL_COMPONENT_RUNTIME )
|
||||
set( TARGET_LIST ${TARGET_LIST} login-server_sql CACHE INTERNAL "" )
|
||||
message( STATUS "Creating target login-server_sql - done" )
|
||||
else()
|
||||
message( STATUS "Skipping target login-server_sql (requires common_sql)" )
|
||||
endif()
|
||||
endif( BUILD_SQL_SERVERS )
|
||||
|
@ -2,7 +2,7 @@
|
||||
#
|
||||
# login txt
|
||||
#
|
||||
if( HAVE_common_base )
|
||||
if( BUILD_TXT_SERVERS )
|
||||
message( STATUS "Creating target login-server" )
|
||||
set( TXT_LOGIN_HEADERS
|
||||
"${TXT_LOGIN_SOURCE_DIR}/account.h"
|
||||
@ -36,6 +36,4 @@ if( INSTALL_COMPONENT_RUNTIME )
|
||||
endif( INSTALL_COMPONENT_RUNTIME )
|
||||
set( TARGET_LIST ${TARGET_LIST} login-server CACHE INTERNAL "" )
|
||||
message( STATUS "Creating target login-server - done" )
|
||||
else()
|
||||
message( STATUS "Skipping target login-server (requires common_base)" )
|
||||
endif()
|
||||
endif( BUILD_TXT_SERVERS )
|
||||
|
@ -2,7 +2,7 @@
|
||||
#
|
||||
# map sql
|
||||
#
|
||||
if( HAVE_common_sql )
|
||||
if( BUILD_SQL_SERVERS )
|
||||
message( STATUS "Creating target map-server_sql" )
|
||||
set( SQL_MAP_HEADERS
|
||||
"${SQL_MAP_SOURCE_DIR}/atcommand.h"
|
||||
@ -82,10 +82,12 @@ set( LIBRARIES ${GLOBAL_LIBRARIES} )
|
||||
set( INCLUDE_DIRS ${GLOBAL_INCLUDE_DIRS} )
|
||||
set( DEFINITIONS "${GLOBAL_DEFINITIONS}" )
|
||||
if( WITH_PCRE )
|
||||
message( STATUS "Using PCRE" )
|
||||
message( STATUS "Enabled PCRE code" )
|
||||
set( LIBRARIES ${LIBRARIES} ${PCRE_LIBRARIES} )
|
||||
set( INCLUDE_DIRS ${INCLUDE_DIRS} ${PCRE_INCLUDE_DIRS} )
|
||||
set( DEFINITIONS "${DEFINITIONS} -DPCRE_SUPPORT" )
|
||||
else()
|
||||
message( STATUS "Disabled PCRE code" )
|
||||
endif()
|
||||
set( SOURCE_FILES ${COMMON_BASE_HEADERS} ${COMMON_SQL_HEADERS} ${SQL_MAP_HEADERS} ${SQL_MAP_SOURCES} )
|
||||
source_group( common FILES ${COMMON_BASE_HEADERS} ${COMMON_SQL_HEADERS} )
|
||||
@ -103,6 +105,4 @@ if( INSTALL_COMPONENT_RUNTIME )
|
||||
endif( INSTALL_COMPONENT_RUNTIME )
|
||||
set( TARGET_LIST ${TARGET_LIST} map-server_sql CACHE INTERNAL "" )
|
||||
message( STATUS "Creating target map-server_sql - done" )
|
||||
else()
|
||||
message( STATUS "Skipping target map-server_sql (requires common_sql; optional PCRE)" )
|
||||
endif()
|
||||
endif( BUILD_SQL_SERVERS )
|
||||
|
@ -2,7 +2,7 @@
|
||||
#
|
||||
# map txt
|
||||
#
|
||||
if( HAVE_common_base )
|
||||
if( BUILD_TXT_SERVERS )
|
||||
message( STATUS "Creating target map-server" )
|
||||
set( TXT_MAP_HEADERS
|
||||
"${TXT_MAP_SOURCE_DIR}/atcommand.h"
|
||||
@ -82,10 +82,12 @@ set( LIBRARIES ${GLOBAL_LIBRARIES} )
|
||||
set( INCLUDE_DIRS ${GLOBAL_INCLUDE_DIRS} )
|
||||
set( DEFINITIONS "${GLOBAL_DEFINITIONS} -DTXT_ONLY" )
|
||||
if( WITH_PCRE )
|
||||
message( STATUS "Using PCRE" )
|
||||
message( STATUS "Enabled PCRE code" )
|
||||
set( LIBRARIES ${LIBRARIES} ${PCRE_LIBRARIES} )
|
||||
set( INCLUDE_DIRS ${INCLUDE_DIRS} ${PCRE_INCLUDE_DIRS} )
|
||||
set( DEFINITIONS "${DEFINITIONS} -DPCRE_SUPPORT" )
|
||||
else()
|
||||
message( STATUS "Disabled PCRE code" )
|
||||
endif()
|
||||
set( SOURCE_FILES ${COMMON_BASE_HEADERS} ${TXT_MAP_HEADERS} ${TXT_MAP_SOURCES} )
|
||||
source_group( common FILES ${COMMON_BASE_HEADERS} )
|
||||
@ -103,6 +105,4 @@ if( INSTALL_COMPONENT_RUNTIME )
|
||||
endif( INSTALL_COMPONENT_RUNTIME )
|
||||
set( TARGET_LIST ${TARGET_LIST} map-server CACHE INTERNAL "" )
|
||||
message( STATUS "Creating target map-server - done" )
|
||||
else()
|
||||
message( STATUS "Skipping target map-server (requires common_base; optional PCRE)" )
|
||||
endif()
|
||||
endif( BUILD_TXT_SERVERS )
|
||||
|
@ -48,6 +48,9 @@ if( WIN32 )
|
||||
option( BUILD_PLUGIN_dbghelpplug "build dbghelpplug plugin" OFF )
|
||||
endif()
|
||||
endif()
|
||||
if( NOT DEFINED BUILD_PLUGIN_dbghelpplug )
|
||||
message( STATUS "Disabled dbghelpplug plugin target (requires WIN32 and HAVE_DBGHELP_H)" )
|
||||
endif()
|
||||
if( BUILD_PLUGIN_dbghelpplug )
|
||||
message( STATUS "Creating target dbghelpplug" )
|
||||
set( DBGHELPPLUG_SOURCES
|
||||
@ -80,6 +83,8 @@ endif( BUILD_PLUGIN_dbghelpplug )
|
||||
#
|
||||
if( WIN32 OR HAVE_GETPID )
|
||||
option( BUILD_PLUGIN_pid "build pid plugin" OFF )
|
||||
else()
|
||||
message( STATUS "Disabled pid plugin target (requires WIN32 or HAVE_GETPID)" )
|
||||
endif()
|
||||
if( BUILD_PLUGIN_pid )
|
||||
message( STATUS "Creating target pid" )
|
||||
|
@ -3,6 +3,11 @@
|
||||
# mapcache
|
||||
#
|
||||
if( WITH_ZLIB )
|
||||
option( BUILD_MAPCACHE "build mapcache executable" ON )
|
||||
else()
|
||||
message( STATUS "Disabled mapcache target (required ZLIB)" )
|
||||
endif()
|
||||
if( BUILD_MAPCACHE )
|
||||
message( STATUS "Creating target mapcache" )
|
||||
set( COMMON_HEADERS
|
||||
${COMMON_MINI_HEADERS}
|
||||
@ -35,7 +40,4 @@ if( INSTALL_COMPONENT_RUNTIME )
|
||||
endif( INSTALL_COMPONENT_RUNTIME )
|
||||
set( TARGET_LIST ${TARGET_LIST} mapcache CACHE INTERNAL "" )
|
||||
message( STATUS "Creating target mapcache - done" )
|
||||
else()
|
||||
message( STATUS "Skipping target mapcache (requires ZLIB)" )
|
||||
unset( HAVE_mapcache CACHE )
|
||||
endif()
|
||||
endif( BUILD_MAPCACHE )
|
||||
|
@ -4,7 +4,9 @@
|
||||
#
|
||||
set( CONVERTER_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR} CACHE INTERNAL "" )
|
||||
if( WITH_MYSQL )
|
||||
option( BUILD_CONVERTERS "build login-converter and char-converter" OFF )
|
||||
option( BUILD_CONVERTERS "build converter executables" OFF )
|
||||
else()
|
||||
message( STATUS "Disabled converter targets (requires MYSQL)" )
|
||||
endif()
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user