mirror of
https://github.com/g-truc/glm.git
synced 2024-11-12 21:31:47 +00:00
Merge branch 'master' of https://github.com/g-truc/glm
This commit is contained in:
commit
d73fd81812
@ -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")
|
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()
|
endif()
|
||||||
|
|
||||||
option(GLM_DYNAMIC_LIBRARY_ENABLE "GLM static library" OFF)
|
option(GLM_DYNAMIC_LIBRARY_ENABLE "GLM dynamic library" OFF)
|
||||||
if(GLM_DYNAMIC_LIBRARY_ENABLE)
|
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")
|
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()
|
endif()
|
||||||
|
|
||||||
|
option(GLM_INSTALL_ENABLE "GLM install" ON)
|
||||||
|
|
||||||
option(GLM_TEST_ENABLE "GLM test" OFF)
|
option(GLM_TEST_ENABLE "GLM test" OFF)
|
||||||
if(NOT GLM_TEST_ENABLE)
|
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")
|
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)
|
add_subdirectory(test)
|
||||||
|
|
||||||
set(GLM_INSTALL_CONFIGDIR "${CMAKE_INSTALL_LIBDIR}/cmake/glm")
|
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(
|
write_basic_package_version_file(
|
||||||
"${CMAKE_CURRENT_BINARY_DIR}/glmConfigVersion.cmake"
|
"${CMAKE_CURRENT_BINARY_DIR}/glmConfigVersion.cmake"
|
||||||
@ -194,12 +198,14 @@ configure_package_config_file(
|
|||||||
NO_CHECK_REQUIRED_COMPONENTS_MACRO
|
NO_CHECK_REQUIRED_COMPONENTS_MACRO
|
||||||
)
|
)
|
||||||
|
|
||||||
install(
|
if (GLM_INSTALL_ENABLE)
|
||||||
|
install(
|
||||||
FILES
|
FILES
|
||||||
"${CMAKE_CURRENT_BINARY_DIR}/${GLM_INSTALL_CONFIGDIR}/glmConfig.cmake"
|
"${CMAKE_CURRENT_BINARY_DIR}/${GLM_INSTALL_CONFIGDIR}/glmConfig.cmake"
|
||||||
"${CMAKE_CURRENT_BINARY_DIR}/glmConfigVersion.cmake"
|
"${CMAKE_CURRENT_BINARY_DIR}/glmConfigVersion.cmake"
|
||||||
DESTINATION ${GLM_INSTALL_CONFIGDIR}
|
DESTINATION ${GLM_INSTALL_CONFIGDIR}
|
||||||
)
|
)
|
||||||
|
endif()
|
||||||
|
|
||||||
if (NOT CMAKE_VERSION VERSION_LESS "3.0")
|
if (NOT CMAKE_VERSION VERSION_LESS "3.0")
|
||||||
add_library(glm INTERFACE)
|
add_library(glm INTERFACE)
|
||||||
@ -214,10 +220,12 @@ if (NOT CMAKE_VERSION VERSION_LESS "3.0")
|
|||||||
FILE "${CMAKE_CURRENT_BINARY_DIR}/glmTargets.cmake"
|
FILE "${CMAKE_CURRENT_BINARY_DIR}/glmTargets.cmake"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if (GLM_INSTALL_ENABLE)
|
||||||
install(
|
install(
|
||||||
EXPORT glmTargets FILE glmTargets.cmake
|
EXPORT glmTargets FILE glmTargets.cmake
|
||||||
DESTINATION ${GLM_INSTALL_CONFIGDIR}
|
DESTINATION ${GLM_INSTALL_CONFIGDIR}
|
||||||
)
|
)
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# build pkg-config file
|
# build pkg-config file
|
||||||
@ -228,9 +236,11 @@ configure_file(
|
|||||||
)
|
)
|
||||||
|
|
||||||
# install pkg-config file
|
# install pkg-config file
|
||||||
install(
|
if (GLM_INSTALL_ENABLE)
|
||||||
|
install(
|
||||||
FILES "${CMAKE_CURRENT_BINARY_DIR}/glm.pc"
|
FILES "${CMAKE_CURRENT_BINARY_DIR}/glm.pc"
|
||||||
DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig"
|
DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig"
|
||||||
)
|
)
|
||||||
|
endif()
|
||||||
|
|
||||||
export(PACKAGE glm)
|
export(PACKAGE glm)
|
||||||
|
@ -78,7 +78,7 @@ namespace glm
|
|||||||
///
|
///
|
||||||
/// @param m Input matrix multiplied by this scale matrix.
|
/// @param m Input matrix multiplied by this scale matrix.
|
||||||
/// @param v Ratio of scaling for each axis.
|
/// @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 gtc_matrix_transform
|
||||||
/// @see - scale(tmat4x4<T, P> const & m, T x, T y, T z)
|
/// @see - scale(tmat4x4<T, P> const & m, T x, T y, T z)
|
||||||
/// @see - scale(tvec3<T, P> const & v)
|
/// @see - scale(tvec3<T, P> const & v)
|
||||||
|
Loading…
Reference in New Issue
Block a user