Compare commits
No commits in common. 'c9' and 'f41' have entirely different histories.
@ -1 +1,23 @@
|
||||
SOURCES/0.9.9.8.tar.gz
|
||||
/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
|
||||
/0.9.9.8.tar.gz
|
||||
/1.0.1.tar.gz
|
||||
|
@ -1 +0,0 @@
|
||||
505e96fedffdb6e8e725ea353e5893576185f0fd SOURCES/0.9.9.8.tar.gz
|
@ -1,150 +0,0 @@
|
||||
From 02f26a88537b0b02dd0df77fc858e9449c7e3847 Mon Sep 17 00:00:00 2001
|
||||
From: Krzysztof Kurek <krzysio.kurek@pm.me>
|
||||
Date: Sat, 30 Jan 2021 21:08:48 +0100
|
||||
Subject: [PATCH] Add installation support from PR #1054
|
||||
|
||||
This is based on commit 887827b762111a8e6b4765513b4be212fa6a5426,
|
||||
discovered from https://github.com/g-truc/glm/pull/1054
|
||||
---
|
||||
CMakeLists.txt | 16 ++++++++++++++--
|
||||
cmake/glm/glmConfig-version.cmake | 11 -----------
|
||||
cmake/glm/glmConfig.cmake | 22 ----------------------
|
||||
glm/CMakeLists.txt | 10 +++++++++-
|
||||
manual.md | 21 ++++++++++++++++++++-
|
||||
5 files changed, 43 insertions(+), 37 deletions(-)
|
||||
delete mode 100644 cmake/glm/glmConfig-version.cmake
|
||||
delete mode 100644 cmake/glm/glmConfig.cmake
|
||||
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 843e7546..642a5fde 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -3,13 +3,25 @@ cmake_policy(VERSION 3.2)
|
||||
|
||||
set(GLM_VERSION "0.9.9")
|
||||
project(glm VERSION ${GLM_VERSION} LANGUAGES CXX)
|
||||
-enable_testing()
|
||||
+message(STATUS "GLM: Version " ${GLM_VERSION})
|
||||
|
||||
add_subdirectory(glm)
|
||||
add_library(glm::glm ALIAS glm)
|
||||
|
||||
if(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
|
||||
-add_subdirectory(test)
|
||||
+ include(CPack)
|
||||
+ install(DIRECTORY glm DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} PATTERN "CMakeLists.txt" EXCLUDE)
|
||||
+ install(EXPORT glm FILE glmConfig.cmake DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/glm NAMESPACE glm::)
|
||||
+ include(CMakePackageConfigHelpers)
|
||||
+ write_basic_package_version_file("glmConfigVersion.cmake" COMPATIBILITY AnyNewerVersion)
|
||||
+ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/glmConfigVersion.cmake DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/glm)
|
||||
+
|
||||
+ include(CTest)
|
||||
+ if(BUILD_TESTING)
|
||||
+ add_subdirectory(test)
|
||||
+ endif()
|
||||
|
||||
endif(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
+
|
||||
+
|
||||
diff --git a/cmake/glm/glmConfig-version.cmake b/cmake/glm/glmConfig-version.cmake
|
||||
deleted file mode 100644
|
||||
index 6e63a4a3..00000000
|
||||
--- a/cmake/glm/glmConfig-version.cmake
|
||||
+++ /dev/null
|
||||
@@ -1,11 +0,0 @@
|
||||
-if(${PACKAGE_FIND_VERSION_MAJOR} EQUAL 0)
|
||||
- if (${PACKAGE_FIND_VERSION} VERSION_LESS ${GLM_VERSION})
|
||||
- set(PACKAGE_VERSION_COMPATIBLE 1)
|
||||
- endif()
|
||||
- if(${PACKAGE_FIND_VERSION} VERSION_EQUAL ${GLM_VERSION})
|
||||
- set(PACKAGE_VERSION_EXACT 1)
|
||||
- endif()
|
||||
-else()
|
||||
- set(PACKAGE_VERSION_UNSUITABLE 1)
|
||||
-endif()
|
||||
-
|
||||
diff --git a/cmake/glm/glmConfig.cmake b/cmake/glm/glmConfig.cmake
|
||||
deleted file mode 100644
|
||||
index 4fba5116..00000000
|
||||
--- a/cmake/glm/glmConfig.cmake
|
||||
+++ /dev/null
|
||||
@@ -1,22 +0,0 @@
|
||||
-cmake_minimum_required(VERSION 3.2 FATAL_ERROR)
|
||||
-cmake_policy(VERSION 3.2)
|
||||
-
|
||||
-set(GLM_VERSION 0.9.9)
|
||||
-
|
||||
-get_filename_component(_IMPORT_PREFIX "${CMAKE_CURRENT_LIST_FILE}" PATH)
|
||||
-get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH)
|
||||
-get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH)
|
||||
-if (_IMPORT_PREFIX STREQUAL "/")
|
||||
- set(_IMPORT_PREFIX "")
|
||||
-endif()
|
||||
-
|
||||
-# Set the old GLM_INCLUDE_DIRS variable for backwards compatibility
|
||||
-set(GLM_INCLUDE_DIRS ${_IMPORT_PREFIX})
|
||||
-
|
||||
-add_library(glm::glm INTERFACE IMPORTED)
|
||||
-set_target_properties(glm::glm PROPERTIES
|
||||
- INTERFACE_INCLUDE_DIRECTORIES ${GLM_INCLUDE_DIRS})
|
||||
-
|
||||
-mark_as_advanced(glm_DIR)
|
||||
-set(_IMPORT_PREFIX)
|
||||
-
|
||||
diff --git a/glm/CMakeLists.txt b/glm/CMakeLists.txt
|
||||
index 4ff51c81..cee0d2e7 100644
|
||||
--- a/glm/CMakeLists.txt
|
||||
+++ b/glm/CMakeLists.txt
|
||||
@@ -43,7 +43,15 @@ source_group("SIMD Files" FILES ${SIMD_INLINE})
|
||||
source_group("SIMD Files" FILES ${SIMD_HEADER})
|
||||
|
||||
add_library(glm INTERFACE)
|
||||
-target_include_directories(glm INTERFACE ../)
|
||||
+
|
||||
+include(GNUInstallDirs)
|
||||
+
|
||||
+target_include_directories(glm INTERFACE
|
||||
+ $<BUILD_INTERFACE:${CMAKE_SOURCE_DIR}>
|
||||
+ $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
|
||||
+)
|
||||
+
|
||||
+install(TARGETS glm EXPORT glm)
|
||||
|
||||
if(BUILD_STATIC_LIBS)
|
||||
add_library(glm_static STATIC ${ROOT_TEXT} ${ROOT_MD} ${ROOT_NAT}
|
||||
diff --git a/manual.md b/manual.md
|
||||
index a7f6956f..d53df3d7 100644
|
||||
--- a/manual.md
|
||||
+++ b/manual.md
|
||||
@@ -277,7 +277,26 @@ GLM does not depend on external libraries or headers such as `<GL/gl.h>`, [`<GL/
|
||||
|
||||
### <a name="section1_5"></a> 1.5. Finding GLM with CMake
|
||||
|
||||
-GLM packages a `glmConfig.cmake` and `glmConfig-version.cmake` in the root of the repository and the release archives. To find GLM with CMake you can pass `-Dglm_DIR=<path to glm root>/cmake/glm/` when running CMake. You can then either add `${GLM_INCLUDE_DIRS}` to your target's include directories, or link against the imported `glm::glm` target.
|
||||
+When installed, GLM provides the CMake package configuration files `glmConfig.cmake` and `glmConfigVersion.cmake`.
|
||||
+
|
||||
+To use these configurations files, you may need to set the `glm_DIR` variable to the directory containing the configuration files `<installation prefix>/lib/cmake/glm/`.
|
||||
+
|
||||
+Use the `find_package` CMake command to load the configurations into your project. Lastly, either link your executable against the `glm::glm` target or add `${GLM_INCLUDE_DIRS}` to your target's include directories:
|
||||
+
|
||||
+```cmake
|
||||
+set(glm_DIR <installation prefix>/lib/cmake/glm) # if necessary
|
||||
+find_package(glm REQUIRED)
|
||||
+target_link_libraries(<your executable> glm::glm)
|
||||
+```
|
||||
+
|
||||
+To use GLM as a submodule in a project instead, use `add_subdirectory` to expose the same target, or add the directory to your target's
|
||||
+
|
||||
+```cmake
|
||||
+add_subdirectory(glm)
|
||||
+target_link_libraries(<your executable> glm::glm)
|
||||
+# or
|
||||
+target_include_directories(<your executable> glm)
|
||||
+```
|
||||
|
||||
---
|
||||
<div style="page-break-after: always;"> </div>
|
||||
--
|
||||
2.29.2
|
||||
|
@ -1,25 +0,0 @@
|
||||
From e0c728eca35d6d9c34d239c56bdcfb460b378676 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Joonas=20Saraj=C3=A4rvi?= <muep@iki.fi>
|
||||
Date: Sun, 7 Feb 2021 19:34:40 +0200
|
||||
Subject: [PATCH] Use built-in mechanism for marking arch-independent
|
||||
|
||||
---
|
||||
CMakeLists.txt | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 642a5fde..a7b80449 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -14,7 +14,7 @@ if(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
install(DIRECTORY glm DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} PATTERN "CMakeLists.txt" EXCLUDE)
|
||||
install(EXPORT glm FILE glmConfig.cmake DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/glm NAMESPACE glm::)
|
||||
include(CMakePackageConfigHelpers)
|
||||
- write_basic_package_version_file("glmConfigVersion.cmake" COMPATIBILITY AnyNewerVersion)
|
||||
+ write_basic_package_version_file("glmConfigVersion.cmake" COMPATIBILITY AnyNewerVersion ARCH_INDEPENDENT)
|
||||
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/glmConfigVersion.cmake DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/glm)
|
||||
|
||||
include(CTest)
|
||||
--
|
||||
2.29.2
|
||||
|
@ -0,0 +1,11 @@
|
||||
diff -ru glm-1.0.1/CMakeLists.txt glm-1.0.1-noarch/CMakeLists.txt
|
||||
--- glm-1.0.1/CMakeLists.txt 2024-02-27 18:19:47.000000000 +0100
|
||||
+++ glm-1.0.1-noarch/CMakeLists.txt 2024-03-02 11:25:31.703221759 +0100
|
||||
@@ -270,6 +270,7 @@
|
||||
write_basic_package_version_file(
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/glmConfigVersion.cmake"
|
||||
COMPATIBILITY AnyNewerVersion
|
||||
+ ARCH_INDEPENDENT
|
||||
)
|
||||
install(
|
||||
FILES "${CMAKE_CURRENT_BINARY_DIR}/glmConfigVersion.cmake"
|
@ -0,0 +1,12 @@
|
||||
diff -ru glm-1.0.1/test/CMakeLists.txt glm-1.0.1-without-werror/test/CMakeLists.txt
|
||||
--- glm-1.0.1/test/CMakeLists.txt 2024-02-27 18:19:47.000000000 +0100
|
||||
+++ glm-1.0.1-without-werror/test/CMakeLists.txt 2024-03-02 11:57:28.431725545 +0100
|
||||
@@ -20,7 +20,7 @@
|
||||
endif()
|
||||
|
||||
if(NOT GLM_DISABLE_AUTO_DETECTION)
|
||||
- add_compile_options(-Werror)
|
||||
+# add_compile_options(-Werror)
|
||||
# add_compile_options(-Wpedantic)
|
||||
# add_compile_options(-Wall)
|
||||
# add_compile_options(-Wextra)
|
Loading…
Reference in new issue