build: Fix dependency management for workbenches
Previously the workbench was not disabled even when dependencies were unmet, resulting in eventual compile failure.
This commit is contained in:
@@ -6,11 +6,12 @@ macro(CheckInterModuleDependencies)
|
||||
# modules. Warns if any of the prerequisite modules are disabled.
|
||||
function(REQUIRES_MODS dependent)
|
||||
if(${dependent})
|
||||
foreach(prerequisite ${ARGN})
|
||||
foreach(prerequisite IN LISTS ARGN)
|
||||
if(NOT ${prerequisite})
|
||||
message(WARNING
|
||||
"${dependent} requires ${ARGN} each be ON, but "
|
||||
"${prerequisite} is \"${${prerequisite}}\"")
|
||||
message(STATUS "${dependent} requires ${prerequisite} to be ON, but it"
|
||||
" is \"${${prerequisite}}\"")
|
||||
set(${dependent} OFF PARENT_SCOPE)
|
||||
break()
|
||||
endif(NOT ${prerequisite})
|
||||
endforeach()
|
||||
endif(${dependent})
|
||||
|
||||
Reference in New Issue
Block a user