Skip to content

Commit

Permalink
make Libint2::cxx consumable even if it used system Boost
Browse files Browse the repository at this point in the history
  • Loading branch information
evaleev committed Sep 17, 2023
1 parent fff8544 commit 46b2a5f
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions export/cmake/libint2-config.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)
Expand Down

0 comments on commit 46b2a5f

Please sign in to comment.