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

Feat: allow for multiple find package overrides

parent 640eaca7
No related branches found
No related tags found
1 merge request!5Feat: allow for multiple find package overrides
......@@ -30,9 +30,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)
if (${_pkg_low} STREQUAL ${_sub_low})
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.
Finish editing this message first!
Please register or to comment