diff --git a/vendor/cryptopp/CMakeLists.txt b/vendor/cryptopp/CMakeLists.txt index ef7a3e10..c13015f4 100644 --- a/vendor/cryptopp/CMakeLists.txt +++ b/vendor/cryptopp/CMakeLists.txt @@ -1,11 +1,11 @@ project(mycryptopp) -add_library(cryptopp dummy.cpp) +add_library(cryptopp INTERFACE) # note: include directory is called vendor_cryptopp instead of cryptopp to avoid include clashes with system headers target_include_directories(cryptopp SYSTEM INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}) # Forward debug build info (i.e. set CRYPTOPP_DEBUG variable if building in debug mode) -target_compile_definitions(cryptopp PUBLIC $<$:CRYPTOPP_DEBUG>) # add to all targets depending on this +target_compile_definitions(cryptopp INTERFACE $<$:CRYPTOPP_DEBUG>) # add to all targets depending on this add_compile_options($<$:-DCRYPTOPP_DEBUG>) # add to stuff built in subdirectories (like the actual library) if(NOT DISABLE_OPENMP) @@ -68,8 +68,8 @@ if(NOT DISABLE_OPENMP) target_link_libraries(OpenMP_TARGET INTERFACE ${OpenMP_CXX_FLAGS} ${Additional_OpenMP_Libraries_Workaround}) endif() - target_link_libraries(cryptopp PUBLIC ${OpenMP_CXX_FLAGS}) # Workaround for Ubuntu 18.04 that otherwise doesn't set -fopenmp for linking - target_link_libraries(cryptopp PUBLIC OpenMP::OpenMP_CXX) + target_link_libraries(cryptopp INTERFACE ${OpenMP_CXX_FLAGS}) # Workaround for Ubuntu 18.04 that otherwise doesn't set -fopenmp for linking + target_link_libraries(cryptopp INTERFACE OpenMP::OpenMP_CXX) # also add these flags to the third party Crypto++ build setup that is built in a subdirectory message(STATUS "OpenMP flags: ${OpenMP_CXX_FLAGS}") @@ -87,4 +87,4 @@ set(BUILD_STATIC ON CACHE BOOL "") set(cryptocpp_DISPLAY_CMAKE_SUPPORT_WARNING OFF CACHE BOOL "") add_subdirectory(vendor_cryptopp EXCLUDE_FROM_ALL) -target_link_libraries(cryptopp PRIVATE cryptopp-static) +target_link_libraries(cryptopp INTERFACE cryptopp-static) diff --git a/vendor/cryptopp/dummy.cpp b/vendor/cryptopp/dummy.cpp deleted file mode 100644 index e69de29b..00000000 diff --git a/vendor/googletest/CMakeLists.txt b/vendor/googletest/CMakeLists.txt index 6c7e98ae..f5835f5e 100644 --- a/vendor/googletest/CMakeLists.txt +++ b/vendor/googletest/CMakeLists.txt @@ -7,13 +7,12 @@ if (BUILD_TESTING) set(INSTALL_GMOCK off CACHE BOOL "" FORCE) add_subdirectory(gtest EXCLUDE_FROM_ALL) - project (googletest) - add_library(${PROJECT_NAME} dummy.cpp) - target_link_libraries(${PROJECT_NAME} PUBLIC gtest gmock) - target_include_directories(${PROJECT_NAME} SYSTEM INTERFACE ${gtest_INCLUDE_DIRS}/include SYSTEM ${gmock_INCLUDE_DIRS}/include) + add_library(googletest INTERFACE) + target_link_libraries(googletest INTERFACE gtest gmock) + target_include_directories(googletest SYSTEM INTERFACE ${gtest_INCLUDE_DIRS}/include SYSTEM INTERFACE ${gmock_INCLUDE_DIRS}/include) # Disable "missing override" warning because gmock MOCK_METHOD() don't use override :( if (NOT WIN32) - target_compile_options(${PROJECT_NAME} PUBLIC "-Wno-inconsistent-missing-override") + target_compile_options(googletest INTERFACE "-Wno-inconsistent-missing-override") endif() endif() diff --git a/vendor/googletest/dummy.cpp b/vendor/googletest/dummy.cpp deleted file mode 100644 index e69de29b..00000000 diff --git a/vendor/range-v3/CMakeLists.txt b/vendor/range-v3/CMakeLists.txt index 11075e42..4c2eda73 100644 --- a/vendor/range-v3/CMakeLists.txt +++ b/vendor/range-v3/CMakeLists.txt @@ -1,8 +1,2 @@ -project (range-v3) - -set(SOURCES - dummy.cpp -) - -add_library(${PROJECT_NAME} STATIC EXCLUDE_FROM_ALL ${SOURCES}) -target_include_directories(${PROJECT_NAME} SYSTEM PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/range-v3/include) +add_library(range-v3 INTERFACE) +target_include_directories(range-v3 SYSTEM INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}/range-v3/include) diff --git a/vendor/range-v3/dummy.cpp b/vendor/range-v3/dummy.cpp deleted file mode 100644 index e69de29b..00000000 diff --git a/vendor/spdlog/CMakeLists.txt b/vendor/spdlog/CMakeLists.txt index 41be9fa6..8c6937b3 100644 --- a/vendor/spdlog/CMakeLists.txt +++ b/vendor/spdlog/CMakeLists.txt @@ -1,8 +1,2 @@ -project (spdlog) - -set(SOURCES - dummy.cpp -) - -add_library(${PROJECT_NAME} STATIC ${SOURCES}) -target_include_directories(${PROJECT_NAME} SYSTEM PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) +add_library(spdlog INTERFACE) +target_include_directories(spdlog SYSTEM INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}) diff --git a/vendor/spdlog/dummy.cpp b/vendor/spdlog/dummy.cpp deleted file mode 100644 index e69de29b..00000000