diff options
author | click <none@none> | 2010-09-08 19:20:38 +0200 |
---|---|---|
committer | click <none@none> | 2010-09-08 19:20:38 +0200 |
commit | 3b91ce95a64d5ed95b8a5ff3cd595c088df1eb75 (patch) | |
tree | 6be38071555710c4355104c2cd765c7b84987173 | |
parent | f1159c2e99d76979718b650ec8789ef47a232292 (diff) |
BuildSystem: Sort out issues with mysql-libraries under *nix (and should now also work properly for Win32)
- Rename the "EXTERNAL_MYSQL" flag to "USE_MYSQL_SOURCES" to reflect it's PROPER use (and ensure that it's ONLY used on Win32)
- Remove a lingering "scripts" definition (the "scripts"-target is always included, but only from compiled parts (broke builds with -DSCRIPTS=0)
--HG--
branch : trunk
-rw-r--r-- | CMakeLists.txt | 2 | ||||
-rw-r--r-- | cmake/platform/settings.unix.cmake | 9 | ||||
-rw-r--r-- | cmake/platform/settings.win32.cmake | 6 | ||||
-rw-r--r-- | cmake/showoptions.cmake | 7 | ||||
-rw-r--r-- | src/server/worldserver/CMakeLists.txt | 8 |
5 files changed, 8 insertions, 24 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index fab266c5848..3faf2e79ba5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -47,7 +47,7 @@ include(CheckPlatform) find_package(PCHSupport) find_package(ACE REQUIRED) find_package(OpenSSL REQUIRED) -if( EXTERNAL_MYSQL ) +if( NOT USE_MYSQL_SOURCES ) find_package(MySQL REQUIRED) endif() diff --git a/cmake/platform/settings.unix.cmake b/cmake/platform/settings.unix.cmake index 11d796771c2..9dae9f5ca9f 100644 --- a/cmake/platform/settings.unix.cmake +++ b/cmake/platform/settings.unix.cmake @@ -10,15 +10,6 @@ if( NOT LIBSDIR ) message(STATUS "UNIX: Using default library directory") endif() -# use internal MySQL headers if external is not forced -if( NOT EXTERNAL_MYSQL ) - set(MYSQL_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/dep/mysqllite/include) - set(MYSQL_LIBRARY "libmysql") - set( MYSQL_FOUND 1 ) - message(STATUS "Using internal MySQL.") -endif() - - # configure uninstaller configure_file( "${CMAKE_CURRENT_SOURCE_DIR}/cmake_uninstall.cmake.in" diff --git a/cmake/platform/settings.win32.cmake b/cmake/platform/settings.win32.cmake index babb3f1e269..b66eb2da7bb 100644 --- a/cmake/platform/settings.win32.cmake +++ b/cmake/platform/settings.win32.cmake @@ -1,5 +1,5 @@ # Platform-specfic options -option(EXTERNAL_MYSQL "Use your own installed MySQL instead of the internal one" 0) +option(USE_MYSQL_SOURCES "Use included MySQL-sources to build libraries" 1) # Package overloads set(ACE_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/dep/acelite) @@ -7,11 +7,11 @@ set(ACE_LIBRARY "ace") set(BZIP2_LIBRARIES "bzip2") set(ZLIB_LIBRARIES "zlib") -if( NOT EXTERNAL_MYSQL ) +if( USE_MYSQL_SOURCES ) set(MYSQL_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/dep/mysqllite/include) set(MYSQL_LIBRARY "libmysql") set( MYSQL_FOUND 1 ) - message(STATUS "Using internal MySQL.") + message(STATUS "Using supplied MySQL sources") endif() # check the CMake preload parameters (commented out by default) diff --git a/cmake/showoptions.cmake b/cmake/showoptions.cmake index 93c57ef96f0..bb5cd1fe6b9 100644 --- a/cmake/showoptions.cmake +++ b/cmake/showoptions.cmake @@ -77,12 +77,11 @@ else() endif() if( WIN32 ) - if( EXTERNAL_MYSQL ) - message("* Use external MySQL : Yes") + if( USE_MYSQL_SOURCES ) + message("* Use MySQL sourcetree : Yes (default)") else() - message("* Use external MySQL : No (default)") + message("* Use MySQL sourcetree : No") endif() endif( WIN32 ) message("") - diff --git a/src/server/worldserver/CMakeLists.txt b/src/server/worldserver/CMakeLists.txt index 7179c2f8c31..596ae87a977 100644 --- a/src/server/worldserver/CMakeLists.txt +++ b/src/server/worldserver/CMakeLists.txt @@ -157,21 +157,15 @@ endif() set_target_properties(worldserver PROPERTIES LINK_FLAGS "${worldserver_LINK_FLAGS}") -if( SCRIPTS ) - set(SCRIPT_LIB "scripts") -else() - set(SCRIPT_LIB "") -endif() - target_link_libraries(worldserver game shared + scripts trinitysockets collision g3dlib gsoap ${JEMALLOC_LIB} - ${SCRIPT_LIB} ${READLINE_LIBRARY} ${TERMCAP_LIBRARY} ${ACE_LIBRARY} |