Browse Source

Merge branch 'master' into compatibility

Conflicts:
	src/Magnum/Math/Test/MatrixTest.cpp
	src/Magnum/Math/Test/RectangularMatrixTest.cpp
	src/Magnum/Math/Test/VectorTest.cpp
Vladimír Vondruš 12 years ago
parent
commit
cae0773b0c
  1. 10
      CMakeLists.txt
  2. 10
      doc/building.dox
  3. 40
      doc/cmake.dox
  4. 19
      doc/plugins.dox
  5. 12
      modules/FindCorrade.cmake
  6. 57
      modules/FindMagnum.cmake
  7. 137
      package/ci/jenkins-mingw-w64.xml
  8. 2
      src/Magnum/Audio/Audio.cpp
  9. 2
      src/Magnum/CMakeLists.txt
  10. 25
      src/Magnum/Math/Matrix.h
  11. 4
      src/Magnum/Math/Test/MatrixTest.cpp
  12. 4
      src/Magnum/Math/Test/RectangularMatrixTest.cpp
  13. 2
      src/Magnum/Math/Test/VectorTest.cpp
  14. 2
      src/Magnum/MeshTools/CMakeLists.txt
  15. 8
      src/Magnum/Platform/CMakeLists.txt
  16. 4
      src/Magnum/Platform/Sdl2Application.cpp
  17. 10
      src/Magnum/Platform/magnum-info.cpp
  18. 2
      src/Magnum/SceneGraph/CMakeLists.txt
  19. 6
      src/Magnum/Text/CMakeLists.txt
  20. 2
      src/Magnum/Text/fontconverter.cpp
  21. 6
      src/Magnum/TextureTools/CMakeLists.txt
  22. 2
      src/Magnum/TextureTools/distancefieldconverter.cpp
  23. 4
      src/MagnumPlugins/MagnumFont/CMakeLists.txt
  24. 4
      src/MagnumPlugins/MagnumFontConverter/CMakeLists.txt
  25. 2
      src/MagnumPlugins/ObjImporter/CMakeLists.txt
  26. 2
      src/MagnumPlugins/TgaImageConverter/CMakeLists.txt
  27. 2
      src/MagnumPlugins/TgaImporter/CMakeLists.txt
  28. 2
      src/MagnumPlugins/WavAudioImporter/CMakeLists.txt

10
CMakeLists.txt

@ -58,8 +58,12 @@ if(CORRADE_TARGET_NACL)
elseif(CORRADE_TARGET_ANDROID)
option(WITH_ANDROIDAPPLICATION "Build AndroidApplication library" OFF)
# OS X-specific application libraries
elseif(CORRADE_TARGET_APPLE)
cmake_dependent_option(WITH_WINDOWLESSCGLAPPLICATION "Build WindowlessCglApplication library" OFF "NOT WITH_MAGNUMINFO;NOT WITH_FONTCONVERTER;NOT WITH_DISTANCEFIELDCONVERTER" ON)
# X11, GLX and EGL-specific application libraries
elseif(CORRADE_TARGET_UNIX AND NOT APPLE)
elseif(CORRADE_TARGET_UNIX)
option(WITH_GLXAPPLICATION "Build GlxApplication library" OFF)
cmake_dependent_option(WITH_WINDOWLESSGLXAPPLICATION "Build WindowlessGlxApplication library" OFF "NOT WITH_MAGNUMINFO;NOT WITH_FONTCONVERTER;NOT WITH_DISTANCEFIELDCONVERTER" ON)
cmake_dependent_option(WITH_XEGLAPPLICATION "Build XEglApplication library" OFF "TARGET_GLES" OFF)
@ -67,10 +71,6 @@ elseif(CORRADE_TARGET_UNIX AND NOT APPLE)
# Windows-specific application libraries
elseif(CORRADE_TARGET_WINDOWS)
cmake_dependent_option(WITH_WINDOWLESSWGLAPPLICATION "Build WindowlessWglApplication library" OFF "NOT WITH_MAGNUMINFO;NOT WITH_FONTCONVERTER;NOT WITH_DISTANCEFIELDCONVERTER" ON)
# OS X-specific application libraries
elseif(APPLE)
cmake_dependent_option(WITH_WINDOWLESSCGLAPPLICATION "Build WindowlessCglApplication library" OFF "NOT WITH_MAGNUMINFO;NOT WITH_FONTCONVERTER;NOT WITH_DISTANCEFIELDCONVERTER" ON)
endif()
# Platform-independent (almost) application libraries

10
doc/building.dox

@ -502,13 +502,15 @@ in `axes/hudson.matrix.TextAxis` or via the web interface later.
Magnum-Compatibility-GLTests depend on active X11 session, thus they should be
run from Jenkins instance running on graphical user session.
There is also MinGW32 and Emscripten configuration, add or update them with the
commands below. See @ref building-crosscompiling for more information about
setting up the crosscompilers and `toolchains/` submodule. For Emscripten you
need also **Node.js** installed to run the tests.
There is also MinGW32, MinGW-w64, Emscripten and NaCl configuration, add or
update them with the commands below. See @ref building-crosscompiling for more
information about setting up the crosscompilers and `toolchains/` submodule.
For Emscripten you need also **Node.js** installed to run the tests.
java -jar jenkins-cli.jar -s http://your-jenkins-server <command> Magnum-MinGW32 < jenkins-mingw32.xml
java -jar jenkins-cli.jar -s http://your-jenkins-server <command> Magnum-MinGW-w64 < jenkins-mingw-w64.xml
java -jar jenkins-cli.jar -s http://your-jenkins-server <command> Magnum-Emscripten < jenkins-emscripten.xml
java -jar jenkins-cli.jar -s http://your-jenkins-server <command> Magnum-NaCl < jenkins-nacl.xml
*/
}

