glm: new package
This commit is contained in:
parent
d3943f198c
commit
257a1c2ab0
|
@ -0,0 +1,43 @@
|
|||
From 6059c5767b8be1fdaf7b4c8bf6f435ee9f7e5f0c 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] Export the GLM target
|
||||
|
||||
---
|
||||
CMakeLists.txt | 1 +
|
||||
glm/CMakeLists.txt | 10 +++++++++-
|
||||
2 files changed, 10 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 8d597db07..9b268fc1c 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -20,6 +20,7 @@ enable_testing()
|
||||
|
||||
add_subdirectory(glm)
|
||||
add_library(glm::glm ALIAS glm)
|
||||
+install(EXPORT glm FILE glm-config.cmake DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake NAMESPACE glm::)
|
||||
|
||||
if(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
|
||||
diff --git a/glm/CMakeLists.txt b/glm/CMakeLists.txt
|
||||
index 4ff51c818..e97192cf7 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 ../)
|
||||
+
|
||||
+target_include_directories(glm INTERFACE
|
||||
+ $<BUILD_INTERFACE:${CMAKE_SOURCE_DIR}>
|
||||
+ $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
|
||||
+)
|
||||
+
|
||||
+include(GNUInstallDirs)
|
||||
+install(TARGETS glm EXPORT glm)
|
||||
+install(DIRECTORY . DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/glm" PATTERN "CMakeLists.txt" EXCLUDE)
|
||||
|
||||
if(BUILD_STATIC_LIBS)
|
||||
add_library(glm_static STATIC ${ROOT_TEXT} ${ROOT_MD} ${ROOT_NAT}
|
|
@ -0,0 +1,9 @@
|
|||
TERMUX_PKG_HOMEPAGE=https://glm.g-truc.net/
|
||||
TERMUX_PKG_DESCRIPTION="C++ mathematics library for graphics software based on the GLSL specifications"
|
||||
TERMUX_PKG_LICENSE="MIT"
|
||||
TERMUX_PKG_LICENSE_FILE="copying.txt"
|
||||
TERMUX_PKG_MAINTAINER="@termux"
|
||||
TERMUX_PKG_VERSION=0.9.9.8
|
||||
TERMUX_PKG_SRCURL=https://github.com/g-truc/glm/archive/${TERMUX_PKG_VERSION}.tar.gz
|
||||
TERMUX_PKG_SHA256=7d508ab72cb5d43227a3711420f06ff99b0a0cb63ee2f93631b162bfe1fe9592
|
||||
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="-DGLM_TEST_ENABLE=OFF"
|
Loading…
Reference in New Issue