Make sure installed glm::glm has the includes

This commit is contained in:
Krzysztof Kurek 2021-01-31 14:50:00 +01:00
parent dd457459b2
commit 3a4b55020e
No known key found for this signature in database
GPG Key ID: 04CCC8030ECE248C
2 changed files with 2 additions and 1 deletions

View File

@ -22,7 +22,6 @@ add_library(glm::glm ALIAS glm)
if(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR}) if(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR})
include(CPack) include(CPack)
include(GNUInstallDirs)
install(DIRECTORY glm DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} 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::) install(EXPORT glm FILE glmConfig.cmake DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/glm NAMESPACE glm::)
include(CMakePackageConfigHelpers) include(CMakePackageConfigHelpers)

View File

@ -44,6 +44,8 @@ source_group("SIMD Files" FILES ${SIMD_HEADER})
add_library(glm INTERFACE) add_library(glm INTERFACE)
include(GNUInstallDirs)
target_include_directories(glm INTERFACE target_include_directories(glm INTERFACE
$<BUILD_INTERFACE:${CMAKE_SOURCE_DIR}> $<BUILD_INTERFACE:${CMAKE_SOURCE_DIR}>
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}> $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>