Skip to content

Commit

Permalink
Fix finding of Octree and SceneGraph in FindMagnumExtras.cmake
Browse files Browse the repository at this point in the history
Signed-off-by: Squareys <[email protected]>
  • Loading branch information
Squareys committed Sep 11, 2016
1 parent e879fc3 commit e08dd78
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions modules/FindMagnumExtras.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@

# Corrade library dependencies
set(_MAGNUMEXTRAS_CORRADE_DEPENDENCIES )

foreach(_component ${MagnumExtras_FIND_COMPONENTS})
string(TOUPPER ${_component} _COMPONENT)

Expand All @@ -81,6 +82,10 @@ foreach(_component ${MagnumExtras_FIND_COMPONENTS})
string(TOUPPER ${_component} _COMPONENT)

if(_component MATCHES Octree)
set(_MAGNUMEXTRAS_${_COMPONENT}_MAGNUM_DEPENDENCIES Shapes)
endif()

if(_component MATCHES SceneGraph)
set(_MAGNUMEXTRAS_${_COMPONENT}_MAGNUM_DEPENDENCIES SceneGraph)
endif()

Expand All @@ -99,10 +104,13 @@ foreach(_component ${MagnumExtras_FIND_COMPONENTS})
string(TOUPPER ${_component} _COMPONENT)

# (no inter-component dependencies yet)
if(_component MATCHES SceneGraph)
set(_MAGNUMEXTRAS_${_COMPONENT}_DEPENDENCIES Octree)
endif()

# Mark the dependencies as required if the component is also required
if(MagnumExtras_FIND_REQUIRED_${_component})
foreach(_dependency ${_MAGNUMEXTRAS_${_COMPONENT}_DEPENDENCIES})
foreach(_dependency ${})
set(MagnumExtras_FIND_REQUIRED_${_dependency} TRUE)
endforeach()
endif()
Expand All @@ -120,7 +128,7 @@ endif()

# Component distinction (listing them explicitly to avoid mistakes with finding
# components from other repositories)
set(_MAGNUMEXTRAS_LIBRARY_COMPONENTS "^$")
set(_MAGNUMEXTRAS_LIBRARY_COMPONENTS "(Octree|SceneGraph)")

# Additional components
foreach(_component ${MagnumExtras_FIND_COMPONENTS})
Expand Down

0 comments on commit e08dd78

Please sign in to comment.