40
doc/cmake.dox

@ -51,19 +51,28 @@ 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_DEBUG_DIR` -- Base directory with dynamic plugins for debug
builds, defaults to `magnum-d/` subdirectory of dir where %Magnum library
was found
- `MAGNUM_PLUGINS_RELEASE_DIR` -- Base directory with dynamic plugins for
release builds, defaults to `magnum/` subdirectory of dir where %Magnum
library was found
- `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
`MAGNUM_PLUGINS_RELEASE_DIR` in release builds and multi-configuration
builds or to `MAGNUM_PLUGINS_DEBUG_DIR` in debug builds. You can modify all
three variable (e.g. set them to `.` when deploying on Windows with plugins
stored relatively to the executable), the following `MAGNUM_PLUGINS_*_DIR`
variables depend on it.
- `MAGNUM_PLUGINS_FONT[|_DEBUG|_RELEASE]_DIR` -- Directory with dynamic font
plugins
- `MAGNUM_PLUGINS_FONTCONVERTER[|_DEBUG|_RELEASE]_DIR` -- Directory with
dynamic font converter plugins
- `MAGNUM_PLUGINS_IMAGECONVERTER[|_DEBUG|_RELEASE]_DIR` -- Directory with
dynamic image converter plugins
- `MAGNUM_PLUGINS_IMPORTER[|_DEBUG|_RELEASE]_DIR` -- Directory with dynamic
importer plugins
- `MAGNUM_PLUGINS_AUDIOIMPORTER[|_DEBUG|_RELEASE]_DIR` -- Directory with
dynamic 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
@ -141,11 +150,10 @@ 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.
`MAGNUM_PLUGINS_DIR` variable, especially on multi-configuration build systems.
You can make use of @ref corrade-cmake "CORRADE_IS_DEBUG_BUILD" preprocessor
variable along with `MAGNUM_PLUGINS_*_DEBUG_DIR` / `MAGNUM_PLUGINS_*_RELEASE_DIR`
variables to decide in preprocessing step.
Features of found %Magnum library are exposed in these CMake variables, they
are also available as preprocessor variables if including Magnum.h:

19
doc/plugins.dox

@ -96,9 +96,24 @@ to these:
#define MAGNUM_PLUGINS_IMPORTER_DIR "${MAGNUM_PLUGINS_IMPORTER_DIR}"
@endcode
In case you are using multi-configuration build system (such as Visual Studio
or XCode), CMake cannot provide separate plugin directory for debug and release
build and you have to do it on your own in preprocessing step using
@ref corrade-cmake "CORRADE_IS_DEBUG_BUILD" variable. This will ensure that you
use debug plugin directory for debug build on multi-configuration build sytems
and fall back to autodetection for the rest:
@code
#ifdef CORRADE_IS_DEBUG_BUILD
#define MAGNUM_PLUGINS_IMPORTER_DIR "${MAGNUM_PLUGINS_IMPORTER_DEBUG_DIR}"
#else
#define MAGNUM_PLUGINS_IMPORTER_DIR "${MAGNUM_PLUGINS_IMPORTER_DIR}"
#endif
@endcode
Then process the file in your `CMakeLists.txt`. The result
(`${MAGNUM_PLUGINS_IMPORTER_DIR}` gets replaced with the actual value) is put
into build directory, so don't forget to add it to include path:
(`${MAGNUM_PLUGINS_IMPORTER_DIR}` / `${MAGNUM_PLUGINS_IMPORTER_DEBUG_DIR}` gets
replaced with the actual value) is put into build directory, so don't forget to
add it to include path:
@code
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/configure.h.cmake
${CMAKE_CURRENT_BINARY_DIR}/configure.h)

12
modules/FindCorrade.cmake

