Export the GLM target

This commit is contained in:
Krzysztof Kurek
2021-01-30 21:08:48 +01:00
parent 3a25105d86
commit 6059c5767b
2 changed files with 10 additions and 1 deletions

View File

@@ -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}