Browse Source

Install also debug plugins to different location.

Following changes done in Corrade.
pull/51/head
Vladimír Vondruš 12 years ago
parent
commit
5101e3a60c
  1. 18
      CMakeLists.txt
  2. 12
      doc/building.dox
  3. 34
      doc/cmake.dox
  4. 122
      modules/FindMagnum.cmake
  5. 6
      src/MagnumPlugins/CMakeLists.txt
  6. 2
      src/MagnumPlugins/MagnumFont/CMakeLists.txt
  7. 2
      src/MagnumPlugins/MagnumFontConverter/CMakeLists.txt
  8. 2
      src/MagnumPlugins/ObjImporter/CMakeLists.txt
  9. 2
      src/MagnumPlugins/TgaImageConverter/CMakeLists.txt
  10. 2
      src/MagnumPlugins/TgaImporter/CMakeLists.txt
  11. 2
      src/MagnumPlugins/WavAudioImporter/CMakeLists.txt

18
CMakeLists.txt

@ -177,12 +177,18 @@ endif()
include(CorradeLibSuffix)
set(MAGNUM_BINARY_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/bin)
set(MAGNUM_LIBRARY_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX})
set(MAGNUM_PLUGINS_INSTALL_DIR ${MAGNUM_LIBRARY_INSTALL_DIR}/magnum)
set(MAGNUM_PLUGINS_FONT_INSTALL_DIR ${MAGNUM_PLUGINS_INSTALL_DIR}/fonts)
set(MAGNUM_PLUGINS_FONTCONVERTER_INSTALL_DIR ${MAGNUM_PLUGINS_INSTALL_DIR}/fontconverters)
set(MAGNUM_PLUGINS_IMAGECONVERTER_INSTALL_DIR ${MAGNUM_PLUGINS_INSTALL_DIR}/imageconverters)
set(MAGNUM_PLUGINS_IMPORTER_INSTALL_DIR ${MAGNUM_PLUGINS_INSTALL_DIR}/importers)
set(MAGNUM_PLUGINS_AUDIOIMPORTER_INSTALL_DIR ${MAGNUM_PLUGINS_INSTALL_DIR}/audioimporters)
set(MAGNUM_PLUGINS_DEBUG_INSTALL_DIR ${MAGNUM_LIBRARY_INSTALL_DIR}/magnum-d)
set(MAGNUM_PLUGINS_RELEASE_INSTALL_DIR ${MAGNUM_LIBRARY_INSTALL_DIR}/magnum)
set(MAGNUM_PLUGINS_FONT_DEBUG_INSTALL_DIR ${MAGNUM_PLUGINS_DEBUG_INSTALL_DIR}/fonts)
set(MAGNUM_PLUGINS_FONT_RELEASE_INSTALL_DIR ${MAGNUM_PLUGINS_RELEASE_INSTALL_DIR}/fonts)
set(MAGNUM_PLUGINS_FONTCONVERTER_DEBUG_INSTALL_DIR ${MAGNUM_PLUGINS_DEBUG_INSTALL_DIR}/fontconverters)
set(MAGNUM_PLUGINS_FONTCONVERTER_RELEASE_INSTALL_DIR ${MAGNUM_PLUGINS_RELEASE_INSTALL_DIR}/fontconverters)
set(MAGNUM_PLUGINS_IMAGECONVERTER_DEBUG_INSTALL_DIR ${MAGNUM_PLUGINS_DEBUG_INSTALL_DIR}/imageconverters)
set(MAGNUM_PLUGINS_IMAGECONVERTER_RELEASE_INSTALL_DIR ${MAGNUM_PLUGINS_RELEASE_INSTALL_DIR}/imageconverters)
set(MAGNUM_PLUGINS_IMPORTER_DEBUG_INSTALL_DIR ${MAGNUM_PLUGINS_DEBUG_INSTALL_DIR}/importers)
set(MAGNUM_PLUGINS_IMPORTER_RELEASE_INSTALL_DIR ${MAGNUM_PLUGINS_RELEASE_INSTALL_DIR}/importers)
set(MAGNUM_PLUGINS_AUDIOIMPORTER_DEBUG_INSTALL_DIR ${MAGNUM_PLUGINS_DEBUG_INSTALL_DIR}/audioimporters)
set(MAGNUM_PLUGINS_AUDIOIMPORTER_RELEASE_INSTALL_DIR ${MAGNUM_PLUGINS_RELEASE_INSTALL_DIR}/audioimporters)
set(MAGNUM_DATA_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/share/magnum)
set(MAGNUM_CMAKE_FIND_MODULE_INSTALL_DIR ${CMAKE_ROOT}/Modules)
set(MAGNUM_INCLUDE_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/include/Magnum)

