From e936ed35eaea255d115a46912d69e443f6c3004a Mon Sep 17 00:00:00 2001 From: Krzysztof Kurek Date: Sat, 30 Jan 2021 23:59:37 +0100 Subject: [PATCH] Resolve issues with CMake versions 3.13 and earlier --- CMakeLists.txt | 3 +-- glm/CMakeLists.txt | 2 ++ 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 13818ee4..f6c43879 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -23,8 +23,7 @@ if(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR}) include(CPack) include(GNUInstallDirs) - install(TARGETS glm EXPORT glm) - install(DIRECTORY glm TYPE INCLUDE PATTERN "CMakeLists.txt" EXCLUDE) + 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 ARCH_INDEPENDENT) diff --git a/glm/CMakeLists.txt b/glm/CMakeLists.txt index 83c8eaa5..f7ccb6f3 100644 --- a/glm/CMakeLists.txt +++ b/glm/CMakeLists.txt @@ -49,6 +49,8 @@ target_include_directories(glm INTERFACE $ ) +install(TARGETS glm EXPORT glm) + if(BUILD_STATIC_LIBS) add_library(glm_static STATIC ${ROOT_TEXT} ${ROOT_MD} ${ROOT_NAT} ${ROOT_SOURCE} ${ROOT_INLINE} ${ROOT_HEADER}