aboutsummaryrefslogtreecommitdiff
path: root/dep
diff options
context:
space:
mode:
Diffstat (limited to 'dep')
-rw-r--r--dep/mysql/CMakeLists.txt15
1 files changed, 5 insertions, 10 deletions
diff --git a/dep/mysql/CMakeLists.txt b/dep/mysql/CMakeLists.txt
index 08a117bf173..ba4af695468 100644
--- a/dep/mysql/CMakeLists.txt
+++ b/dep/mysql/CMakeLists.txt
@@ -8,15 +8,10 @@
# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-if (NOT MYSQL_FOUND)
- message(FATAL_ERROR "MySQL wasn't found on your system but it's required to build the servers!")
-endif()
+find_package(MySQL REQUIRED COMPONENTS lib OPTIONAL_COMPONENTS binary)
-add_library(mysql STATIC IMPORTED GLOBAL)
+add_library(mysql INTERFACE)
-set_target_properties(mysql
- PROPERTIES
- IMPORTED_LOCATION
- "${MYSQL_LIBRARY}"
- INTERFACE_INCLUDE_DIRECTORIES
- "${MYSQL_INCLUDE_DIR}")
+target_link_libraries(mysql
+ INTERFACE
+ MySQL::MySQL)