@ -19,6 +19,13 @@
# chosen based on actual build configuration of the project (i.e. Debug build
# is linked to debug libraries, Release build to release libraries).
#
# On multi-configuration build systems (such as Visual Studio or XCode) the
# preprocessor variable CORRADE_IS_DEBUG_BUILD is defined if given build
# configuration is Debug (not Corrade itself, but build configuration of the
# project using it). Useful e.g. for selecting proper plugin directory. On
# single-configuration build systems (such as Makefiles) this information is
# not needed and thus the variable is not defined in any case.
#
# Corrade configures the compiler to use C++11 standard. Additionally you can
# use CORRADE_CXX_FLAGS to enable additional pedantic set of warnings and
# enable hidden visibility by default.
@ -39,6 +46,7 @@
# CORRADE_BUILD_STATIC - Defined if compiled as static libraries
# CORRADE_TARGET_UNIX - Defined if compiled for some Unix flavor
# (Linux, BSD, OS X)
# CORRADE_TARGET_APPLE - Defined if compiled for OS X
# CORRADE_TARGET_WINDOWS - Defined if compiled for Windows
# CORRADE_TARGET_NACL - Defined if compiled for Google Chrome
# Native Client
@ -230,6 +238,10 @@ string(FIND "${_corradeConfigure}" "#define CORRADE_TARGET_UNIX" _TARGET_UNIX)
if(NOT _TARGET_UNIX EQUAL -1)
set(CORRADE_TARGET_UNIX 1)
endif()
string(FIND "${_corradeConfigure}" "#define CORRADE_TARGET_APPLE" _TARGET_APPLE)
if(NOT _TARGET_APPLE EQUAL -1)
set(CORRADE_TARGET_APPLE 1)
endif()
string(FIND "${_corradeConfigure}" "#define CORRADE_TARGET_WINDOWS" _TARGET_WINDOWS)
if(NOT _TARGET_WINDOWS EQUAL -1)
set(CORRADE_TARGET_WINDOWS 1)

57
modules/FindMagnum.cmake

@ -7,19 +7,28 @@
# MAGNUM_LIBRARIES - Magnum library and dependent libraries
# MAGNUM_INCLUDE_DIRS - Root include dir and include dirs of
# dependencies
# MAGNUM_PLUGINS_DEBUG_DIR - Base directory with dynamic plugins for
# debug builds, defaults to magnum-d/ subdirectory of dir where Magnum
# library was found
# MAGNUM_PLUGINS_RELEASE_DIR - Base directory with dynamic plugins for
# release builds, defaults to magnum/ subdirectory of dir where Magnum
# library was found
# 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
# to MAGNUM_PLUGINS_RELEASE_DIR in release builds and multi-configuration
# builds or to MAGNUM_PLUGINS_DEBUG_DIR in debug builds. You can modify all
# three variable (e.g. set them to . when deploying on Windows with plugins
# stored relatively to the executable), the following MAGNUM_PLUGINS_*_DIR
# variables depend on it.
# MAGNUM_PLUGINS_FONT[|_DEBUG|_RELEASE]_DIR - Directory with dynamic font
# plugins
# MAGNUM_PLUGINS_FONTCONVERTER[|_DEBUG|_RELEASE]_DIR - Directory with dynamic
# font converter plugins
# MAGNUM_PLUGINS_IMAGECONVERTER[|_DEBUG|_RELEASE]_DIR - Directory with dynamic
# image converter plugins
# MAGNUM_PLUGINS_IMPORTER[|_DEBUG|_RELEASE]_DIR - Directory with dynamic
# importer plugins
# MAGNUM_PLUGINS_AUDIOIMPORTER[|_DEBUG|_RELEASE]_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
@ -69,11 +78,10 @@
# 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.
# for the MAGNUM_PLUGINS_DIR variable, especially on multi-configuration build
# systems. You can make use of CORRADE_IS_DEBUG_BUILD preprocessor variable
# along with MAGNUM_PLUGINS_*_DEBUG_DIR / MAGNUM_PLUGINS_*_RELEASE_DIR
# variables to decide in preprocessing step.
#
# Features of found Magnum library are exposed in these variables:
# MAGNUM_BUILD_DEPRECATED - Defined if compiled with deprecated APIs
@ -156,7 +164,6 @@ if(MAGNUM_LIBRARY_DEBUG AND MAGNUM_LIBRARY_RELEASE)
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()
@ -223,7 +230,7 @@ endif()
# ${MAGNUM_LIBRARIES} listed in dependencies also after all other library names
# to avoid linker errors. Applicaiton libraries are often last thus it is
# +- sufficient to add it there only.
if(WIN32 OR MAGNUM_BUILD_STATIC)
if(CORRADE_TARGET_WINDOWS OR MAGNUM_BUILD_STATIC)
set(_WINDOWCONTEXT_MAGNUM_LIBRARIES_DEPENDENCY ${MAGNUM_LIBRARIES})
endif()
@ -516,12 +523,26 @@ if(MAGNUM_BUILD_DEPRECATED)
endif()
# Get base plugin directory from main library location
set(MAGNUM_PLUGINS_DEBUG_DIR ${_MAGNUM_LIBRARY_PATH}/magnum-d
CACHE PATH "Base directory where to look for Magnum plugins for debug builds")
set(MAGNUM_PLUGINS_RELEASE_DIR ${_MAGNUM_LIBRARY_PATH}/magnum
CACHE PATH "Base directory where to look for Magnum plugins for release builds")
set(MAGNUM_PLUGINS_DIR ${_MAGNUM_LIBRARY_PATH}/magnum${_MAGNUM_PLUGINS_DIR_SUFFIX}
CACHE PATH "Base directory where to look for Magnum plugins")
# Plugin directories
set(MAGNUM_PLUGINS_FONT_DIR ${MAGNUM_PLUGINS_DIR}/fonts)
set(MAGNUM_PLUGINS_FONT_DEBUG_DIR ${MAGNUM_PLUGINS_DEBUG_DIR}/fonts)
set(MAGNUM_PLUGINS_FONT_RELEASE_DIR ${MAGNUM_PLUGINS_RELEASE_DIR}/fonts)
set(MAGNUM_PLUGINS_FONTCONVERTER_DIR ${MAGNUM_PLUGINS_DIR}/fontconverters)
set(MAGNUM_PLUGINS_FONTCONVERTER_DEBUG_DIR ${MAGNUM_PLUGINS_DEBUG_DIR}/fontconverters)
set(MAGNUM_PLUGINS_FONTCONVERTER_RELEASE_DIR ${MAGNUM_PLUGINS_RELEASE_DIR}/fontconverters)
set(MAGNUM_PLUGINS_IMAGECONVERTER_DIR ${MAGNUM_PLUGINS_DIR}/imageconverters)
set(MAGNUM_PLUGINS_IMAGECONVERTER_DEBUG_DIR ${MAGNUM_PLUGINS_DEBUG_DIR}/imageconverters)
set(MAGNUM_PLUGINS_IMAGECONVERTER_RELEASE_DIR ${MAGNUM_PLUGINS_RELEASE_DIR}/imageconverters)
set(MAGNUM_PLUGINS_IMPORTER_DIR ${MAGNUM_PLUGINS_DIR}/importers)
set(MAGNUM_PLUGINS_IMPORTER_DEBUG_DIR ${MAGNUM_PLUGINS_DEBUG_DIR}/importers)
set(MAGNUM_PLUGINS_IMPORTER_RELEASE_DIR ${MAGNUM_PLUGINS_RELEASE_DIR}/importers)
set(MAGNUM_PLUGINS_AUDIOIMPORTER_DIR ${MAGNUM_PLUGINS_DIR}/audioimporters)
set(MAGNUM_PLUGINS_AUDIOIMPORTER_DEBUG_DIR ${MAGNUM_PLUGINS_DEBUG_DIR}/audioimporters)
set(MAGNUM_PLUGINS_AUDIOIMPORTER_RELEASE_DIR ${MAGNUM_PLUGINS_RELEASE_DIR}/audioimporters)

