From e03f812fef4a2326dad14021a058a73a23b80ed0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Fri, 25 Mar 2016 14:42:37 +0100 Subject: [PATCH] modules: properly handle implicit required inter-module dependencies. --- modules/FindMagnum.cmake | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/modules/FindMagnum.cmake b/modules/FindMagnum.cmake index 24699091a..0a8eea56a 100644 --- a/modules/FindMagnum.cmake +++ b/modules/FindMagnum.cmake @@ -314,6 +314,13 @@ foreach(_component ${Magnum_FIND_COMPONENTS}) list(APPEND _MAGNUM_${_COMPONENT}_DEPENDENCIES Text TextureTools) endif() + # Mark the dependencies as required if the component is also required + if(Magnum_FIND_REQUIRED_${_component}) + foreach(_dependency ${_MAGNUM_${_COMPONENT}_DEPENDENCIES}) + set(Magnum_FIND_REQUIRED_${_dependency} TRUE) + endforeach() + endif() + list(APPEND _MAGNUM_ADDITIONAL_COMPONENTS ${_MAGNUM_${_COMPONENT}_DEPENDENCIES}) endforeach()