mariadb/plugin/auth_pam/CMakeLists.txt
Sergei Golubchik db227616d2 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.
2015-02-15 22:14:33 +01:00

13 lines
355 B
CMake

INCLUDE (CheckIncludeFiles)
INCLUDE (CheckFunctionExists)
CHECK_INCLUDE_FILES (security/pam_appl.h HAVE_PAM_APPL_H)
CHECK_FUNCTION_EXISTS (strndup HAVE_STRNDUP)
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)