summaryrefslogtreecommitdiff
path: root/plugin
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2015-02-12 12:26:37 +0100
committerSergei Golubchik <serg@mariadb.org>2015-02-15 22:14:33 +0100
commitdb227616d2ac4529041f37dbc4b6cd5e0338c4a1 (patch)
treeb65c2a8f49fe57f5bd61264544bb1aeba46bc011 /plugin
parent985ef1d42a7b71c72aa3b26d96f0876ac597522f (diff)
downloadmariadb-git-db227616d2ac4529041f37dbc4b6cd5e0338c4a1.tar.gz
followup for "MDEV-6248 GUI-friendly cmake options to enable/disable plugins"
Remove ONLY_IF clause in MYSQL_ADD_PLUGIN and the requirement that every plugin's CMakeLists.txt *must* do MYSQL_ADD_PLUGIN for PLUGIN_XXX=YES to work. This was very fragile and cannot be relied on. Use a different implementation of =YES check - iterate all PLUGIN_* variables and see which one doesn't have a matching target. Revert all ONLY_IF changes in CMakeLists.txt files.
Diffstat (limited to 'plugin')
-rw-r--r--plugin/auth_pam/CMakeLists.txt12
-rw-r--r--plugin/auth_socket/CMakeLists.txt5
-rw-r--r--plugin/cracklib_password_check/CMakeLists.txt7
-rw-r--r--plugin/example_key_management_plugin/CMakeLists.txt6
-rw-r--r--plugin/file_key_management_plugin/CMakeLists.txt6
5 files changed, 18 insertions, 18 deletions
diff --git a/plugin/auth_pam/CMakeLists.txt b/plugin/auth_pam/CMakeLists.txt
index 055e188c45b..51317527c77 100644
--- a/plugin/auth_pam/CMakeLists.txt
+++ b/plugin/auth_pam/CMakeLists.txt
@@ -4,10 +4,10 @@ INCLUDE (CheckFunctionExists)
CHECK_INCLUDE_FILES (security/pam_appl.h HAVE_PAM_APPL_H)
CHECK_FUNCTION_EXISTS (strndup HAVE_STRNDUP)
-IF(HAVE_STRNDUP)
- ADD_DEFINITIONS(-DHAVE_STRNDUP)
-ENDIF(HAVE_STRNDUP)
-
-MYSQL_ADD_PLUGIN(auth_pam auth_pam.c ONLY_IF HAVE_PAM_APPL_H
- LINK_LIBRARIES pam MODULE_ONLY)
+IF(HAVE_PAM_APPL_H)
+ IF(HAVE_STRNDUP)
+ ADD_DEFINITIONS(-DHAVE_STRNDUP)
+ ENDIF(HAVE_STRNDUP)
+ MYSQL_ADD_PLUGIN(auth_pam auth_pam.c LINK_LIBRARIES pam MODULE_ONLY)
+ENDIF(HAVE_PAM_APPL_H)
diff --git a/plugin/auth_socket/CMakeLists.txt b/plugin/auth_socket/CMakeLists.txt
index 5630cac33ce..547b1b8e3bf 100644
--- a/plugin/auth_socket/CMakeLists.txt
+++ b/plugin/auth_socket/CMakeLists.txt
@@ -64,5 +64,6 @@ ENDIF()
ENDIF()
ENDIF()
-MYSQL_ADD_PLUGIN(auth_socket auth_socket.c ONLY_IF ok MODULE_ONLY)
-
+IF(ok)
+ MYSQL_ADD_PLUGIN(auth_socket auth_socket.c MODULE_ONLY)
+ENDIF()
diff --git a/plugin/cracklib_password_check/CMakeLists.txt b/plugin/cracklib_password_check/CMakeLists.txt
index 21c5b7682c9..a57ad240d64 100644
--- a/plugin/cracklib_password_check/CMakeLists.txt
+++ b/plugin/cracklib_password_check/CMakeLists.txt
@@ -3,9 +3,8 @@ INCLUDE (CheckLibraryExists)
CHECK_INCLUDE_FILES (crack.h HAVE_CRACK_H)
CHECK_LIBRARY_EXISTS(crack FascistCheckUser "" HAVE_LIBCRACK)
+
IF (HAVE_ALLOCA_H AND HAVE_CRACK_H AND HAVE_LIBCRACK AND HAVE_MEMCPY)
- SET(ok 1)
+ MYSQL_ADD_PLUGIN(cracklib_password_check cracklib_password_check.c
+ LINK_LIBRARIES crack MODULE_ONLY)
ENDIF()
-
-MYSQL_ADD_PLUGIN(cracklib_password_check cracklib_password_check.c
- LINK_LIBRARIES crack ONLY_IF ok MODULE_ONLY)
diff --git a/plugin/example_key_management_plugin/CMakeLists.txt b/plugin/example_key_management_plugin/CMakeLists.txt
index dbceb0fed8b..250f77856c0 100644
--- a/plugin/example_key_management_plugin/CMakeLists.txt
+++ b/plugin/example_key_management_plugin/CMakeLists.txt
@@ -1,2 +1,4 @@
-MYSQL_ADD_PLUGIN(EXAMPLE_KEY_MANAGEMENT_PLUGIN example_key_management_plugin.cc
- MODULE_ONLY ONLY_IF HAVE_EncryptAes128Ctr)
+IF(HAVE_EncryptAes128Ctr)
+ MYSQL_ADD_PLUGIN(EXAMPLE_KEY_MANAGEMENT_PLUGIN example_key_management_plugin.cc
+ MODULE_ONLY)
+ENDIF()
diff --git a/plugin/file_key_management_plugin/CMakeLists.txt b/plugin/file_key_management_plugin/CMakeLists.txt
index 91f11aeef45..8a0429e979e 100644
--- a/plugin/file_key_management_plugin/CMakeLists.txt
+++ b/plugin/file_key_management_plugin/CMakeLists.txt
@@ -1,8 +1,6 @@
SET(FILE_KEY_MANAGEMENT_PLUGIN_SOURCES file_key_management_plugin.cc EncKeys.cc KeySingleton.cc)
IF(NOT SSL_SOURCES)
- SET(USING_OPENSSL ON)
+ MYSQL_ADD_PLUGIN(FILE_KEY_MANAGEMENT_PLUGIN ${FILE_KEY_MANAGEMENT_PLUGIN_SOURCES}
+ LINK_LIBRARIES pcre)
ENDIF()
-
-MYSQL_ADD_PLUGIN(FILE_KEY_MANAGEMENT_PLUGIN ${FILE_KEY_MANAGEMENT_PLUGIN_SOURCES}
- LINK_LIBRARIES pcre ONLY_IF USING_OPENSSL)