mirror of
https://github.com/boostorg/cmake.git
synced 2026-01-19 04:02:15 +00:00
Merge pull request #58 from Neumann-A/optional-deps
Add optional deps into generated config
This commit is contained in:
@@ -334,6 +334,12 @@ function(boost_install_target)
|
||||
string(APPEND CONFIG_FILE_CONTENTS " find_dependency(boost_${CMAKE_MATCH_1} ${__VERSION} EXACT)\n")
|
||||
string(APPEND CONFIG_FILE_CONTENTS "endif()\n")
|
||||
|
||||
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 "endif()\n")
|
||||
|
||||
elseif(dep STREQUAL "Threads::Threads")
|
||||
|
||||
string(APPEND CONFIG_FILE_CONTENTS "set(THREADS_PREFER_PTHREAD_FLAG ON)\n")
|
||||
|
||||
Reference in New Issue
Block a user