diff options
author | Shido <the.keikun@gmail.com> | 2014-05-17 17:42:40 +0800 |
---|---|---|
committer | Shido <the.keikun@gmail.com> | 2014-05-30 09:20:04 +0800 |
commit | 05902619eb900472906b9cce38b276e3517d1719 (patch) | |
tree | ee24cadaad612c89969461e67d11184ba5c3879e | |
parent | aed877235088b6f1d27b6fd03813c2d59e8e13c1 (diff) | |
download | hercules-05902619eb900472906b9cce38b276e3517d1719.tar.gz hercules-05902619eb900472906b9cce38b276e3517d1719.tar.bz2 hercules-05902619eb900472906b9cce38b276e3517d1719.tar.xz hercules-05902619eb900472906b9cce38b276e3517d1719.zip |
Removed CMakeLists.txt (Thanks to Haruna)
-rw-r--r-- | 3rdparty/CMakeLists.txt | 55 | ||||
-rw-r--r-- | 3rdparty/libconfig/CMakeLists.txt | 29 | ||||
-rw-r--r-- | 3rdparty/msinttypes/CMakeLists.txt | 9 | ||||
-rw-r--r-- | 3rdparty/mt19937ar/CMakeLists.txt | 16 | ||||
-rw-r--r-- | 3rdparty/mysql/CMakeLists.txt | 68 | ||||
-rw-r--r-- | 3rdparty/pcre/CMakeLists.txt | 65 | ||||
-rw-r--r-- | 3rdparty/zlib/CMakeLists.txt | 64 | ||||
-rw-r--r-- | CMakeLists.txt | 594 | ||||
-rw-r--r-- | src/CMakeLists.txt | 20 | ||||
-rw-r--r-- | src/char/CMakeLists.txt | 62 | ||||
-rw-r--r-- | src/common/CMakeLists.txt | 166 | ||||
-rw-r--r-- | src/login/CMakeLists.txt | 12 | ||||
-rw-r--r-- | src/login/sql/CMakeLists.txt | 39 | ||||
-rw-r--r-- | src/map/CMakeLists.txt | 12 | ||||
-rw-r--r-- | src/map/sql/CMakeLists.txt | 118 | ||||
-rw-r--r-- | src/plugins/CMakeLists.txt | 36 | ||||
-rw-r--r-- | src/tool/CMakeLists.txt | 45 |
17 files changed, 0 insertions, 1410 deletions
diff --git a/3rdparty/CMakeLists.txt b/3rdparty/CMakeLists.txt deleted file mode 100644 index 3b60b68dc..000000000 --- a/3rdparty/CMakeLists.txt +++ /dev/null @@ -1,55 +0,0 @@ - -# macro to configure the use of local or system version of a package -# Uses: -# HAVE_LOCAL_${name} - is local version available? -# ${name}_LOCAL_LIBRARIES - libraries of the local version -# ${name}_LOCAL_INCLUDE_DIRS - include directories of the local version -# HAVE_SYSTEM_${name} - is system version available? -# ${name}_SYSTEM_LIBRARIES - libraries of the system version -# ${name}_SYSTEM_INCLUDE_DIRS - include directories of the system version -# Generates: -# WITH_LOCAL_${name} - use the local version of the package (only when local is available) -# WITH_${name} - use this package -# ${name}_LIBRARIES - libraries -# ${name}_INCLUDE_DIRS - include directories -macro( CONFIGURE_WITH_LOCAL_OR_SYSTEM name ) - unset( ${name}_LIBRARIES CACHE ) - unset( ${name}_INCLUDE_DIRS CACHE ) - if( HAVE_LOCAL_${name} ) - set( WITH_LOCAL_${name} ON - CACHE BOOL "use local version of ${name}" ) - else() - unset( WITH_LOCAL_${name} CACHE ) - endif() - if( WITH_LOCAL_${name} ) - message( STATUS "Configuring for local ${name}" ) - set( ${name}_LIBRARIES ${${name}_LOCAL_LIBRARIES} ) - set( ${name}_INCLUDE_DIRS ${${name}_LOCAL_INCLUDE_DIRS} ) - message( STATUS "Configuring for local ${name} - done" ) - elseif( HAVE_SYSTEM_${name} ) - message( STATUS "Configuring for system ${name}" ) - set( ${name}_LIBRARIES ${${name}_SYSTEM_LIBRARIES} ) - set( ${name}_INCLUDE_DIRS ${${name}_SYSTEM_INCLUDE_DIRS} ) - message( STATUS "Configuring for system ${name} - done" ) - endif() - if( WITH_LOCAL_${name} OR HAVE_SYSTEM_${name} ) - set( WITH_${name} ON - CACHE BOOL "use ${name}" ) - else() - unset( WITH_${name} CACHE ) - endif() - set( ${name}_LIBRARIES ${${name}_LIBRARIES} - CACHE PATH "${name} libraries" ) - set( ${name}_INCLUDE_DIRS ${${name}_INCLUDE_DIRS} - CACHE PATH "${name} include directories" ) - mark_as_advanced( ${name}_LIBRARIES ) - mark_as_advanced( ${name}_INCLUDE_DIRS ) -endmacro( CONFIGURE_WITH_LOCAL_OR_SYSTEM ) - - -add_subdirectory( libconfig ) -add_subdirectory( msinttypes ) -add_subdirectory( mt19937ar ) -add_subdirectory( mysql ) -add_subdirectory( pcre ) -add_subdirectory( zlib ) diff --git a/3rdparty/libconfig/CMakeLists.txt b/3rdparty/libconfig/CMakeLists.txt deleted file mode 100644 index a99441249..000000000 --- a/3rdparty/libconfig/CMakeLists.txt +++ /dev/null @@ -1,29 +0,0 @@ - -find_path( LIBCONFIG_INCLUDE_DIRS "libconfig.h" - PATHS "${CMAKE_CURRENT_SOURCE_DIR}" - NO_DEFAULT_PATH ) -find_path( LIBCONFIG_SOURCE_DIR "libconfig.c" - PATHS "${CMAKE_CURRENT_SOURCE_DIR}" - NO_DEFAULT_PATH ) -mark_as_advanced( LIBCONFIG_INCLUDE_DIRS ) -mark_as_advanced( LIBCONFIG_SOURCE_DIR ) - -set( LIBCONFIG_HEADERS - "${CMAKE_CURRENT_SOURCE_DIR}/grammar.h" - "${CMAKE_CURRENT_SOURCE_DIR}/libconfig.h" - "${CMAKE_CURRENT_SOURCE_DIR}/parsectx.h" - "${CMAKE_CURRENT_SOURCE_DIR}/scanctx.h" - "${CMAKE_CURRENT_SOURCE_DIR}/scanner.h" - "${CMAKE_CURRENT_SOURCE_DIR}/strbuf.h" - "${CMAKE_CURRENT_SOURCE_DIR}/wincompat.h" - CACHE INTERNAL "libconfig headers" ) -set( LIBCONFIG_SOURCES - "${CMAKE_CURRENT_SOURCE_DIR}/grammar.c" - "${CMAKE_CURRENT_SOURCE_DIR}/libconfig.c" - "${CMAKE_CURRENT_SOURCE_DIR}/scanctx.c" - "${CMAKE_CURRENT_SOURCE_DIR}/scanner.c" - "${CMAKE_CURRENT_SOURCE_DIR}/strbuf.c" - CACHE INTERNAL "libconfig sources" ) -set( LIBCONFIG_DEFINITIONS - "-DLIBCONFIG_STATIC" - CACHE INTERNAL "libconfig definitions" ) diff --git a/3rdparty/msinttypes/CMakeLists.txt b/3rdparty/msinttypes/CMakeLists.txt deleted file mode 100644 index c11c1d72a..000000000 --- a/3rdparty/msinttypes/CMakeLists.txt +++ /dev/null @@ -1,9 +0,0 @@ - -if( MSVC ) -find_path( MSINTTYPES_INCLUDE_DIRS "inttypes.h" - PATHS "${CMAKE_CURRENT_SOURCE_DIR}/include" - NO_DEFAULT_PATH ) -mark_as_advanced( MSINTTYPES_INCLUDE_DIRS ) -message( STATUS "Adding global include directory: ${MSINTTYPES_INCLUDE_DIRS}" ) -set_property( CACHE GLOBAL_INCLUDE_DIRS PROPERTY VALUE ${GLOBAL_INCLUDE_DIRS} ${MSINTTYPES_INCLUDE_DIRS} ) -endif() diff --git a/3rdparty/mt19937ar/CMakeLists.txt b/3rdparty/mt19937ar/CMakeLists.txt deleted file mode 100644 index 08eff5790..000000000 --- a/3rdparty/mt19937ar/CMakeLists.txt +++ /dev/null @@ -1,16 +0,0 @@ - -find_path( MT19937AR_INCLUDE_DIRS "mt19937ar.h" - PATHS "${CMAKE_CURRENT_SOURCE_DIR}" - NO_DEFAULT_PATH ) -find_path( MT19937AR_SOURCE_DIR "mt19937ar.c" - PATHS "${CMAKE_CURRENT_SOURCE_DIR}" - NO_DEFAULT_PATH ) -mark_as_advanced( MT19937AR_INCLUDE_DIRS ) -mark_as_advanced( MT19937AR_SOURCE_DIR ) - -set( MT19937AR_HEADERS - "${CMAKE_CURRENT_SOURCE_DIR}/mt19937ar.h" - CACHE INTERNAL "mt19937ar headers" ) -set( MT19937AR_SOURCES - "${CMAKE_CURRENT_SOURCE_DIR}/mt19937ar.c" - CACHE INTERNAL "mt19937ar sources" ) diff --git a/3rdparty/mysql/CMakeLists.txt b/3rdparty/mysql/CMakeLists.txt deleted file mode 100644 index e85fd626d..000000000 --- a/3rdparty/mysql/CMakeLists.txt +++ /dev/null @@ -1,68 +0,0 @@ - -# -# local copy -# -if( WIN32 ) -message( STATUS "Detecting local MYSQL" ) -find_path( MYSQL_LOCAL_INCLUDE_DIRS "mysql.h" - PATHS "${CMAKE_CURRENT_SOURCE_DIR}/include" - NO_DEFAULT_PATH ) -find_library( MYSQL_LOCAL_LIBRARIES - NAMES libmysql - PATHS "${CMAKE_CURRENT_SOURCE_DIR}/lib" - NO_DEFAULT_PATH ) -mark_as_advanced( MYSQL_LOCAL_LIBRARIES ) -mark_as_advanced( MYSQL_LOCAL_INCLUDE_DIRS ) - -if( MYSQL_LOCAL_LIBRARIES AND MYSQL_LOCAL_INCLUDE_DIRS ) - if( EXISTS "${MYSQL_LOCAL_INCLUDE_DIRS}/mysql_version.h" ) - file( STRINGS "${MYSQL_LOCAL_INCLUDE_DIRS}/mysql_version.h" MYSQL_VERSION_H REGEX "^#define MYSQL_SERVER_VERSION[ \t]+\"[^\"]+\".*$" ) - string( REGEX REPLACE "^.*MYSQL_SERVER_VERSION[ \t]+\"([^\"]+)\".*$" "\\1" MYSQL_SERVER_VERSION "${MYSQL_VERSION_H}" ) - message( STATUS "Found MYSQL: ${MYSQL_LOCAL_LIBRARIES} (found version ${MYSQL_SERVER_VERSION})" ) - else() - message( STATUS "Found MYSQL: ${MYSQL_LOCAL_LIBRARIES}" ) - endif() - set( HAVE_LOCAL_MYSQL ON - CACHE BOOL "mysql client is available as a local copy") - mark_as_advanced( HAVE_LOCAL_MYSQL ) -else() - foreach( _VAR MYSQL_LOCAL_LIBRARIES MYSQL_LOCAL_INCLUDE_DIRS ) - if( NOT "${_VAR}" ) - set( MISSING_VARS ${MISSING_VARS} ${_VAR} ) - endif() - endforeach() - message( STATUS "Could NOT find MYSQL (missing: ${MISSING_VARS})" ) - unset( HAVE_LOCAL_MYSQL CACHE ) -endif() -message( STATUS "Detecting local MYSQL - done" ) -endif( WIN32 ) - - -# -# system -# -message( STATUS "Detecting system MYSQL" ) -unset( MYSQL_LIBRARIES CACHE ) -unset( MYSQL_INCLUDE_DIRS CACHE ) -find_package( MYSQL ) -set( MYSQL_SYSTEM_LIBRARIES "${MYSQL_LIBRARIES}" - CACHE PATH "system mysql libraries" ) -set( MYSQL_SYSTEM_INCLUDE_DIRS "${MYSQL_INCLUDE_DIRS}" - CACHE PATH "system mysql include directories" ) -mark_as_advanced( MYSQL_SYSTEM_LIBRARIES ) -mark_as_advanced( MYSQL_SYSTEM_INCLUDE_DIRS ) - -if( MYSQL_SYSTEM_LIBRARIES AND MYSQL_SYSTEM_INCLUDE_DIRS ) - set( HAVE_SYSTEM_MYSQL ON - CACHE BOOL "mysql client is available on the system" ) - mark_as_advanced( HAVE_SYSTEM_MYSQL ) -else() - unset( HAVE_SYSTEM_MYSQL CACHE ) -endif() -message( STATUS "Detecting system MYSQL - done" ) - - -# -# configure -# -CONFIGURE_WITH_LOCAL_OR_SYSTEM( MYSQL ) diff --git a/3rdparty/pcre/CMakeLists.txt b/3rdparty/pcre/CMakeLists.txt deleted file mode 100644 index 57465a46c..000000000 --- a/3rdparty/pcre/CMakeLists.txt +++ /dev/null @@ -1,65 +0,0 @@ - -# -# local copy -# -if( WIN32 ) -message( STATUS "Detecting local PCRE" ) -find_path( PCRE_LOCAL_INCLUDE_DIRS "pcre.h" - PATHS "${CMAKE_CURRENT_SOURCE_DIR}/include" - NO_DEFAULT_PATH ) -find_library( PCRE_LOCAL_LIBRARIES - NAMES pcre - PATHS "${CMAKE_CURRENT_SOURCE_DIR}/lib" - NO_DEFAULT_PATH ) -mark_as_advanced( PCRE_LOCAL_LIBRARIES ) -mark_as_advanced( PCRE_LOCAL_INCLUDE_DIRS ) - -if( PCRE_LOCAL_LIBRARIES AND PCRE_LOCAL_INCLUDE_DIRS ) - file( STRINGS "${PCRE_LOCAL_INCLUDE_DIRS}/pcre.h" PCRE_H REGEX "^#define[ \t]+PCRE_M[A-Z]+[ \t]+[0-9]+.*$" ) - string( REGEX REPLACE "^.*PCRE_MAJOR[ \t]+([0-9]+).*$" "\\1" PCRE_MAJOR "${PCRE_H}" ) - string( REGEX REPLACE "^.*PCRE_MINOR[ \t]+([0-9]+).*$" "\\1" PCRE_MINOR "${PCRE_H}" ) - message( STATUS "Found PCRE: ${PCRE_LOCAL_LIBRARIES} (found version ${PCRE_MAJOR}.${PCRE_MINOR})" ) - set( HAVE_LOCAL_PCRE ON - CACHE BOOL "pcre is available as a local copy" ) - mark_as_advanced( HAVE_LOCAL_PCRE ) -else() - foreach( _VAR PCRE_LOCAL_LIBRARIES PCRE_LOCAL_INCLUDE_DIRS ) - if( NOT "${_VAR}" ) - set( MISSING_VARS ${MISSING_VARS} ${_VAR} ) - endif() - endforeach() - message( STATUS "Could NOT find PCRE (missing: ${MISSING_VARS})" ) - unset( HAVE_LOCAL_PCRE CACHE ) -endif() -message( STATUS "Detecting local PCRE - done" ) -endif( WIN32 ) - - -# -# system -# -message( STATUS "Detecting system PCRE" ) -unset( PCRE_LIBRARIES CACHE ) -unset( PCRE_INCLUDE_DIRS CACHE ) -find_package( PCRE ) -set( PCRE_SYSTEM_LIBRARIES ${PCRE_LIBRARIES} - CACHE PATH "system pcre libraries" ) -set( PCRE_SYSTEM_INCLUDE_DIRS ${PCRE_INCLUDE_DIRS} - CACHE PATH "system pcre include directories" ) -mark_as_advanced( PCRE_SYSTEM_LIBRARIES ) -mark_as_advanced( PCRE_SYSTEM_INCLUDE_DIRS ) - -if( PCRE_SYSTEM_LIBRARIES AND PCRE_SYSTEM_INCLUDE_DIRS ) - set( HAVE_SYSTEM_PCRE ON - CACHE BOOL "pcre is available on the system" ) - mark_as_advanced( HAVE_SYSTEM_PCRE ) -else() - unset( HAVE_SYSTEM_PCRE CACHE ) -endif() -message( STATUS "Detecting system PCRE - done" ) - - -# -# configure -# -CONFIGURE_WITH_LOCAL_OR_SYSTEM( PCRE ) diff --git a/3rdparty/zlib/CMakeLists.txt b/3rdparty/zlib/CMakeLists.txt deleted file mode 100644 index 4002908f5..000000000 --- a/3rdparty/zlib/CMakeLists.txt +++ /dev/null @@ -1,64 +0,0 @@ - -# -# local copy -# -if( WIN32 ) -message( STATUS "Detecting local ZLIB" ) -find_path( ZLIB_LOCAL_INCLUDE_DIRS "zlib.h" - PATHS "${CMAKE_CURRENT_SOURCE_DIR}/include" - NO_DEFAULT_PATH ) -find_library( ZLIB_LOCAL_LIBRARIES - NAMES zdll - PATHS "${CMAKE_CURRENT_SOURCE_DIR}/lib" - NO_DEFAULT_PATH ) -mark_as_advanced( ZLIB_LOCAL_LIBRARIES ) -mark_as_advanced( ZLIB_LOCAL_INCLUDE_DIRS ) - -if( ZLIB_LOCAL_LIBRARIES AND ZLIB_LOCAL_INCLUDE_DIRS ) - file( STRINGS "${ZLIB_LOCAL_INCLUDE_DIRS}/zlib.h" ZLIB_H REGEX "^#define[ \t]+ZLIB_VERSION[ \t]+\"[^\"]+\".*$" ) - string( REGEX REPLACE "^.*ZLIB_VERSION[ \t]+\"([^\"]+)\".*$" "\\1" ZLIB_VERSION "${ZLIB_H}" ) - message( STATUS "Found local ZLIB: ${ZLIB_LOCAL_LIBRARIES} (found version ${ZLIB_VERSION})" ) - set( HAVE_LOCAL_ZLIB ON - CACHE BOOL "zlib is available as a local copy" ) - mark_as_advanced( HAVE_LOCAL_ZLIB ) -else() - foreach( _VAR ZLIB_LOCAL_LIBRARIES ZLIB_LOCAL_INCLUDE_DIRS ) - if( NOT "${_VAR}" ) - set( MISSING_VARS ${MISSING_VARS} ${_VAR} ) - endif() - endforeach() - message( STATUS "Could NOT find local ZLIB (missing: ${MISSING_VARS})" ) - unset( HAVE_LOCAL_ZLIB CACHE ) -endif() -message( STATUS "Detecting local ZLIB - done" ) -endif( WIN32 ) - - -# -# system -# -message( STATUS "Detecting system ZLIB" ) -unset( ZLIB_LIBRARIES CACHE ) -unset( ZLIB_INCLUDE_DIRS CACHE ) -find_package( ZLIB ) -set( ZLIB_SYSTEM_LIBRARIES ${ZLIB_LIBRARIES} - CACHE PATH "system zlib libraries" ) -set( ZLIB_SYSTEM_INCLUDE_DIRS ${ZLIB_INCLUDE_DIRS} - CACHE PATH "system zlib include directories" ) -mark_as_advanced( ZLIB_SYSTEM_LIBRARIES ) -mark_as_advanced( ZLIB_SYSTEM_INCLUDE_DIRS ) - -if( ZLIB_SYSTEM_LIBRARIES AND ZLIB_SYSTEM_INCLUDE_DIRS ) - set( HAVE_SYSTEM_ZLIB ON - CACHE BOOL "zlib is available on the system" ) - mark_as_advanced( HAVE_SYSTEM_ZLIB ) -else() - unset( HAVE_SYSTEM_ZLIB CACHE ) -endif() -message( STATUS "Detecting system ZLIB - done" ) - - -# -# configure -# -CONFIGURE_WITH_LOCAL_OR_SYSTEM( ZLIB ) diff --git a/CMakeLists.txt b/CMakeLists.txt deleted file mode 100644 index 883920817..000000000 --- a/CMakeLists.txt +++ /dev/null @@ -1,594 +0,0 @@ -##################################################################### -# -# "Getting Started with CMake", a tutorial video by Eric Wing. -# Part 1 of 6: http://www.youtube.com/watch?v=CLvZTyji_Uw -# Part 2 of 6: http://www.youtube.com/watch?v=gUW-RrRQjEg -# Part 3 of 6: http://www.youtube.com/watch?v=sz6cPhbuTk4 -# Part 4 of 6: http://www.youtube.com/watch?v=JICZOkyNXbg -# Part 5 of 6: http://www.youtube.com/watch?v=lAiuLHy4dCk -# Part 6 of 6: http://www.youtube.com/watch?v=fAtJNzDZdH8 -# -# You can use notepad++ for syntax highlighting. -# Naming conventions: -# WITH_* : option to use an external package or not -# ENABLE_* : option to use an internal feature/code or not -# HAVE_* : internal variable indicating if we have and are using something -# -# Maintainer: Fl�vio J. Saraiva (feel free to send complaints or suggestions) -# flaviojs @ rAthena forum/irc -# flaviojs2005 \A-T/ gmail <D.o,T> com -# -##################################################################### - - -#cmake_minimum_required( VERSION 2.8.4 ) -# Functional changes from 2.8.3 to 2.8.4: -# string(SUBSTRING) works with length -1 as "rest of string" -# changes to some CPack generators -# CYGWIN no longer defines WIN32 -# CMP0017: Prefer files from the CMake module directory when including from there. -set( CMAKE_LEGACY_CYGWIN_WIN32 0 ) -cmake_minimum_required( VERSION 2.8.3 ) -project( rAthena C ) -if( CYGWIN ) - unset( WIN32 ) -endif() - - -# -# Prevent building in the source directory by default -# -if( ALLOW_SAME_DIRECTORY ) -elseif( "${CMAKE_CURRENT_SOURCE_DIR}" STREQUAL "${CMAKE_CURRENT_BINARY_DIR}" ) - option( ALLOW_SAME_DIRECTORY "Allow CMake to build in the source directory." OFF ) - message( FATAL_ERROR - "Do not use the source directory to build your files, instead delete CMakeCache.txt, create a separate folder and build there.\n" - "Example: (build in subdir 'build' and install to source dir)\n" - " rm -f CMakeCache.txt\n" - " mkdir build\n" - " cd build\n" - " cmake -G\"Unix Makefiles\" -DINSTALL_TO_SOURCE=ON -DCMAKE_BUILD_TYPE=RelWithDebInfo ..\n" - " make install\n" - " cd ..\n" - " rm -rf build\n" - "To skip this check, set ALLOW_SAME_DIRECTORY to ON (-DALLOW_SAME_DIRECTORY=ON)" ) -endif() - - -# -# Global stuff -# -set( GLOBAL_LIBRARIES ${LINK_LIBRARIES} CACHE INTERNAL "" )# list (comma separated values) -set( GLOBAL_INCLUDE_DIRS ${INCLUDE_DIRECTORIES} CACHE INTERNAL "" )# list (comma separated values) -set( GLOBAL_DEFINITIONS ${COMPILE_DEFINITIONS} CACHE INTERNAL "" )# string (space separated values -DFOO=bar) -mark_as_advanced( GLOBAL_LIBRARIES GLOBAL_INCLUDE_DIRS GLOBAL_DEFINITIONS ) -if( WIN32 ) - set_property( CACHE GLOBAL_DEFINITIONS PROPERTY VALUE "${GLOBAL_DEFINITIONS} -DFD_SETSIZE=4096" ) -endif() -if( MSVC ) - set_property( CACHE GLOBAL_LIBRARIES PROPERTY VALUE ${GLOBAL_LIBRARIES} "oldnames.lib" "ws2_32.lib" ) - set_property( CACHE GLOBAL_DEFINITIONS PROPERTY VALUE "${GLOBAL_DEFINITIONS} -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE" ) -endif() - - -# -# 3rd party -# -set( CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/cmake CACHE INTERNAL "" ) -include( CheckCSourceCompiles ) -include( CheckCSourceRuns ) -include( CheckIncludeFile ) -include( CheckFunctionExists ) -include( FindFunctionLibrary ) -include( TestBigEndian ) - - -# -# Find svnversion -# -message( STATUS "Detecting svnversion" ) -find_program( SVNVERSION_EXECUTABLE svnversion ) -mark_as_advanced( SVNVERSION_EXECUTABLE ) -if( SVNVERSION_EXECUTABLE ) - message( STATUS "Found svnversion: ${SVNVERSION_EXECUTABLE}" ) -endif() -message( STATUS "Detecting svnversion - done" ) - - -# -# Find Subversion -# -message( STATUS "Detecting Subversion" ) -find_package( Subversion ) -message( STATUS "Detecting Subversion - done" ) - -# -# PACKETVER -# -set( PACKETVER CACHE STRING "Sets the PACKETVER define of the servers. (see src/common/mmo.h)" ) -if( PACKETVER ) - list( APPEND GLOBAL_DEFINITIONS PACKETVER=${PACKETVER} ) -endif() - - -# -# SVNVERSION -# -if( SVNVERSION_EXECUTABLE ) - message( STATUS "Getting svn version" ) - execute_process( COMMAND ${SVNVERSION_EXECUTABLE} ${PROJECT_SOURCE_DIR} - OUTPUT_VARIABLE SVNVERSION - OUTPUT_STRIP_TRAILING_WHITESPACE ) - if( SVNVERSION MATCHES "^Unversioned" ) - set( SVNVERSION ) - endif() - string( REGEX REPLACE "[^1234567890MSexported]" "_" SVNVERSION "${SVNVERSION}" ) - message( STATUS "Found version: ${SVNVERSION}" ) - message( STATUS "Getting svn version - done" ) -endif() -if( Subversion_FOUND AND SVNVERSION ) - message( STATUS "Getting svn branch" ) - Subversion_WC_INFO( ${PROJECT_SOURCE_DIR} rAthena ) - if( rAthena_WC_URL ) - string( REGEX MATCH "[^/]+$" BRANCH ${rAthena_WC_URL} ) - set( SVNVERSION "${BRANCH}-${SVNVERSION}" ) - message( STATUS "Found branch: ${BRANCH}" ) - endif() - message( STATUS "Getting svn branch - done" ) -endif() - - -# -# threads -# -message( STATUS "Detecting threads library" ) -set( CMAKE_THREAD_PREFER_PTHREAD 1 ) -find_package(Threads REQUIRED) -if( CMAKE_THREAD_LIBS_INIT ) - message( STATUS "Adding global library: ${FUNCTION_FLOOR_LIBRARIES}" ) - set_property( CACHE GLOBAL_LIBRARIES PROPERTY VALUE ${GLOBAL_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT} ) -endif() -message( STATUS "Detecting threads library - done" ) - - -# -# math library (FreeBSD/Linux/Solaris) -# -message( STATUS "Detecting math library (m)" ) -CHECK_INCLUDE_FILE( math.h HAVE_MATH_H ) -if( NOT HAVE_MATH_H ) - message( FATAL_ERROR "math.h not found" ) -endif() -set( CMAKE_REQUIRED_LIBRARIES ${GLOBAL_LIBRARIES} ) -find_function_library( floor FUNCTION_FLOOR_LIBRARIES m ) -if( FUNCTION_FLOOR_LIBRARIES ) - message( STATUS "Adding global library: ${FUNCTION_FLOOR_LIBRARIES}" ) - set_property( CACHE GLOBAL_LIBRARIES PROPERTY VALUE ${GLOBAL_LIBRARIES} ${FUNCTION_FLOOR_LIBRARIES} ) -endif() -message( STATUS "Detecting math library (m) - done" ) - - -# -# dynamic loading library (Linux) -# -if( NOT WIN32 ) -message( STATUS "Detecting dynamic loading library (dl)" ) -set( CMAKE_REQUIRED_LIBRARIES ${GLOBAL_LIBRARIES} ) -find_function_library( dlopen FUNCTION_DLOPEN_LIBRARIES dl ) -if( FUNCTION_DLOPEN_LIBRARIES ) - message( STATUS "Adding global library: ${FUNCTION_DLOPEN_LIBRARIES}" ) - set_property( CACHE GLOBAL_LIBRARIES PROPERTY VALUE ${GLOBAL_LIBRARIES} ${FUNCTION_DLOPEN_LIBRARIES} ) -endif() -message( STATUS "Detecting dynamic loading library (dl) - done" ) -endif() - - -# -# networking library (Solaris/MinGW) -# -if( NOT MSVC ) -message( STATUS "Detecting networking library (socket/nsl/ws2_32)" ) -set( CMAKE_REQUIRED_LIBRARIES ${GLOBAL_LIBRARIES} ) -find_function_library( bind FUNCTION_BIND_LIBRARIES socket ws2_32 ) -if( FUNCTION_BIND_LIBRARIES ) - message( STATUS "Adding global library: ${FUNCTION_BIND_LIBRARIES}" ) - set_property( CACHE GLOBAL_LIBRARIES PROPERTY VALUE ${GLOBAL_LIBRARIES} ${FUNCTION_BIND_LIBRARIES} ) -endif() -set( CMAKE_REQUIRED_LIBRARIES ${GLOBAL_LIBRARIES} ) -find_function_library( gethostbyname FUNCTION_GETHOSTBYNAME_LIBRARIES nsl ) -if( FUNCTION_GETHOSTBYNAME_LIBRARIES ) - message( STATUS "Adding global library: ${FUNCTION_GETHOSTBYNAME_LIBRARIES}" ) - set_property( CACHE GLOBAL_LIBRARIES PROPERTY VALUE ${GLOBAL_LIBRARIES} ${FUNCTION_GETHOSTBYNAME_LIBRARIES} ) -endif() -message( STATUS "Detecting networking library (socket/nsl/ws2_32) - done" ) -endif() - - -# -# Test for big endian -# -TEST_BIG_ENDIAN( BIG_ENDIAN ) -if( NOT DEFINED BIG_ENDIAN ) - message( WARNING "unable to determine endianess, only LITTLE ENDIAN is supported" ) -elseif( BIG_ENDIAN ) - message( FATAL_ERROR "bigendian is not supported" ) -endif() - - -# -# Test monotonic clock -# -# CLOCK_MONOTONIC clock for clock_gettime -# Normally defines _POSIX_TIMERS > 0 and _POSIX_MONOTONIC_CLOCK (for posix -# compliant systems) and __FreeBSD_cc_version >= 500005 (for FreeBSD -# >= 5.1.0, which does not have the posix defines (ref. r11983)) would be -# checked but some systems define them even when they do not support it -# (ref. bugreport:1003). -# -message( STATUS "Check for monotonic clock" ) -find_library( RT_LIBRARY rt )# (optional, rt on Debian) -mark_as_advanced( RT_LIBRARY ) -set( CMAKE_REQUIRED_LIBRARIES ${GLOBAL_LIBRARIES} ${RT_LIBRARY} ) -file( READ "${CMAKE_SOURCE_DIR}/3rdparty/cmake/tests/HAVE_MONOTONIC_CLOCK.c" _SOURCE ) -CHECK_C_SOURCE_RUNS( "${_SOURCE}" HAVE_MONOTONIC_CLOCK ) -if( HAVE_MONOTONIC_CLOCK ) - message( STATUS "Check for monotonic clock - yes" ) - set_property( CACHE GLOBAL_LIBRARIES PROPERTY VALUE ${GLOBAL_LIBRARIES} ${RT_LIBRARY} ) - set_property( CACHE GLOBAL_DEFINITIONS PROPERTY VALUE "${GLOBAL_DEFINITIONS} -DHAVE_MONOTONIC_CLOCK" ) -else() - message( STATUS "Check for monotonic clock - no" ) -endif() - - -# -# Test if function exists: -# setrlimit - used to set the socket limit -# strnlen - string length with upper scan bound -# getpid - process id -# gettid - thread id -# -CHECK_FUNCTION_EXISTS( setrlimit HAVE_SETRLIMIT ) -CHECK_FUNCTION_EXISTS( strnlen HAVE_STRNLEN ) -CHECK_FUNCTION_EXISTS( getpid HAVE_GETPID ) -CHECK_FUNCTION_EXISTS( gettid HAVE_GETTID ) -foreach( define HAVE_SETRLIMIT HAVE_STRNLEN HAVE_GETPID HAVE_GETTID ) - if( ${define} ) - set_property( CACHE GLOBAL_DEFINITIONS PROPERTY VALUE "${GLOBAL_DEFINITIONS} -D${define}" ) - endif() -endforeach() - - -# -# Use RDTSC instruction as a timing source (time stamp counter on x86 since Pentium) (default=OFF) -# -# Enable it when you've timing issues. (ex: in conjunction with XEN or Other Virtualization mechanisms) -# Please ensure that you've disabled dynamic CPU-Frequencys, such as power saving options. -# (On the most modern Dedicated Servers cpufreq is preconfigured, see your distribution's manual how to disable it) -# -option( ENABLE_RDTSC "use RDTSC instruction as a timing source (default=OFF)" OFF ) -if( ENABLE_RDTSC ) - set_property( CACHE GLOBAL_DEFINITIONS PROPERTY VALUE "${GLOBAL_DEFINITIONS} -DENABLE_RDTSC" ) - message( STATUS "Enabled RDTSC as a timing source" ) -endif() - - -# -# Enable extra debug code (default=OFF) -# -option( ENABLE_EXTRA_DEBUG_CODE "enable extra debug code (default=OFF)" OFF ) -if( ENABLE_EXTRA_DEBUG_CODE ) - set_property( CACHE GLOBAL_DEFINITIONS PROPERTY VALUE "${GLOBAL_DEFINITIONS} -DDEBUG" ) - message( STATUS "Enabled extra DEBUG code" ) -endif() - - -# -# Enable builtin memory manager (default=default) -# -set( MEMMGR_OPTIONS "default;yes;no" ) -set( ENABLE_MEMMGR "default" CACHE STRING "enable builtin memory manager: ${MEMMGR_OPTIONS} (default=default)" ) -set_property( CACHE ENABLE_MEMMGR PROPERTY STRINGS ${MEMMGR_OPTIONS} ) -if( ENABLE_MEMMGR STREQUAL "default" ) - # use source code default -elseif( ENABLE_MEMMGR STREQUAL "yes" ) - set_property( CACHE GLOBAL_DEFINITIONS PROPERTY VALUE "${GLOBAL_DEFINITIONS} -DUSE_MEMMGR" ) - message( STATUS "Enabled the builtin memory manager" ) -elseif( ENABLE_MEMMGR STREQUAL "no" ) - set_property( CACHE GLOBAL_DEFINITIONS PROPERTY VALUE "${GLOBAL_DEFINITIONS} -DNO_MEMMGR" ) - message( STATUS "Disabled the builtin memory manager" ) -else() - message( FATAL_ERROR "invalid option ENABLE_MEMMGR=${ENABLE_MEMMGR} (valid options: ${MEMMGR_OPTIONS})" ) -endif() - - -# -# Enable memory library (default=system) -# -set( MEMORY_OPTIONS "system;memwatch;dmalloc;gcollect" ) -set( ENABLE_MEMORY "system" CACHE STRING "enable memory library: ${MEMORY_OPTIONS} (default=system)" ) -set_property( CACHE ENABLE_MEMORY PROPERTY STRINGS ${MEMORY_OPTIONS} ) -if( ENABLE_MEMORY STREQUAL "system" ) - # use system functions - -elseif( ENABLE_MEMORY STREQUAL "memwatch" ) - CHECK_INCLUDE_FILE( memwatch.h HAVE_MEMWATCH_H ) - find_library( MEMWATCH_LIBRARY memwatch ) - mark_as_advanced( MEMWATCH_LIBRARY ) - if( HAVE_MEMWATCH_H AND MEMWATCH_LIBRARY ) - message( STATUS "Adding global library: ${MEMWATCH_LIBRARY}" ) - set_property( CACHE GLOBAL_LIBRARIES PROPERTY VALUE ${GLOBAL_LIBRARIES} ${MEMWATCH_LIBRARY} ) - set_property( CACHE GLOBAL_DEFINITIONS PROPERTY VALUE "${GLOBAL_DEFINITIONS} -DMEMWATCH" ) - message( STATUS "Enabled the memory library memwatch" ) - else() - message( FATAL_ERROR "Failed to enable the memory library memwatch" ) - endif() - -elseif( ENABLE_MEMORY STREQUAL "dmalloc" ) - CHECK_INCLUDE_FILE( dmalloc.h HAVE_DMALLOC_H ) - find_library( DMALLOC_LIBRARY dmalloc ) - mark_as_advanced( DMALLOC_LIBRARY ) - if( HAVE_DMALLOC_H AND DMALLOC_LIBRARY ) - message( STATUS "Adding global library: ${DMALLOC_LIBRARY}" ) - set_property( CACHE GLOBAL_LIBRARIES PROPERTY VALUE ${GLOBAL_LIBRARIES} ${DMALLOC_LIBRARY} ) - set_property( CACHE GLOBAL_DEFINITIONS PROPERTY VALUE "${GLOBAL_DEFINITIONS} -DDMALLOC -DDMALLOC_FUNC_CHECK" ) - message( STATUS "Enabled the memory library dmalloc" ) - else() - message( FATAL_ERROR "Failed to enable the memory library dmalloc" ) - endif() - -elseif( ENABLE_MEMORY STREQUAL "gcollect" ) - CHECK_INCLUDE_FILE( gc.h HAVE_GC_H ) - find_library( GC_LIBRARY gc ) - mark_as_advanced( GC_LIBRARY ) - if( HAVE_GC_H AND GC_LIBRARY ) - message( STATUS "Adding global library: ${GC_LIBRARY}" ) - set_property( CACHE GLOBAL_LIBRARIES PROPERTY VALUE ${GLOBAL_LIBRARIES} ${GC_LIBRARY} ) - set_property( CACHE GLOBAL_DEFINITIONS PROPERTY VALUE "${GLOBAL_DEFINITIONS} -DGCOLLECT" ) - message( STATUS "Enabled the memory library gcollect" ) - else() - message( FATAL_ERROR "Failed to enable the memory library gcollect" ) - endif() - -else() - message( FATAL_ERROR "invalid option ENABLE_MEMORY=${ENABLE_MEMORY} (valid options: ${MEMORY_OPTIONS})" ) -endif() - - -# -# Enable profiler (default=none) -# -set( PROFILER_OPTIONS "none;gprof" ) -set( ENABLE_PROFILER "none" CACHE STRING "enable profiler: ${PROFILER_OPTIONS} (default=none)" ) -set_property( CACHE ENABLE_PROFILER PROPERTY STRINGS ${PROFILER_OPTIONS} ) -if( ENABLE_PROFILER STREQUAL "none" ) - # no profiler - -elseif( ENABLE_PROFILER STREQUAL "gprof" ) - if( CMAKE_C_COMPILER_ID STREQUAL "GNU" ) - if( NOT HAVE_GPROF_FLAGS ) - set_property( CACHE CMAKE_C_FLAGS PROPERTY VALUE "${CMAKE_C_FLAGS} -pg" ) - set_property( CACHE CMAKE_EXE_LINKER_FLAGS PROPERTY VALUE "${CMAKE_EXE_LINKER_FLAGS} -pg" ) - set( HAVE_GPROF_FLAGS ON CACHE INTERNAL "" ) - endif() - message( STATUS "Enabled the profiler gprof" ) - else() - message( FATAL_ERROR "Failed to enable the profiler gprof - not GNU" ) - endif() - -else() - message( FATAL_ERROR "invalid option ENABLE_PROFILER=${ENABLE_PROFILER} (valid options: ${PROFILER_OPTIONS})" ) -endif() - - -# -# Enable extra buildbot code (default=OFF) -# -option( ENABLE_EXTRA_BUILDBOT_CODE "enable extra buildbot code (default=OFF)" OFF ) -if( ENABLE_EXTRA_BUILDBOT_CODE ) - set_property( CACHE GLOBAL_DEFINITIONS PROPERTY VALUE "${GLOBAL_DEFINITIONS} -DBUILDBOT" ) - message( STATUS "Enabled extra BUILDBOT code" ) -endif() - - -##################################################################### -# package stuff -# -set( CPACK_PACKAGE_NAME "Hercules" ) -set( CPACK_PACKAGE_DESCRIPTION_SUMMARY "MMORPG server package" ) -set( CPACK_PACKAGE_VERSION ${SVNVERSION} ) -set( CPACK_RESOURCE_FILE_LICENSE ${CMAKE_CURRENT_SOURCE_DIR}/LICENSE ) -#set( CPACK_MONOLITHIC_INSTALL ON ) -include( CPACK OPTIONAL RESULT_VARIABLE HAVE_CPACK ) -if( HAVE_CPACK ) - option( WITH_CPACK "enable building packages with CPack ('package' target)" ON ) -endif() -if( NOT WITH_CPACK ) - # empty replacements - macro( cpack_add_component_group ) - endmacro() - macro( cpack_add_component ) - endmacro() - message( STATUS "Disabled package creation" ) -endif() - -set( Runtime "Runtime files" CACHE INTERNAL "" ) -set( Runtime_base "configurations, dbs, npcs, docs, ..." CACHE INTERNAL "" ) -set( Runtime_templates "conf/import and save (generated from conf/import-tmpl and save-tmpl)" CACHE INTERNAL "" ) -cpack_add_component_group( Runtime DESCRIPTION ${Runtime} DISPLAY_NAME "Runtime" ) -cpack_add_component( Runtime_base DESCRIPTION ${Runtime_base} DISPLAY_NAME "Base files" GROUP Runtime ) -cpack_add_component( Runtime_templates DESCRIPTION ${Runtime_templates} DISPLAY_NAME "Base templates" GROUP Runtime ) - -set( Development "Development files" CACHE INTERNAL "" ) -set( Development_base "projects, 3rdparty, sources, templates" CACHE INTERNAL "" ) -cpack_add_component_group( Development DESCRIPTION ${Development} DISPLAY_NAME "Development" ) -cpack_add_component( Development_base DESCRIPTION ${Development_base} DISPLAY_NAME "Base files" GROUP Development ) - - -# -# install stuff -# -option( INSTALL_COMPONENT_RUNTIME "install/package files needed to run the project" ON ) -option( INSTALL_COMPONENT_DEVELOPMENT "install/package files needed to build the project" OFF ) -option( INSTALL_TO_PATH "copy files to INSTALL_PATH" OFF ) -option( INSTALL_TO_SOURCE "copy files to source directory, skips what is already there (${CMAKE_CURRENT_SOURCE_DIR})" OFF ) -option( INSTALL_TO_SUBDIR "copy files to subdirectory (${CMAKE_CURRENT_BINARY_DIR}/install)" OFF ) -set( INSTALL_PATH "${CMAKE_INSTALL_PREFIX}" CACHE STRING "install path (only used when INSTALL_TO_PATH is set)" ) -mark_as_advanced( CMAKE_INSTALL_PREFIX ) -if( INSTALL_TO_PATH AND NOT ("${INSTALL_TO}" STREQUAL "path") )# changed to path - set_property( CACHE INSTALL_TO_SOURCE INSTALL_TO_SUBDIR PROPERTY VALUE OFF ) -elseif( INSTALL_TO_SOURCE AND NOT ("${INSTALL_TO}" STREQUAL "source") )# changed to source - set_property( CACHE INSTALL_TO_PATH INSTALL_TO_SUBDIR PROPERTY VALUE OFF ) -elseif( INSTALL_TO_SUBDIR AND NOT ("${INSTALL_TO}" STREQUAL "subdir") )# changed to subdir - set_property( CACHE INSTALL_TO_PATH INSTALL_TO_SOURCE PROPERTY VALUE OFF ) -elseif( NOT INSTALL_TO_PATH AND NOT INSTALL_TO_SOURCE AND NOT INSTALL_TO_SUBDIR )# default - set_property( CACHE INSTALL_TO_SUBDIR PROPERTY VALUE ON ) -endif() -if( INSTALL_TO_PATH ) - set( INSTALL_TO "path" CACHE INTERNAL "" ) - set_property( CACHE CMAKE_INSTALL_PREFIX PROPERTY VALUE "${INSTALL_PATH}" ) -elseif( INSTALL_TO_SOURCE ) - set( INSTALL_TO "source" CACHE INTERNAL "" ) - set_property( CACHE CMAKE_INSTALL_PREFIX PROPERTY VALUE "${CMAKE_CURRENT_SOURCE_DIR}" ) -elseif( INSTALL_TO_SUBDIR ) - set( INSTALL_TO "subdir" CACHE INTERNAL "" ) - set_property( CACHE CMAKE_INSTALL_PREFIX PROPERTY VALUE "${CMAKE_CURRENT_BINARY_DIR}/install" ) -endif() -set( SVN_FOLDER_PATTERN "[\\.]svn" CACHE STRING "pattern of svn folder that we exclude from instalations" ) -mark_as_advanced( SVN_FOLDER_PATTERN ) -set( DEVELOPMENT_FILES - "${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt" - "${CMAKE_CURRENT_SOURCE_DIR}/configure" - "${CMAKE_CURRENT_SOURCE_DIR}/configure.in" - "${CMAKE_CURRENT_SOURCE_DIR}/Hercules-9.sln" - "${CMAKE_CURRENT_SOURCE_DIR}/Hercules-10.sln" - ) -set( DEVELOPMENT_DIRECTORIES - "3rdparty" - "conf/import-tmpl" - "src" - "vcproj-9" - "vcproj-10" - ) -set( RUNTIME_FILES - "${CMAKE_CURRENT_SOURCE_DIR}/athena-start" - "${CMAKE_CURRENT_SOURCE_DIR}/char-server.sh" - "${CMAKE_CURRENT_SOURCE_DIR}/charserv-sql.bat" - "${CMAKE_CURRENT_SOURCE_DIR}/dbghelp.dll" - "${CMAKE_CURRENT_SOURCE_DIR}/libmysql.dll" - "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE" - "${CMAKE_CURRENT_SOURCE_DIR}/login-server.sh" - "${CMAKE_CURRENT_SOURCE_DIR}/logserv-sql.bat" - "${CMAKE_CURRENT_SOURCE_DIR}/map-server.sh" - "${CMAKE_CURRENT_SOURCE_DIR}/mapserv-sql.bat" - "${CMAKE_CURRENT_SOURCE_DIR}/pcre3.dll" - "${CMAKE_CURRENT_SOURCE_DIR}/README.txt" - "${CMAKE_CURRENT_SOURCE_DIR}/runserver-sql.bat" - "${CMAKE_CURRENT_SOURCE_DIR}/serv.bat" - "${CMAKE_CURRENT_SOURCE_DIR}/start" - "${CMAKE_CURRENT_SOURCE_DIR}/zlib1.dll" - ) -set( RUNTIME_DIRECTORIES - "conf" - "db" - "doc" - "log" - "npc" - "plugins" - "sql-files" - "tools" - ) -if( INSTALL_TO_SOURCE )# skip, already in the source dir -else() - if( INSTALL_COMPONENT_RUNTIME ) - install( FILES ${RUNTIME_FILES} - DESTINATION "." - COMPONENT Runtime_base ) - foreach( DIR IN ITEMS ${RUNTIME_DIRECTORIES} ) - if( EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/${DIR}/" ) - install( DIRECTORY "${DIR}/" - DESTINATION "${DIR}" - COMPONENT Runtime_base - PATTERN ${SVN_FOLDER_PATTERN} EXCLUDE - PATTERN "conf/import-tmpl" EXCLUDE ) - else() - # create empty directory - install( CODE "file(MAKE_DIRECTORY \"\${ENV}\${CMAKE_INSTALL_PREFIX}/${DIR}\")" - COMPONENT Runtime_base ) - endif() - endforeach() - endif( INSTALL_COMPONENT_RUNTIME ) - if( INSTALL_COMPONENT_DEVELOPMENT ) - install( FILES ${DEVELOPMENT_FILES} - DESTINATION "." - COMPONENT Development_base ) - foreach( DIR IN ITEMS ${DEVELOPMENT_DIRECTORIES} ) - install( DIRECTORY "${DIR}/" - DESTINATION "${DIR}" - COMPONENT Development_base - PATTERN ${SVN_FOLDER_PATTERN} EXCLUDE ) - endforeach() - endif( INSTALL_COMPONENT_DEVELOPMENT ) -endif() -if( INSTALL_COMPONENT_RUNTIME ) - # templates - set( _TEMPLATES - "conf/import-tmpl" "conf/import" - ) - set( INSTALL_TEMPLATES_FILE "${CMAKE_CURRENT_BINARY_DIR}/InstallTemplates.cmake" ) - file( WRITE "${INSTALL_TEMPLATES_FILE}" - "macro( INSTALL_TEMPLATE _SRC _DST )\n" - " set( SRC \"${CMAKE_CURRENT_SOURCE_DIR}/\${_SRC}\" )\n" - " set( DST \"\${CMAKE_INSTALL_PREFIX}/\${_DST}\" )\n" - " if( EXISTS \"\${DST}\" )\n" - " message( \"-- Already exists: \${DST}\" )\n" - " else()\n" - " message( \"-- Installing template: \${DST}\" )\n" - " execute_process( COMMAND \"${CMAKE_COMMAND}\" -E copy \"\${SRC}\" \"\${DST}\" )\n" - " endif()\n" - "endmacro()\n" - ) - while( _TEMPLATES ) - list( GET _TEMPLATES 0 _SRC ) - list( GET _TEMPLATES 1 _DST ) - list( REMOVE_AT _TEMPLATES 0 1 ) - if( IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/${_SRC}" ) - file( GLOB _PATHS "${CMAKE_CURRENT_SOURCE_DIR}/${_SRC}/*" ) - foreach( _PATH IN ITEMS ${_PATHS} ) - string( REPLACE "${CMAKE_CURRENT_SOURCE_DIR}/${_SRC}/" "" _PATH "${_PATH}" ) - if( NOT "${_PATH}" MATCHES "${SVN_FOLDER_PATTERN}" ) - list( APPEND _TEMPLATES "${_SRC}/${_PATH}" "${_DST}/${_PATH}" ) - endif() - endforeach() - else() - file( APPEND "${INSTALL_TEMPLATES_FILE}" "INSTALL_TEMPLATE( \"${_SRC}\" \"${_DST}\" )\n" ) - endif() - endwhile() - install( SCRIPT "${INSTALL_TEMPLATES_FILE}" - COMPONENT Runtime_templates ) -endif( INSTALL_COMPONENT_RUNTIME ) - - -# -# sources -# -set( TARGET_LIST CACHE INTERNAL "" ) -add_subdirectory( 3rdparty ) -add_subdirectory( src ) - - -##################################################################### -# final checks and warnings -# -if( CMAKE_SIZEOF_VOID_P EQUAL 8 ) - message( WARNING "64bit should work, but is not recommended." ) -elseif( NOT CMAKE_SIZEOF_VOID_P EQUAL 4 ) - message( FATAL_ERROR "unexpected architecture (CMAKE_SIZEOF_VOID_P is ${CMAKE_SIZEOF_VOID_P})" ) -endif() -list( LENGTH TARGET_LIST _LEN ) -if( _LEN EQUAL 0 ) - message( FATAL_ERROR "no targets available" ) -endif() -message( STATUS "Available targets:" ) -foreach( _TARGET IN ITEMS ${TARGET_LIST} ) - message( STATUS "\t${_TARGET}" ) -endforeach() diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt deleted file mode 100644 index 0c120f99a..000000000 --- a/src/CMakeLists.txt +++ /dev/null @@ -1,20 +0,0 @@ - -# -# setup and static libraries -# -add_subdirectory( common ) -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( map ) -add_subdirectory( tool ) -add_subdirectory( plugins ) diff --git a/src/char/CMakeLists.txt b/src/char/CMakeLists.txt deleted file mode 100644 index 9413ff303..000000000 --- a/src/char/CMakeLists.txt +++ /dev/null @@ -1,62 +0,0 @@ - -# -# setup -# -set( SQL_CHAR_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR} CACHE INTERNAL "" ) - - -# -# char sql -# -if( BUILD_SQL_SERVERS ) -message( STATUS "Creating target char-server" ) -set( SQL_CHAR_HEADERS - "${CMAKE_CURRENT_SOURCE_DIR}/char.h" - "${CMAKE_CURRENT_SOURCE_DIR}/int_auction.h" - "${CMAKE_CURRENT_SOURCE_DIR}/int_elemental.h" - "${CMAKE_CURRENT_SOURCE_DIR}/int_guild.h" - "${CMAKE_CURRENT_SOURCE_DIR}/int_homun.h" - "${CMAKE_CURRENT_SOURCE_DIR}/int_mail.h" - "${CMAKE_CURRENT_SOURCE_DIR}/int_mercenary.h" - "${CMAKE_CURRENT_SOURCE_DIR}/int_party.h" - "${CMAKE_CURRENT_SOURCE_DIR}/int_pet.h" - "${CMAKE_CURRENT_SOURCE_DIR}/int_quest.h" - "${CMAKE_CURRENT_SOURCE_DIR}/int_storage.h" - "${CMAKE_CURRENT_SOURCE_DIR}/inter.h" - "${CMAKE_CURRENT_SOURCE_DIR}/pincode.h" - ) -set( SQL_CHAR_SOURCES - "${CMAKE_CURRENT_SOURCE_DIR}/char.c" - "${CMAKE_CURRENT_SOURCE_DIR}/int_auction.c" - "${CMAKE_CURRENT_SOURCE_DIR}/int_elemental.c" - "${CMAKE_CURRENT_SOURCE_DIR}/int_guild.c" - "${CMAKE_CURRENT_SOURCE_DIR}/int_homun.c" - "${CMAKE_CURRENT_SOURCE_DIR}/int_mail.c" - "${CMAKE_CURRENT_SOURCE_DIR}/int_mercenary.c" - "${CMAKE_CURRENT_SOURCE_DIR}/int_party.c" - "${CMAKE_CURRENT_SOURCE_DIR}/int_pet.c" - "${CMAKE_CURRENT_SOURCE_DIR}/int_quest.c" - "${CMAKE_CURRENT_SOURCE_DIR}/int_storage.c" - "${CMAKE_CURRENT_SOURCE_DIR}/inter.c" - "${CMAKE_CURRENT_SOURCE_DIR}/pincode.c" - ) -set( DEPENDENCIES common_sql ) -set( LIBRARIES ${GLOBAL_LIBRARIES} ) -set( INCLUDE_DIRS ${GLOBAL_INCLUDE_DIRS} ${COMMON_BASE_INCLUDE_DIRS} ) -set( DEFINITIONS "${GLOBAL_DEFINITIONS} ${COMMON_BASE_DEFINITIONS}" ) -set( SOURCE_FILES ${COMMON_BASE_HEADERS} ${COMMON_SQL_HEADERS} ${SQL_CHAR_HEADERS} ${SQL_CHAR_SOURCES} ) -source_group( common FILES ${COMMON_BASE_HEADERS} ${COMMON_SQL_HEADERS} ) -source_group( char FILES ${SQL_CHAR_HEADERS} ${SQL_CHAR_SOURCES} ) -include_directories( ${INCLUDE_DIRS} ) -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_FLAGS "${DEFINITIONS}" ) -if( INSTALL_COMPONENT_RUNTIME ) - cpack_add_component( Runtime_charserver_sql DESCRIPTION "char-server (sql version)" DISPLAY_NAME "char-server" GROUP Runtime ) - install( TARGETS char-server - DESTINATION "." - COMPONENT Runtime_charserver_sql ) -endif( INSTALL_COMPONENT_RUNTIME ) -message( STATUS "Creating target char-server - done" ) -endif( BUILD_SQL_SERVERS ) diff --git a/src/common/CMakeLists.txt b/src/common/CMakeLists.txt deleted file mode 100644 index 5653663df..000000000 --- a/src/common/CMakeLists.txt +++ /dev/null @@ -1,166 +0,0 @@ - -# -# Create svnversion.h -# -message( STATUS "Creating svnversion.h" ) -if( SVNVERSION ) - file( WRITE ${CMAKE_CURRENT_BINARY_DIR}/svnversion.h - "#ifndef SVNVERSION\n#define SVNVERSION ${SVNVERSION}\n#endif\n" ) -else() - file( WRITE ${CMAKE_CURRENT_BINARY_DIR}/svnversion.h "" ) -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_COMPONENT_DEVELOPMENT ) - install( FILES ${CMAKE_CURRENT_BINARY_DIR}/svnversion.h - DESTINATION "src/common" - COMPONENT Development_base ) -endif( INSTALL_COMPONENT_DEVELOPMENT ) -message( STATUS "Creating svnversion.h - done" ) - - -##################################################################### -# setup -# -set( COMMON_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}" - CACHE PATH "common source directory" ) -mark_as_advanced( COMMON_SOURCE_DIR ) - -set( COMMON_ALL_HEADERS - "${CMAKE_CURRENT_BINARY_DIR}/svnversion.h" - "${COMMON_SOURCE_DIR}/cbasetypes.h" - "${COMMON_SOURCE_DIR}/mmo.h" - ) - -set( COMMON_MINI_HEADERS - ${COMMON_ALL_HEADERS} - "${COMMON_SOURCE_DIR}/core.h" - "${COMMON_SOURCE_DIR}/console.h" - "${COMMON_SOURCE_DIR}/malloc.h" - "${COMMON_SOURCE_DIR}/showmsg.h" - "${COMMON_SOURCE_DIR}/strlib.h" - ${LIBCONFIG_HEADERS} # needed by showmsg.h - CACHE INTERNAL "" ) -set( COMMON_MINI_SOURCES - "${COMMON_SOURCE_DIR}/core.c" - "${COMMON_SOURCE_DIR}/console.c" - "${COMMON_SOURCE_DIR}/malloc.c" - "${COMMON_SOURCE_DIR}/showmsg.c" - "${COMMON_SOURCE_DIR}/strlib.c" - ${LIBCONFIG_SOURCES} # needed by showmsg.c - CACHE INTERNAL "" ) -set( COMMON_MINI_INCLUDE_DIRS ${LIBCONFIG_INCLUDE_DIRS} CACHE INTERNAL "" ) -set( COMMON_MINI_DEFINITIONS "-DMINICORE ${LIBCONFIG_DEFINITIONS}" CACHE INTERNAL "" ) - - -# -# common_base -# -if( WITH_ZLIB ) -message( STATUS "Creating target common_base" ) -set( COMMON_BASE_HEADERS - ${COMMON_ALL_HEADERS} - "${COMMON_SOURCE_DIR}/conf.h" - "${COMMON_SOURCE_DIR}/core.h" - "${COMMON_SOURCE_DIR}/console.h" - "${COMMON_SOURCE_DIR}/db.h" - "${COMMON_SOURCE_DIR}/des.h" - "${COMMON_SOURCE_DIR}/ers.h" - "${COMMON_SOURCE_DIR}/grfio.h" - "${COMMON_SOURCE_DIR}/HPM.h" - "${COMMON_SOURCE_DIR}/HPMi.h" - "${COMMON_SOURCE_DIR}/malloc.h" - "${COMMON_SOURCE_DIR}/mapindex.h" - "${COMMON_SOURCE_DIR}/md5calc.h" - "${COMMON_SOURCE_DIR}/nullpo.h" - "${COMMON_SOURCE_DIR}/random.h" - "${COMMON_SOURCE_DIR}/showmsg.h" - "${COMMON_SOURCE_DIR}/socket.h" - "${COMMON_SOURCE_DIR}/strlib.h" - "${COMMON_SOURCE_DIR}/timer.h" - "${COMMON_SOURCE_DIR}/utils.h" - "${COMMON_SOURCE_DIR}/atomic.h" - "${COMMON_SOURCE_DIR}/spinlock.h" - "${COMMON_SOURCE_DIR}/thread.h" - "${COMMON_SOURCE_DIR}/mutex.h" - ${LIBCONFIG_HEADERS} # needed by conf.h/showmsg.h - CACHE INTERNAL "common_base headers" ) -set( COMMON_BASE_SOURCES - "${COMMON_SOURCE_DIR}/conf.c" - "${COMMON_SOURCE_DIR}/core.c" - "${COMMON_SOURCE_DIR}/console.c" - "${COMMON_SOURCE_DIR}/db.c" - "${COMMON_SOURCE_DIR}/des.c" - "${COMMON_SOURCE_DIR}/ers.c" - "${COMMON_SOURCE_DIR}/grfio.c" - "${COMMON_SOURCE_DIR}/HPM.c" - "${COMMON_SOURCE_DIR}/malloc.c" - "${COMMON_SOURCE_DIR}/mapindex.c" - "${COMMON_SOURCE_DIR}/md5calc.c" - "${COMMON_SOURCE_DIR}/nullpo.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" - "${COMMON_SOURCE_DIR}/thread.c" - "${COMMON_SOURCE_DIR}/mutex.c" - ${LIBCONFIG_SOURCES} # needed by conf.c/showmsg.c - CACHE INTERNAL "common_base sources" ) -set( COMMON_BASE_INCLUDE_DIRS - ${LIBCONFIG_INCLUDE_DIRS} - CACHE INTERNAL "common_base include dirs" ) -set( COMMON_BASE_DEFINITIONS - ${LIBCONFIG_DEFINITIONS} - CACHE INTERNAL "common_base definitions" ) -set( LIBRARIES ${GLOBAL_LIBRARIES} ${ZLIB_LIBRARIES} ) -set( INCLUDE_DIRS ${GLOBAL_INCLUDE_DIRS} ${MT19937AR_INCLUDE_DIRS} ${ZLIB_INCLUDE_DIRS} ${COMMON_BASE_INCLUDE_DIRS} ) -set( DEFINITIONS "${GLOBAL_DEFINITIONS} ${COMMON_BASE_DEFINITIONS}" ) -set( SOURCE_FILES ${MT19937AR_HEADERS} ${MT19937AR_SOURCES} ${COMMON_BASE_HEADERS} ${COMMON_BASE_SOURCES} ) -source_group( mt19937ar FILES ${MT19937AR_HEADERS} ${MT19937AR_SOURCES} ) -source_group( common FILES ${COMMON_BASE_HEADERS} ${COMMON_BASE_SOURCES} ) -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 INTERNAL "" ) -set( TARGET_LIST ${TARGET_LIST} common_base CACHE INTERNAL "" ) -message( STATUS "Creating target common_base - done" ) -else() -message( STATUS "Skipping target common_base (requires ZLIB)" ) -unset( HAVE_common_base CACHE ) -endif() - - -# -# common_sql -# -if( HAVE_common_base AND WITH_MYSQL ) -message( STATUS "Creating target common_sql" ) -set( COMMON_SQL_HEADERS - ${COMMON_ALL_HEADERS} - "${CMAKE_CURRENT_SOURCE_DIR}/sql.h" - CACHE INTERNAL "common_sql headers" ) -set( COMMON_SQL_SOURCES - "${CMAKE_CURRENT_SOURCE_DIR}/sql.c" - CACHE INTERNAL "common_sql sources" ) -set( DEPENDENCIES common_base ) -set( LIBRARIES ${GLOBAL_LIBRARIES} ${MYSQL_LIBRARIES} ) -set( INCLUDE_DIRS ${GLOBAL_INCLUDE_DIRS} ${MYSQL_INCLUDE_DIRS} ) -set( DEFINITIONS "${GLOBAL_DEFINITIONS}" ) -set( SOURCE_FILES ${COMMON_SQL_HEADERS} ${COMMON_SQL_SOURCES} ) -source_group( common FILES ${COMMON_SQL_HEADERS} ${COMMON_SQL_SOURCES} ) -add_library( common_sql ${SOURCE_FILES} ) -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 INTERNAL "" ) -set( TARGET_LIST ${TARGET_LIST} common_sql CACHE INTERNAL "" ) -message( STATUS "Creating target common_sql - done" ) -else() -message( STATUS "Skipping target common_sql (requires common_base and MYSQL)" ) -unset( HAVE_common_sql CACHE ) -endif() diff --git a/src/login/CMakeLists.txt b/src/login/CMakeLists.txt deleted file mode 100644 index fa657f8fd..000000000 --- a/src/login/CMakeLists.txt +++ /dev/null @@ -1,12 +0,0 @@ - -# -# setup -# -set( LOGIN_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR} CACHE INTERNAL "" ) -set( SQL_LOGIN_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR} CACHE INTERNAL "" ) - - -# -# targets -# -add_subdirectory( sql ) diff --git a/src/login/sql/CMakeLists.txt b/src/login/sql/CMakeLists.txt deleted file mode 100644 index 46cf4db02..000000000 --- a/src/login/sql/CMakeLists.txt +++ /dev/null @@ -1,39 +0,0 @@ - -# -# login sql -# -if( BUILD_SQL_SERVERS ) -message( STATUS "Creating target login-server" ) -set( SQL_LOGIN_HEADERS - "${SQL_LOGIN_SOURCE_DIR}/account.h" - "${SQL_LOGIN_SOURCE_DIR}/ipban.h" - "${SQL_LOGIN_SOURCE_DIR}/login.h" - "${SQL_LOGIN_SOURCE_DIR}/loginlog.h" - ) -set( SQL_LOGIN_SOURCES - "${SQL_LOGIN_SOURCE_DIR}/account_sql.c" - "${SQL_LOGIN_SOURCE_DIR}/ipban_sql.c" - "${SQL_LOGIN_SOURCE_DIR}/login.c" - "${SQL_LOGIN_SOURCE_DIR}/loginlog_sql.c" - ) -set( DEPENDENCIES common_sql ) -set( LIBRARIES ${GLOBAL_LIBRARIES} ) -set( INCLUDE_DIRS ${GLOBAL_INCLUDE_DIRS} ${COMMON_BASE_INCLUDE_DIRS} ) -set( DEFINITIONS "${GLOBAL_DEFINITIONS} ${COMMON_BASE_DEFINITIONS} -DWITH_SQL" ) -set( SOURCE_FILES ${COMMON_BASE_HEADERS} ${COMMON_SQL_HEADERS} ${SQL_LOGIN_HEADERS} ${SQL_LOGIN_SOURCES} ) -source_group( common FILES ${COMMON_BASE_HEADERS} ${COMMON_SQL_HEADERS} ) -source_group( login FILES ${SQL_LOGIN_HEADERS} ${SQL_LOGIN_SOURCES} ) -include_directories( ${INCLUDE_DIRS} ) -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_FLAGS "${DEFINITIONS}" ) -if( INSTALL_COMPONENT_RUNTIME ) - cpack_add_component( Runtime_loginserver_sql DESCRIPTION "login-server (sql version)" DISPLAY_NAME "login-server" GROUP Runtime ) - install( TARGETS login-server - DESTINATION "." - COMPONENT Runtime_loginserver_sql ) -endif( INSTALL_COMPONENT_RUNTIME ) -set( TARGET_LIST ${TARGET_LIST} login-server CACHE INTERNAL "" ) -message( STATUS "Creating target login-server - done" ) -endif( BUILD_SQL_SERVERS ) diff --git a/src/map/CMakeLists.txt b/src/map/CMakeLists.txt deleted file mode 100644 index 51c3538ef..000000000 --- a/src/map/CMakeLists.txt +++ /dev/null @@ -1,12 +0,0 @@ - -# -# setup -# -set( MAP_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR} CACHE INTERNAL "" ) -set( SQL_MAP_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR} CACHE INTERNAL "" ) - - -# -# targets -# -add_subdirectory( sql ) diff --git a/src/map/sql/CMakeLists.txt b/src/map/sql/CMakeLists.txt deleted file mode 100644 index 1629b2a8b..000000000 --- a/src/map/sql/CMakeLists.txt +++ /dev/null @@ -1,118 +0,0 @@ - -# -# map sql -# -if( BUILD_SQL_SERVERS ) -message( STATUS "Creating target map-server" ) -set( SQL_MAP_HEADERS - "${SQL_MAP_SOURCE_DIR}/atcommand.h" - "${SQL_MAP_SOURCE_DIR}/battle.h" - "${SQL_MAP_SOURCE_DIR}/battleground.h" - "${SQL_MAP_SOURCE_DIR}/buyingstore.h" - "${SQL_MAP_SOURCE_DIR}/chat.h" - "${SQL_MAP_SOURCE_DIR}/chrif.h" - "${SQL_MAP_SOURCE_DIR}/clif.h" - "${SQL_MAP_SOURCE_DIR}/date.h" - "${SQL_MAP_SOURCE_DIR}/duel.h" - "${SQL_MAP_SOURCE_DIR}/elemental.h" - "${SQL_MAP_SOURCE_DIR}/guild.h" - "${SQL_MAP_SOURCE_DIR}/homunculus.h" - "${SQL_MAP_SOURCE_DIR}/HPMmap.h" - "${SQL_MAP_SOURCE_DIR}/instance.h" - "${SQL_MAP_SOURCE_DIR}/intif.h" - "${SQL_MAP_SOURCE_DIR}/irc-bot.h" - "${SQL_MAP_SOURCE_DIR}/itemdb.h" - "${SQL_MAP_SOURCE_DIR}/log.h" - "${SQL_MAP_SOURCE_DIR}/mail.h" - "${SQL_MAP_SOURCE_DIR}/map.h" - "${SQL_MAP_SOURCE_DIR}/mapreg.h" - "${SQL_MAP_SOURCE_DIR}/mercenary.h" - "${SQL_MAP_SOURCE_DIR}/mob.h" - "${SQL_MAP_SOURCE_DIR}/npc.h" - "${SQL_MAP_SOURCE_DIR}/packets.h" - "${SQL_MAP_SOURCE_DIR}/packets_struct.h" - "${SQL_MAP_SOURCE_DIR}/party.h" - "${SQL_MAP_SOURCE_DIR}/path.h" - "${SQL_MAP_SOURCE_DIR}/pc.h" - "${SQL_MAP_SOURCE_DIR}/pc_groups.h" - "${SQL_MAP_SOURCE_DIR}/pet.h" - "${SQL_MAP_SOURCE_DIR}/quest.h" - "${SQL_MAP_SOURCE_DIR}/script.h" - "${SQL_MAP_SOURCE_DIR}/searchstore.h" - "${SQL_MAP_SOURCE_DIR}/skill.h" - "${SQL_MAP_SOURCE_DIR}/status.h" - "${SQL_MAP_SOURCE_DIR}/storage.h" - "${SQL_MAP_SOURCE_DIR}/trade.h" - "${SQL_MAP_SOURCE_DIR}/unit.h" - "${SQL_MAP_SOURCE_DIR}/vending.h" - ) -set( SQL_MAP_SOURCES - "${SQL_MAP_SOURCE_DIR}/atcommand.c" - "${SQL_MAP_SOURCE_DIR}/battle.c" - "${SQL_MAP_SOURCE_DIR}/battleground.c" - "${SQL_MAP_SOURCE_DIR}/buyingstore.c" - "${SQL_MAP_SOURCE_DIR}/chat.c" - "${SQL_MAP_SOURCE_DIR}/chrif.c" - "${SQL_MAP_SOURCE_DIR}/clif.c" - "${SQL_MAP_SOURCE_DIR}/date.c" - "${SQL_MAP_SOURCE_DIR}/duel.c" - "${SQL_MAP_SOURCE_DIR}/elemental.c" - "${SQL_MAP_SOURCE_DIR}/guild.c" - "${SQL_MAP_SOURCE_DIR}/homunculus.c" - "${SQL_MAP_SOURCE_DIR}/HPMmap.c" - "${SQL_MAP_SOURCE_DIR}/instance.c" - "${SQL_MAP_SOURCE_DIR}/intif.c" - "${SQL_MAP_SOURCE_DIR}/irc-bot.c" - "${SQL_MAP_SOURCE_DIR}/itemdb.c" - "${SQL_MAP_SOURCE_DIR}/log.c" - "${SQL_MAP_SOURCE_DIR}/mail.c" - "${SQL_MAP_SOURCE_DIR}/map.c" - "${SQL_MAP_SOURCE_DIR}/mapreg_sql.c" - "${SQL_MAP_SOURCE_DIR}/mercenary.c" - "${SQL_MAP_SOURCE_DIR}/mob.c" - "${SQL_MAP_SOURCE_DIR}/npc.c" - "${SQL_MAP_SOURCE_DIR}/npc_chat.c" - "${SQL_MAP_SOURCE_DIR}/party.c" - "${SQL_MAP_SOURCE_DIR}/path.c" - "${SQL_MAP_SOURCE_DIR}/pc.c" - "${SQL_MAP_SOURCE_DIR}/pc_groups.c" - "${SQL_MAP_SOURCE_DIR}/pet.c" - "${SQL_MAP_SOURCE_DIR}/quest.c" - "${SQL_MAP_SOURCE_DIR}/script.c" - "${SQL_MAP_SOURCE_DIR}/searchstore.c" - "${SQL_MAP_SOURCE_DIR}/skill.c" - "${SQL_MAP_SOURCE_DIR}/status.c" - "${SQL_MAP_SOURCE_DIR}/storage.c" - "${SQL_MAP_SOURCE_DIR}/trade.c" - "${SQL_MAP_SOURCE_DIR}/unit.c" - "${SQL_MAP_SOURCE_DIR}/vending.c" - ) -set( DEPENDENCIES common_sql ) -set( LIBRARIES ${GLOBAL_LIBRARIES} ) -set( INCLUDE_DIRS ${GLOBAL_INCLUDE_DIRS} ${COMMON_BASE_INCLUDE_DIRS} ) -set( DEFINITIONS "${GLOBAL_DEFINITIONS} ${COMMON_BASE_DEFINITIONS}" ) -if( WITH_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} ) -source_group( map FILES ${SQL_MAP_HEADERS} ${SQL_MAP_SOURCES} ) -include_directories( ${INCLUDE_DIRS} ) -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_FLAGS "${DEFINITIONS}" ) -if( INSTALL_COMPONENT_RUNTIME ) - cpack_add_component( Runtime_mapserver_sql DESCRIPTION "map-server (sql version)" DISPLAY_NAME "map-server" GROUP Runtime ) - install( TARGETS map-server - DESTINATION "." - COMPONENT Runtime_mapserver_sql ) -endif( INSTALL_COMPONENT_RUNTIME ) -set( TARGET_LIST ${TARGET_LIST} map-server CACHE INTERNAL "" ) -message( STATUS "Creating target map-server - done" ) -endif( BUILD_SQL_SERVERS ) diff --git a/src/plugins/CMakeLists.txt b/src/plugins/CMakeLists.txt deleted file mode 100644 index e3043a668..000000000 --- a/src/plugins/CMakeLists.txt +++ /dev/null @@ -1,36 +0,0 @@ -# -# setup -# -get_property( CAN_BUILD_SHARED_LIBS GLOBAL PROPERTY TARGET_SUPPORTS_SHARED_LIBS ) -if( NOT CAN_BUILD_SHARED_LIBS ) - return() -endif() - -# -# sample -# -option( BUILD_PLUGIN_sample "build sample plugin" OFF ) -if( BUILD_PLUGIN_sample ) -message( STATUS "Creating target sample" ) -set( SAMPLE_SOURCES - "${CMAKE_CURRENT_SOURCE_DIR}/sample.c" - ) -set( LIBRARIES ${GLOBAL_LIBRARIES} ) -set( INCLUDE_DIRS ${GLOBAL_INCLUDE_DIRS} ) -set( DEFINITIONS ${GLOBAL_DEFINITIONS} ) -set( SOURCE_FILES ${SAMPLE_SOURCES} ) -source_group( sample FILES ${SAMPLE_SOURCES} ) -include_directories( ${INCLUDE_DIRS} ) -add_library( sample SHARED ${SOURCE_FILES} ) -target_link_libraries( sample ${LIBRARIES} ) -set_target_properties( sample PROPERTIES COMPILE_FLAGS "${DEFINITIONS}" ) -set_target_properties( sample PROPERTIES PREFIX "" ) -if( INSTALL_COMPONENT_RUNTIME ) - cpack_add_component( Runtime_sample DESCRIPTION "sample plugin" DISPLAY_NAME "sample" GROUP Runtime ) - install( TARGETS sample - DESTINATION "plugins" - COMPONENT Runtime_sample ) -endif( INSTALL_COMPONENT_RUNTIME ) -set( TARGET_LIST ${TARGET_LIST} sample CACHE INTERNAL "" ) -message( STATUS "Creating target sample - done" ) -endif( BUILD_PLUGIN_sample ) diff --git a/src/tool/CMakeLists.txt b/src/tool/CMakeLists.txt deleted file mode 100644 index a54ffa0e2..000000000 --- a/src/tool/CMakeLists.txt +++ /dev/null @@ -1,45 +0,0 @@ - -# -# 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} - "${COMMON_SOURCE_DIR}/des.h" - "${COMMON_SOURCE_DIR}/grfio.h" - "${COMMON_SOURCE_DIR}/utils.h" - ) -set( COMMON_SOURCES - ${COMMON_MINI_SOURCES} - "${COMMON_SOURCE_DIR}/des.c" - "${COMMON_SOURCE_DIR}/grfio.c" - "${COMMON_SOURCE_DIR}/utils.c" - ) -set( MAPCACHE_SOURCES - "${CMAKE_CURRENT_SOURCE_DIR}/mapcache.c" - ) -set( LIBRARIES ${GLOBAL_LIBRARIES} ${ZLIB_LIBRARIES} ) -set( INCLUDE_DIRS ${GLOBAL_INCLUDE_DIRS} ${ZLIB_INCLUDE_DIRS} ${COMMON_MINI_INCLUDE_DIRS} ) -set( DEFINITIONS "${GLOBAL_DEFINITIONS} ${COMMON_MINI_DEFINITIONS}" ) -set( SOURCE_FILES ${COMMON_HEADERS} ${COMMON_SOURCES} ${MAPCACHE_SOURCES} ) -source_group( common FILES ${COMMON_HEADERS} ${COMMON_SOURCES} ) -source_group( mapcache FILES ${MAPCACHE_SOURCES} ) -add_executable( mapcache ${SOURCE_FILES} ) -include_directories( ${INCLUDE_DIRS} ) -target_link_libraries( mapcache ${LIBRARIES} ) -set_target_properties( mapcache PROPERTIES COMPILE_FLAGS "${DEFINITIONS}" ) -if( INSTALL_COMPONENT_RUNTIME ) - cpack_add_component( Runtime_mapcache DESCRIPTION "mapcache generator" DISPLAY_NAME "mapcache" GROUP Runtime ) - install( TARGETS mapcache - DESTINATION "." - COMPONENT Runtime_mapcache ) -endif( INSTALL_COMPONENT_RUNTIME ) -set( TARGET_LIST ${TARGET_LIST} mapcache CACHE INTERNAL "" ) -message( STATUS "Creating target mapcache - done" ) -endif( BUILD_MAPCACHE ) |