From 46b2a5f439eba0e750eb7884f4dae6c87131be15 Mon Sep 17 00:00:00 2001 From: Eduard Valeyev Date: Sun, 17 Sep 2023 11:40:30 -0400 Subject: [PATCH] make Libint2::cxx consumable even if it used system Boost --- export/cmake/libint2-config.cmake.in | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/export/cmake/libint2-config.cmake.in b/export/cmake/libint2-config.cmake.in index d6fbb75ba..09699c177 100644 --- a/export/cmake/libint2-config.cmake.in +++ b/export/cmake/libint2-config.cmake.in @@ -22,6 +22,7 @@ set(LIBINT2_EXT_VERSION "@LIBINT_EXT_VERSION@") set(LIBINT2_LIBRARIES Libint2::int2) set(LIBINT2_INCLUDE_DIRS "@PACKAGE_LIBINT2_INSTALL_INCLUDEDIR@") +set(LIBINT_HAS_SYSTEM_BOOST_PREPROCESSOR_VARIADICS @LIBINT_HAS_SYSTEM_BOOST_PREPROCESSOR_VARIADICS@) # Import library targets if(NOT TARGET Libint2::libint2) @@ -31,6 +32,12 @@ if(NOT TARGET Libint2::libint2) endif() endif() +# if relied on system Boost for preprocessor variadics, make sure it's available +if (LIBINT_HAS_SYSTEM_BOOST_PREPROCESSOR_VARIADICS AND NOT TARGET Boost::boost) + include(CMakeFindDependencyMacro) + find_dependency(Boost 1.29) +endif() + # Need Threads::Threads if (NOT TARGET Threads::Threads) find_package(Threads QUIET REQUIRED)