RHEL 9.0.0 Alpha bootstrap

The content of this branch was automatically imported from Fedora ELN
with the following as its source:
https://src.fedoraproject.org/rpms/glm#7119deaade6429cad0ae5494479c1ac10c8e2ed2
This commit is contained in:
Petr Šabata 2020-10-15 01:46:17 +02:00
parent bd6f314832
commit 45ed77b9d6
7 changed files with 1350 additions and 0 deletions

21
.gitignore vendored
View File

@ -0,0 +1,21 @@
/glm-0.9.3.2.zip
/glm-0.9.3.4.zip
/glm-0.9.4.2.zip
/glm-0.9.4.3.zip
/glm-0.9.4.4.zip
/glm-0.9.4.5.zip
/glm-0.9.4.6.zip
/glm-0.9.5.2.zip
/glm-0.9.6.1.zip
/glm-0.9.6.3.zip
/glm-0.9.7.0.zip
/glm-0.9.7.2.zip
/glm-0.9.7.3.zip
/glm-0.9.7.6.zip
/glm-0.9.8.2.zip
/glm-0.9.8.3.zip
/glm-0.9.8.4.zip
/glm-0.9.8.5.zip
/glm-0.9.9.0.zip
/glm-0.9.9.2.zip
/glm-0.9.9.6.zip

21
glm-0.9.6.1-ulp.patch Normal file
View File

