Browse Source

modules: use a unique name to find MAGNUMBINDINGS_INCLUDE_DIR.

Otherwise it just picked the include dir of Magnum itself, causing
strange problems when Magnum and Magnum Bindings are installed to
different locations.

Also, in this case the hint was wrong, which *maybe* was what made it
work compared to Magnum Integration.
next
Vladimír Vondruš 2 years ago
parent
commit
a775640b02
  1. 12
      modules/FindMagnumBindings.cmake

12
modules/FindMagnumBindings.cmake

@ -58,9 +58,15 @@
find_package(Magnum REQUIRED)
# Global bindings include dir
find_path(MAGNUMBINDINGS_INCLUDE_DIR Magnum
HINTS ${MAGNUMBINDINGS_INCLUDE_DIR})
# Global include dir that's unique to Magnum Bindings. Often they will be
# installed alongside Magnum, which is why the hint, but if not, it shouldn't
# just pick MAGNUM_INCLUDE_DIR because then _MAGNUMBINDINGS_*_INCLUDE_DIR will
# fail to be found. In case of CMake subprojects the versionBindings.h is
# generated inside the build dir so this won't find it, instead
# src/CMakeLists.txt forcibly sets MAGNUMBINDINGS_INCLUDE_DIR as an internal
# cache value to make that work.
find_path(MAGNUMBINDINGS_INCLUDE_DIR Magnum/versionBindings.h
HINTS ${MAGNUM_INCLUDE_DIR})
mark_as_advanced(MAGNUMBINDINGS_INCLUDE_DIR)
# Component distinction (listing them explicitly to avoid mistakes with finding

Loading…
Cancel
Save