#------------------------------------------------------------------- # This file is part of the CMake build system for Scol # # The contents of this file are placed in the public domain. Feel # free to make use of it in any way you like. #------------------------------------------------------------------- ############################################################ # include/Scol core library ############################################################ PROJECT(security) # define header and source files for the library set (SECURITY_HEADER_FILES # None! ) if (Scol_STATIC) set (SECURITY_HEADER_FILES ${SECURITY_HEADER_FILES} include/loadScolSecurity.h) endif() set (SECURITY_SOURCE_FILES src/securityplugin.cpp ) file(GLOB CRYPTO_PP_HEADER_FILES cryptopp/*.h) file(GLOB CRYPTO_PP_SOURCE_FILES cryptopp/*.cpp) scol_include_plugin("SECURITY" "${PROJECT_SOURCE_DIR}/include" "loadScolSecurity.h") # Add directories includes. include_directories(cryptopp) # This is how visual studio directories (or filters) are generated. source_group(Header\ Files\\CryptoPP FILES ${CRYPTO_PP_HEADER_FILES}) # Same thing for sources files source_group(Source\ Files\\CryptoPP FILES ${CRYPTO_PP_SOURCE_FILES}) # Add definition for P4 optimizations, warnings removal. add_definitions(-DOPTI_P4 -D_CRT_SECURE_NO_WARNINGS -DCRYPTOPP_DISABLE_ASM -DCRYPTOPP_DISABLE_X86ASM) if(WIN32) set(LIBRARIES Ws2_32.lib) elseif(ANDROID AND ANDROID_NDK_RELEASE_NUM GREATER 10004) set(LIBRARIES gomp) endif() if(NOT WIN32) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC") add_definitions(-DCRYPTOPP_DISABLE_SSSE3) endif() # setup Scol security plugin target add_library(security ${Scol_LIB_TYPE} ${SECURITY_HEADER_FILES} ${SECURITY_SOURCE_FILES} ${CRYPTO_PP_HEADER_FILES} ${CRYPTO_PP_SOURCE_FILES} ) add_dependencies(security kernel) if (ANDROID) set(Scol_ANDROID_DEPENDENCIES ${Scol_ANDROID_DEPENDENCIES} security CACHE INTERNAL "" FORCE) message(STATUS "[${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE}] Scol_ANDROID_DEPENDENCIES: ${Scol_ANDROID_DEPENDENCIES} -- added security to android project deps") endif() # set the dll version. #set_target_properties(security PROPERTIES VERSION ${Scol_VERSION} SOVERSION ${Scol_VERSION_MAJOR}) target_link_libraries(security ${LIBRARIES}) # install Scol security scol_config_plugin(security) #install(FILES ${CRYPTO_PP_HEADER_FILES} DESTINATION include/SCOL/plugins/security/cryptopp)