2022-01-11 13:48:15 +08:00
|
|
|
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
2022-02-24 06:38:18 +08:00
|
|
|
index 146d2b8..f180498 100755
|
2022-01-11 13:48:15 +08:00
|
|
|
--- a/CMakeLists.txt
|
|
|
|
+++ b/CMakeLists.txt
|
2022-02-24 06:38:18 +08:00
|
|
|
@@ -360,12 +360,8 @@ endif (BUILD_POSTGRESQL)
|
2022-01-11 13:48:15 +08:00
|
|
|
|
|
|
|
if (BUILD_MYSQL)
|
2022-02-24 06:38:18 +08:00
|
|
|
# Find mysql, only mariadb client library is supported
|
|
|
|
- find_package(MySQL QUIET)
|
|
|
|
find_package(unofficial-libmariadb QUIET)
|
|
|
|
- if (MySQL_FOUND)
|
2022-01-11 13:48:15 +08:00
|
|
|
- target_link_libraries(${PROJECT_NAME} PRIVATE MySQL_lib)
|
2022-02-24 06:38:18 +08:00
|
|
|
- set(DROGON_FOUND_MYSQL TRUE)
|
|
|
|
- elseif (unofficial-libmariadb_FOUND)
|
|
|
|
+ if (unofficial-libmariadb_FOUND)
|
|
|
|
target_link_libraries(${PROJECT_NAME} PRIVATE unofficial::libmariadb)
|
|
|
|
set(DROGON_FOUND_MYSQL TRUE)
|
|
|
|
endif ()
|
2022-01-11 13:48:15 +08:00
|
|
|
diff --git a/cmake/templates/DrogonConfig.cmake.in b/cmake/templates/DrogonConfig.cmake.in
|
2022-02-24 06:38:18 +08:00
|
|
|
index 199cfb9..a3fbde0 100644
|
2022-01-11 13:48:15 +08:00
|
|
|
--- a/cmake/templates/DrogonConfig.cmake.in
|
|
|
|
+++ b/cmake/templates/DrogonConfig.cmake.in
|
|
|
|
@@ -25,7 +25,7 @@ if(@SQLite3_FOUND@)
|
|
|
|
find_dependency(SQLite3)
|
|
|
|
endif()
|
|
|
|
if(@MySQL_FOUND@)
|
|
|
|
-find_dependency(MySQL)
|
|
|
|
+find_dependency(unofficial-libmariadb CONFIG REQUIRED)
|
|
|
|
endif()
|
|
|
|
if(@Boost_FOUND@)
|
|
|
|
find_dependency(Boost)
|