Browse Source

CMake: make MAGNUM_PLUGINS[_DEBUG|_RELEASE|]_DIR a STRING cache entry.

The PATH entry is always converted to absolute, making it impossible to
specify a relative path (e.g. relative to executable location).
pull/187/head^2
Vladimír Vondruš 10 years ago
parent
commit
806ad4fda3
  1. 11
      CMakeLists.txt
  2. 11
      modules/FindMagnum.cmake

11
CMakeLists.txt

@ -303,13 +303,16 @@ else()
set(MAGNUM_PLUGINS_DIR_INIT ${MAGNUM_PLUGINS_RELEASE_DIR_INIT})
endif()
# Make these paths configurable from outside
# Make these paths configurable from outside. This is *not* PATH, because CMake
# always converts the path to an absolute location internally, making it
# impossible to specify relative paths there. Sorry in advance for not having
# the dir selection button in CMake GUI.
set(MAGNUM_PLUGINS_DEBUG_DIR ${MAGNUM_PLUGINS_DEBUG_DIR_INIT}
CACHE PATH "Base directory where to look for Magnum plugins for debug builds")
CACHE STRING "Base directory where to look for Magnum plugins for debug builds")
set(MAGNUM_PLUGINS_RELEASE_DIR ${MAGNUM_PLUGINS_RELEASE_DIR_INIT}
CACHE PATH "Base directory where to look for Magnum plugins for release builds")
CACHE STRING "Base directory where to look for Magnum plugins for release builds")
set(MAGNUM_PLUGINS_DIR ${MAGNUM_PLUGINS_DIR_INIT}
CACHE PATH "Base directory where to look for Magnum plugins")
CACHE STRING "Base directory where to look for Magnum plugins")
add_subdirectory(modules)
add_subdirectory(src)

11
modules/FindMagnum.cmake

@ -794,13 +794,16 @@ set(MAGNUM_PLUGINS_AUDIOIMPORTER_RELEASE_LIBRARY_INSTALL_DIR ${MAGNUM_PLUGINS_RE
set(MAGNUM_INCLUDE_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/include/Magnum)
set(MAGNUM_PLUGINS_INCLUDE_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/include/MagnumPlugins)
# Get base plugin directory from main library location
# Get base plugin directory from main library location. This is *not* PATH,
# because CMake always converts the path to an absolute location internally,
# making it impossible to specify relative paths there. Sorry in advance for
# not having the dir selection button in CMake GUI.
set(MAGNUM_PLUGINS_DEBUG_DIR ${_MAGNUM_PLUGINS_DIR_PREFIX}/magnum-d
CACHE PATH "Base directory where to look for Magnum plugins for debug builds")
CACHE STRING "Base directory where to look for Magnum plugins for debug builds")
set(MAGNUM_PLUGINS_RELEASE_DIR ${_MAGNUM_PLUGINS_DIR_PREFIX}/magnum
CACHE PATH "Base directory where to look for Magnum plugins for release builds")
CACHE STRING "Base directory where to look for Magnum plugins for release builds")
set(MAGNUM_PLUGINS_DIR ${_MAGNUM_PLUGINS_DIR_PREFIX}/magnum${_MAGNUM_PLUGINS_DIR_SUFFIX}
CACHE PATH "Base directory where to look for Magnum plugins")
CACHE STRING "Base directory where to look for Magnum plugins")
# Plugin directories
set(MAGNUM_PLUGINS_FONT_DIR ${MAGNUM_PLUGINS_DIR}/fonts)

Loading…
Cancel
Save