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)