Browse Source

FindMagnum: added also MAGNUM_WINDOWLESSAPPLICATION_* aliases.

pull/278/head
Vladimír Vondruš 13 years ago
parent
commit
7e1037ceda
  1. 24
      modules/FindMagnum.cmake

24
modules/FindMagnum.cmake

@ -41,10 +41,11 @@
# MAGNUM_*_FOUND - Whether the component was found # MAGNUM_*_FOUND - Whether the component was found
# MAGNUM_*_LIBRARIES - Component library and dependent libraries # MAGNUM_*_LIBRARIES - Component library and dependent libraries
# MAGNUM_*_INCLUDE_DIRS - Include dirs of module dependencies # MAGNUM_*_INCLUDE_DIRS - Include dirs of module dependencies
# If exactly one *Application component is requested and found, its # If exactly one *Application or exactly one Windowless*Application
# libraries and include dirs are also available in convenience aliases # component is requested and found, its libraries and include dirs are
# MAGNUM_APPLICATION_LIBRARIES and MAGNUM_APPLICATION_INCLUDE_DIRS to # available in convenience aliases MAGNUM_APPLICATION_LIBRARIES or
# simplify porting. # MAGNUM_WINDOWLESSAPPLICATION_LIBRARIES and MAGNUM_APPLICATION_INCLUDE_DIRS
# or MAGNUM_WINDOWLESSAPPLICATION_INCLUDE_DIRS to simplify porting.
# #
# Features of found Magnum library are exposed in these variables: # Features of found Magnum library are exposed in these variables:
# MAGNUM_TARGET_GLES - Defined if compiled for OpenGL ES # MAGNUM_TARGET_GLES - Defined if compiled for OpenGL ES
@ -288,10 +289,17 @@ foreach(component ${Magnum_FIND_COMPONENTS})
# Don't expose variables w/o dependencies to end users # Don't expose variables w/o dependencies to end users
mark_as_advanced(FORCE MAGNUM_${_COMPONENT}_LIBRARY _MAGNUM_${_COMPONENT}_INCLUDE_DIR) mark_as_advanced(FORCE MAGNUM_${_COMPONENT}_LIBRARY _MAGNUM_${_COMPONENT}_INCLUDE_DIR)
# If this is application library, make it available also in global # Global aliases for Windowless*Application and *Application components.
# MAGNUM_APPLICATION_LIBRARIES and MAGNUM_APPLICATION_INCLUDE_DIRS. If # If already set, unset them to avoid ambiguity.
# these variables are already set, unset them to avoid ambiguity. if(${component} MATCHES Windowless.+Application)
if(${component} MATCHES .+Application) if(NOT DEFINED MAGNUM_WINDOWLESSAPPLICATION_LIBRARIES AND NOT DEFINED MAGNUM_WINDOWLESSAPPLICATION_INCLUDE_DIRS)
set(MAGNUM_WINDOWLESSAPPLICATION_LIBRARIES ${MAGNUM_${_COMPONENT}_LIBRARIES})
set(MAGNUM_WINDOWLESSAPPLICATION_INCLUDE_DIRS ${MAGNUM_${_COMPONENT}_INCLUDE_DIRS})
else()
unset(MAGNUM_WINDOWLESSAPPLICATION_LIBRARIES)
unset(MAGNUM_WINDOWLESSAPPLICATION_INCLUDE_DIRS)
endif()
elseif(${component} MATCHES .+Application)
if(NOT DEFINED MAGNUM_APPLICATION_LIBRARIES AND NOT DEFINED MAGNUM_APPLICATION_INCLUDE_DIRS) if(NOT DEFINED MAGNUM_APPLICATION_LIBRARIES AND NOT DEFINED MAGNUM_APPLICATION_INCLUDE_DIRS)
set(MAGNUM_APPLICATION_LIBRARIES ${MAGNUM_${_COMPONENT}_LIBRARIES}) set(MAGNUM_APPLICATION_LIBRARIES ${MAGNUM_${_COMPONENT}_LIBRARIES})
set(MAGNUM_APPLICATION_INCLUDE_DIRS ${MAGNUM_${_COMPONENT}_INCLUDE_DIRS}) set(MAGNUM_APPLICATION_INCLUDE_DIRS ${MAGNUM_${_COMPONENT}_INCLUDE_DIRS})

Loading…
Cancel
Save