BuildSystem/Macros: Revert FindMySQL.cmake changes from ea96a5d888 - handled with simple if-tests instead
BuildSystem: Adjust buildfiles so that they reflect their proper parameters (will change when we've cleaned it up even more) --HG-- branch : trunk
This commit is contained in:
+4
-1
@@ -46,8 +46,11 @@ include(CheckPlatform)
|
|||||||
# basic packagesearching and setup (further support will be needed, this is a preliminary release!)
|
# basic packagesearching and setup (further support will be needed, this is a preliminary release!)
|
||||||
find_package(PCHSupport)
|
find_package(PCHSupport)
|
||||||
find_package(ACE REQUIRED)
|
find_package(ACE REQUIRED)
|
||||||
find_package(MySQL REQUIRED)
|
|
||||||
find_package(OpenSSL REQUIRED)
|
find_package(OpenSSL REQUIRED)
|
||||||
|
if(NOT EXTERNAL_MYSQL)
|
||||||
|
find_package(MySQL REQUIRED)
|
||||||
|
endif()
|
||||||
|
|
||||||
if( UNIX )
|
if( UNIX )
|
||||||
find_package(Readline)
|
find_package(Readline)
|
||||||
find_package(ZLIB)
|
find_package(ZLIB)
|
||||||
|
|||||||
@@ -62,8 +62,7 @@ if( UNIX )
|
|||||||
endif( MYSQL_CONFIG )
|
endif( MYSQL_CONFIG )
|
||||||
endif( UNIX )
|
endif( UNIX )
|
||||||
|
|
||||||
if( EXTERNAL_MYSQL )
|
find_path(MYSQL_INCLUDE_DIR
|
||||||
find_path(MYSQL_INCLUDE_DIR
|
|
||||||
NAMES
|
NAMES
|
||||||
mysql.h
|
mysql.h
|
||||||
PATHS
|
PATHS
|
||||||
@@ -86,13 +85,10 @@ if( EXTERNAL_MYSQL )
|
|||||||
"c:/msys/local/include"
|
"c:/msys/local/include"
|
||||||
DOC
|
DOC
|
||||||
"Specify the directory containing mysql.h."
|
"Specify the directory containing mysql.h."
|
||||||
)
|
)
|
||||||
else( EXTERNAL_MYSQL )
|
|
||||||
set(MYSQL_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/dep/mysqllite/include)
|
|
||||||
endif( EXTERNAL_MYSQL )
|
|
||||||
|
|
||||||
if( UNIX )
|
if( UNIX )
|
||||||
foreach(LIB ${MYSQL_ADD_LIBRARIES})
|
foreach(LIB ${MYSQL_ADD_LIBRARIES})
|
||||||
find_library( MYSQL_LIBRARY
|
find_library( MYSQL_LIBRARY
|
||||||
NAMES
|
NAMES
|
||||||
mysql libmysql ${LIB}
|
mysql libmysql ${LIB}
|
||||||
@@ -105,11 +101,10 @@ foreach(LIB ${MYSQL_ADD_LIBRARIES})
|
|||||||
/usr/local/mysql/lib
|
/usr/local/mysql/lib
|
||||||
DOC "Specify the location of the mysql library here."
|
DOC "Specify the location of the mysql library here."
|
||||||
)
|
)
|
||||||
endforeach(LIB ${MYSQL_ADD_LIBRARY})
|
endforeach(LIB ${MYSQL_ADD_LIBRARY})
|
||||||
endif( UNIX )
|
endif( UNIX )
|
||||||
|
|
||||||
if( WIN32 )
|
if( WIN32 )
|
||||||
if( EXTERNAL_MYSQL )
|
|
||||||
find_library( MYSQL_LIBRARY
|
find_library( MYSQL_LIBRARY
|
||||||
NAMES
|
NAMES
|
||||||
libmysql
|
libmysql
|
||||||
@@ -128,9 +123,6 @@ if( WIN32 )
|
|||||||
"c:/msys/local/include"
|
"c:/msys/local/include"
|
||||||
DOC "Specify the location of the mysql library here."
|
DOC "Specify the location of the mysql library here."
|
||||||
)
|
)
|
||||||
else( EXTERNAL_MYSQL )
|
|
||||||
set(MYSQL_LIBRARY libmysql)
|
|
||||||
endif( EXTERNAL_MYSQL )
|
|
||||||
endif( WIN32 )
|
endif( WIN32 )
|
||||||
|
|
||||||
# On Windows you typically don't need to include any extra libraries
|
# On Windows you typically don't need to include any extra libraries
|
||||||
@@ -150,20 +142,15 @@ else( NOT WIN32 )
|
|||||||
set( MYSQL_EXTRA_LIBRARIES "" )
|
set( MYSQL_EXTRA_LIBRARIES "" )
|
||||||
endif( NOT WIN32 )
|
endif( NOT WIN32 )
|
||||||
|
|
||||||
if( EXTERNAL_MYSQL )
|
if( MYSQL_LIBRARY )
|
||||||
if( MYSQL_LIBRARY )
|
|
||||||
if( MYSQL_INCLUDE_DIR )
|
if( MYSQL_INCLUDE_DIR )
|
||||||
set( MYSQL_FOUND 1 )
|
set( MYSQL_FOUND 1 )
|
||||||
message(STATUS "Found MySQL library: ${MYSQL_LIBRARY}")
|
message(STATUS "Found MySQL library: ${MYSQL_LIBRARY}")
|
||||||
message(STATUS "Found MySQL headers: ${MYSQL_INCLUDE_DIR}")
|
message(STATUS "Found MySQL headers: ${MYSQL_INCLUDE_DIR}")
|
||||||
else( MYSQL_INCLUDE_DIR )
|
else( MYSQL_INCLUDE_DIR )
|
||||||
message(FATAL_ERROR "Could not find MySQL headers! Please install the development libraries and headers or use internal MySQL.")
|
message(FATAL_ERROR "Could not find MySQL headers! Please install the development libraries and headers")
|
||||||
endif( MYSQL_INCLUDE_DIR )
|
endif( MYSQL_INCLUDE_DIR )
|
||||||
mark_as_advanced( MYSQL_FOUND MYSQL_LIBRARY MYSQL_EXTRA_LIBRARIES MYSQL_INCLUDE_DIR )
|
mark_as_advanced( MYSQL_FOUND MYSQL_LIBRARY MYSQL_EXTRA_LIBRARIES MYSQL_INCLUDE_DIR )
|
||||||
else( MYSQL_LIBRARY )
|
else( MYSQL_LIBRARY )
|
||||||
message(FATAL_ERROR "Could not find the MySQL libraries! Please install the development libraries and headers or use internal MySQL.")
|
message(FATAL_ERROR "Could not find the MySQL libraries! Please install the development libraries and headers")
|
||||||
endif( MYSQL_LIBRARY )
|
endif( MYSQL_LIBRARY )
|
||||||
else( EXTERNAL_MYSQL )
|
|
||||||
set( MYSQL_FOUND 1 )
|
|
||||||
message(STATUS "Using internal MySQL.")
|
|
||||||
endif( EXTERNAL_MYSQL )
|
|
||||||
|
|||||||
@@ -14,11 +14,6 @@ option(TOOLS "Build map/vmap extraction/assembler tools"
|
|||||||
option(USE_SCRIPTPCH "Use precompiled headers when compiling scripts" 1)
|
option(USE_SCRIPTPCH "Use precompiled headers when compiling scripts" 1)
|
||||||
option(USE_COREPCH "Use precompiled headers when compiling servers" 1)
|
option(USE_COREPCH "Use precompiled headers when compiling servers" 1)
|
||||||
option(USE_SFMT "Use SFMT as random numbergenerator" 0)
|
option(USE_SFMT "Use SFMT as random numbergenerator" 0)
|
||||||
if(WIN32)
|
|
||||||
option(EXTERNAL_MYSQL "Use your own installed MySQL instead of the internal one" 0)
|
|
||||||
else(WIN32)
|
|
||||||
set(EXTERNAL_MYSQL 0)
|
|
||||||
endif(WIN32)
|
|
||||||
option(WITH_WARNINGS "Show all warnings during compile" 1)
|
option(WITH_WARNINGS "Show all warnings during compile" 1)
|
||||||
option(WITH_COREDEBUG "Include additional debug-code in core" 0)
|
option(WITH_COREDEBUG "Include additional debug-code in core" 0)
|
||||||
option(WITH_SQL "Copy SQL files during installation" 0)
|
option(WITH_SQL "Copy SQL files during installation" 0)
|
||||||
|
|||||||
@@ -1,9 +1,19 @@
|
|||||||
|
# Platform-specfic options
|
||||||
|
option(EXTERNAL_MYSQL "Use your own installed MySQL instead of the internal one" 0)
|
||||||
|
|
||||||
# Package overloads
|
# Package overloads
|
||||||
set(ACE_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/dep/acelite)
|
set(ACE_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/dep/acelite)
|
||||||
set(ACE_LIBRARY "ace")
|
set(ACE_LIBRARY "ace")
|
||||||
set(BZIP2_LIBRARIES "bzip2")
|
set(BZIP2_LIBRARIES "bzip2")
|
||||||
set(ZLIB_LIBRARIES "zlib")
|
set(ZLIB_LIBRARIES "zlib")
|
||||||
|
|
||||||
|
if( 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( EXTERNAL_MYSQL )
|
||||||
|
|
||||||
# check the CMake preload parameters (commented out by default)
|
# check the CMake preload parameters (commented out by default)
|
||||||
|
|
||||||
# overload CMAKE_INSTALL_PREFIX if not being set properly
|
# overload CMAKE_INSTALL_PREFIX if not being set properly
|
||||||
|
|||||||
@@ -63,15 +63,6 @@ else()
|
|||||||
message("* Use SFMT for RNG : No (default)")
|
message("* Use SFMT for RNG : No (default)")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if( WIN32 )
|
|
||||||
if( EXTERNAL_MYSQL )
|
|
||||||
message("* Use external MySQL : Yes")
|
|
||||||
add_definitions(-DUSE_SFMT_FOR_RNG)
|
|
||||||
else()
|
|
||||||
message("* Use external MySQL : No (default)")
|
|
||||||
endif()
|
|
||||||
endif( WIN32 )
|
|
||||||
|
|
||||||
if( WITH_WARNINGS )
|
if( WITH_WARNINGS )
|
||||||
message("* Show all warnings : Yes")
|
message("* Show all warnings : Yes")
|
||||||
else()
|
else()
|
||||||
@@ -85,5 +76,13 @@ else()
|
|||||||
message("* Use coreside debug : No (default)")
|
message("* Use coreside debug : No (default)")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if( WIN32 )
|
||||||
|
if( EXTERNAL_MYSQL )
|
||||||
|
message("* Use external MySQL : Yes")
|
||||||
|
else()
|
||||||
|
message("* Use external MySQL : No (default)")
|
||||||
|
endif()
|
||||||
|
endif( WIN32 )
|
||||||
|
|
||||||
message("")
|
message("")
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user