137
package/ci/jenkins-mingw-w64.xml

@ -0,0 +1,137 @@
<?xml version='1.0' encoding='UTF-8'?>
<matrix-project>
<actions/>
<description></description>
<logRotator class="hudson.tasks.LogRotator">
<daysToKeep>-1</daysToKeep>
<numToKeep>10</numToKeep>
<artifactDaysToKeep>-1</artifactDaysToKeep>
<artifactNumToKeep>-1</artifactNumToKeep>
</logRotator>
<keepDependencies>false</keepDependencies>
<properties/>
<scm class="hudson.plugins.git.GitSCM" plugin="git@2.0">
<configVersion>2</configVersion>
<userRemoteConfigs>
<hudson.plugins.git.UserRemoteConfig>
<url>git://github.com/mosra/magnum.git</url>
</hudson.plugins.git.UserRemoteConfig>
</userRemoteConfigs>
<branches>
<hudson.plugins.git.BranchSpec>
<name>*/master</name>
</hudson.plugins.git.BranchSpec>
</branches>
<doGenerateSubmoduleConfigurations>false</doGenerateSubmoduleConfigurations>
<submoduleCfg class="list"/>
<extensions>
<hudson.plugins.git.extensions.impl.CloneOption>
<shallow>true</shallow>
<reference></reference>
</hudson.plugins.git.extensions.impl.CloneOption>
</extensions>
</scm>
<canRoam>true</canRoam>
<disabled>false</disabled>
<blockBuildWhenDownstreamBuilding>false</blockBuildWhenDownstreamBuilding>
<blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding>
<triggers/>
<concurrentBuild>false</concurrentBuild>
<customWorkspace>Magnum</customWorkspace>
<axes>
<hudson.matrix.TextAxis>
<name>arch</name>
<values>
<string>32</string>
<string>64</string>
</values>
</hudson.matrix.TextAxis>
<hudson.matrix.TextAxis>
<name>libraries</name>
<values>
<string>static</string>
<string>dynamic</string>
</values>
</hudson.matrix.TextAxis>
<hudson.matrix.TextAxis>
<name>compatibility</name>
<values>
<string></string>
<string>deprecated</string>
</values>
</hudson.matrix.TextAxis>
</axes>
<builders>
<hudson.tasks.Shell>
<command>
<![CDATA[
git submodule init
git submodule update
if [ ${libraries} = "static" ] ; then
static_build_flag="-DBUILD_STATIC=ON -DBUILD_STATIC_PIC=ON"
fi
if [ "${compatibility}" = "deprecated" ] ; then
deprecated_build_flag=ON
else
deprecated_build_flag=OFF
fi
mkdir -p build-mingw-w64-${arch}-${libraries}-${compatibility}
cd build-mingw-w64-${arch}-${libraries}-${compatibility}
cmake .. \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_TOOLCHAIN_FILE=../toolchains/archlinux/basic-mingw-w64-${arch}.cmake \
-DCMAKE_FIND_ROOT_PATH=${JENKINS_HOME}/filesystem/mingw-w64-${arch}-${libraries}-${compatibility} \
-DCMAKE_INSTALL_PREFIX=${JENKINS_HOME}/filesystem/mingw-w64-${arch}-${libraries}-${compatibility} \
-DBUILD_TESTS=ON \
`#-DBUILD_GL_TESTS=ON` \
-DBUILD_DEPRECATED=${deprecated_build_flag} \
${static_build_flag} \
-DWITH_AUDIO=ON \
-DWITH_GLUTAPPLICATION=ON \
-DWITH_SDL2APPLICATION=ON \
-DWITH_MAGNUMFONT=ON \
-DWITH_MAGNUMFONTCONVERTER=ON \
-DWITH_OBJIMPORTER=ON \
-DWITH_TGAIMAGECONVERTER=ON \
-DWITH_TGAIMPORTER=ON \
-DWITH_WAVAUDIOIMPORTER=ON \
-DWITH_DISTANCEFIELDCONVERTER=ON \
-DWITH_FONTCONVERTER=ON \
-DWITH_MAGNUMINFO=ON \
-G Ninja
ninja
ninja install/strip
]]>
</command>
</hudson.tasks.Shell>
</builders>
<publishers>
<hudson.plugins.textfinder.TextFinderPublisher plugin="text-finder@1.9">
<regexp>Errors while running CTest</regexp>
<succeedIfFound>false</succeedIfFound>
<unstableIfFound>true</unstableIfFound>
<alsoCheckConsoleOutput>true</alsoCheckConsoleOutput>
</hudson.plugins.textfinder.TextFinderPublisher>
</publishers>
<buildWrappers/>
<executionStrategy class="hudson.matrix.DefaultMatrixExecutionStrategyImpl">
<runSequentially>true</runSequentially>
<touchStoneCombinationFilter>
<![CDATA[
arch == "64" && libraries == "dynamic" && compatibility == "deprecated"
]]>
</touchStoneCombinationFilter>
<touchStoneResultCondition>
<name>UNSTABLE</name>
<ordinal>1</ordinal>
<color>YELLOW</color>
<completeBuild>true</completeBuild>
</touchStoneResultCondition>
</executionStrategy>
<childCustomWorkspace>.</childCustomWorkspace>
</matrix-project>

