Browse Source

Merge branch 'master' of https://github.com/g-truc/glm

Christophe Riccio 9 years ago
parent
commit
d73fd81812
2 changed files with 28 additions and 18 deletions
  1. 27 17
      CMakeLists.txt
  2. 1 1
      glm/gtc/matrix_transform.hpp

+ 27 - 17
CMakeLists.txt

@@ -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(
-    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")
 if (NOT CMAKE_VERSION VERSION_LESS "3.0")
     add_library(glm INTERFACE)
     add_library(glm INTERFACE)
@@ -213,11 +219,13 @@ if (NOT CMAKE_VERSION VERSION_LESS "3.0")
         EXPORT glmTargets
         EXPORT glmTargets
         FILE "${CMAKE_CURRENT_BINARY_DIR}/glmTargets.cmake"
         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()
 endif()
 
 
 # build pkg-config file
 # build pkg-config file
@@ -228,9 +236,11 @@ configure_file(
 )
 )
 
 
 # install pkg-config 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)
 export(PACKAGE glm)

+ 1 - 1
glm/gtc/matrix_transform.hpp

@@ -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)