Skip to content

Commit

Permalink
Add HINTS to the TARGET_NAME_IF_EXISTS case as well
Browse files Browse the repository at this point in the history
  • Loading branch information
pdimov committed Jun 19, 2024
1 parent 98dd92e commit 5eab56d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/BoostInstall.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ function(boost_install_target)
elseif(dep MATCHES "^\\$<TARGET_NAME_IF_EXISTS:Boost::(.*)>$")

string(APPEND CONFIG_FILE_CONTENTS "if(NOT boost_${CMAKE_MATCH_1}_FOUND)\n")
string(APPEND CONFIG_FILE_CONTENTS " find_package(boost_${CMAKE_MATCH_1} ${__VERSION} EXACT QUIET)\n")
string(APPEND CONFIG_FILE_CONTENTS " find_package(boost_${CMAKE_MATCH_1} ${__VERSION} EXACT QUIET HINTS \"\${CMAKE_CURRENT_LIST_DIR}/..\")\n")
string(APPEND CONFIG_FILE_CONTENTS "endif()\n")

elseif(dep STREQUAL "Threads::Threads")
Expand Down

1 comment on commit 5eab56d

@soro
Copy link
Contributor

@soro soro commented on 5eab56d Jun 19, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assumed that since this uses find_package rather than find_dependency, it might work without modification - probably doesn't hurt to have this hint

Please sign in to comment.