2014-02-01 03:31:19 +06:00
|
|
|
# Use the same path for shared and static plugins
|
2013-10-02 23:21:43 +06:00
|
|
|
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib/${QCA_LIB_NAME}/crypto")
|
2014-02-01 03:31:19 +06:00
|
|
|
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib/${QCA_LIB_NAME}/crypto")
|
|
|
|
|
2014-01-01 02:10:15 +06:00
|
|
|
set(PLUGINS "botan;cyrus-sasl;gcrypt;gnupg;logger;nss;ossl;pkcs11;softstore" CACHE INTERNAL "")
|
|
|
|
|
|
|
|
# Initialize WITH_${PLUGIN}_PLUGIN cache variables
|
|
|
|
foreach(PLUGIN IN LISTS PLUGINS)
|
|
|
|
set(WITH_${PLUGIN}_PLUGIN "" CACHE STRING "Build ${PLUGIN} plugin")
|
|
|
|
string(TOLOWER "${WITH_${PLUGIN}_PLUGIN}" WITH_${PLUGIN}_PLUGIN)
|
|
|
|
endforeach(PLUGIN IN LISTS PLUGINS)
|
2013-11-11 21:08:56 +06:00
|
|
|
|
|
|
|
string(REGEX MATCH "^none|all|auto$" NOT_PLUGIN_LIST "${BUILD_PLUGINS}")
|
|
|
|
|
|
|
|
if(NOT_PLUGIN_LIST)
|
|
|
|
# BUILD_PLUGINS has "none", "all" or "auto" value
|
|
|
|
foreach(PLUGIN IN LISTS PLUGINS)
|
|
|
|
# If not defined by user use BUILD_PLUGINS value
|
|
|
|
# to decide build or not build the plugin
|
|
|
|
if("${WITH_${PLUGIN}_PLUGIN}" STREQUAL "")
|
|
|
|
if("${BUILD_PLUGINS}" STREQUAL "all")
|
|
|
|
set(WITH_${PLUGIN}_PLUGIN "yes")
|
|
|
|
elseif("${BUILD_PLUGINS}" STREQUAL "auto")
|
|
|
|
set(WITH_${PLUGIN}_PLUGIN "auto")
|
2020-02-15 11:00:57 +01:00
|
|
|
else()
|
2013-11-11 21:08:56 +06:00
|
|
|
set(WITH_${PLUGIN}_PLUGIN "no")
|
2020-02-15 11:00:57 +01:00
|
|
|
endif()
|
2013-11-11 21:08:56 +06:00
|
|
|
elseif(NOT WITH_${PLUGIN}_PLUGIN)
|
|
|
|
set(WITH_${PLUGIN}_PLUGIN "no")
|
|
|
|
elseif("${WITH_${PLUGIN}_PLUGIN}" STREQUAL "auto")
|
|
|
|
set(WITH_${PLUGIN}_PLUGIN "auto")
|
2020-02-15 11:00:57 +01:00
|
|
|
else()
|
2013-11-11 21:08:56 +06:00
|
|
|
set(WITH_${PLUGIN}_PLUGIN "yes")
|
2020-02-15 11:00:57 +01:00
|
|
|
endif()
|
2013-11-11 21:08:56 +06:00
|
|
|
|
|
|
|
# Build plugin if yes or auto
|
|
|
|
if(WITH_${PLUGIN}_PLUGIN)
|
|
|
|
add_subdirectory("qca-${PLUGIN}")
|
2020-02-15 11:00:57 +01:00
|
|
|
else()
|
2014-01-01 02:10:15 +06:00
|
|
|
disable_plugin(${PLUGIN})
|
2020-02-15 11:00:57 +01:00
|
|
|
endif()
|
2013-11-11 21:08:56 +06:00
|
|
|
endforeach(PLUGIN IN LISTS PLUGINS)
|
2020-02-15 11:00:57 +01:00
|
|
|
else()
|
2013-11-11 21:08:56 +06:00
|
|
|
# BUILD_PLUGINS has list plugins to builds
|
|
|
|
foreach(PLUGIN IN LISTS PLUGINS)
|
|
|
|
list(FIND BUILD_PLUGINS "${PLUGIN}" PLUGIN_INDEX)
|
|
|
|
if(PLUGIN_INDEX GREATER -1)
|
|
|
|
set(WITH_${PLUGIN}_PLUGIN "yes")
|
|
|
|
add_subdirectory("qca-${PLUGIN}")
|
2020-02-15 11:00:57 +01:00
|
|
|
else()
|
2014-01-01 02:10:15 +06:00
|
|
|
disable_plugin(${PLUGIN})
|
2020-02-15 11:00:57 +01:00
|
|
|
endif()
|
2013-11-11 21:08:56 +06:00
|
|
|
endforeach(PLUGIN IN LISTS PLUGINS)
|
2020-02-15 11:00:57 +01:00
|
|
|
endif()
|
2013-11-11 21:08:56 +06:00
|
|
|
|
|
|
|
message("")
|
|
|
|
message("Plugins:")
|
|
|
|
foreach(PLUGIN IN LISTS PLUGINS)
|
2014-01-01 02:10:15 +06:00
|
|
|
message(" qca-${PLUGIN} ${WITH_${PLUGIN}_PLUGIN_INTERNAL}")
|
2013-11-11 21:08:56 +06:00
|
|
|
endforeach(PLUGIN IN LISTS PLUGINS)
|
2013-10-01 08:01:50 +06:00
|
|
|
|
2008-06-11 21:54:06 +00:00
|
|
|
# Currently disabled
|
|
|
|
#
|
|
|
|
# IF (WIN32)
|
|
|
|
# MESSAGE(STATUS "WinCrypto plugin enabled")
|
|
|
|
# ADD_SUBDIRECTORY(qca-wincrypto)
|
|
|
|
# ENDIF (WIN32)
|
2006-10-02 09:59:51 +00:00
|
|
|
|