Force enable MySQL

This commit is contained in:
WolverinDEV 2020-04-18 11:20:15 +02:00
parent 65dad8e9cb
commit edc0a9db2b

View File

@ -199,8 +199,6 @@ if(HAVE_OPEN_SSL)
openssl::crypto::static) openssl::crypto::static)
endif() endif()
find_package(mysql)
add_library(TeaSpeak STATIC ${SOURCE_FILES} ${HEADER_FILES}) add_library(TeaSpeak STATIC ${SOURCE_FILES} ${HEADER_FILES})
target_link_libraries(TeaSpeak PUBLIC target_link_libraries(TeaSpeak PUBLIC
threadpool::static jsoncpp_lib threadpool::static jsoncpp_lib
@ -210,13 +208,19 @@ target_link_libraries(TeaSpeak PUBLIC
dl dl
) )
find_package(mysql REQUIRED)
set(mysql_FOUND ON)
message("${mysql_FOUND}")
if(mysql_FOUND) if(mysql_FOUND)
message("Found MySQL") message("Found MySQL")
target_link_libraries(TeaSpeak PUBLIC target_link_libraries(TeaSpeak PUBLIC
mysql::client::static mysql::client::static
) )
target_compile_options(TeaSpeak PRIVATE "-Wall" "-DHAVE_MYSQL_H") target_compile_options(TeaSpeak PRIVATE "-Wall" "-DHAVE_MYSQL_H")
else()
message("Building without MySQL Support")
endif() endif()
if (TEASPEAK_SERVER) if (TEASPEAK_SERVER)
target_link_libraries(TeaSpeak PUBLIC CXXTerminal::static) target_link_libraries(TeaSpeak PUBLIC CXXTerminal::static)
endif () endif ()