12
doc/building.dox

@ -134,11 +134,13 @@ plan to use them with shared libraries later, enable also position-independent
code with `BUILD_STATIC_PIC`. If you want to build with another compiler (e.g.
Clang), pass `-DCMAKE_CXX_COMPILER=clang++` to CMake.
Libraries built in `Debug` configuration (e.g. with `CMAKE_BUILD_TYPE` set to
`Debug`) have `-d` suffix to make it possible to have both debug and release
libraries installed alongside each other. Headers and other files are the same
for both. The library distinction is handled automatically when using %Magnum
in depending projects, see @ref cmake for more information.
Libraries and static plugins built in `Debug` configuration (e.g. with
`CMAKE_BUILD_TYPE` set to `Debug`) have `-d` suffix to make it possible to have
both debug and release libraries installed alongside each other. *Dynamic*
plugins in `Debug` configuration are installed to `magnum-d` subdirectory
instead of `magnum`. Headers and other files are the same for both. The library
and plugin distinction is handled semi-automatically when using %Magnum in
depending projects, see @ref cmake for more information.
%Magnum by default does not install `FindMagnum.cmake`, as you should bundle
the module with your code instead of depending on it being in system location.

34
doc/cmake.dox

@ -51,17 +51,19 @@ variables:
- `MAGNUM_FOUND` -- Whether the library was found
- `MAGNUM_LIBRARIES` -- %Magnum library and dependent libraries
- `MAGNUM_INCLUDE_DIRS` -- Root include dir and include dirs of dependencies
- `MAGNUM_PLUGINS_DIR` -- Base directory with plugins, defaults to `magnum/`
subdirectory of dir where Magnum library was found. You can modify it (e.g.
set it to `.` when deploying on Windows with plugins stored relatively to
the executable), the following `MAGNUM_PLUGINS_*_DIR` variables depend on
it.
- `MAGNUM_PLUGINS_FONT_DIR` -- Directory with font plugins
- `MAGNUM_PLUGINS_FONTCONVERTER_DIR` -- Directory with font converter plugins
- `MAGNUM_PLUGINS_IMAGECONVERTER_DIR` -- Directory with image converter
- `MAGNUM_PLUGINS_DIR` -- Base directory with dynamic plugins, defaults to
`magnum/` subdirectory of dir where Magnum library was found (or
`magnum-d/` in debug build). . You can modify it (e.g. set it to `.` when
deploying on Windows with plugins stored relatively to the executable),
the following `MAGNUM_PLUGINS_*_DIR` variables depend on it.
- `MAGNUM_PLUGINS_FONT_DIR` -- Directory with dynamic font plugins
- `MAGNUM_PLUGINS_FONTCONVERTER_DIR` -- Directory with dynamic font converter
plugins
- `MAGNUM_PLUGINS_IMAGECONVERTER_DIR` -- Directory with dynamic image
converter plugins
- `MAGNUM_PLUGINS_IMPORTER_DIR` -- Directory with dynamic importer plugins
- `MAGNUM_PLUGINS_AUDIOIMPORTER_DIR` -- Directory with dynamic audio importer
plugins
- `MAGNUM_PLUGINS_IMPORTER_DIR` -- Directory with importer plugins
- `MAGNUM_PLUGINS_AUDIOIMPORTER_DIR` -- Directory with audio importer plugins
However, this command will try to find only the base library, not the optional
components. The base library depends on %Corrade and OpenGL libraries (or
@ -133,9 +135,15 @@ convenience aliases `MAGNUM_APPLICATION_LIBRARIES` /
/ `MAGNUM_WINDOWLESSAPPLICATION_INCLUDE_DIRS` to simplify porting.
The package is found if either debug or release version of each requested
library is found. If both debug and release libraries are found, proper version
is chosen based on actual build configuration of the project (i.e. `Debug`
build is linked to debug libraries, `Release` build to release libraries).
library (or plugin) is found. If both debug and release libraries (or plugins)
are found, proper version is chosen based on actual build configuration of the
project (i.e. `Debug` build is linked to debug libraries, `Release` build to
release libraries). Note that this autodetection might fail for the
`MAGNUM_PLUGINS_DIR` variable, i.e. you might need to switch it manually to
`magnum-d/` or `magnum/` subdirectory based on whether you want to dynamically
load plugins with or without debug information. You can also make use of
`CMAKE_BUILD_TYPE` or `CMAKE_CFG_INTDIR` CMake variables for compile-time
decision.
Features of found %Magnum library are exposed in these CMake variables, they
are also available as preprocessor variables if including Magnum.h:

122
modules/FindMagnum.cmake

@ -7,16 +7,19 @@
# MAGNUM_LIBRARIES - Magnum library and dependent libraries
# MAGNUM_INCLUDE_DIRS - Root include dir and include dirs of
# dependencies
# MAGNUM_PLUGINS_DIR - Base directory with plugins, defaults to
# `magnum/` subdirectory of dir where Magnum library was found. You can
# modify it (e.g. set it to `.` when deploying on Windows with plugins
# stored relatively to the executable), the following MAGNUM_PLUGINS_*_DIR
# variables depend on it.
# MAGNUM_PLUGINS_FONT_DIR - Directory with font plugins
# MAGNUM_PLUGINS_FONTCONVERTER_DIR - Directory with font converter plugins
# MAGNUM_PLUGINS_IMAGECONVERTER_DIR - Directory with image converter plugins
# MAGNUM_PLUGINS_IMPORTER_DIR - Directory with importer plugins
# MAGNUM_PLUGINS_AUDIOIMPORTER_DIR - Directory with audio importer plugins
# MAGNUM_PLUGINS_DIR - Base directory with dynamic plugins, defaults
# to magnum/ subdirectory of dir where Magnum library was found (or magnum-d/
# in debug build). You can modify it (e.g. set it to `.` when deploying on
# Windows with plugins stored relatively to the executable), the following
# MAGNUM_PLUGINS_*_DIR variables depend on it.
# MAGNUM_PLUGINS_FONT_DIR - Directory with dynamic font plugins
# MAGNUM_PLUGINS_FONTCONVERTER_DIR - Directory with dynamic font converter
# plugins
# MAGNUM_PLUGINS_IMAGECONVERTER_DIR - Directory with dynamic image converter
# plugins
# MAGNUM_PLUGINS_IMPORTER_DIR - Directory with dynamic importer plugins
# MAGNUM_PLUGINS_AUDIOIMPORTER_DIR - Directory with dynamic audio importer
# plugins
# This command will try to find only the base library, not the optional
# components. The base library depends on Corrade and OpenGL libraries (or
# OpenGL ES libraries). Additional dependencies are specified by the
@ -60,10 +63,15 @@
# / MAGNUM_WINDOWLESSAPPLICATION_INCLUDE_DIRS to simplify porting.
#
# The package is found if either debug or release version of each requested
# library is found. If both debug and release libraries are found, proper
# version is chosen based on actual build configuration of the project (i.e.
# Debug build is linked to debug libraries, Release build to release
# libraries).
# library (or plugin) is found. If both debug and release libraries (or
# plugins) are found, proper version is chosen based on actual build
# configuration of the project (i.e. Debug build is linked to debug libraries,
# Release build to release libraries). Note that this autodetection might fail
# for the MAGNUM_PLUGINS_DIR variable, i.e. you might need to switch it
# manually to magnum-d/ or magnum/ subdirectory based on whether you want
# to dynamically load plugins with or without debug information. You can also
# make use of CMAKE_BUILD_TYPE or CMAKE_CFG_INTDIR CMake variables for
# compile-time decision.
#
# Features of found Magnum library are exposed in these variables:
# MAGNUM_BUILD_DEPRECATED - Defined if compiled with deprecated APIs
@ -89,17 +97,17 @@
# MAGNUM_*_LIBRARY_DEBUG - Debug version of given library, if found
# MAGNUM_*_LIBRARY_RELEASE - Release version of given library, if found
# MAGNUM_LIBRARY_INSTALL_DIR - Library installation directory
# MAGNUM_PLUGINS_INSTALL_DIR - Plugin installation directory
# MAGNUM_PLUGINS_FONT_INSTALL_DIR - Font plugin installation
# MAGNUM_PLUGINS_[DEBUG|RELEASE]_INSTALL_DIR - Plugin installation directory
# MAGNUM_PLUGINS_FONT_[DEBUG|RELEASE]_INSTALL_DIR - Font plugin installation
# directory
# MAGNUM_PLUGINS_FONTCONVERTER_INSTALL_DIR - Font converter plugin
# installation directory
# MAGNUM_PLUGINS_IMAGECONVERTER_INSTALL_DIR - Image converter plugin
# installation directory
# MAGNUM_PLUGINS_IMPORTER_INSTALL_DIR - Importer plugin installation
# directory
# MAGNUM_PLUGINS_AUDIOIMPORTER_INSTALL_DIR - Audio omporter plugin
# MAGNUM_PLUGINS_FONTCONVERTER_[DEBUG|RELEASE]_INSTALL_DIR - Font converter
# plugin installation directory
# MAGNUM_PLUGINS_IMAGECONVERTER_[DEBUG|RELEASE]_INSTALL_DIR - Image converter
# plugin installation directory
# MAGNUM_PLUGINS_IMPORTER_[DEBUG|RELEASE]_INSTALL_DIR - Importer plugin
# installation directory
# MAGNUM_PLUGINS_AUDIOIMPORTER_[DEBUG|RELEASE]_INSTALL_DIR - Audio importer
# plugin installation directory
# MAGNUM_CMAKE_FIND_MODULE_INSTALL_DIR - Installation dir for CMake Find*
# modules
# MAGNUM_INCLUDE_INSTALL_DIR - Header installation directory
@ -138,15 +146,21 @@ find_package(Corrade REQUIRED)
find_library(MAGNUM_LIBRARY_DEBUG Magnum-d)
find_library(MAGNUM_LIBRARY_RELEASE Magnum)
# Set the MAGNUM_LIBRARY variable based on what was found
# Set the MAGNUM_LIBRARY variable based on what was found, use that information
# to guess also build type of dynamic plugins
if(MAGNUM_LIBRARY_DEBUG AND MAGNUM_LIBRARY_RELEASE)
set(MAGNUM_LIBRARY
debug ${MAGNUM_LIBRARY_DEBUG}
optimized ${MAGNUM_LIBRARY_RELEASE})
get_filename_component(_MAGNUM_LIBRARY_PATH ${MAGNUM_LIBRARY_DEBUG} PATH)
# TODO: how to handle this with MSVC and other multi-configuration tools?
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
set(_MAGNUM_PLUGINS_DIR_SUFFIX "-d")
endif()
elseif(MAGNUM_LIBRARY_DEBUG)
set(MAGNUM_LIBRARY ${MAGNUM_LIBRARY_DEBUG})
get_filename_component(_MAGNUM_LIBRARY_PATH ${MAGNUM_LIBRARY_DEBUG} PATH)
set(_MAGNUM_PLUGINS_DIR_SUFFIX "-d")
elseif(MAGNUM_LIBRARY_RELEASE)
set(MAGNUM_LIBRARY ${MAGNUM_LIBRARY_RELEASE})
get_filename_component(_MAGNUM_LIBRARY_PATH ${MAGNUM_LIBRARY_RELEASE} PATH)
@ -259,8 +273,30 @@ foreach(component ${Magnum_FIND_COMPONENTS})
# break something else
set(_tmp_prefixes ${CMAKE_FIND_LIBRARY_PREFIXES})
set(CMAKE_FIND_LIBRARY_PREFIXES ${CMAKE_FIND_LIBRARY_PREFIXES} "")
find_library(MAGNUM_${_COMPONENT}_LIBRARY ${component}
PATH_SUFFIXES magnum/${_MAGNUM_${_COMPONENT}_PATH_SUFFIX})
# Try to find both debug and release version. Dynamic and static debug
# libraries are on different places.
find_library(MAGNUM_${_COMPONENT}_LIBRARY_DEBUG ${component}
PATH_SUFFIXES magnum-d/${_MAGNUM_${_COMPONENT}_PATH_SUFFIX})
find_library(MAGNUM_${_COMPONENT}_LIBRARY_DEBUG ${component}-d
PATH_SUFFIXES magnum/${_MAGNUM_${_COMPONENT}_PATH_SUFFIX})
find_library(MAGNUM_${_COMPONENT}_LIBRARY_RELEASE ${component}
PATH_SUFFIXES magnum/${_MAGNUM_${_COMPONENT}_PATH_SUFFIX})
# Set the _LIBRARY variable based on what was found
if(MAGNUM_${_COMPONENT}_LIBRARY_DEBUG AND MAGNUM_${_COMPONENT}_LIBRARY_RELEASE)
set(MAGNUM_${_COMPONENT}_LIBRARY
debug ${MAGNUM_${_COMPONENT}_LIBRARY_DEBUG}
optimized ${MAGNUM_${_COMPONENT}_LIBRARY_RELEASE})
elseif(MAGNUM_${_COMPONENT}_LIBRARY_DEBUG)
set(MAGNUM_${_COMPONENT}_LIBRARY ${MAGNUM_${_COMPONENT}_LIBRARY_DEBUG})
elseif(MAGNUM_${_COMPONENT}_LIBRARY_RELEASE)
set(MAGNUM_${_COMPONENT}_LIBRARY ${MAGNUM_${_COMPONENT}_LIBRARY_RELEASE})
endif()
set(CMAKE_FIND_LIBRARY_PREFIXES ${_tmp_prefixes})
# Set library defaults, find the library
@ -425,12 +461,18 @@ find_package_handle_standard_args(Magnum
# Installation dirs
include(CorradeLibSuffix)
set(MAGNUM_LIBRARY_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX})
set(MAGNUM_PLUGINS_INSTALL_DIR ${MAGNUM_LIBRARY_INSTALL_DIR}/magnum)
set(MAGNUM_PLUGINS_FONT_INSTALL_DIR ${MAGNUM_PLUGINS_INSTALL_DIR}/fonts)
set(MAGNUM_PLUGINS_FONTCONVERTER_INSTALL_DIR ${MAGNUM_PLUGINS_INSTALL_DIR}/fontconverters)
set(MAGNUM_PLUGINS_IMAGECONVERTER_INSTALL_DIR ${MAGNUM_PLUGINS_INSTALL_DIR}/imageconverters)
set(MAGNUM_PLUGINS_IMPORTER_INSTALL_DIR ${MAGNUM_PLUGINS_INSTALL_DIR}/importers)
set(MAGNUM_PLUGINS_AUDIOIMPORTER_INSTALL_DIR ${MAGNUM_PLUGINS_INSTALL_DIR}/audioimporters)
set(MAGNUM_PLUGINS_DEBUG_INSTALL_DIR ${MAGNUM_LIBRARY_INSTALL_DIR}/magnum-d)
set(MAGNUM_PLUGINS_RELEASE_INSTALL_DIR ${MAGNUM_LIBRARY_INSTALL_DIR}/magnum)
set(MAGNUM_PLUGINS_FONT_DEBUG_INSTALL_DIR ${MAGNUM_PLUGINS_DEBUG_INSTALL_DIR}/fonts)
set(MAGNUM_PLUGINS_FONT_RELEASE_INSTALL_DIR ${MAGNUM_PLUGINS_RELEASE_INSTALL_DIR}/fonts)
set(MAGNUM_PLUGINS_FONTCONVERTER_DEBUG_INSTALL_DIR ${MAGNUM_PLUGINS_DEBUG_INSTALL_DIR}/fontconverters)
set(MAGNUM_PLUGINS_FONTCONVERTER_RELEASE_INSTALL_DIR ${MAGNUM_PLUGINS_RELEASE_INSTALL_DIR}/fontconverters)
set(MAGNUM_PLUGINS_IMAGECONVERTER_DEBUG_INSTALL_DIR ${MAGNUM_PLUGINS_DEBUG_INSTALL_DIR}/imageconverters)
set(MAGNUM_PLUGINS_IMAGECONVERTER_RELEASE_INSTALL_DIR ${MAGNUM_PLUGINS_RELEASE_INSTALL_DIR}/imageconverters)
set(MAGNUM_PLUGINS_IMPORTER_DEBUG_INSTALL_DIR ${MAGNUM_PLUGINS_DEBUG_INSTALL_DIR}/importers)
set(MAGNUM_PLUGINS_IMPORTER_RELEASE_INSTALL_DIR ${MAGNUM_PLUGINS_RELEASE_INSTALL_DIR}/importers)
set(MAGNUM_PLUGINS_AUDIOIMPORTER_DEBUG_INSTALL_DIR ${MAGNUM_PLUGINS_DEBUG_INSTALL_DIR}/audioimporters)
set(MAGNUM_PLUGINS_AUDIOIMPORTER_RELEASE_INSTALL_DIR ${MAGNUM_PLUGINS_RELEASE_INSTALL_DIR}/audioimporters)
set(MAGNUM_CMAKE_FIND_MODULE_INSTALL_DIR ${CMAKE_ROOT}/Modules)
set(MAGNUM_INCLUDE_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/include/Magnum)
set(MAGNUM_PLUGINS_INCLUDE_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/include/MagnumPlugins)
@ -440,12 +482,18 @@ mark_as_advanced(FORCE
MAGNUM_LIBRARY
MAGNUM_INCLUDE_DIR
MAGNUM_LIBRARY_INSTALL_DIR
MAGNUM_PLUGINS_INSTALL_DIR
MAGNUM_PLUGINS_FONT_INSTALL_DIR
MAGNUM_PLUGINS_FONTCONVERTER_INSTALL_DIR
MAGNUM_PLUGINS_IMAGECONVERTER_INSTALL_DIR
MAGNUM_PLUGINS_IMPORTER_INSTALL_DIR
MAGNUM_PLUGINS_AUDIOIMPORTER_INSTALL_DIR
MAGNUM_PLUGINS_DEBUG_INSTALL_DIR
MAGNUM_PLUGINS_RELEASE_INSTALL_DIR
MAGNUM_PLUGINS_FONT_DEBUG_INSTALL_DIR
MAGNUM_PLUGINS_FONT_RELEASE_INSTALL_DIR
MAGNUM_PLUGINS_FONTCONVERTER_DEBUG_INSTALL_DIR
MAGNUM_PLUGINS_FONTCONVERTER_RELEASE_INSTALL_DIR
MAGNUM_PLUGINS_IMAGECONVERTER_DEBUG_INSTALL_DIR
MAGNUM_PLUGINS_IMAGECONVERTER_RELEASE_INSTALL_DIR
MAGNUM_PLUGINS_IMPORTER_DEBUG_INSTALL_DIR
MAGNUM_PLUGINS_IMPORTER_RELEASE_INSTALL_DIR
MAGNUM_PLUGINS_AUDIOIMPORTER_DEBUG_INSTALL_DIR
MAGNUM_PLUGINS_AUDIOIMPORTER_RELEASE_INSTALL_DIR
MAGNUM_CMAKE_MODULE_INSTALL_DIR
MAGNUM_INCLUDE_INSTALL_DIR
MAGNUM_PLUGINS_INCLUDE_INSTALL_DIR)
@ -460,7 +508,7 @@ if(MAGNUM_BUILD_DEPRECATED)
endif()
# Get base plugin directory from main library location
set(MAGNUM_PLUGINS_DIR ${_MAGNUM_LIBRARY_PATH}/magnum
set(MAGNUM_PLUGINS_DIR ${_MAGNUM_LIBRARY_PATH}/magnum${_MAGNUM_PLUGINS_DIR_SUFFIX}
CACHE PATH "Base directory where to look for Magnum plugins")
# Plugin directories

6
src/MagnumPlugins/CMakeLists.txt

@ -24,11 +24,11 @@
#
# Wrapper for creating given plugin type
macro(add_plugin)
macro(add_plugin plugin_name debug_install_dir release_install_dir metadata_file)
if(NOT BUILD_STATIC)
corrade_add_plugin(${ARGN})
corrade_add_plugin(${plugin_name} ${debug_install_dir} ${release_install_dir} ${metadata_file} ${ARGN})
else()
corrade_add_static_plugin(${ARGN})
corrade_add_static_plugin(${plugin_name} ${release_install_dir} ${metadata_file} ${ARGN})
endif()
endmacro()

2
src/MagnumPlugins/MagnumFont/CMakeLists.txt

@ -32,7 +32,7 @@ set(MagnumFont_HEADERS
add_library(MagnumFontObjects OBJECT ${MagnumFont_SOURCES})
set_target_properties(MagnumFontObjects PROPERTIES COMPILE_FLAGS "${CMAKE_SHARED_LIBRARY_CXX_FLAGS}")
add_plugin(MagnumFont ${MAGNUM_PLUGINS_FONT_INSTALL_DIR}
add_plugin(MagnumFont ${MAGNUM_PLUGINS_FONT_DEBUG_INSTALL_DIR} ${MAGNUM_PLUGINS_FONT_RELEASE_INSTALL_DIR}
MagnumFont.conf
$<TARGET_OBJECTS:MagnumFontObjects>
pluginRegistration.cpp)

2
src/MagnumPlugins/MagnumFontConverter/CMakeLists.txt

@ -32,7 +32,7 @@ set(MagnumFontConverter_HEADERS
add_library(MagnumFontConverterObjects OBJECT ${MagnumFontConverter_SOURCES})
set_target_properties(MagnumFontConverterObjects PROPERTIES COMPILE_FLAGS "${CMAKE_SHARED_LIBRARY_CXX_FLAGS}")
add_plugin(MagnumFontConverter ${MAGNUM_PLUGINS_FONTCONVERTER_INSTALL_DIR}
add_plugin(MagnumFontConverter ${MAGNUM_PLUGINS_FONTCONVERTER_DEBUG_INSTALL_DIR} ${MAGNUM_PLUGINS_FONTCONVERTER_RELEASE_INSTALL_DIR}
MagnumFontConverter.conf
$<TARGET_OBJECTS:MagnumFontConverterObjects>
pluginRegistration.cpp)

2
src/MagnumPlugins/ObjImporter/CMakeLists.txt

@ -28,7 +28,7 @@ if(NOT BUILD_STATIC OR BUILD_STATIC_PIC)
set_target_properties(ObjImporterObjects PROPERTIES COMPILE_FLAGS "${CMAKE_SHARED_LIBRARY_CXX_FLAGS}")
endif()
add_plugin(ObjImporter ${MAGNUM_PLUGINS_IMPORTER_INSTALL_DIR}
add_plugin(ObjImporter ${MAGNUM_PLUGINS_IMPORTER_DEBUG_INSTALL_DIR} ${MAGNUM_PLUGINS_IMPORTER_RELEASE_INSTALL_DIR}
ObjImporter.conf
$<TARGET_OBJECTS:ObjImporterObjects>
pluginRegistration.cpp)

2
src/MagnumPlugins/TgaImageConverter/CMakeLists.txt

@ -32,7 +32,7 @@ set(TgaImageConverter_HEADERS
add_library(TgaImageConverterObjects OBJECT ${TgaImageConverter_SRCS})
set_target_properties(TgaImageConverterObjects PROPERTIES COMPILE_FLAGS "-DTgaImageConverterObjects_EXPORTS ${CMAKE_SHARED_LIBRARY_CXX_FLAGS}")
add_plugin(TgaImageConverter ${MAGNUM_PLUGINS_IMAGECONVERTER_INSTALL_DIR}
add_plugin(TgaImageConverter ${MAGNUM_PLUGINS_IMAGECONVERTER_DEBUG_INSTALL_DIR} ${MAGNUM_PLUGINS_IMAGECONVERTER_RELEASE_INSTALL_DIR}
TgaImageConverter.conf
$<TARGET_OBJECTS:TgaImageConverterObjects>
pluginRegistration.cpp)

2
src/MagnumPlugins/TgaImporter/CMakeLists.txt

@ -33,7 +33,7 @@ set(TgaImporter_HEADERS
add_library(TgaImporterObjects OBJECT ${TgaImporter_SRCS})
set_target_properties(TgaImporterObjects PROPERTIES COMPILE_FLAGS "-DTgaImporterObjects_EXPORTS ${CMAKE_SHARED_LIBRARY_CXX_FLAGS}")
add_plugin(TgaImporter ${MAGNUM_PLUGINS_IMPORTER_INSTALL_DIR}
add_plugin(TgaImporter ${MAGNUM_PLUGINS_IMPORTER_DEBUG_INSTALL_DIR} ${MAGNUM_PLUGINS_IMPORTER_RELEASE_INSTALL_DIR}
TgaImporter.conf
$<TARGET_OBJECTS:TgaImporterObjects>
pluginRegistration.cpp)

2
src/MagnumPlugins/WavAudioImporter/CMakeLists.txt

@ -39,7 +39,7 @@ if(NOT BUILD_STATIC OR BUILD_STATIC_PIC)
set_target_properties(WavAudioImporterObjects PROPERTIES COMPILE_FLAGS "${CMAKE_SHARED_LIBRARY_CXX_FLAGS}")
endif()
add_plugin(WavAudioImporter ${MAGNUM_PLUGINS_AUDIOIMPORTER_INSTALL_DIR}
add_plugin(WavAudioImporter ${MAGNUM_PLUGINS_AUDIOIMPORTER_DEBUG_INSTALL_DIR} ${MAGNUM_PLUGINS_AUDIOIMPORTER_RELEASE_INSTALL_DIR}
WavAudioImporter.conf
$<TARGET_OBJECTS:WavAudioImporterObjects>
pluginRegistration.cpp)

Loading…
Cancel
Save