mirror of
https://github.com/g-truc/glm.git
synced 2024-11-22 17:04:35 +00:00
Export the GLM target
This commit is contained in:
parent
3a25105d86
commit
6059c5767b
@ -20,6 +20,7 @@ enable_testing()
|
|||||||
|
|
||||||
add_subdirectory(glm)
|
add_subdirectory(glm)
|
||||||
add_library(glm::glm ALIAS 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})
|
if(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR})
|
||||||
|
|
||||||
|
@ -43,7 +43,15 @@ source_group("SIMD Files" FILES ${SIMD_INLINE})
|
|||||||
source_group("SIMD Files" FILES ${SIMD_HEADER})
|
source_group("SIMD Files" FILES ${SIMD_HEADER})
|
||||||
|
|
||||||
add_library(glm INTERFACE)
|
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)
|
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}
|
||||||
|
Loading…
Reference in New Issue
Block a user