This commit is contained in:
Christophe Riccio 2016-12-14 17:59:22 +01:00
commit d73fd81812
2 changed files with 28 additions and 18 deletions

View File

@ -21,11 +21,13 @@ if(GLM_STATIC_LIBRARY_ENABLE)
message(STATUS "GLM is a header only library, no need to build it. Set the option GLM_STATIC_LIBRARY_ENABLE with ON to build an optional static library")
endif()
option(GLM_DYNAMIC_LIBRARY_ENABLE "GLM static library" OFF)
option(GLM_DYNAMIC_LIBRARY_ENABLE "GLM dynamic library" OFF)
if(GLM_DYNAMIC_LIBRARY_ENABLE)
message(STATUS "GLM is a header only library, no need to build it. Set the option GLM_DYNAMIC_LIBRARY_ENABLE with ON to build an optional dynamic library")
endif()
option(GLM_INSTALL_ENABLE "GLM install" ON)
option(GLM_TEST_ENABLE "GLM test" OFF)
if(NOT GLM_TEST_ENABLE)
message(STATUS "GLM is a header only library, no need to build it. Set the option GLM_TEST_ENABLE with ON to build and run the test bench")
@ -170,7 +172,9 @@ add_subdirectory(glm)
add_subdirectory(test)
set(GLM_INSTALL_CONFIGDIR "${CMAKE_INSTALL_LIBDIR}/cmake/glm")
install(DIRECTORY glm DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
if (GLM_INSTALL_ENABLE)
install(DIRECTORY glm DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
endif()
write_basic_package_version_file(
"${CMAKE_CURRENT_BINARY_DIR}/glmConfigVersion.cmake"
@ -194,12 +198,14 @@ configure_package_config_file(
NO_CHECK_REQUIRED_COMPONENTS_MACRO
)
install(
FILES
"${CMAKE_CURRENT_BINARY_DIR}/${GLM_INSTALL_CONFIGDIR}/glmConfig.cmake"
"${CMAKE_CURRENT_BINARY_DIR}/glmConfigVersion.cmake"
DESTINATION ${GLM_INSTALL_CONFIGDIR}
)
if (GLM_INSTALL_ENABLE)
install(
FILES
"${CMAKE_CURRENT_BINARY_DIR}/${GLM_INSTALL_CONFIGDIR}/glmConfig.cmake"
"${CMAKE_CURRENT_BINARY_DIR}/glmConfigVersion.cmake"
DESTINATION ${GLM_INSTALL_CONFIGDIR}
)
endif()
if (NOT CMAKE_VERSION VERSION_LESS "3.0")
add_library(glm INTERFACE)
@ -213,11 +219,13 @@ if (NOT CMAKE_VERSION VERSION_LESS "3.0")
EXPORT glmTargets
FILE "${CMAKE_CURRENT_BINARY_DIR}/glmTargets.cmake"
)
install(
EXPORT glmTargets FILE glmTargets.cmake
DESTINATION ${GLM_INSTALL_CONFIGDIR}
)
if (GLM_INSTALL_ENABLE)
install(
EXPORT glmTargets FILE glmTargets.cmake
DESTINATION ${GLM_INSTALL_CONFIGDIR}
)
endif()
endif()
# build pkg-config file
@ -228,9 +236,11 @@ configure_file(
)
# install pkg-config file
install(
FILES "${CMAKE_CURRENT_BINARY_DIR}/glm.pc"
DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig"
)
if (GLM_INSTALL_ENABLE)
install(
FILES "${CMAKE_CURRENT_BINARY_DIR}/glm.pc"
DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig"
)
endif()
export(PACKAGE glm)

View File

@ -78,7 +78,7 @@ namespace glm
///
/// @param m Input matrix multiplied by this scale matrix.
/// @param v Ratio of scaling for each axis.
/// @tparam T Value type used to build the matrix. Currently supported: half (not recommanded), float or double.
/// @tparam T Value type used to build the matrix. Currently supported: half (not recommended), float or double.
/// @see gtc_matrix_transform
/// @see - scale(tmat4x4<T, P> const & m, T x, T y, T z)
/// @see - scale(tvec3<T, P> const & v)