Commit 3915f2a2 authored by Guillaume Pasero's avatar Guillaume Pasero

BUG: enabled optional depends are now integrated in the mod_DEPENDS list

parent 93a663e0
......@@ -10,11 +10,6 @@ macro(_otb_module_use_recurse mod)
foreach(dep IN LISTS ${mod}_DEPENDS)
_otb_module_use_recurse(${dep})
endforeach()
foreach(dep IN LISTS ${mod}_OPTIONAL_DEPENDS)
if (${dep}_ENABLED)
_otb_module_use_recurse(${dep})
endif()
endforeach()
if(${mod}_INCLUDE_DIRS)
include_directories(${${mod}_INCLUDE_DIRS})
endif()
......@@ -46,7 +41,6 @@ endmacro()
# Loads variables describing the given module:
# <module>_LOADED = True if the module has been loaded
# <module>_DEPENDS = List of dependencies on other modules
# <module>_OPTIONAL_DEPENDS = List of dependencies on other modules
# <module>_LIBRARIES = Libraries to link
# <module>_INCLUDE_DIRS = Header search path
# <module>_LIBRARY_DIRS = Library search path (for outside dependencies)
......
set(@otb-module@_LOADED 1)
set(@otb-module@_DEPENDS "@otb-module-DEPENDS@")
set(@otb-module@_OPTIONAL_DEPENDS "@otb-module-OPTIONAL_DEPENDS@")
set(@otb-module@_LIBRARIES "@otb-module-LIBRARIES@")
set(@otb-module@_INCLUDE_DIRS "@otb-module-INCLUDE_DIRS@")
set(@otb-module@_LIBRARY_DIRS "@otb-module-LIBRARY_DIRS@")
......
......@@ -201,7 +201,11 @@ macro(otb_module_impl)
set(otb-module-EXPORT_CODE-install "${${otb-module}_EXPORT_CODE_INSTALL}")
set(otb-module-DEPENDS "${OTB_MODULE_${otb-module}_DEPENDS}")
set(otb-module-OPTIONAL_DEPENDS "${OTB_MODULE_${otb-module}_OPTIONAL_DEPENDS}")
foreach(dep IN LISTS OTB_MODULE_${otb-module}_OPTIONAL_DEPENDS)
if (${dep}_ENABLED)
list(APPEND otb-module-DEPENDS ${dep})
endif()
endforeach()
set(otb-module-LIBRARIES "${${otb-module}_LIBRARIES}")
set(otb-module-INCLUDE_DIRS-build "${${otb-module}_INCLUDE_DIRS}")
set(otb-module-INCLUDE_DIRS-install "\${OTB_INSTALL_PREFIX}/${${otb-module}_INSTALL_INCLUDE_DIR}")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment