diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index c72721e..b21ad73 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -16,6 +16,13 @@ if(NOT ${PROJECT_NAME} STREQUAL "CycloneDDS") message(FATAL_ERROR "Top-level CMakeLists.txt was moved to the top-level directory. Please run cmake on ${dir} instead of ${CMAKE_CURRENT_LIST_DIR}") endif() + +# Support the OMG DDS Security within ddsc adds quite a bit of code. +option(ENABLE_SECURITY "Enable OMG DDS Security support" ON) +if(NOT ENABLE_SECURITY) + message(STATUS "Building without OMG DDS Security support") +endif() + add_subdirectory(ddsrt) # some of the tests in the core rely on preprocessing IDL, so idlc has to diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt index 6eb9b91..38037f9 100644 --- a/src/core/CMakeLists.txt +++ b/src/core/CMakeLists.txt @@ -54,10 +54,7 @@ if(ENABLE_SSL) endif() # Support the OMG DDS Security within ddsc adds quite a bit of code. -option(ENABLE_SECURITY "Enable OMG DDS Security support" ON) -if(NOT ENABLE_SECURITY) - message(STATUS "Building without OMG DDS Security support") -else() +if(ENABLE_SECURITY) add_definitions(-DDDSI_INCLUDE_SECURITY) target_link_libraries(ddsc PRIVATE security_core) target_include_directories( diff --git a/src/security/builtin_plugins/authentication/CMakeLists.txt b/src/security/builtin_plugins/authentication/CMakeLists.txt index f5f46a4..9dc9b53 100644 --- a/src/security/builtin_plugins/authentication/CMakeLists.txt +++ b/src/security/builtin_plugins/authentication/CMakeLists.txt @@ -56,7 +56,7 @@ target_include_directories(dds_security_auth install( TARGETS - EXPORT "${CMAKE_PROJECT_NAME}" + EXPORT "${PROJECT_NAME}" RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" COMPONENT lib LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" COMPONENT lib ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}" COMPONENT lib diff --git a/src/security/core/CMakeLists.txt b/src/security/core/CMakeLists.txt index 69a2ba5..231eb9e 100644 --- a/src/security/core/CMakeLists.txt +++ b/src/security/core/CMakeLists.txt @@ -50,7 +50,7 @@ install( #install( # TARGETS security_core -# EXPORT "${CMAKE_PROJECT_NAME}" +# EXPORT "${PROJECT_NAME}" # RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" COMPONENT lib # LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" COMPONENT lib # ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}" COMPONENT lib