mirror of
https://github.com/g-truc/glm.git
synced 2024-11-22 08:54:35 +00:00
Include CPack if project is built as standalone
This commit is contained in:
parent
f64239743e
commit
3e99386b6f
@ -16,18 +16,20 @@ set(GLM_VERSION ${GLM_VERSION_MAJOR}.${GLM_VERSION_MINOR}.${GLM_VERSION_PATCH}.$
|
||||
project(glm VERSION ${GLM_VERSION} LANGUAGES CXX)
|
||||
message(STATUS "GLM: Version " ${GLM_VERSION})
|
||||
|
||||
enable_testing()
|
||||
|
||||
add_subdirectory(glm)
|
||||
add_library(glm::glm ALIAS glm)
|
||||
install(EXPORT glm FILE glmConfig.cmake DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/glm NAMESPACE glm::)
|
||||
|
||||
include(CMakePackageConfigHelpers)
|
||||
write_basic_package_version_file("glmConfigVersion.cmake" COMPATIBILITY AnyNewerVersion ARCH_INDEPENDENT)
|
||||
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/glmConfigVersion.cmake DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/glm)
|
||||
|
||||
if(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
|
||||
add_subdirectory(test)
|
||||
include(CPack)
|
||||
install(EXPORT glm FILE glmConfig.cmake DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/glm NAMESPACE glm::)
|
||||
include(CMakePackageConfigHelpers)
|
||||
write_basic_package_version_file("glmConfigVersion.cmake" COMPATIBILITY AnyNewerVersion ARCH_INDEPENDENT)
|
||||
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/glmConfigVersion.cmake DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/glm)
|
||||
|
||||
enable_testing()
|
||||
add_subdirectory(test)
|
||||
|
||||
endif(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user