2
src/Magnum/Audio/Audio.cpp

@ -33,7 +33,7 @@ namespace Magnum { namespace Audio {
/* Verify types */
static_assert(std::is_same<ALubyte, UnsignedByte>::value, "ALubyte is not the same as UnsignedByte");
/** @todo Why `ALbyte` is defined as `char` and not `signed char` on OSX? */
#ifndef __APPLE__
#ifndef CORRADE_TARGET_APPLE
static_assert(std::is_same<ALbyte, Byte>::value, "ALbyte is not the same as Byte");
#else
static_assert(std::is_signed<ALbyte>::value && sizeof(ALbyte) == 1, "ALbyte does not have the same characteristics as Byte");

2
src/Magnum/CMakeLists.txt

@ -242,7 +242,7 @@ if(BUILD_TESTS)
# On Windows we need to install first and then run the tests to avoid "DLL
# not found" hell, thus we need to install this too
if(WIN32 AND NOT CMAKE_CROSSCOMPILING)
if(CORRADE_TARGET_WINDOWS AND NOT CMAKE_CROSSCOMPILING)
install(TARGETS MagnumMathTestLib
RUNTIME DESTINATION ${MAGNUM_BINARY_INSTALL_DIR}
LIBRARY DESTINATION ${MAGNUM_LIBRARY_INSTALL_DIR}

25
src/Magnum/Math/Matrix.h

@ -34,7 +34,7 @@
namespace Magnum { namespace Math {
namespace Implementation {
template<std::size_t size, class T> class MatrixDeterminant;
template<std::size_t, class> struct MatrixDeterminant;
}
/**
@ -270,9 +270,8 @@ template<std::size_t size, class T> inline Corrade::Utility::Debug operator<<(Co
namespace Implementation {
template<std::size_t size, class T> class MatrixDeterminant {
public:
T operator()(const Matrix<size, T>& m);
template<std::size_t size, class T> struct MatrixDeterminant {
T operator()(const Matrix<size, T>& m);
};
template<std::size_t size, class T> T MatrixDeterminant<size, T>::operator()(const Matrix<size, T>& m) {
@ -284,18 +283,16 @@ template<std::size_t size, class T> T MatrixDeterminant<size, T>::operator()(con
return out;
}
template<class T> class MatrixDeterminant<2, T> {
public:
constexpr T operator()(const Matrix<2, T>& m) const {
return m[0][0]*m[1][1] - m[1][0]*m[0][1];
}
template<class T> struct MatrixDeterminant<2, T> {
constexpr T operator()(const Matrix<2, T>& m) const {
return m[0][0]*m[1][1] - m[1][0]*m[0][1];
}
};
template<class T> class MatrixDeterminant<1, T> {
public:
constexpr T operator()(const Matrix<1, T>& m) const {
return m[0][0];
}
template<class T> struct MatrixDeterminant<1, T> {
constexpr T operator()(const Matrix<1, T>& m) const {
return m[0][0];
}
};
}

4
src/Magnum/Math/Test/MatrixTest.cpp

@ -303,13 +303,13 @@ void MatrixTest::invertedOrthogonal() {
template<class T> class BasicVec2: public Math::Vector<2, T> {
public:
/* MSVC 2013 can't cope with {} here */
template<class ...U> BasicVec2(U&&... args): Math::Vector<2, T>(std::forward<U>(args)...) {}
template<class ...U> constexpr BasicVec2(U&&... args): Math::Vector<2, T>(std::forward<U>(args)...) {}
};
template<class T> class BasicMat2: public Math::Matrix<2, T> {
public:
/* MSVC 2013 can't cope with {} here */
template<class ...U> BasicMat2(U&&... args): Math::Matrix<2, T>(std::forward<U>(args)...) {}
template<class ...U> constexpr BasicMat2(U&&... args): Math::Matrix<2, T>(std::forward<U>(args)...) {}
MAGNUM_MATRIX_SUBCLASS_IMPLEMENTATION(2, BasicMat2, BasicVec2)
};

4
src/Magnum/Math/Test/RectangularMatrixTest.cpp

@ -428,7 +428,7 @@ void RectangularMatrixTest::vector() {
template<std::size_t size, class T> class BasicMat: public Math::RectangularMatrix<size, size, T> {
public:
/* MSVC 2013 can't cope with {} here */
template<class ...U> BasicMat(U&&... args): Math::RectangularMatrix<size, size, T>(std::forward<U>(args)...) {}
template<class ...U> constexpr BasicMat(U&&... args): Math::RectangularMatrix<size, size, T>(std::forward<U>(args)...) {}
MAGNUM_RECTANGULARMATRIX_SUBCLASS_IMPLEMENTATION(size, size, BasicMat<size, T>)
};
@ -438,7 +438,7 @@ MAGNUM_MATRIX_OPERATOR_IMPLEMENTATION(BasicMat<size, T>)
template<class T> class BasicMat2x2: public BasicMat<2, T> {
public:
/* MSVC 2013 can't cope with {} here */
template<class ...U> BasicMat2x2(U&&... args): BasicMat<2, T>(std::forward<U>(args)...) {}
template<class ...U> constexpr BasicMat2x2(U&&... args): BasicMat<2, T>(std::forward<U>(args)...) {}
MAGNUM_RECTANGULARMATRIX_SUBCLASS_IMPLEMENTATION(2, 2, BasicMat2x2<T>)
};

2
src/Magnum/Math/Test/VectorTest.cpp

@ -457,7 +457,7 @@ void VectorTest::angle() {
template<class T> class BasicVec2: public Math::Vector<2, T> {
public:
/* MSVC 2013 can't cope with {} here */
template<class ...U> BasicVec2(U&&... args): Math::Vector<2, T>(std::forward<U>(args)...) {}
template<class ...U> constexpr BasicVec2(U&&... args): Math::Vector<2, T>(std::forward<U>(args)...) {}
MAGNUM_VECTOR_SUBCLASS_IMPLEMENTATION(2, BasicVec2)
};

2
src/Magnum/MeshTools/CMakeLists.txt

@ -91,7 +91,7 @@ if(BUILD_TESTS)
# On Windows we need to install first and then run the tests to avoid "DLL
# not found" hell, thus we need to install this too
if(WIN32 AND NOT CMAKE_CROSSCOMPILING)
if(CORRADE_TARGET_WINDOWS AND NOT CMAKE_CROSSCOMPILING)
install(TARGETS MagnumMeshToolsTestLib
RUNTIME DESTINATION ${MAGNUM_BINARY_INSTALL_DIR}
LIBRARY DESTINATION ${MAGNUM_LIBRARY_INSTALL_DIR}

8
src/Magnum/Platform/CMakeLists.txt

@ -232,14 +232,14 @@ endif()
# Magnum Info
if(WITH_MAGNUMINFO)
add_executable(magnum-info magnum-info.cpp)
if(UNIX AND NOT CORRADE_TARGET_NACL AND NOT APPLE)
target_link_libraries(magnum-info MagnumWindowlessGlxApplication ${X11_LIBRARIES})
if(CORRADE_TARGET_APPLE)
target_link_libraries(magnum-info MagnumWindowlessCglApplication)
elseif(CORRADE_TARGET_NACL)
target_link_libraries(magnum-info MagnumWindowlessNaClApplication ppapi_cpp ppapi)
elseif(CORRADE_TARGET_UNIX)
target_link_libraries(magnum-info MagnumWindowlessGlxApplication ${X11_LIBRARIES})
elseif(CORRADE_TARGET_WINDOWS)
target_link_libraries(magnum-info MagnumWindowlessWglApplication)
elseif(APPLE)
target_link_libraries(magnum-info MagnumWindowlessCglApplication)
else()
message(FATAL_ERROR "magnum-info is not available on this platform. Set WITH_MAGNUMINFO to OFF to skip building it.")
endif()

4
src/Magnum/Platform/Sdl2Application.cpp

@ -159,7 +159,7 @@ bool Sdl2Application::tryCreateContext(const Configuration& configuration) {
in Apple's GL drivers, thus we would be forever stuck on 2.1 without the
new features. In practice SDL fails to create 2.1 context on recent OS X
versions. */
#elif defined(__APPLE__)
#elif defined(CORRADE_TARGET_APPLE)
else {
SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, 3);
SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, 2);
@ -177,7 +177,7 @@ bool Sdl2Application::tryCreateContext(const Configuration& configuration) {
}
/* Fall back to GL 2.1, if 3.2 context creation fails on OS X */
#ifdef __APPLE__
#ifdef CORRADE_TARGET_APPLE
if(!(context = SDL_GL_CreateContext(window))){
Warning() << "Platform::Sdl2Application::tryCreateContext(): cannot create core context:" << SDL_GetError() << "(falling back to compatibility context)";
SDL_DestroyWindow(window);

10
src/Magnum/Platform/magnum-info.cpp

@ -53,7 +53,7 @@
#ifdef CORRADE_TARGET_NACL
#include "Magnum/Platform/WindowlessNaClApplication.h"
#elif defined(__APPLE__)
#elif defined(CORRADE_TARGET_APPLE)
#include "Magnum/Platform/WindowlessCglApplication.h"
#elif defined(CORRADE_TARGET_UNIX)
#include "Magnum/Platform/WindowlessGlxApplication.h"
@ -103,10 +103,14 @@ MagnumInfo::MagnumInfo(const Arguments& arguments): Platform::WindowlessApplicat
#ifdef CORRADE_TARGET_NACL
Debug() << "Used application: Platform::WindowlessNaClApplication";
#elif defined(__APPLE__)
#elif defined(CORRADE_TARGET_APPLE)
Debug() << "Used application: Platform::WindowlessCglApplication";
#else
#elif defined(CORRADE_TARGET_UNIX)
Debug() << "Used application: Platform::WindowlessGlxApplication";
#elif defined(CORRADE_TARGET_WINDOWS)
Debug() << "Used application: Platform::WindowlessWglApplication";
#else
#error No windowless application available on this platform
#endif
Debug() << "Compilation flags:";
#ifdef CORRADE_GCC44_COMPATIBILITY

2
src/Magnum/SceneGraph/CMakeLists.txt

@ -104,7 +104,7 @@ if(BUILD_TESTS)
# On Windows we need to install first and then run the tests to avoid "DLL
# not found" hell, thus we need to install this too
if(WIN32 AND NOT CMAKE_CROSSCOMPILING)
if(CORRADE_TARGET_WINDOWS AND NOT CMAKE_CROSSCOMPILING)
install(TARGETS MagnumSceneGraphTestLib
RUNTIME DESTINATION ${MAGNUM_BINARY_INSTALL_DIR}
LIBRARY DESTINATION ${MAGNUM_LIBRARY_INSTALL_DIR}

6
src/Magnum/Text/CMakeLists.txt

@ -67,11 +67,11 @@ if(WITH_FONTCONVERTER)
add_executable(magnum-fontconverter fontconverter.cpp)
if(APPLE)
if(CORRADE_TARGET_APPLE)
target_link_libraries(magnum-fontconverter MagnumText Magnum MagnumWindowlessCglApplication)
elseif(UNIX AND NOT TARGET_GLES)
elseif(CORRADE_TARGET_UNIX AND NOT TARGET_GLES)
target_link_libraries(magnum-fontconverter MagnumText Magnum MagnumWindowlessGlxApplication ${X11_LIBRARIES})
elseif(WIN32)
elseif(CORRADE_TARGET_WINDOWS)
target_link_libraries(magnum-fontconverter MagnumText Magnum MagnumWindowlessWglApplication)
else()
message(FATAL_ERROR "magnum-fontconverter is not available on this platform. Set WITH_FONTCONVERTER to OFF to suppress this warning.")

2
src/Magnum/Text/fontconverter.cpp

@ -32,7 +32,7 @@
#include "Magnum/Text/DistanceFieldGlyphCache.h"
#include "Magnum/Trade/AbstractImageConverter.h"
#ifdef __APPLE__
#ifdef CORRADE_TARGET_APPLE
#include "Magnum/Platform/WindowlessCglApplication.h"
#elif defined(CORRADE_TARGET_UNIX)
#include "Magnum/Platform/WindowlessGlxApplication.h"

6
src/Magnum/TextureTools/CMakeLists.txt

@ -56,11 +56,11 @@ if(WITH_DISTANCEFIELDCONVERTER)
add_executable(magnum-distancefieldconverter distancefieldconverter.cpp)
if(APPLE)
if(CORRADE_TARGET_APPLE)
target_link_libraries(magnum-distancefieldconverter MagnumTextureTools MagnumWindowlessCglApplication Magnum)
elseif(UNIX AND NOT TARGET_GLES)
elseif(CORRADE_TARGET_UNIX AND NOT TARGET_GLES)
target_link_libraries(magnum-distancefieldconverter MagnumTextureTools Magnum MagnumWindowlessGlxApplication ${X11_LIBRARIES})
elseif(WIN32)
elseif(CORRADE_TARGET_WINDOWS)
target_link_libraries(magnum-distancefieldconverter MagnumTextureTools MagnumWindowlessWglApplication Magnum)
else()
message(FATAL_ERROR "magnum-distancefieldconverter is not available on this platform. Set WITH_DISTANCEFIELDCONVERTER to OFF to suppress this warning.")

2
src/Magnum/TextureTools/distancefieldconverter.cpp

@ -37,7 +37,7 @@
#include "Magnum/Trade/AbstractImageConverter.h"
#include "Magnum/Trade/ImageData.h"
#ifdef __APPLE__
#ifdef CORRADE_TARGET_APPLE
#include "Magnum/Platform/WindowlessCglApplication.h"
#elif defined(CORRADE_TARGET_UNIX)
#include "Magnum/Platform/WindowlessGlxApplication.h"

4
src/MagnumPlugins/MagnumFont/CMakeLists.txt

@ -38,7 +38,7 @@ add_plugin(MagnumFont ${MAGNUM_PLUGINS_FONT_DEBUG_INSTALL_DIR} ${MAGNUM_PLUGINS_
pluginRegistration.cpp)
target_link_libraries(MagnumFont Magnum MagnumText)
if(WIN32)
if(CORRADE_TARGET_WINDOWS)
target_link_libraries(MagnumFont TgaImporter)
endif()
@ -51,7 +51,7 @@ if(BUILD_GL_TESTS)
# On Windows we need to install first and then run the tests to avoid "DLL
# not found" hell, thus we need to install this too
if(WIN32 AND NOT CMAKE_CROSSCOMPILING)
if(CORRADE_TARGET_WINDOWS AND NOT CMAKE_CROSSCOMPILING)
install(TARGETS MagnumMagnumFontTestLib
RUNTIME DESTINATION ${MAGNUM_BINARY_INSTALL_DIR}
LIBRARY DESTINATION ${MAGNUM_LIBRARY_INSTALL_DIR}

4
src/MagnumPlugins/MagnumFontConverter/CMakeLists.txt

@ -38,7 +38,7 @@ add_plugin(MagnumFontConverter ${MAGNUM_PLUGINS_FONTCONVERTER_DEBUG_INSTALL_DIR}
pluginRegistration.cpp)
target_link_libraries(MagnumFontConverter Magnum MagnumText)
if(WIN32)
if(CORRADE_TARGET_WINDOWS)
target_link_libraries(MagnumFontConverter TgaImageConverter)
endif()
@ -51,7 +51,7 @@ if(BUILD_GL_TESTS)
# On Windows we need to install first and then run the tests to avoid "DLL
# not found" hell, thus we need to install this too
if(WIN32 AND NOT CMAKE_CROSSCOMPILING)
if(CORRADE_TARGET_WINDOWS AND NOT CMAKE_CROSSCOMPILING)
install(TARGETS MagnumMagnumFontConverterTestLib
RUNTIME DESTINATION ${MAGNUM_BINARY_INSTALL_DIR}
LIBRARY DESTINATION ${MAGNUM_LIBRARY_INSTALL_DIR}

2
src/MagnumPlugins/ObjImporter/CMakeLists.txt

@ -43,7 +43,7 @@ if(BUILD_TESTS)
# On Windows we need to install first and then run the tests to avoid "DLL
# not found" hell, thus we need to install this too
if(WIN32 AND NOT CMAKE_CROSSCOMPILING)
if(CORRADE_TARGET_WINDOWS AND NOT CMAKE_CROSSCOMPILING)
install(TARGETS MagnumObjImporterTestLib
RUNTIME DESTINATION ${MAGNUM_BINARY_INSTALL_DIR}
LIBRARY DESTINATION ${MAGNUM_LIBRARY_INSTALL_DIR}

2
src/MagnumPlugins/TgaImageConverter/CMakeLists.txt

@ -47,7 +47,7 @@ if(BUILD_TESTS)
# On Windows we need to install first and then run the tests to avoid "DLL
# not found" hell, thus we need to install this too
if(WIN32 AND NOT CMAKE_CROSSCOMPILING)
if(CORRADE_TARGET_WINDOWS AND NOT CMAKE_CROSSCOMPILING)
install(TARGETS MagnumTgaImageConverterTestLib
RUNTIME DESTINATION ${MAGNUM_BINARY_INSTALL_DIR}
LIBRARY DESTINATION ${MAGNUM_LIBRARY_INSTALL_DIR}

2
src/MagnumPlugins/TgaImporter/CMakeLists.txt

@ -48,7 +48,7 @@ if(BUILD_TESTS)
# On Windows we need to install first and then run the tests to avoid "DLL
# not found" hell, thus we need to install this too
if(WIN32 AND NOT CMAKE_CROSSCOMPILING)
if(CORRADE_TARGET_WINDOWS AND NOT CMAKE_CROSSCOMPILING)
install(TARGETS MagnumTgaImporterTestLib
RUNTIME DESTINATION ${MAGNUM_BINARY_INSTALL_DIR}
LIBRARY DESTINATION ${MAGNUM_LIBRARY_INSTALL_DIR}

2
src/MagnumPlugins/WavAudioImporter/CMakeLists.txt

@ -54,7 +54,7 @@ if(BUILD_TESTS)
# On Windows we need to install first and then run the tests to avoid "DLL
# not found" hell, thus we need to install this too
if(WIN32 AND NOT CMAKE_CROSSCOMPILING)
if(CORRADE_TARGET_WINDOWS AND NOT CMAKE_CROSSCOMPILING)
install(TARGETS MagnumWavAudioImporterTestLib
RUNTIME DESTINATION ${MAGNUM_BINARY_INSTALL_DIR}
LIBRARY DESTINATION ${MAGNUM_LIBRARY_INSTALL_DIR}

Loading…
Cancel
Save