From 46c5ad9ee495885ee889d8d30176ca6b9e81d748 Mon Sep 17 00:00:00 2001 From: Andrei Malashkin Date: Fri, 20 Sep 2024 16:52:08 +0200 Subject: [PATCH] remove hack about deploying crypto3 --- crypto3/CMakeLists.txt | 12 +----------- .../cmake/{Config.cmake.in => crypto3Config.cmake} | 11 ++++------- 2 files changed, 5 insertions(+), 18 deletions(-) rename crypto3/cmake/{Config.cmake.in => crypto3Config.cmake} (80%) diff --git a/crypto3/CMakeLists.txt b/crypto3/CMakeLists.txt index 6dbe96bc4d..88645636b8 100644 --- a/crypto3/CMakeLists.txt +++ b/crypto3/CMakeLists.txt @@ -75,20 +75,10 @@ endif() configure_file(${CMAKE_CURRENT_LIST_DIR}/docs/doxygen/crypto3.doxyfile.in ${CMAKE_CURRENT_BINARY_DIR}/crypto3.doxyfile @ONLY) -# Configure package file to be able to import crypto3 headers -# TODO: remove it after resolving cyclical dependencies in crypto3 modules -include(CMakePackageConfigHelpers) -include(GNUInstallDirs) set(CONFIG_DIR ${CMAKE_INSTALL_LIBDIR}/cmake/crypto3) -configure_package_config_file( - cmake/Config.cmake.in - crypto3Config.cmake - INSTALL_DESTINATION ${CONFIG_DIR} -) - install( FILES - ${CMAKE_CURRENT_BINARY_DIR}/crypto3Config.cmake + cmake/crypto3Config.cmake DESTINATION ${CONFIG_DIR} ) diff --git a/crypto3/cmake/Config.cmake.in b/crypto3/cmake/crypto3Config.cmake similarity index 80% rename from crypto3/cmake/Config.cmake.in rename to crypto3/cmake/crypto3Config.cmake index e4861b6214..ca5e6167d9 100644 --- a/crypto3/cmake/Config.cmake.in +++ b/crypto3/cmake/crypto3Config.cmake @@ -1,16 +1,13 @@ -@PACKAGE_INIT@ - -include(CMakeFindDependencyMacro) -find_dependency(Boost COMPONENTS REQUIRED - container json filesystem log log_setup program_options thread system unit_test_framework) - # Protect against multiple inclusion if (TARGET crypto3::all) return() endif() +include(CMakeFindDependencyMacro) +find_dependency(Boost COMPONENTS REQUIRED + container json filesystem log log_setup program_options thread system unit_test_framework) + add_library(crypto3::all INTERFACE IMPORTED) set_target_properties(crypto3::all PROPERTIES - INTERFACE_INCLUDE_DIRECTORIES "@CMAKE_INSTALL_FULL_INCLUDEDIR@" INTERFACE_LINK_LIBRARIES ${Boost_LIBRARIES})