Warning, /libraries/qca/plugins/CMakeLists.txt is written in an unsupported language. File is not indexed.

0001 # Use the same path for shared and static plugins
0002 set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib/${QCA_LIB_NAME}/crypto")
0003 set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib/${QCA_LIB_NAME}/crypto")
0004 
0005 set(PLUGINS "botan;cyrus-sasl;gcrypt;gnupg;logger;nss;ossl;pkcs11;softstore" CACHE INTERNAL "")
0006 
0007 # Initialize WITH_${PLUGIN}_PLUGIN cache variables
0008 foreach(PLUGIN IN LISTS PLUGINS)
0009   set(WITH_${PLUGIN}_PLUGIN "" CACHE STRING "Build ${PLUGIN} plugin")
0010   string(TOLOWER "${WITH_${PLUGIN}_PLUGIN}" WITH_${PLUGIN}_PLUGIN)
0011 endforeach(PLUGIN IN LISTS PLUGINS)
0012 
0013 string(REGEX MATCH "^none|all|auto$" NOT_PLUGIN_LIST "${BUILD_PLUGINS}")
0014 
0015 if(NOT_PLUGIN_LIST)
0016   # BUILD_PLUGINS has "none", "all" or "auto" value
0017   foreach(PLUGIN IN LISTS PLUGINS)
0018     # If not defined by user use BUILD_PLUGINS value
0019     # to decide build or not build the plugin
0020     if("${WITH_${PLUGIN}_PLUGIN}" STREQUAL "")
0021       if("${BUILD_PLUGINS}" STREQUAL "all")
0022         set(WITH_${PLUGIN}_PLUGIN "yes")
0023       elseif("${BUILD_PLUGINS}" STREQUAL "auto")
0024         set(WITH_${PLUGIN}_PLUGIN "auto")
0025       else()
0026         set(WITH_${PLUGIN}_PLUGIN "no")
0027       endif()
0028     elseif(NOT WITH_${PLUGIN}_PLUGIN)
0029       set(WITH_${PLUGIN}_PLUGIN "no")
0030     elseif("${WITH_${PLUGIN}_PLUGIN}" STREQUAL "auto")
0031       set(WITH_${PLUGIN}_PLUGIN "auto")
0032     else()
0033       set(WITH_${PLUGIN}_PLUGIN "yes")
0034     endif()
0035 
0036     # Build plugin if yes or auto
0037     if(WITH_${PLUGIN}_PLUGIN)
0038       add_subdirectory("qca-${PLUGIN}")
0039     else()
0040       disable_plugin(${PLUGIN})
0041     endif()
0042   endforeach(PLUGIN IN LISTS PLUGINS)
0043 else()
0044   # BUILD_PLUGINS has list plugins to builds
0045   foreach(PLUGIN IN LISTS PLUGINS)
0046     list(FIND BUILD_PLUGINS "${PLUGIN}" PLUGIN_INDEX)
0047     if(PLUGIN_INDEX GREATER -1)
0048       set(WITH_${PLUGIN}_PLUGIN "yes")
0049       add_subdirectory("qca-${PLUGIN}")
0050     else()
0051       disable_plugin(${PLUGIN})
0052     endif()
0053   endforeach(PLUGIN IN LISTS PLUGINS)
0054 endif()
0055 
0056 message("")
0057 message("Plugins:")
0058 foreach(PLUGIN IN LISTS PLUGINS)
0059   message("  qca-${PLUGIN} ${WITH_${PLUGIN}_PLUGIN_INTERNAL}")
0060 endforeach(PLUGIN IN LISTS PLUGINS)
0061 
0062 # Currently disabled
0063 #
0064 # IF (WIN32)
0065 #         MESSAGE(STATUS "WinCrypto plugin enabled")
0066 #         ADD_SUBDIRECTORY(qca-wincrypto)
0067 # ENDIF (WIN32)
0068