2
0
mirror of https://github.com/boostorg/cmake.git synced 2026-01-19 04:02:15 +00:00

Add a hint for the stage directory to find_package in the cmake configure files, so that recursive lookup does not fail when configuring as a transitive dependency using rules_foreign_cc (bazel) cmake targets

This commit is contained in:
Soeren Roerden
2024-06-19 12:48:16 -04:00
parent c9987a6d41
commit 1cd045fdf6

View File

@@ -343,7 +343,7 @@ function(boost_install_target)
if(dep MATCHES "^Boost::(.*)$")
string(APPEND CONFIG_FILE_CONTENTS "if(NOT boost_${CMAKE_MATCH_1}_FOUND)\n")
string(APPEND CONFIG_FILE_CONTENTS " find_dependency(boost_${CMAKE_MATCH_1} ${__VERSION} EXACT)\n")
string(APPEND CONFIG_FILE_CONTENTS " find_dependency(boost_${CMAKE_MATCH_1} ${__VERSION} EXACT HINTS \"\${CMAKE_CURRENT_LIST_DIR}/..\")\n")
string(APPEND CONFIG_FILE_CONTENTS "endif()\n")
elseif(dep MATCHES "^\\$<TARGET_NAME_IF_EXISTS:Boost::(.*)>$")