@ -0,0 +1,21 @@
diff -ru glm/glm/gtc/ulp.inl glm-ulp/glm/gtc/ulp.inl
--- glm/glm/gtc/ulp.inl 2014-12-09 21:13:54.000000000 +0200
+++ glm-ulp/glm/gtc/ulp.inl 2015-01-06 16:29:47.497932633 +0200
@@ -316,7 +316,7 @@
if(x < y)
{
T temp = x;
- while(temp != y)// && ulp < std::numeric_limits<std::size_t>::max())
+ while(temp < y)// && ulp < std::numeric_limits<std::size_t>::max())
{
++ulp;
temp = next_float(temp);
@@ -325,7 +325,7 @@
else if(y < x)
{
T temp = y;
- while(temp != x)// && ulp < std::numeric_limits<std::size_t>::max())
+ while(temp < x)// && ulp < std::numeric_limits<std::size_t>::max())
{
++ulp;
temp = next_float(temp);

View File

@ -0,0 +1,345 @@
diff -ru glm/glm/simd/platform.h glm.compiler-list/glm/simd/platform.h
--- glm/glm/simd/platform.h 2018-02-04 06:40:56.358999859 +0200
+++ glm.compiler-list/glm/simd/platform.h 2018-02-04 06:46:34.359917919 +0200
@@ -77,58 +77,37 @@
// Intel
#define GLM_COMPILER_INTEL 0x00100000
-#define GLM_COMPILER_INTEL12 0x00100010
-#define GLM_COMPILER_INTEL12_1 0x00100020
-#define GLM_COMPILER_INTEL13 0x00100030
#define GLM_COMPILER_INTEL14 0x00100040
#define GLM_COMPILER_INTEL15 0x00100050
#define GLM_COMPILER_INTEL16 0x00100060
+#define GLM_COMPILER_INTEL17 0x00100070
// Visual C++ defines
#define GLM_COMPILER_VC 0x01000000
-#define GLM_COMPILER_VC10 0x01000090
-#define GLM_COMPILER_VC11 0x010000A0
#define GLM_COMPILER_VC12 0x010000B0
#define GLM_COMPILER_VC14 0x010000C0
#define GLM_COMPILER_VC15 0x010000D0
+#define GLM_COMPILER_VC16 0x010000E0
// GCC defines
#define GLM_COMPILER_GCC 0x02000000
-#define GLM_COMPILER_GCC44 0x020000B0
-#define GLM_COMPILER_GCC45 0x020000C0
#define GLM_COMPILER_GCC46 0x020000D0
#define GLM_COMPILER_GCC47 0x020000E0
#define GLM_COMPILER_GCC48 0x020000F0
#define GLM_COMPILER_GCC49 0x02000100
-#define GLM_COMPILER_GCC50 0x02000200
-#define GLM_COMPILER_GCC51 0x02000300
-#define GLM_COMPILER_GCC52 0x02000400
-#define GLM_COMPILER_GCC53 0x02000500
-#define GLM_COMPILER_GCC54 0x02000600
-#define GLM_COMPILER_GCC60 0x02000700
-#define GLM_COMPILER_GCC61 0x02000800
-#define GLM_COMPILER_GCC62 0x02000900
-#define GLM_COMPILER_GCC70 0x02000A00
-#define GLM_COMPILER_GCC71 0x02000B00
-#define GLM_COMPILER_GCC72 0x02000C00
-#define GLM_COMPILER_GCC80 0x02000D00
+#define GLM_COMPILER_GCC5 0x02000200
+#define GLM_COMPILER_GCC6 0x02000300
+#define GLM_COMPILER_GCC7 0x02000400
+#define GLM_COMPILER_GCC8 0x02000500
// CUDA
#define GLM_COMPILER_CUDA 0x10000000
-#define GLM_COMPILER_CUDA40 0x10000040
-#define GLM_COMPILER_CUDA41 0x10000050
-#define GLM_COMPILER_CUDA42 0x10000060
-#define GLM_COMPILER_CUDA50 0x10000070
-#define GLM_COMPILER_CUDA60 0x10000080
-#define GLM_COMPILER_CUDA65 0x10000090
#define GLM_COMPILER_CUDA70 0x100000A0
#define GLM_COMPILER_CUDA75 0x100000B0
#define GLM_COMPILER_CUDA80 0x100000C0
// Clang
#define GLM_COMPILER_CLANG 0x20000000
-#define GLM_COMPILER_CLANG32 0x20000030
-#define GLM_COMPILER_CLANG33 0x20000040
#define GLM_COMPILER_CLANG34 0x20000050
#define GLM_COMPILER_CLANG35 0x20000060
#define GLM_COMPILER_CLANG36 0x20000070
@@ -148,20 +127,16 @@
# define GLM_COMPILER GLM_COMPILER_UNKNOWN
#elif defined(__INTEL_COMPILER)
-# if __INTEL_COMPILER == 1200
-# define GLM_COMPILER GLM_COMPILER_INTEL12
-# elif __INTEL_COMPILER == 1210
-# define GLM_COMPILER GLM_COMPILER_INTEL12_1
-# elif __INTEL_COMPILER == 1300
-# define GLM_COMPILER GLM_COMPILER_INTEL13
+# if (__clang_major__ < 1400)
+# error "GLM requires ICC 2013 SP1 or newer"
# elif __INTEL_COMPILER == 1400
# define GLM_COMPILER GLM_COMPILER_INTEL14
# elif __INTEL_COMPILER == 1500
# define GLM_COMPILER GLM_COMPILER_INTEL15
-# elif __INTEL_COMPILER >= 1600
+# elif __INTEL_COMPILER == 1600
# define GLM_COMPILER GLM_COMPILER_INTEL16
-# else
-# define GLM_COMPILER GLM_COMPILER_INTEL
+# elif __INTEL_COMPILER >= 1700
+# define GLM_COMPILER GLM_COMPILER_INTEL17
# endif
// CUDA
@@ -178,28 +153,18 @@
// Clang
#elif defined(__clang__)
# if defined(__apple_build_version__)
-# if __clang_major__ == 5 && __clang_minor__ == 0
-# define GLM_COMPILER GLM_COMPILER_CLANG33
-# elif __clang_major__ == 5 && __clang_minor__ == 1
-# define GLM_COMPILER GLM_COMPILER_CLANG34
+# if (__clang_major__ < 6)
+# error "GLM requires Clang 3.4 / Apple Clang 6.0 or higher"
# elif __clang_major__ == 6 && __clang_minor__ == 0
# define GLM_COMPILER GLM_COMPILER_CLANG35
# elif __clang_major__ == 6 && __clang_minor__ >= 1
# define GLM_COMPILER GLM_COMPILER_CLANG36
# elif __clang_major__ >= 7
# define GLM_COMPILER GLM_COMPILER_CLANG37
-# else
-# define GLM_COMPILER GLM_COMPILER_CLANG
# endif
# else
-# if __clang_major__ == 3 && __clang_minor__ == 0
-# define GLM_COMPILER GLM_COMPILER_CLANG30
-# elif __clang_major__ == 3 && __clang_minor__ == 1
-# define GLM_COMPILER GLM_COMPILER_CLANG31
-# elif __clang_major__ == 3 && __clang_minor__ == 2
-# define GLM_COMPILER GLM_COMPILER_CLANG32
-# elif __clang_major__ == 3 && __clang_minor__ == 3
-# define GLM_COMPILER GLM_COMPILER_CLANG33
+# if ((__clang_major__ == 3) && (__clang_minor__ < 4)) || (__clang_major__ < 3)
+# error "GLM requires Clang 3.4 or higher"
# elif __clang_major__ == 3 && __clang_minor__ == 4
# define GLM_COMPILER GLM_COMPILER_CLANG34
# elif __clang_major__ == 3 && __clang_minor__ == 5
@@ -220,39 +185,25 @@
# define GLM_COMPILER GLM_COMPILER_CLANG42
# elif __clang_major__ >= 4
# define GLM_COMPILER GLM_COMPILER_CLANG42
-# else
-# define GLM_COMPILER GLM_COMPILER_CLANG
# endif
# endif
// Visual C++
#elif defined(_MSC_VER)
-# if _MSC_VER < 1600
-# error "GLM requires Visual C++ 10 - 2010 or higher"
-# elif _MSC_VER == 1600
-# define GLM_COMPILER GLM_COMPILER_VC11
-# elif _MSC_VER == 1700
-# define GLM_COMPILER GLM_COMPILER_VC11
+# if _MSC_VER < 1800
+# error "GLM requires Visual C++ 12 - 2013 or higher"
# elif _MSC_VER == 1800
# define GLM_COMPILER GLM_COMPILER_VC12
# elif _MSC_VER == 1900
# define GLM_COMPILER GLM_COMPILER_VC14
# elif _MSC_VER >= 1910
# define GLM_COMPILER GLM_COMPILER_VC15
-# else//_MSC_VER
-# define GLM_COMPILER GLM_COMPILER_VC
# endif//_MSC_VER
// G++
#elif defined(__GNUC__) || defined(__MINGW32__)
-# if (__GNUC__ == 4) && (__GNUC_MINOR__ == 2)
-# define GLM_COMPILER (GLM_COMPILER_GCC42)
-# elif (__GNUC__ == 4) && (__GNUC_MINOR__ == 3)
-# define GLM_COMPILER (GLM_COMPILER_GCC43)
-# elif (__GNUC__ == 4) && (__GNUC_MINOR__ == 4)
-# define GLM_COMPILER (GLM_COMPILER_GCC44)
-# elif (__GNUC__ == 4) && (__GNUC_MINOR__ == 5)
-# define GLM_COMPILER (GLM_COMPILER_GCC45)
+# if ((__GNUC__ == 4) && (__GNUC_MINOR__ < 6)) || (__GNUC__ < 4)
+# error "GLM requires GCC 4.7 or higher"
# elif (__GNUC__ == 4) && (__GNUC_MINOR__ == 6)
# define GLM_COMPILER (GLM_COMPILER_GCC46)
# elif (__GNUC__ == 4) && (__GNUC_MINOR__ == 7)
@@ -261,32 +212,14 @@
# define GLM_COMPILER (GLM_COMPILER_GCC48)
# elif (__GNUC__ == 4) && (__GNUC_MINOR__ >= 9)
# define GLM_COMPILER (GLM_COMPILER_GCC49)
-# elif (__GNUC__ == 5) && (__GNUC_MINOR__ == 0)
-# define GLM_COMPILER (GLM_COMPILER_GCC50)
-# elif (__GNUC__ == 5) && (__GNUC_MINOR__ == 1)
-# define GLM_COMPILER (GLM_COMPILER_GCC51)
-# elif (__GNUC__ == 5) && (__GNUC_MINOR__ == 2)
-# define GLM_COMPILER (GLM_COMPILER_GCC52)
-# elif (__GNUC__ == 5) && (__GNUC_MINOR__ == 3)
-# define GLM_COMPILER (GLM_COMPILER_GCC53)
-# elif (__GNUC__ == 5) && (__GNUC_MINOR__ >= 4)
-# define GLM_COMPILER (GLM_COMPILER_GCC54)
-# elif (__GNUC__ == 6) && (__GNUC_MINOR__ == 0)
-# define GLM_COMPILER (GLM_COMPILER_GCC60)
-# elif (__GNUC__ == 6) && (__GNUC_MINOR__ == 1)
-# define GLM_COMPILER (GLM_COMPILER_GCC61)
-# elif (__GNUC__ == 6) && (__GNUC_MINOR__ >= 2)
-# define GLM_COMPILER (GLM_COMPILER_GCC62)
-# elif (__GNUC__ == 7) && (__GNUC_MINOR__ == 0)
-# define GLM_COMPILER (GLM_COMPILER_GCC70)
-# elif (__GNUC__ == 7) && (__GNUC_MINOR__ == 1)
-# define GLM_COMPILER (GLM_COMPILER_GCC71)
-# elif (__GNUC__ == 7) && (__GNUC_MINOR__ == 2)
-# define GLM_COMPILER (GLM_COMPILER_GCC72)
+# elif (__GNUC__ == 5)
+# define GLM_COMPILER (GLM_COMPILER_GCC5)
+# elif (__GNUC__ == 6)
+# define GLM_COMPILER (GLM_COMPILER_GCC6)
+# elif (__GNUC__ == 7)
+# define GLM_COMPILER (GLM_COMPILER_GCC7)
# elif (__GNUC__ >= 8)
-# define GLM_COMPILER (GLM_COMPILER_GCC80)
-# else
-# define GLM_COMPILER (GLM_COMPILER_GCC)
+# define GLM_COMPILER (GLM_COMPILER_GCC8)
# endif
#else
diff -ru glm/test/core/core_setup_message.cpp glm.compiler-list/test/core/core_setup_message.cpp
--- glm/test/core/core_setup_message.cpp 2018-02-04 06:40:56.359999845 +0200
+++ glm.compiler-list/test/core/core_setup_message.cpp 2018-02-04 06:41:19.846652644 +0200
@@ -10,12 +10,6 @@
{
switch(GLM_COMPILER)
{
- case GLM_COMPILER_VC10:
- std::printf("Visual C++ 10 - 2010\n");
- break;
- case GLM_COMPILER_VC11:
- std::printf("Visual C++ 11 - 2012\n");
- break;
case GLM_COMPILER_VC12:
std::printf("Visual C++ 12 - 2013\n");
break;
@@ -23,7 +17,10 @@
std::printf("Visual C++ 14 - 2015\n");
break;
case GLM_COMPILER_VC15:
- std::printf("Visual C++ 15 - 201X\n");
+ std::printf("Visual C++ 15 - 2017\n");
+ break;
+ case GLM_COMPILER_VC16:
+ std::printf("Visual C++ 16 - 20XX\n");
break;
default:
std::printf("Visual C++ version not detected\n");
@@ -35,12 +32,6 @@
{
switch(GLM_COMPILER)
{
- case GLM_COMPILER_GCC44:
- std::printf("GCC 4.4\n");
- break;
- case GLM_COMPILER_GCC45:
- std::printf("GCC 4.5\n");
- break;
case GLM_COMPILER_GCC46:
std::printf("GCC 4.6\n");
break;
@@ -53,41 +44,17 @@
case GLM_COMPILER_GCC49:
std::printf("GCC 4.9\n");
break;
- case GLM_COMPILER_GCC50:
- std::printf("GCC 5.0\n");
- break;
- case GLM_COMPILER_GCC51:
- std::printf("GCC 5.1\n");
- break;
- case GLM_COMPILER_GCC52:
- std::printf("GCC 5.2\n");
- break;
- case GLM_COMPILER_GCC53:
- std::printf("GCC 5.3\n");
- break;
- case GLM_COMPILER_GCC54:
- std::printf("GCC 5.4\n");
- break;
- case GLM_COMPILER_GCC60:
- std::printf("GCC 6.0\n");
+ case GLM_COMPILER_GCC5:
+ std::printf("GCC 5\n");
break;
- case GLM_COMPILER_GCC61:
- std::printf("GCC 6.1\n");
+ case GLM_COMPILER_GCC6:
+ std::printf("GCC 6\n");
break;
- case GLM_COMPILER_GCC62:
- std::printf("GCC 6.2\n");
+ case GLM_COMPILER_GCC7:
+ std::printf("GCC 7\n");
break;
- case GLM_COMPILER_GCC70:
- std::printf("GCC 7.0\n");
- break;
- case GLM_COMPILER_GCC71:
- std::printf("GCC 7.1\n");
- break;
- case GLM_COMPILER_GCC72:
- std::printf("GCC 7.2\n");
- break;
- case GLM_COMPILER_GCC80:
- std::printf("GCC 8.0\n");
+ case GLM_COMPILER_GCC8:
+ std::printf("GCC 8\n");
break;
default:
std::printf("GCC version not detected\n");
@@ -103,12 +70,6 @@
{
switch(GLM_COMPILER)
{
- case GLM_COMPILER_CLANG32:
- std::printf("Clang 3.2\n");
- break;
- case GLM_COMPILER_CLANG33:
- std::printf("Clang 3.3\n");
- break;
case GLM_COMPILER_CLANG34:
std::printf("Clang 3.4\n");
break;
@@ -145,23 +106,17 @@
{
switch(GLM_COMPILER)
{
- case GLM_COMPILER_INTEL12:
- std::printf("ICC 12\n");
- break;
- case GLM_COMPILER_INTEL12_1:
- std::printf("ICC 12.1\n");
- break;
- case GLM_COMPILER_INTEL13:
- std::printf("ICC 13\n");
- break;
case GLM_COMPILER_INTEL14:
- std::printf("ICC 14\n");
+ std::printf("ICC 14 - 2013 SP1\n");
break;
case GLM_COMPILER_INTEL15:
- std::printf("ICC 15\n");
+ std::printf("ICC 15 - 2015\n");
break;
case GLM_COMPILER_INTEL16:
- std::printf("ICC 16\n");
+ std::printf("ICC 16 - 2017\n");
+ break;
+ case GLM_COMPILER_INTEL17:
+ std::printf("ICC 17 - 20XX\n");
break;
default:
std::printf("Intel compiler version not detected\n");

628
glm-0.9.9.6-install.patch Normal file
View File

@ -0,0 +1,628 @@
From 09e1b48278a00f273cba0f021c1d8a840747fe90 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Joonas=20Saraj=C3=A4rvi?= <muep@iki.fi>
Date: Sat, 23 Nov 2019 14:55:45 +0200
Subject: [PATCH] Revert "Removed CMake install and uninstall scripts"
This reverts commit 5f352ecce21bb1ab37fa56fac0f383c779b351a3.
CMake installation support was removed by the upstream project, but
it should still work with GLM 0.9.9.6.
Some work is happening upstream [1, 2, 3] to make available a working
setup, but 0.9.9.6 did not ship with installation support.
[1] https://github.com/g-truc/glm/issues/961
[2] https://github.com/g-truc/glm/pull/966
[3] https://github.com/g-truc/glm/pull/968
---
CMakeLists.txt | 64 ++++++++
cmake/CMakePackageConfigHelpers.cmake | 227 ++++++++++++++++++++++++++
cmake/GNUInstallDirs.cmake | 188 +++++++++++++++++++++
cmake/glm.pc.in | 7 +
cmake/glmBuildConfig.cmake.in | 6 +
cmake/glmConfig.cmake.in | 9 +
cmake_uninstall.cmake.in | 26 +++
readme.md | 3 -
8 files changed, 527 insertions(+), 3 deletions(-)
create mode 100644 cmake/CMakePackageConfigHelpers.cmake
create mode 100644 cmake/GNUInstallDirs.cmake
create mode 100644 cmake/glm.pc.in
create mode 100644 cmake/glmBuildConfig.cmake.in
create mode 100644 cmake/glmConfig.cmake.in
create mode 100644 cmake_uninstall.cmake.in
diff --git a/CMakeLists.txt b/CMakeLists.txt
index b8c328a0..2325ebf8 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -4,6 +4,11 @@ cmake_policy(VERSION 3.2)
set(GLM_VERSION "0.9.9")
project(glm VERSION ${GLM_VERSION} LANGUAGES CXX)
+list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
+
+include(GNUInstallDirs)
+include(CMakePackageConfigHelpers)
+
enable_testing()
option(GLM_QUIET "No CMake Message" OFF)
@@ -237,3 +242,62 @@ include_directories("${PROJECT_SOURCE_DIR}")
add_subdirectory(glm)
add_subdirectory(test)
+set(GLM_INSTALL_CONFIGDIR "${CMAKE_INSTALL_LIBDIR}/cmake/glm")
+install(DIRECTORY glm DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
+
+
+# CMake automatically adds an architecture compatibility check to make sure
+# 32 and 64 bit code is not accidentally mixed. For a header-only library this
+# is not required. The check can be disabled by temporarily unsetting
+# CMAKE_SIZEOF_VOID_P. In CMake 3.14 and later this can be achieved more cleanly
+# with write_basic_package_version_file(ARCH_INDEPENDENT).
+# TODO: Use this once a newer CMake can be required.
+set(GLM_SIZEOF_VOID_P ${CMAKE_SIZEOF_VOID_P})
+unset(CMAKE_SIZEOF_VOID_P)
+write_basic_package_version_file("${CMAKE_CURRENT_BINARY_DIR}/glmConfigVersion.cmake" VERSION ${GLM_VERSION} COMPATIBILITY AnyNewerVersion)
+set(CMAKE_SIZEOF_VOID_P ${GLM_SIZEOF_VOID_P})
+
+# build tree package config
+configure_file(cmake/glmBuildConfig.cmake.in glmConfig.cmake @ONLY)
+
+# install tree package config
+configure_package_config_file(
+ cmake/glmConfig.cmake.in
+ ${GLM_INSTALL_CONFIGDIR}/glmConfig.cmake
+ INSTALL_DESTINATION ${GLM_INSTALL_CONFIGDIR}
+ PATH_VARS CMAKE_INSTALL_INCLUDEDIR
+ NO_CHECK_REQUIRED_COMPONENTS_MACRO)
+
+install(FILES
+ "${CMAKE_CURRENT_BINARY_DIR}/${GLM_INSTALL_CONFIGDIR}/glmConfig.cmake"
+ "${CMAKE_CURRENT_BINARY_DIR}/glmConfigVersion.cmake"
+ DESTINATION ${GLM_INSTALL_CONFIGDIR})
+
+add_library(glm INTERFACE)
+target_include_directories(glm INTERFACE
+ $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
+ $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>)
+install(TARGETS glm EXPORT glmTargets)
+
+export(EXPORT glmTargets FILE "${CMAKE_CURRENT_BINARY_DIR}/glmTargets.cmake")
+
+install(EXPORT glmTargets FILE glmTargets.cmake DESTINATION ${GLM_INSTALL_CONFIGDIR})
+
+# build pkg-config file
+configure_file("./cmake/glm.pc.in" "glm.pc" @ONLY)
+
+# install pkg-config file
+install(FILES "${CMAKE_CURRENT_BINARY_DIR}/glm.pc" DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig")
+
+export(PACKAGE glm)
+
+if(NOT TARGET uninstall)
+ configure_file(
+ ${CMAKE_CURRENT_SOURCE_DIR}/cmake_uninstall.cmake.in
+ ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake
+ IMMEDIATE @ONLY)
+
+ add_custom_target(uninstall
+ COMMAND ${CMAKE_COMMAND} -P
+ ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake)
+endif()
diff --git a/cmake/CMakePackageConfigHelpers.cmake b/cmake/CMakePackageConfigHelpers.cmake
new file mode 100644
index 00000000..d5bf4a2f
--- /dev/null
+++ b/cmake/CMakePackageConfigHelpers.cmake
@@ -0,0 +1,227 @@
+# - CONFIGURE_PACKAGE_CONFIG_FILE(), WRITE_BASIC_PACKAGE_VERSION_FILE()
+#
+# CONFIGURE_PACKAGE_CONFIG_FILE(<input> <output> INSTALL_DESTINATION <path>
+# [PATH_VARS <var1> <var2> ... <varN>]
+# [NO_SET_AND_CHECK_MACRO]
+# [NO_CHECK_REQUIRED_COMPONENTS_MACRO])
+#
+# CONFIGURE_PACKAGE_CONFIG_FILE() should be used instead of the plain
+# CONFIGURE_FILE() command when creating the <Name>Config.cmake or <Name>-config.cmake
+# file for installing a project or library. It helps making the resulting package
+# relocatable by avoiding hardcoded paths in the installed Config.cmake file.
+#
+# In a FooConfig.cmake file there may be code like this to make the
+# install destinations know to the using project:
+# set(FOO_INCLUDE_DIR "@CMAKE_INSTALL_FULL_INCLUDEDIR@" )
+# set(FOO_DATA_DIR "@CMAKE_INSTALL_PREFIX@/@RELATIVE_DATA_INSTALL_DIR@" )
+# set(FOO_ICONS_DIR "@CMAKE_INSTALL_PREFIX@/share/icons" )
+# ...logic to determine installedPrefix from the own location...
+# set(FOO_CONFIG_DIR "${installedPrefix}/@CONFIG_INSTALL_DIR@" )
+# All 4 options shown above are not sufficient, since the first 3 hardcode
+# the absolute directory locations, and the 4th case works only if the logic
+# to determine the installedPrefix is correct, and if CONFIG_INSTALL_DIR contains
+# a relative path, which in general cannot be guaranteed.
+# This has the effect that the resulting FooConfig.cmake file would work poorly
+# under Windows and OSX, where users are used to choose the install location
+# of a binary package at install time, independent from how CMAKE_INSTALL_PREFIX
+# was set at build/cmake time.
+#
+# Using CONFIGURE_PACKAGE_CONFIG_FILE() helps. If used correctly, it makes the
+# resulting FooConfig.cmake file relocatable.
+# Usage:
+# 1. write a FooConfig.cmake.in file as you are used to
+# 2. insert a line containing only the string "@PACKAGE_INIT@"
+# 3. instead of SET(FOO_DIR "@SOME_INSTALL_DIR@"), use SET(FOO_DIR "@PACKAGE_SOME_INSTALL_DIR@")
+# (this must be after the @PACKAGE_INIT@ line)
+# 4. instead of using the normal CONFIGURE_FILE(), use CONFIGURE_PACKAGE_CONFIG_FILE()
+#
+# The <input> and <output> arguments are the input and output file, the same way
+# as in CONFIGURE_FILE().
+#
+# The <path> given to INSTALL_DESTINATION must be the destination where the FooConfig.cmake
+# file will be installed to. This can either be a relative or absolute path, both work.
+#
+# The variables <var1> to <varN> given as PATH_VARS are the variables which contain
+# install destinations. For each of them the macro will create a helper variable
+# PACKAGE_<var...>. These helper variables must be used
+# in the FooConfig.cmake.in file for setting the installed location. They are calculated
+# by CONFIGURE_PACKAGE_CONFIG_FILE() so that they are always relative to the
+# installed location of the package. This works both for relative and also for absolute locations.
+# For absolute locations it works only if the absolute location is a subdirectory
+# of CMAKE_INSTALL_PREFIX.
+#
+# By default configure_package_config_file() also generates two helper macros,
+# set_and_check() and check_required_components() into the FooConfig.cmake file.
+#
+# set_and_check() should be used instead of the normal set()
+# command for setting directories and file locations. Additionally to setting the
+# variable it also checks that the referenced file or directory actually exists
+# and fails with a FATAL_ERROR otherwise. This makes sure that the created
+# FooConfig.cmake file does not contain wrong references.
+# When using the NO_SET_AND_CHECK_MACRO, this macro is not generated into the
+# FooConfig.cmake file.
+#
+# check_required_components(<package_name>) should be called at the end of the
+# FooConfig.cmake file if the package supports components.
+# This macro checks whether all requested, non-optional components have been found,
+# and if this is not the case, sets the Foo_FOUND variable to FALSE, so that the package
+# is considered to be not found.
+# It does that by testing the Foo_<Component>_FOUND variables for all requested
+# required components.
+# When using the NO_CHECK_REQUIRED_COMPONENTS option, this macro is not generated
+# into the FooConfig.cmake file.
+#
+# For an example see below the documentation for WRITE_BASIC_PACKAGE_VERSION_FILE().
+#
+#
+# WRITE_BASIC_PACKAGE_VERSION_FILE( filename VERSION major.minor.patch COMPATIBILITY (AnyNewerVersion|SameMajorVersion|ExactVersion) )
+#
+# Writes a file for use as <package>ConfigVersion.cmake file to <filename>.
+# See the documentation of FIND_PACKAGE() for details on this.
+# filename is the output filename, it should be in the build tree.
+# major.minor.patch is the version number of the project to be installed
+# The COMPATIBILITY mode AnyNewerVersion means that the installed package version
+# will be considered compatible if it is newer or exactly the same as the requested version.
+# This mode should be used for packages which are fully backward compatible,
+# also across major versions.
+# If SameMajorVersion is used instead, then the behaviour differs from AnyNewerVersion
+# in that the major version number must be the same as requested, e.g. version 2.0 will
+# not be considered compatible if 1.0 is requested.
+# This mode should be used for packages which guarantee backward compatibility within the
+# same major version.
+# If ExactVersion is used, then the package is only considered compatible if the requested
+# version matches exactly its own version number (not considering the tweak version).
+# For example, version 1.2.3 of a package is only considered compatible to requested version 1.2.3.
+# This mode is for packages without compatibility guarantees.
+# If your project has more elaborated version matching rules, you will need to write your
+# own custom ConfigVersion.cmake file instead of using this macro.
+#
+# Internally, this macro executes configure_file() to create the resulting
+# version file. Depending on the COMPATIBILITY, either the file
+# BasicConfigVersion-SameMajorVersion.cmake.in or BasicConfigVersion-AnyNewerVersion.cmake.in
+# is used. Please note that these two files are internal to CMake and you should
+# not call configure_file() on them yourself, but they can be used as starting
+# point to create more sophisticted custom ConfigVersion.cmake files.
+#
+#
+# Example using both configure_package_config_file() and write_basic_package_version_file():
+# CMakeLists.txt:
+# set(INCLUDE_INSTALL_DIR include/ ... CACHE )
+# set(LIB_INSTALL_DIR lib/ ... CACHE )
+# set(SYSCONFIG_INSTALL_DIR etc/foo/ ... CACHE )
+# ...
+# include(CMakePackageConfigHelpers)
+# configure_package_config_file(FooConfig.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/FooConfig.cmake
+# INSTALL_DESTINATION ${LIB_INSTALL_DIR}/Foo/cmake
+# PATH_VARS INCLUDE_INSTALL_DIR SYSCONFIG_INSTALL_DIR)
+# write_basic_package_version_file(${CMAKE_CURRENT_BINARY_DIR}/FooConfigVersion.cmake
+# VERSION 1.2.3
+# COMPATIBILITY SameMajorVersion )
+# install(FILES ${CMAKE_CURRENT_BINARY_DIR}/FooConfig.cmake ${CMAKE_CURRENT_BINARY_DIR}/FooConfigVersion.cmake
+# DESTINATION ${LIB_INSTALL_DIR}/Foo/cmake )
+#
+# With a FooConfig.cmake.in:
+# set(FOO_VERSION x.y.z)
+# ...
+# @PACKAGE_INIT@
+# ...
+# set_and_check(FOO_INCLUDE_DIR "@PACKAGE_INCLUDE_INSTALL_DIR@")
+# set_and_check(FOO_SYSCONFIG_DIR "@PACKAGE_SYSCONFIG_INSTALL_DIR@")
+#
+# check_required_components(Foo)
+
+
+#=============================================================================
+# Copyright 2012 Alexander Neundorf <neundorf@kde.org>
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distribute this file outside of CMake, substitute the full
+# License text for the above reference.)
+
+include(CMakeParseArguments)
+
+include(WriteBasicConfigVersionFile)
+
+macro(WRITE_BASIC_PACKAGE_VERSION_FILE)
+ write_basic_config_version_file(${ARGN})
+endmacro()
+
+
+function(CONFIGURE_PACKAGE_CONFIG_FILE _inputFile _outputFile)
+ set(options NO_SET_AND_CHECK_MACRO NO_CHECK_REQUIRED_COMPONENTS_MACRO)
+ set(oneValueArgs INSTALL_DESTINATION )
+ set(multiValueArgs PATH_VARS )
+
+ cmake_parse_arguments(CCF "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
+
+ if(CCF_UNPARSED_ARGUMENTS)
+ message(FATAL_ERROR "Unknown keywords given to CONFIGURE_PACKAGE_CONFIG_FILE(): \"${CCF_UNPARSED_ARGUMENTS}\"")
+ endif()
+
+ if(NOT CCF_INSTALL_DESTINATION)
+ message(FATAL_ERROR "No INSTALL_DESTINATION given to CONFIGURE_PACKAGE_CONFIG_FILE()")
+ endif()
+
+ if(IS_ABSOLUTE "${CCF_INSTALL_DESTINATION}")
+ set(absInstallDir "${CCF_INSTALL_DESTINATION}")
+ else()
+ set(absInstallDir "${CMAKE_INSTALL_PREFIX}/${CCF_INSTALL_DESTINATION}")
+ endif()
+ file(RELATIVE_PATH PACKAGE_RELATIVE_PATH "${absInstallDir}" "${CMAKE_INSTALL_PREFIX}" )
+
+ foreach(var ${CCF_PATH_VARS})
+ if(NOT DEFINED ${var})
+ message(FATAL_ERROR "Variable ${var} does not exist")
+ else()
+ if(IS_ABSOLUTE "${${var}}")
+ string(REPLACE "${CMAKE_INSTALL_PREFIX}" "\${PACKAGE_PREFIX_DIR}"
+ PACKAGE_${var} "${${var}}")
+ else()
+ set(PACKAGE_${var} "\${PACKAGE_PREFIX_DIR}/${${var}}")
+ endif()
+ endif()
+ endforeach()
+
+ set(PACKAGE_INIT "
+####### Expanded from @PACKAGE_INIT@ by configure_package_config_file() #######
+get_filename_component(PACKAGE_PREFIX_DIR \"\${CMAKE_CURRENT_LIST_DIR}/${PACKAGE_RELATIVE_PATH}\" ABSOLUTE)
+")
+
+ if(NOT CCF_NO_SET_AND_CHECK_MACRO)
+ set(PACKAGE_INIT "${PACKAGE_INIT}
+macro(set_and_check _var _file)
+ set(\${_var} \"\${_file}\")
+ if(NOT EXISTS \"\${_file}\")
+ message(FATAL_ERROR \"File or directory \${_file} referenced by variable \${_var} does not exist !\")
+ endif()
+endmacro()
+")
+ endif()
+
+
+ if(NOT CCF_NO_CHECK_REQUIRED_COMPONENTS_MACRO)
+ set(PACKAGE_INIT "${PACKAGE_INIT}
+macro(check_required_components _NAME)
+ foreach(comp \${\${_NAME}_FIND_COMPONENTS})
+ if(NOT \${_NAME}_\${comp}_FOUND)
+ if(\${_NAME}_FIND_REQUIRED_\${comp})
+ set(\${_NAME}_FOUND FALSE)
+ endif()
+ endif()
+ endforeach(comp)
+endmacro()
+")
+ endif()
+
+ set(PACKAGE_INIT "${PACKAGE_INIT}
+####################################################################################")
+
+ configure_file("${_inputFile}" "${_outputFile}" @ONLY)
+
+endfunction()
diff --git a/cmake/GNUInstallDirs.cmake b/cmake/GNUInstallDirs.cmake
new file mode 100644
index 00000000..4dc2d68a
--- /dev/null
+++ b/cmake/GNUInstallDirs.cmake
@@ -0,0 +1,188 @@
+# - Define GNU standard installation directories
+# Provides install directory variables as defined for GNU software:
+# http://www.gnu.org/prep/standards/html_node/Directory-Variables.html
+# Inclusion of this module defines the following variables:
+# CMAKE_INSTALL_<dir> - destination for files of a given type
+# CMAKE_INSTALL_FULL_<dir> - corresponding absolute path
+# where <dir> is one of:
+# BINDIR - user executables (bin)
+# SBINDIR - system admin executables (sbin)
+# LIBEXECDIR - program executables (libexec)
+# SYSCONFDIR - read-only single-machine data (etc)
+# SHAREDSTATEDIR - modifiable architecture-independent data (com)
+# LOCALSTATEDIR - modifiable single-machine data (var)
+# LIBDIR - object code libraries (lib or lib64 or lib/<multiarch-tuple> on Debian)
+# INCLUDEDIR - C header files (include)
+# OLDINCLUDEDIR - C header files for non-gcc (/usr/include)
+# DATAROOTDIR - read-only architecture-independent data root (share)
+# DATADIR - read-only architecture-independent data (DATAROOTDIR)
+# INFODIR - info documentation (DATAROOTDIR/info)
+# LOCALEDIR - locale-dependent data (DATAROOTDIR/locale)
+# MANDIR - man documentation (DATAROOTDIR/man)
+# DOCDIR - documentation root (DATAROOTDIR/doc/PROJECT_NAME)
+# Each CMAKE_INSTALL_<dir> value may be passed to the DESTINATION options of
+# install() commands for the corresponding file type. If the includer does
+# not define a value the above-shown default will be used and the value will
+# appear in the cache for editing by the user.
+# Each CMAKE_INSTALL_FULL_<dir> value contains an absolute path constructed
+# from the corresponding destination by prepending (if necessary) the value
+# of CMAKE_INSTALL_PREFIX.
+
+#=============================================================================
+# Copyright 2011 Nikita Krupen'ko <krnekit@gmail.com>
+# Copyright 2011 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distribute this file outside of CMake, substitute the full
+# License text for the above reference.)
+
+# Installation directories
+#
+if(NOT DEFINED CMAKE_INSTALL_BINDIR)
+ set(CMAKE_INSTALL_BINDIR "bin" CACHE PATH "user executables (bin)")
+endif()
+
+if(NOT DEFINED CMAKE_INSTALL_SBINDIR)
+ set(CMAKE_INSTALL_SBINDIR "sbin" CACHE PATH "system admin executables (sbin)")
+endif()
+
+if(NOT DEFINED CMAKE_INSTALL_LIBEXECDIR)
+ set(CMAKE_INSTALL_LIBEXECDIR "libexec" CACHE PATH "program executables (libexec)")
+endif()
+
+if(NOT DEFINED CMAKE_INSTALL_SYSCONFDIR)
+ set(CMAKE_INSTALL_SYSCONFDIR "etc" CACHE PATH "read-only single-machine data (etc)")
+endif()
+
+if(NOT DEFINED CMAKE_INSTALL_SHAREDSTATEDIR)
+ set(CMAKE_INSTALL_SHAREDSTATEDIR "com" CACHE PATH "modifiable architecture-independent data (com)")
+endif()
+
+if(NOT DEFINED CMAKE_INSTALL_LOCALSTATEDIR)
+ set(CMAKE_INSTALL_LOCALSTATEDIR "var" CACHE PATH "modifiable single-machine data (var)")
+endif()
+
+if(NOT DEFINED CMAKE_INSTALL_LIBDIR)
+ set(_LIBDIR_DEFAULT "lib")
+ # Override this default 'lib' with 'lib64' iff:
+ # - we are on Linux system but NOT cross-compiling
+ # - we are NOT on debian
+ # - we are on a 64 bits system
+ # reason is: amd64 ABI: http://www.x86-64.org/documentation/abi.pdf
+ # For Debian with multiarch, use 'lib/${CMAKE_LIBRARY_ARCHITECTURE}' if
+ # CMAKE_LIBRARY_ARCHITECTURE is set (which contains e.g. "i386-linux-gnu"
+ # See http://wiki.debian.org/Multiarch
+ if((CMAKE_SYSTEM_NAME MATCHES "Linux|kFreeBSD" OR CMAKE_SYSTEM_NAME STREQUAL "GNU")
+ AND NOT CMAKE_CROSSCOMPILING)
+ if (EXISTS "/etc/debian_version") # is this a debian system ?
+ if(CMAKE_LIBRARY_ARCHITECTURE)
+ set(_LIBDIR_DEFAULT "lib/${CMAKE_LIBRARY_ARCHITECTURE}")
+ endif()
+ else() # not debian, rely on CMAKE_SIZEOF_VOID_P:
+ if(NOT DEFINED CMAKE_SIZEOF_VOID_P)
+ message(AUTHOR_WARNING
+ "Unable to determine default CMAKE_INSTALL_LIBDIR directory because no target architecture is known. "
+ "Please enable at least one language before including GNUInstallDirs.")
+ else()
+ if("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
+ set(_LIBDIR_DEFAULT "lib64")
+ endif()
+ endif()
+ endif()
+ endif()
+ set(CMAKE_INSTALL_LIBDIR "${_LIBDIR_DEFAULT}" CACHE PATH "object code libraries (${_LIBDIR_DEFAULT})")
+endif()
+
+if(NOT DEFINED CMAKE_INSTALL_INCLUDEDIR)
+ set(CMAKE_INSTALL_INCLUDEDIR "include" CACHE PATH "C header files (include)")
+endif()
+
+if(NOT DEFINED CMAKE_INSTALL_OLDINCLUDEDIR)
+ set(CMAKE_INSTALL_OLDINCLUDEDIR "/usr/include" CACHE PATH "C header files for non-gcc (/usr/include)")
+endif()
+
+if(NOT DEFINED CMAKE_INSTALL_DATAROOTDIR)
+ set(CMAKE_INSTALL_DATAROOTDIR "share" CACHE PATH "read-only architecture-independent data root (share)")
+endif()
+
+#-----------------------------------------------------------------------------
+# Values whose defaults are relative to DATAROOTDIR. Store empty values in
+# the cache and store the defaults in local variables if the cache values are
+# not set explicitly. This auto-updates the defaults as DATAROOTDIR changes.
+
+if(NOT CMAKE_INSTALL_DATADIR)
+ set(CMAKE_INSTALL_DATADIR "" CACHE PATH "read-only architecture-independent data (DATAROOTDIR)")
+ set(CMAKE_INSTALL_DATADIR "${CMAKE_INSTALL_DATAROOTDIR}")
+endif()
+
+if(NOT CMAKE_INSTALL_INFODIR)
+ set(CMAKE_INSTALL_INFODIR "" CACHE PATH "info documentation (DATAROOTDIR/info)")
+ set(CMAKE_INSTALL_INFODIR "${CMAKE_INSTALL_DATAROOTDIR}/info")
+endif()
+
+if(NOT CMAKE_INSTALL_LOCALEDIR)
+ set(CMAKE_INSTALL_LOCALEDIR "" CACHE PATH "locale-dependent data (DATAROOTDIR/locale)")
+ set(CMAKE_INSTALL_LOCALEDIR "${CMAKE_INSTALL_DATAROOTDIR}/locale")
+endif()
+
+if(NOT CMAKE_INSTALL_MANDIR)
+ set(CMAKE_INSTALL_MANDIR "" CACHE PATH "man documentation (DATAROOTDIR/man)")
+ set(CMAKE_INSTALL_MANDIR "${CMAKE_INSTALL_DATAROOTDIR}/man")
+endif()
+
+if(NOT CMAKE_INSTALL_DOCDIR)
+ set(CMAKE_INSTALL_DOCDIR "" CACHE PATH "documentation root (DATAROOTDIR/doc/PROJECT_NAME)")
+ set(CMAKE_INSTALL_DOCDIR "${CMAKE_INSTALL_DATAROOTDIR}/doc/${PROJECT_NAME}")
+endif()
+
+#-----------------------------------------------------------------------------
+
+mark_as_advanced(
+ CMAKE_INSTALL_BINDIR
+ CMAKE_INSTALL_SBINDIR
+ CMAKE_INSTALL_LIBEXECDIR
+ CMAKE_INSTALL_SYSCONFDIR
+ CMAKE_INSTALL_SHAREDSTATEDIR
+ CMAKE_INSTALL_LOCALSTATEDIR
+ CMAKE_INSTALL_LIBDIR
+ CMAKE_INSTALL_INCLUDEDIR
+ CMAKE_INSTALL_OLDINCLUDEDIR
+ CMAKE_INSTALL_DATAROOTDIR
+ CMAKE_INSTALL_DATADIR
+ CMAKE_INSTALL_INFODIR
+ CMAKE_INSTALL_LOCALEDIR
+ CMAKE_INSTALL_MANDIR
+ CMAKE_INSTALL_DOCDIR
+ )
+
+# Result directories
+#
+foreach(dir
+ BINDIR
+ SBINDIR
+ LIBEXECDIR
+ SYSCONFDIR
+ SHAREDSTATEDIR
+ LOCALSTATEDIR
+ LIBDIR
+ INCLUDEDIR
+ OLDINCLUDEDIR
+ DATAROOTDIR
+ DATADIR
+ INFODIR
+ LOCALEDIR
+ MANDIR
+ DOCDIR
+ )
+ if(NOT IS_ABSOLUTE ${CMAKE_INSTALL_${dir}})
+ set(CMAKE_INSTALL_FULL_${dir} "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_${dir}}")
+ else()
+ set(CMAKE_INSTALL_FULL_${dir} "${CMAKE_INSTALL_${dir}}")
+ endif()
+endforeach()
diff --git a/cmake/glm.pc.in b/cmake/glm.pc.in
new file mode 100644
index 00000000..fc5c7bb7
--- /dev/null
+++ b/cmake/glm.pc.in
@@ -0,0 +1,7 @@
+prefix=@CMAKE_INSTALL_PREFIX@
+includedir=${prefix}/include
+
+Name: GLM
+Description: OpenGL Mathematics
+Version: @GLM_VERSION@
+Cflags: -I${includedir}
diff --git a/cmake/glmBuildConfig.cmake.in b/cmake/glmBuildConfig.cmake.in
new file mode 100644
index 00000000..1258dea1
--- /dev/null
+++ b/cmake/glmBuildConfig.cmake.in
@@ -0,0 +1,6 @@
+set(GLM_VERSION "@GLM_VERSION@")
+set(GLM_INCLUDE_DIRS "@CMAKE_CURRENT_SOURCE_DIR@")
+
+if (NOT CMAKE_VERSION VERSION_LESS "3.0")
+ include("${CMAKE_CURRENT_LIST_DIR}/glmTargets.cmake")
+endif()
diff --git a/cmake/glmConfig.cmake.in b/cmake/glmConfig.cmake.in
new file mode 100644
index 00000000..37d5ad81
--- /dev/null
+++ b/cmake/glmConfig.cmake.in
@@ -0,0 +1,9 @@
+set(GLM_VERSION "@GLM_VERSION@")
+
+@PACKAGE_INIT@
+
+set_and_check(GLM_INCLUDE_DIRS "@PACKAGE_CMAKE_INSTALL_INCLUDEDIR@")
+
+if (NOT CMAKE_VERSION VERSION_LESS "3.0")
+ include("${CMAKE_CURRENT_LIST_DIR}/glmTargets.cmake")
+endif()
diff --git a/cmake_uninstall.cmake.in b/cmake_uninstall.cmake.in
new file mode 100644
index 00000000..d00a5166
--- /dev/null
+++ b/cmake_uninstall.cmake.in
@@ -0,0 +1,26 @@
+if(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt")
+ message(FATAL_ERROR "Cannot find install manifest: @CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt")
+endif(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt")
+
+if (NOT DEFINED CMAKE_INSTALL_PREFIX)
+ set (CMAKE_INSTALL_PREFIX "@CMAKE_INSTALL_PREFIX@")
+endif ()
+ message(${CMAKE_INSTALL_PREFIX})
+
+file(READ "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt" files)
+string(REGEX REPLACE "\n" ";" files "${files}")
+foreach(file ${files})
+ message(STATUS "Uninstalling $ENV{DESTDIR}${file}")
+ if(IS_SYMLINK "$ENV{DESTDIR}${file}" OR EXISTS "$ENV{DESTDIR}${file}")
+ exec_program(
+ "@CMAKE_COMMAND@" ARGS "-E remove \"$ENV{DESTDIR}${file}\""
+ OUTPUT_VARIABLE rm_out
+ RETURN_VALUE rm_retval
+ )
+ if(NOT "${rm_retval}" STREQUAL 0)
+ message(FATAL_ERROR "Problem when removing $ENV{DESTDIR}${file}")
+ endif(NOT "${rm_retval}" STREQUAL 0)
+ else(IS_SYMLINK "$ENV{DESTDIR}${file}" OR EXISTS "$ENV{DESTDIR}${file}")
+ message(STATUS "File $ENV{DESTDIR}${file} does not exist.")
+ endif(IS_SYMLINK "$ENV{DESTDIR}${file}" OR EXISTS "$ENV{DESTDIR}${file}")
+endforeach(file)
diff --git a/readme.md b/readme.md
index 73e16c91..2f41abdc 100644
--- a/readme.md
+++ b/readme.md
@@ -77,9 +77,6 @@ glm::mat4 camera(float Translate, glm::vec2 const& Rotate)
- Fixed Clang or GCC build due to wrong GLM_HAS_IF_CONSTEXPR definition #907
- Fixed CUDA 9 build #910
-#### Deprecation:
- - Removed CMake install and uninstall scripts
-
### [GLM 0.9.9.5](https://github.com/g-truc/glm/releases/tag/0.9.9.5) - 2019-04-01
#### Fixes:
- Fixed build errors when defining GLM_ENABLE_EXPERIMENTAL #884 #883
--
2.21.0

34
glm-0.9.9.6-noarch.patch Normal file
View File

@ -0,0 +1,34 @@
From a53e3414e5566b288005a8cd59be67ac3af81cec Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Joonas=20Saraj=C3=A4rvi?= <muep@iki.fi>
Date: Sat, 2 May 2020 20:57:48 +0300
Subject: [PATCH] Use built-in mechanism for marking arch-independent
---
CMakeLists.txt | 11 +----------
1 file changed, 1 insertion(+), 10 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 2325ebf8..46ed4ef8 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -246,16 +246,7 @@ set(GLM_INSTALL_CONFIGDIR "${CMAKE_INSTALL_LIBDIR}/cmake/glm")
install(DIRECTORY glm DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
-# CMake automatically adds an architecture compatibility check to make sure
-# 32 and 64 bit code is not accidentally mixed. For a header-only library this
-# is not required. The check can be disabled by temporarily unsetting
-# CMAKE_SIZEOF_VOID_P. In CMake 3.14 and later this can be achieved more cleanly
-# with write_basic_package_version_file(ARCH_INDEPENDENT).
-# TODO: Use this once a newer CMake can be required.
-set(GLM_SIZEOF_VOID_P ${CMAKE_SIZEOF_VOID_P})
-unset(CMAKE_SIZEOF_VOID_P)
-write_basic_package_version_file("${CMAKE_CURRENT_BINARY_DIR}/glmConfigVersion.cmake" VERSION ${GLM_VERSION} COMPATIBILITY AnyNewerVersion)
-set(CMAKE_SIZEOF_VOID_P ${GLM_SIZEOF_VOID_P})
+write_basic_package_version_file("${CMAKE_CURRENT_BINARY_DIR}/glmConfigVersion.cmake" VERSION ${GLM_VERSION} COMPATIBILITY AnyNewerVersion ARCH_INDEPENDENT)
# build tree package config
configure_file(cmake/glmBuildConfig.cmake.in glmConfig.cmake @ONLY)
--
2.25.4

300
glm.spec Normal file
View File

@ -0,0 +1,300 @@
# The library consists of headers only
%global debug_package %{nil}
Name: glm
Version: 0.9.9.6
Release: 5%{?dist}
Summary: C++ mathematics library for graphics programming
License: MIT
URL: http://glm.g-truc.net/
Source0: https://github.com/g-truc/glm/releases/download/%{version}/%{name}-%{version}.zip
Patch0: glm-0.9.9.6-install.patch
Patch1: glm-0.9.9.6-noarch.patch
BuildRequires: gcc
BuildRequires: gcc-c++
BuildRequires: cmake >= 3.14
%description
GLM is a C++ library for doing mathematics operations
required in many OpenGL based applications. Its interface
has been designed to resemble the built-in matrix and vector
types of the OpenGL shading language.
%package devel
Summary: C++ mathematics library for graphics programming
BuildArch: noarch
# As required in
# https://fedoraproject.org/wiki/Packaging:Guidelines#Packaging_Static_Libraries_2
Provides: %{name}-static = %{version}-%{release}
%description devel
GLM is a C++ library for doing mathematics operations
required in many OpenGL based applications. Its interface
has been designed to resemble the built-in matrix and vector
types of the OpenGL shading language.
%{name}-devel is only required for building software that uses
the GLM library. Because GLM currently is a header-only library,
there is no matching run time package.
%package doc
Summary: Documentation for %{name}-devel
BuildArch: noarch
%description doc
The %{name}-doc package contains reference documentation and
a programming manual for the %{name}-devel package.
%prep
# Some glm releases, like version 0.9.3.1, place contents of
# the source archive directly into the archive root. Others,
# like glm 0.9.3.2, place them into a single subdirectory.
# The former case is inconvenient, but it can be be
# compensated for with the -c option of the setup macro.
#
# When updating this package, take care to check if -c is
# needed for the particular version.
#
# Also it looks like some versions get shipped with a common
# directory in archive root, but with an unusual name for the
# directory. In this case, use the -n option of the setup macro.
%setup -q -n glm
# A couple of files had CRLF line-ends in them.
# Check with rpmlint after updating the package that we are not
# forgetting to convert line endings in some files.
#
# This release of glm seems to have shipped with no CRLF file
# endings at all, so these are commented out.
sed -i 's/\r//' readme.md
sed -i 's/\r//' CMakeLists.txt
sed -i 's/\r//' doc/api/doxygen.css
sed -i 's/\r//' doc/api/dynsections.js
sed -i 's/\r//' doc/api/jquery.js
sed -i 's/\r//' doc/api/tabs.css
# These are just for being able to apply the patch that
# was exported from git.
sed -i 's/\r//' glm/detail/setup.hpp
sed -i 's/\r//' glm/simd/platform.h
sed -i 's/\r//' test/core/core_setup_message.cpp
%patch0 -p1
%patch1 -p1
%build
mkdir build
cd build
%{cmake} -DGLM_TEST_ENABLE=ON ..
make %{?_smp_mflags}
%check
cd build
# Some tests are disabled due to failing tests (to be reported)
# - test-core_func_common fails on aarch64
# - test-gtc_packing fails on s390x
ctest --output-on-failure -E '(test-core_func_common|test-gtc_packing)'
%install
cd build
make install DESTDIR=$RPM_BUILD_ROOT
find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';'
find $RPM_BUILD_ROOT -name CMakeLists.txt -exec rm -f {} ';'
# The cmake config files seem architecture independent and since
# also glm-devel is otherwise noarch, it is desired to ship the
# cmake configuration files under /usr/share.
mkdir -pv $RPM_BUILD_ROOT%{_datadir}
mv $RPM_BUILD_ROOT%{_libdir}/cmake $RPM_BUILD_ROOT%{_datadir}/cmake
mv $RPM_BUILD_ROOT%{_libdir}/pkgconfig $RPM_BUILD_ROOT%{_datadir}/pkgconfig
rmdir $RPM_BUILD_ROOT%{_libdir}
# Here it seems to be acceptable to own the cmake and pkgconfig directories
# as an alternative to having glm-devel depending on cmake and pkg-config
# https://fedoraproject.org/wiki/Packaging:Guidelines#The_directory_is_owned_by_a_package_which_is_not_required_for_your_package_to_function
%files devel
%doc readme.md
%{_includedir}/%{name}
%{_datadir}/cmake
%{_datadir}/pkgconfig/
%files doc
%doc doc/manual.pdf
%doc doc/api/
%changelog
* Sat Aug 01 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.9.6-5
- Second attempt - Rebuilt for
https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Mon Jul 27 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.9.6-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Sat May 02 2020 Joonas Sarajärvi <muep@iki.fi> - 0.9.9.6-3
- Remove arch check from glmConfigVersion.cmake, fix #1758009
* Tue Jan 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.9.6-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Sat Nov 23 2019 Joonas Sarajärvi <muep@iki.fi> - 0.9.9.6-1
- New upstream release
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.9.2-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Thu Jan 31 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.9.2-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
* Thu Oct 11 2018 Joonas Sarajärvi <muep@iki.fi> - 0.9.9.2-1
- Update to upstream GLM version 0.9.9.2
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.8.5-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.8.5-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
* Sun Feb 04 2018 Joonas Sarajärvi <muep@iki.fi> - 0.9.8.5-1
- Update to upstream GLM version 0.9.8.5
* Mon Jan 29 2018 Joonas Sarajärvi <muep@iki.fi> - 0.9.8.4-5
- Fix compatibility with GCC 7.3.1 #1539568
* Sat Aug 12 2017 Joonas Sarajärvi <muep@iki.fi> - 0.9.8.4-4
- Update the workaround for known-broken tests
* Wed Aug 02 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.8.4-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.8.4-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
* Thu Mar 02 2017 Joonas Sarajärvi <muep@iki.fi> - 0.9.8.4-1
- Update to upstream GLM version 0.9.8.4
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.8.3-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
* Sat Nov 12 2016 Joonas Sarajärvi <muep@iki.fi> - 0.9.8.3-1
- Update to upstream GLM version 0.9.8.3
* Mon Nov 07 2016 Joonas Sarajärvi <muep@iki.fi> - 0.9.8.2-1
- Update to upstream GLM version 0.9.8.2
* Tue Sep 06 2016 Joonas Sarajärvi <muep@iki.fi> - 0.9.7.6-1
- Update to upstream GLM version 0.9.7.6
* Thu Mar 03 2016 Joonas Sarajärvi <muep@iki.fi> - 0.9.7.3-1
- Update to upstream GLM version 0.9.7.3
* Thu Feb 04 2016 Joonas Sarajärvi <muep@iki.fi> - 0.9.7.2-3
- Fix tests with GCC 6.0
* Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.7.2-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
* Fri Jan 15 2016 Joonas Sarajärvi <muep@iki.fi> - 0.9.7.2-1
- Update to upstream GLM version 0.9.7.2
* Wed Aug 05 2015 Joonas Sarajärvi <muep@iki.fi> - 0.9.7.0-1
- Update to upstream GLM version 0.9.7.0
- CMake config files are added
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.6.3-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
* Sun Apr 26 2015 Joonas Sarajärvi <muep@iki.fi> - 0.9.6.3-1
- Update to upstream GLM version 0.9.6.3
* Mon Apr 20 2015 David Tardon <dtardon@redhat.com> - 0.9.6.1-3
- make -devel noarch
- install license file in -doc, as required by packaging guidelines
* Wed Jan 28 2015 Dan Horák <dan[at]danny.cz> - 0.9.6.1-2
- fix build on big endian arches, patch by Jakub Cajka from #1185298
* Tue Jan 06 2015 Joonas Sarajärvi <muep@iki.fi> - 0.9.6.1-1
- Update to upstream GLM version 0.9.6.1
* Sat Aug 16 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.5.2-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
* Mon Jun 23 2014 Joonas Sarajärvi <muep@iki.fi> - 0.9.5.2-3
- Reduce test array size to avoid memory allocation failure in tests
- Resolve a number of aliasing warnings
- Disable the packing test
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.5.2-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
* Sat Mar 29 2014 Joonas Sarajärvi <muep@iki.fi> - 0.9.5.2-1
- Update to upstream GLM version 0.9.5.2
* Tue Sep 24 2013 Joonas Sarajärvi <muep@iki.fi> - 0.9.4.6-2
- Fix building on ARM
* Tue Sep 24 2013 Joonas Sarajärvi <muep@iki.fi> - 0.9.4.6-1
- Update to upstream GLM version 0.9.4.6
- Bug fixes
* Tue Aug 20 2013 Joonas Sarajärvi <muep@iki.fi> - 0.9.4.5-1
- Update to upstream GLM version 0.9.4.5
- Bug fixes
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.4.4-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
* Sat Jul 06 2013 Joonas Sarajärvi <muep@iki.fi> - 0.9.4.4-1
- Update to upstream GLM version 0.9.4.4
- Bug fixes
* Mon Apr 15 2013 Joonas Sarajärvi <muep@iki.fi> - 0.9.4.3-1
- Update to upstream GLM version 0.9.4.3
- This version introduces just minor bug fixes
* Fri Mar 08 2013 Joonas Sarajärvi <muep@iki.fi> - 0.9.4.2-1
- Update to upstream GLM version 0.9.4.2
* Wed Feb 13 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.3.4-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
* Tue Sep 04 2012 Dan Horák <dan[at]danny.cz> - 0.9.3.4-2
- fix build on non-x86 arches
* Sun Sep 02 2012 Joonas Sarajärvi <muep@iki.fi> - 0.9.3.4-1
- Update to a new upstream version
- Work around problems in glm::log2 for integers
* Sat Sep 01 2012 Joonas Sarajärvi <muep@iki.fi> - 0.9.3.2-3
- Skip gtx_integer test that is known as broken
* Sat Sep 01 2012 Joonas Sarajärvi <muep@iki.fi> - 0.9.3.2-2
- Remove prebuilt binaries shipped in upstream source archive
* Fri May 04 2012 Joonas Sarajärvi <muep@iki.fi> - 0.9.3.2-1
- Update to upstream version 0.9.3.2
* Mon Feb 13 2012 Joonas Sarajärvi <muep@iki.fi> - 0.9.3.1-5
- Use global instead of define
- Clarify the comment about GLM zip archives
- Remove the unnecessary rm command from install section
- Remove misleading reference to non-existing glm package
* Mon Feb 06 2012 Joonas Sarajärvi <muep@iki.fi> - 0.9.3.1-4
- Add virtual Provides: that is required for static-only libraries
- Make descriptions in devel and doc packages more accurate
* Mon Feb 06 2012 Joonas Sarajärvi <muep@iki.fi> - 0.9.3.1-3
- Fix items pointed out in Comment 2 of #787510
* Mon Feb 06 2012 Joonas Sarajärvi <muep@iki.fi> - 0.9.3.1-2
- Build and run the self-test suite shipped with glm
- Add subpackage for manual and reference docs
* Sun Feb 05 2012 Joonas Sarajärvi <muep@iki.fi> - 0.9.3.1-1
- Initial RPM packaging

1
sources Normal file
View File

@ -0,0 +1 @@
SHA512 (glm-0.9.9.6.zip) = dbc3485fc983f5ef86461d9556a5a129c5d9e3be306be1aebe7ed34d2409658559112607a78d7f43513944d7f526b35605f43c31c605aa0f7a55cb3975aeab73