diff --git a/CMakeLists.txt b/CMakeLists.txt index 8d597db0..9b268fc1 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 4ff51c81..e97192cf 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 + $ + $ +) + +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}