Browse Source

modules: updated FindMagnum and FindGLFW.

pull/9/head
Vladimír Vondruš 6 years ago
parent
commit
01d0abb9fc
  1. 14
      modules/FindGLFW.cmake
  2. 4
      modules/FindMagnum.cmake

14
modules/FindGLFW.cmake

@ -43,11 +43,17 @@
# DEALINGS IN THE SOFTWARE. # DEALINGS IN THE SOFTWARE.
# #
# GLFW installs cmake package config files to shared/ folder which handles # GLFW installs cmake package config files which handles dependencies in case
# dependencies in case GLFW is built statically. Try to find first, quietly, so # GLFW is built statically. Try to find first, quietly, so it doesn't print
# it doesn't print loud messages when it's not found, since that's okay. # loud messages when it's not found, since that's okay. If the glfw target
find_package(glfw3 CONFIG QUIET) # already exists, it means we're using it through a CMake subproject -- don't
# attempt to find the package in that case.
if(NOT TARGET glfw)
find_package(glfw3 CONFIG QUIET)
endif()
# If either a glfw config file was found or we have a subproject, point
# GLFW::GLFW to that and exit -- nothing else to do here.
if(TARGET glfw) if(TARGET glfw)
if(NOT TARGET GLFW::GLFW) if(NOT TARGET GLFW::GLFW)
# Aliases of (global) targets are only supported in CMake 3.11, so we # Aliases of (global) targets are only supported in CMake 3.11, so we

4
modules/FindMagnum.cmake

@ -817,9 +817,7 @@ foreach(_component ${Magnum_FIND_COMPONENTS})
elseif(_component STREQUAL Audio) elseif(_component STREQUAL Audio)
find_package(OpenAL) find_package(OpenAL)
set_property(TARGET Magnum::${_component} APPEND PROPERTY set_property(TARGET Magnum::${_component} APPEND PROPERTY
INTERFACE_INCLUDE_DIRECTORIES ${OPENAL_INCLUDE_DIR}) INTERFACE_LINK_LIBRARIES Corrade::PluginManager OpenAL::OpenAL)
set_property(TARGET Magnum::${_component} APPEND PROPERTY
INTERFACE_LINK_LIBRARIES ${OPENAL_LIBRARY} Corrade::PluginManager)
# No special setup for DebugTools library # No special setup for DebugTools library

Loading…
Cancel
Save