Skip to content
Snippets Groups Projects
Commit 088eec31 authored by Pascal Palenda's avatar Pascal Palenda
Browse files

Merge branch 'feature/multi-sub-proj-available' into 'main'

Feat: allow for multiple find package overrides

See merge request !5
parents b0fdfd52 d59af44f
No related branches found
No related tags found
1 merge request!5Feat: allow for multiple find package overrides
......@@ -35,9 +35,17 @@ macro (find_package)
if (AVAILABLE_SUB_PROJECTS)
string (TOLOWER "${ARGV0}" _pkg_low)
string (TOLOWER "${AVAILABLE_SUB_PROJECTS}" _sub_low)
set (_found_in_sub_projects OFF)
foreach (_sub_project ${AVAILABLE_SUB_PROJECTS})
string (TOLOWER "${_sub_project}" _sub_low)
if (${_pkg_low} STREQUAL ${_sub_low})
set (_found_in_sub_projects ON)
break ()
endif ()
endforeach ()
if (_found_in_sub_projects)
message (WARNING "Package ${ARGV0} available as a sub project; skip find_package")
else ()
_find_package (${ARGV})
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment