Skip to content

Commit fba65ee

Browse files
authored
Merge pull request #46 from jll63/fix/finding-boost-workaround
Workaround on finding Boost
2 parents 176d5b2 + 4e7cd31 commit fba65ee

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

CMakeLists.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,10 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON)
1515
# Find Boost dependency
1616
list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake")
1717
include(cmake/find_or_download_package.cmake)
18-
find_or_download_package(Boost INSTALL_WITH_YOMM)
18+
find_package(Boost 1.74 QUIET)
19+
if(NOT TARGET Boost::headers)
20+
find_or_download_package(Boost INSTALL_WITH_YOMM)
21+
endif()
1922
message(STATUS "Using Boost libraries from ${Boost_INCLUDE_DIRS}")
2023

2124
if(NOT ("${CMAKE_BUILD_TYPE}" STREQUAL "Debug") AND (CMAKE_COMPILER_IS_GNUCXX OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang"))

0 commit comments

Comments
 (0)