1
Fork 0
mirror of https://github.com/SapphireServer/Sapphire.git synced 2025-05-01 16:37:45 +00:00

Fixing some CMake issues with mariadb

This commit is contained in:
Mordred Admin 2019-08-30 15:29:02 +02:00
parent 23aead84d3
commit 3db411d907
12 changed files with 15 additions and 12 deletions

View file

@ -60,6 +60,7 @@ if( UNIX )
else( MYSQL_CONFIG )
set(MYSQL_ADD_LIBRARIES "")
list(APPEND MYSQL_ADD_LIBRARIES "mysqlclient_r")
list(APPEND MYSQL_ADD_LIBRARIES "mariadbclient")
endif( MYSQL_CONFIG )
endif( UNIX )
@ -76,6 +77,7 @@ find_path(MYSQL_INCLUDE_DIR
PATHS
${MYSQL_ADD_INCLUDE_PATH}
/usr/include
/usr/include/mariadb
/usr/include/mysql
/usr/local/include
/usr/local/include/mysql
@ -97,7 +99,7 @@ if( UNIX )
foreach(LIB ${MYSQL_ADD_LIBRARIES})
find_library( MYSQL_LIBRARY
NAMES
mysql libmysql ${LIB}
mysql libmysql libmariadb ${LIB}
PATHS
${MYSQL_ADD_LIBRARIES_PATH}
/usr/lib
@ -105,6 +107,7 @@ if( UNIX )
/usr/local/lib
/usr/local/lib/mysql
/usr/local/mysql/lib
/usr/lib/x86_64-linux-gnu
DOC "Specify the location of the mysql library here."
)
endforeach(LIB ${MYSQL_ADD_LIBRARY})

View file

@ -8,7 +8,7 @@ file(GLOB SERVER_SOURCE_FILES "${CMAKE_CURRENT_SOURCE_DIR}*.c*")
add_executable( action_parse ${SERVER_PUBLIC_INCLUDE_FILES} ${SERVER_SOURCE_FILES})
if (UNIX)
target_link_libraries( action_parse common xivdat pthread mysqlclient dl z stdc++fs )
target_link_libraries( action_parse common xivdat pthread mysql dl z stdc++fs )
else()
target_link_libraries( action_parse common xivdat mysql zlib)
endif()

View file

@ -24,7 +24,7 @@ add_executable(discovery_parser ${SERVER_PUBLIC_INCLUDE_FILES} ${SERVER_SOURCE_F
#)
if (UNIX)
target_link_libraries (discovery_parser common xivdat pthread mysqlclient dl z stdc++fs)
target_link_libraries (discovery_parser common xivdat pthread mysql dl z stdc++fs)
else()
target_link_libraries (discovery_parser common xivdat mysql zlib)
endif()

View file

@ -10,7 +10,7 @@ add_executable(event_object_parser ${SERVER_PUBLIC_INCLUDE_FILES} ${SERVER_SOURC
if (UNIX)
target_link_libraries (event_object_parser common xivdat pthread mysqlclient dl z stdc++fs)
target_link_libraries (event_object_parser common xivdat pthread mysql dl z stdc++fs)
else()
target_link_libraries (event_object_parser common xivdat mysql zlib)
endif()

View file

@ -8,7 +8,7 @@ file(GLOB SERVER_SOURCE_FILES "${CMAKE_CURRENT_SOURCE_DIR}*.c*")
add_executable(exd_common_gen ${SERVER_PUBLIC_INCLUDE_FILES} ${SERVER_SOURCE_FILES})
if (UNIX)
target_link_libraries (exd_common_gen common xivdat pthread mysqlclient dl z stdc++fs)
target_link_libraries (exd_common_gen common xivdat pthread mysql dl z stdc++fs)
else()
target_link_libraries (exd_common_gen common xivdat mysql zlib)
endif()

View file

@ -8,7 +8,7 @@ file(GLOB SERVER_SOURCE_FILES "${CMAKE_CURRENT_SOURCE_DIR}*.c*")
add_executable(exd_struct_gen ${SERVER_PUBLIC_INCLUDE_FILES} ${SERVER_SOURCE_FILES})
if (UNIX)
target_link_libraries (exd_struct_gen common xivdat pthread mysqlclient dl z stdc++fs)
target_link_libraries (exd_struct_gen common xivdat pthread mysql dl z stdc++fs)
else()
target_link_libraries (exd_struct_gen common xivdat mysql zlib)
endif()

View file

@ -8,7 +8,7 @@ file(GLOB SERVER_SOURCE_FILES "${CMAKE_CURRENT_SOURCE_DIR}*.c*")
add_executable(exd_struct_test ${SERVER_PUBLIC_INCLUDE_FILES} ${SERVER_SOURCE_FILES})
if (UNIX)
target_link_libraries (exd_struct_test common xivdat pthread mysqlclient dl z stdc++fs )
target_link_libraries (exd_struct_test common xivdat pthread mysql dl z stdc++fs )
else()
target_link_libraries (exd_struct_test common xivdat mysql zlib)
endif()

View file

@ -8,7 +8,7 @@ file(GLOB SERVER_SOURCE_FILES "${CMAKE_CURRENT_SOURCE_DIR}*.c*")
add_executable(mob_parse ${SERVER_PUBLIC_INCLUDE_FILES} ${SERVER_SOURCE_FILES})
if (UNIX)
target_link_libraries (mob_parse common xivdat pthread mysqlclient dl z stdc++fs )
target_link_libraries (mob_parse common xivdat pthread mysql dl z stdc++fs )
else()
target_link_libraries (mob_parse common xivdat mysql zlib)
endif()

View file

@ -11,7 +11,7 @@ file(GLOB SERVER_SOURCE_FILES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
add_executable( nav_export ${SERVER_PUBLIC_INCLUDE_FILES} ${SERVER_SOURCE_FILES})
if (UNIX)
target_link_libraries( nav_export common xivdat pthread mysqlclient dl z stdc++fs Recast Detour DetourTileCache )
target_link_libraries( nav_export common xivdat pthread mysql dl z stdc++fs Recast Detour DetourTileCache )
else()
target_link_libraries( nav_export common xivdat mysql zlib Recast Detour DetourTileCache )
endif()

View file

@ -11,7 +11,7 @@ file(GLOB SERVER_SOURCE_FILES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
add_executable(pcb_reader2 ${SERVER_PUBLIC_INCLUDE_FILES} ${SERVER_SOURCE_FILES})
if (UNIX)
target_link_libraries( pcb_reader2 common xivdat pthread mysqlclient dl z stdc++fs Recast Detour DetourTileCache )
target_link_libraries( pcb_reader2 common xivdat pthread mysql dl z stdc++fs Recast Detour DetourTileCache )
else()
target_link_libraries( pcb_reader2 common xivdat mysql zlib Recast Detour DetourTileCache )
endif()

View file

@ -8,7 +8,7 @@ file(GLOB SERVER_SOURCE_FILES "${CMAKE_CURRENT_SOURCE_DIR}*.c*")
add_executable(quest_parse ${SERVER_PUBLIC_INCLUDE_FILES} ${SERVER_SOURCE_FILES})
if (UNIX)
target_link_libraries (quest_parse common xivdat pthread mysqlclient dl z stdc++fs)
target_link_libraries (quest_parse common xivdat pthread mysql dl z stdc++fs)
else()
target_link_libraries (quest_parse common xivdat mysql zlib)
endif()

View file

@ -8,7 +8,7 @@ file(GLOB SERVER_SOURCE_FILES "${CMAKE_CURRENT_SOURCE_DIR}*.c*")
add_executable(questbattle_bruteforce ${SERVER_PUBLIC_INCLUDE_FILES} ${SERVER_SOURCE_FILES})
if (UNIX)
target_link_libraries (questbattle_bruteforce common xivdat pthread mysqlclient dl z stdc++fs )
target_link_libraries (questbattle_bruteforce common xivdat pthread mysql dl z stdc++fs )
else()
target_link_libraries (questbattle_bruteforce common xivdat mysql zlib)
endif()