Skip to content

Commit f90d22b

Browse files
Try to set CMP0167 for boost on windows
1 parent 8d1bae4 commit f90d22b

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

CMakeLists.txt

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,14 @@ find_package(ament_cmake REQUIRED)
2929
foreach(Dependency IN ITEMS ${THIS_PACKAGE_INCLUDE_DEPENDS})
3030
find_package(${Dependency} REQUIRED)
3131
endforeach()
32-
find_package(Boost REQUIRED)
32+
33+
if(POLICY CMP0167)
34+
cmake_policy(SET CMP0167 NEW)
35+
endif()
36+
find_package(Boost QUIET COMPONENTS headers)
37+
if(NOT Boost_headers_FOUND)
38+
find_package(Boost REQUIRED)
39+
endif()
3340

3441
add_library(realtime_tools SHARED
3542
src/realtime_clock.cpp

0 commit comments

Comments
 (0)