From 79c934b51cdca75971aecca8d89586522a5a9733 Mon Sep 17 00:00:00 2001 From: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> Date: Thu, 12 Feb 2026 10:49:45 +0000 Subject: [PATCH] cmake: Fix NetBSD-specific workaround for Boost --- cmake/module/AddBoostIfNeeded.cmake | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/cmake/module/AddBoostIfNeeded.cmake b/cmake/module/AddBoostIfNeeded.cmake index b3f248009d8..80a6d2e8911 100644 --- a/cmake/module/AddBoostIfNeeded.cmake +++ b/cmake/module/AddBoostIfNeeded.cmake @@ -32,12 +32,14 @@ function(add_boost_if_needed) find_package(Boost 1.74.0 REQUIRED CONFIG) mark_as_advanced(Boost_INCLUDE_DIR boost_headers_DIR) # Workaround for a bug in NetBSD pkgsrc. - # See: https://github.com/NetBSD/pkgsrc/issues/167. + # See https://gnats.netbsd.org/59856. if(CMAKE_SYSTEM_NAME STREQUAL "NetBSD") get_filename_component(_boost_include_dir "${boost_headers_DIR}/../../../include/" ABSOLUTE) - set_target_properties(Boost::headers PROPERTIES - INTERFACE_INCLUDE_DIRECTORIES ${_boost_include_dir} - ) + if(_boost_include_dir MATCHES "^/usr/pkg/") + set_target_properties(Boost::headers PROPERTIES + INTERFACE_INCLUDE_DIRECTORIES ${_boost_include_dir} + ) + endif() unset(_boost_include_dir) endif() set_target_properties(Boost::headers PROPERTIES IMPORTED_GLOBAL TRUE)