mirror of
https://github.com/g-truc/glm.git
synced 2024-11-10 04:31:47 +00:00
Fixed CMake build on 2.8 versions
This commit is contained in:
parent
476ea7bbe1
commit
084804111e
@ -147,37 +147,37 @@ add_subdirectory(test)
|
||||
set(GLM_INSTALL_CONFIGDIR "${CMAKE_INSTALL_LIBDIR}/cmake/glm")
|
||||
install(DIRECTORY glm DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
|
||||
|
||||
include(CMakePackageConfigHelpers)
|
||||
write_basic_package_version_file(
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/glmVersion.cmake"
|
||||
VERSION ${GLM_VERSION}
|
||||
COMPATIBILITY AnyNewerVersion
|
||||
)
|
||||
|
||||
# build tree package config
|
||||
configure_file(
|
||||
cmake/glmBuildConfig.cmake.in
|
||||
glmConfig.cmake
|
||||
COPYONLY
|
||||
)
|
||||
|
||||
# install tree package config
|
||||
configure_package_config_file(
|
||||
cmake/glmConfig.cmake.in
|
||||
${GLM_INSTALL_CONFIGDIR}/glmConfig.cmake
|
||||
INSTALL_DESTINATION ${GLM_INSTALL_CONFIGDIR}
|
||||
PATH_VARS CMAKE_INSTALL_INCLUDEDIR
|
||||
NO_CHECK_REQUIRED_COMPONENTS_MACRO
|
||||
)
|
||||
|
||||
install(
|
||||
FILES
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/glmConfig.cmake"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/glmVersion.cmake"
|
||||
DESTINATION ${GLM_INSTALL_CONFIGDIR}
|
||||
)
|
||||
|
||||
if (NOT CMAKE_VERSION VERSION_LESS "2.8.12")
|
||||
include(CMakePackageConfigHelpers)
|
||||
write_basic_package_version_file(
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/glmVersion.cmake"
|
||||
VERSION ${GLM_VERSION}
|
||||
COMPATIBILITY AnyNewerVersion
|
||||
)
|
||||
|
||||
# build tree package config
|
||||
configure_file(
|
||||
cmake/glmBuildConfig.cmake.in
|
||||
glmConfig.cmake
|
||||
COPYONLY
|
||||
)
|
||||
|
||||
# install tree package config
|
||||
configure_package_config_file(
|
||||
cmake/glmConfig.cmake.in
|
||||
${GLM_INSTALL_CONFIGDIR}/glmConfig.cmake
|
||||
INSTALL_DESTINATION ${GLM_INSTALL_CONFIGDIR}
|
||||
PATH_VARS CMAKE_INSTALL_INCLUDEDIR
|
||||
NO_CHECK_REQUIRED_COMPONENTS_MACRO
|
||||
)
|
||||
|
||||
install(
|
||||
FILES
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/glmConfig.cmake"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/glmVersion.cmake"
|
||||
DESTINATION ${GLM_INSTALL_CONFIGDIR}
|
||||
)
|
||||
|
||||
add_library(glm INTERFACE)
|
||||
target_include_directories(glm INTERFACE
|
||||
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
|
||||
|
Loading…
Reference in New Issue
Block a user