mirror of
https://github.com/SapphireServer/Sapphire.git
synced 2025-04-26 14:37:44 +00:00
Merge pull request #172 from ayyaruq/fix/mysql-includes
Fix CMake MySQL module to be more nix-friendly
This commit is contained in:
commit
1c397db54d
1 changed files with 24 additions and 3 deletions
|
@ -1,6 +1,29 @@
|
||||||
|
|
||||||
if(UNIX)
|
if(UNIX)
|
||||||
include_directories("/usr/include/mysql/")
|
find_path(MYSQL_INCLUDE_DIR mysql.h
|
||||||
|
/usr/include/mysql
|
||||||
|
/usr/local/include/mysql
|
||||||
|
/opt/mysql/mysql/include
|
||||||
|
/opt/mysql/mysql/include/mysql
|
||||||
|
/opt/mysql/include
|
||||||
|
/opt/local/include/mysql5
|
||||||
|
/usr/local/mysql/include
|
||||||
|
/usr/local/mysql/include/mysql
|
||||||
|
$ENV{ProgramFiles}/MySQL/*/include
|
||||||
|
$ENV{SystemDrive}/MySQL/*/include
|
||||||
|
)
|
||||||
|
|
||||||
|
if(MYSQL_INCLUDE_DIR)
|
||||||
|
set(MYSQL_FOUND TRUE)
|
||||||
|
|
||||||
|
include_directories(${MYSQL_INCLUDE_DIR})
|
||||||
|
endif(MYSQL_INCLUDE_DIR)
|
||||||
|
|
||||||
|
if(MYSQL_FOUND)
|
||||||
|
message(STATUS "MySQL include dir: ${MYSQL_INCLUDE_DIR}")
|
||||||
|
else(MYSQL_FOUND)
|
||||||
|
message(FATAL_ERROR "Could not find MySQL headers.")
|
||||||
|
endif(MYSQL_FOUND)
|
||||||
else()
|
else()
|
||||||
include_directories("${LIBRARY_DIR}/external/MySQL/")
|
include_directories("${LIBRARY_DIR}/external/MySQL/")
|
||||||
if(CMAKE_SIZEOF_VOID_P EQUAL 4)
|
if(CMAKE_SIZEOF_VOID_P EQUAL 4)
|
||||||
|
@ -13,5 +36,3 @@ else()
|
||||||
link_directories(${LIBRARY_DIR}/external/zlib/x64)
|
link_directories(${LIBRARY_DIR}/external/zlib/x64)
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue