Resolve issues with CMake versions 3.13 and earlier

This commit is contained in:
Krzysztof Kurek 2021-01-30 23:59:37 +01:00
parent 631faffab3
commit e936ed35ea
No known key found for this signature in database
GPG Key ID: 04CCC8030ECE248C
2 changed files with 3 additions and 2 deletions

View File

@ -23,8 +23,7 @@ if(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR})
include(CPack) include(CPack)
include(GNUInstallDirs) include(GNUInstallDirs)
install(TARGETS glm EXPORT glm) install(DIRECTORY glm DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} PATTERN "CMakeLists.txt" EXCLUDE)
install(DIRECTORY glm TYPE INCLUDE PATTERN "CMakeLists.txt" EXCLUDE)
install(EXPORT glm FILE glmConfig.cmake DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/glm NAMESPACE glm::) install(EXPORT glm FILE glmConfig.cmake DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/glm NAMESPACE glm::)
include(CMakePackageConfigHelpers) include(CMakePackageConfigHelpers)
write_basic_package_version_file("glmConfigVersion.cmake" COMPATIBILITY AnyNewerVersion ARCH_INDEPENDENT) write_basic_package_version_file("glmConfigVersion.cmake" COMPATIBILITY AnyNewerVersion ARCH_INDEPENDENT)

View File

@ -49,6 +49,8 @@ target_include_directories(glm INTERFACE
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}> $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
) )
install(TARGETS glm EXPORT glm)
if(BUILD_STATIC_LIBS) if(BUILD_STATIC_LIBS)
add_library(glm_static STATIC ${ROOT_TEXT} ${ROOT_MD} ${ROOT_NAT} add_library(glm_static STATIC ${ROOT_TEXT} ${ROOT_MD} ${ROOT_NAT}
${ROOT_SOURCE} ${ROOT_INLINE} ${ROOT_HEADER} ${ROOT_SOURCE} ${ROOT_INLINE} ${ROOT_HEADER}