Merge pull request #966 from Twinklebear/master

Add Simpler GLM CMake Config #966
This commit is contained in:
Christophe 2020-03-05 18:47:13 +01:00 committed by GitHub
commit 6b458cb173
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 269 additions and 5 deletions

View File

@ -77,5 +77,11 @@ build_script:
test_script: test_script:
- ctest -j4 -C %CONFIGURATION% - ctest -j4 -C %CONFIGURATION%
- cd ..
- ps: |
mkdir build_test_cmake
cd build_test_cmake
cmake ..\test\cmake\ -G "$env:generator" -Dglm_DIR="$env:APPVEYOR_BUILD_FOLDER/cmake/glm/"
- cmake --build . --config %CONFIGURATION% -- /m /v:minimal
deploy: off deploy: off

3
.gitignore vendored
View File

@ -33,6 +33,8 @@ CMakeFiles
cmake_install.cmake cmake_install.cmake
install_manifest.txt install_manifest.txt
*.cmake *.cmake
!glmConfig.cmake
!glmConfig-version.cmake
# ^ May need to add future .cmake files as exceptions # ^ May need to add future .cmake files as exceptions
# Test logs # Test logs
@ -56,3 +58,4 @@ build*
/.vscode /.vscode
/CMakeSettings.json /CMakeSettings.json
.DS_Store .DS_Store
*.swp

View File

@ -11,6 +11,11 @@ matrix:
- cmake -DCMAKE_CXX_COMPILER=$COMPILER -DCMAKE_BUILD_TYPE=Release -DGLM_TEST_ENABLE=ON -DGLM_DISABLE_AUTO_DETECTION=ON .. - cmake -DCMAKE_CXX_COMPILER=$COMPILER -DCMAKE_BUILD_TYPE=Release -DGLM_TEST_ENABLE=ON -DGLM_DISABLE_AUTO_DETECTION=ON ..
- cmake -E time cmake --build . - cmake -E time cmake --build .
- ctest - ctest
- cd $TRAVIS_BUILD_DIR
- mkdir ./build_test_cmake
- cd ./build_test_cmake
- cmake -DCMAKE_CXX_COMPILER=$COMPILER $TRAVIS_BUILD_DIR/test/cmake/ -Dglm_DIR=$TRAVIS_BUILD_DIR/cmake/glm/
- cmake --build .
env: env:
- MATRIX_EVAL="INFO=C++unknown-release" - MATRIX_EVAL="INFO=C++unknown-release"
@ -23,6 +28,11 @@ matrix:
- cmake -DCMAKE_CXX_COMPILER=$COMPILER -DCMAKE_BUILD_TYPE=Release -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_98=ON -DGLM_TEST_FORCE_PURE=ON .. - cmake -DCMAKE_CXX_COMPILER=$COMPILER -DCMAKE_BUILD_TYPE=Release -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_98=ON -DGLM_TEST_FORCE_PURE=ON ..
- cmake -E time cmake --build . - cmake -E time cmake --build .
- ctest - ctest
- cd $TRAVIS_BUILD_DIR
- mkdir ./build_test_cmake
- cd ./build_test_cmake
- cmake -DCMAKE_CXX_COMPILER=$COMPILER $TRAVIS_BUILD_DIR/test/cmake/ -Dglm_DIR=$TRAVIS_BUILD_DIR/cmake/glm/
- cmake --build .
env: env:
- MATRIX_EVAL="INFO=C++98-pure-release" - MATRIX_EVAL="INFO=C++98-pure-release"
@ -35,6 +45,11 @@ matrix:
- cmake -DCMAKE_CXX_COMPILER=$COMPILER -DCMAKE_BUILD_TYPE=Release -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_98=ON -DGLM_TEST_ENABLE_LANG_EXTENSIONS=ON .. - cmake -DCMAKE_CXX_COMPILER=$COMPILER -DCMAKE_BUILD_TYPE=Release -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_98=ON -DGLM_TEST_ENABLE_LANG_EXTENSIONS=ON ..
- cmake -E time cmake --build . - cmake -E time cmake --build .
- ctest - ctest
- cd $TRAVIS_BUILD_DIR
- mkdir ./build_test_cmake
- cd ./build_test_cmake
- cmake -DCMAKE_CXX_COMPILER=$COMPILER $TRAVIS_BUILD_DIR/test/cmake/ -Dglm_DIR=$TRAVIS_BUILD_DIR/cmake/glm/
- cmake --build .
env: env:
- MATRIX_EVAL="INFO=C++98-pure-ms-release" - MATRIX_EVAL="INFO=C++98-pure-ms-release"
@ -47,6 +62,11 @@ matrix:
- cmake -DCMAKE_CXX_COMPILER=$COMPILER -DCMAKE_BUILD_TYPE=Release -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_11=ON -DGLM_TEST_FORCE_PURE=ON .. - cmake -DCMAKE_CXX_COMPILER=$COMPILER -DCMAKE_BUILD_TYPE=Release -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_11=ON -DGLM_TEST_FORCE_PURE=ON ..
- cmake -E time cmake --build . - cmake -E time cmake --build .
- ctest - ctest
- cd $TRAVIS_BUILD_DIR
- mkdir ./build_test_cmake
- cd ./build_test_cmake
- cmake -DCMAKE_CXX_COMPILER=$COMPILER $TRAVIS_BUILD_DIR/test/cmake/ -Dglm_DIR=$TRAVIS_BUILD_DIR/cmake/glm/
- cmake --build .
env: env:
- MATRIX_EVAL="INFO=C++11-pure-release" - MATRIX_EVAL="INFO=C++11-pure-release"
@ -59,6 +79,11 @@ matrix:
- cmake -DCMAKE_CXX_COMPILER=$COMPILER -DCMAKE_BUILD_TYPE=Release -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_11=ON -DGLM_TEST_ENABLE_LANG_EXTENSIONS=ON -DGLM_TEST_ENABLE_SIMD_SSE2=ON .. - cmake -DCMAKE_CXX_COMPILER=$COMPILER -DCMAKE_BUILD_TYPE=Release -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_11=ON -DGLM_TEST_ENABLE_LANG_EXTENSIONS=ON -DGLM_TEST_ENABLE_SIMD_SSE2=ON ..
- cmake -E time cmake --build . - cmake -E time cmake --build .
- ctest - ctest
- cd $TRAVIS_BUILD_DIR
- mkdir ./build_test_cmake
- cd ./build_test_cmake
- cmake -DCMAKE_CXX_COMPILER=$COMPILER $TRAVIS_BUILD_DIR/test/cmake/ -Dglm_DIR=$TRAVIS_BUILD_DIR/cmake/glm/
- cmake --build .
env: env:
- MATRIX_EVAL="INFO=C++11-sse2-release" - MATRIX_EVAL="INFO=C++11-sse2-release"
@ -71,6 +96,11 @@ matrix:
- cmake -DCMAKE_CXX_COMPILER=$COMPILER -DCMAKE_BUILD_TYPE=Release -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_14=ON -DGLM_TEST_FORCE_PURE=ON .. - cmake -DCMAKE_CXX_COMPILER=$COMPILER -DCMAKE_BUILD_TYPE=Release -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_14=ON -DGLM_TEST_FORCE_PURE=ON ..
- cmake -E time cmake --build . - cmake -E time cmake --build .
- ctest - ctest
- cd $TRAVIS_BUILD_DIR
- mkdir ./build_test_cmake
- cd ./build_test_cmake
- cmake -DCMAKE_CXX_COMPILER=$COMPILER $TRAVIS_BUILD_DIR/test/cmake/ -Dglm_DIR=$TRAVIS_BUILD_DIR/cmake/glm/
- cmake --build .
env: env:
- MATRIX_EVAL="INFO=C++14-pure-release" - MATRIX_EVAL="INFO=C++14-pure-release"
@ -83,6 +113,11 @@ matrix:
- cmake -DCMAKE_CXX_COMPILER=$COMPILER -DCMAKE_BUILD_TYPE=Release -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_14=ON -DGLM_TEST_ENABLE_LANG_EXTENSIONS=ON -DGLM_TEST_ENABLE_SIMD_SSE3=ON .. - cmake -DCMAKE_CXX_COMPILER=$COMPILER -DCMAKE_BUILD_TYPE=Release -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_14=ON -DGLM_TEST_ENABLE_LANG_EXTENSIONS=ON -DGLM_TEST_ENABLE_SIMD_SSE3=ON ..
- cmake -E time cmake --build . - cmake -E time cmake --build .
- ctest - ctest
- cd $TRAVIS_BUILD_DIR
- mkdir ./build_test_cmake
- cd ./build_test_cmake
- cmake -DCMAKE_CXX_COMPILER=$COMPILER $TRAVIS_BUILD_DIR/test/cmake/ -Dglm_DIR=$TRAVIS_BUILD_DIR/cmake/glm/
- cmake --build .
env: env:
- MATRIX_EVAL="INFO=C++14-sse3-release" - MATRIX_EVAL="INFO=C++14-sse3-release"
@ -95,6 +130,11 @@ matrix:
- cmake -DCMAKE_CXX_COMPILER=$COMPILER -DCMAKE_BUILD_TYPE=Release -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_14=ON -DGLM_TEST_ENABLE_LANG_EXTENSIONS=ON -DGLM_TEST_ENABLE_SIMD_AVX=ON .. - cmake -DCMAKE_CXX_COMPILER=$COMPILER -DCMAKE_BUILD_TYPE=Release -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_14=ON -DGLM_TEST_ENABLE_LANG_EXTENSIONS=ON -DGLM_TEST_ENABLE_SIMD_AVX=ON ..
- cmake -E time cmake --build . - cmake -E time cmake --build .
- ctest - ctest
- cd $TRAVIS_BUILD_DIR
- mkdir ./build_test_cmake
- cd ./build_test_cmake
- cmake -DCMAKE_CXX_COMPILER=$COMPILER $TRAVIS_BUILD_DIR/test/cmake/ -Dglm_DIR=$TRAVIS_BUILD_DIR/cmake/glm/
- cmake --build .
env: env:
- MATRIX_EVAL="INFO=C++14-avx-release" - MATRIX_EVAL="INFO=C++14-avx-release"
@ -107,6 +147,11 @@ matrix:
- cmake -DCMAKE_CXX_COMPILER=$COMPILER -DCMAKE_BUILD_TYPE=Debug -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_14=ON -DGLM_TEST_ENABLE_LANG_EXTENSIONS=ON -DGLM_TEST_ENABLE_SIMD_AVX=ON .. - cmake -DCMAKE_CXX_COMPILER=$COMPILER -DCMAKE_BUILD_TYPE=Debug -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_14=ON -DGLM_TEST_ENABLE_LANG_EXTENSIONS=ON -DGLM_TEST_ENABLE_SIMD_AVX=ON ..
- cmake -E time cmake --build . - cmake -E time cmake --build .
- ctest - ctest
- cd $TRAVIS_BUILD_DIR
- mkdir ./build_test_cmake
- cd ./build_test_cmake
- cmake -DCMAKE_CXX_COMPILER=$COMPILER $TRAVIS_BUILD_DIR/test/cmake/ -Dglm_DIR=$TRAVIS_BUILD_DIR/cmake/glm/
- cmake --build .
env: env:
- MATRIX_EVAL="INFO=C++14-avx-debug" - MATRIX_EVAL="INFO=C++14-avx-debug"
@ -119,6 +164,11 @@ matrix:
- cmake -DCMAKE_CXX_COMPILER=$COMPILER -DCMAKE_BUILD_TYPE=Release -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_17=ON -DGLM_TEST_FORCE_PURE=ON .. - cmake -DCMAKE_CXX_COMPILER=$COMPILER -DCMAKE_BUILD_TYPE=Release -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_17=ON -DGLM_TEST_FORCE_PURE=ON ..
- cmake -E time cmake --build . - cmake -E time cmake --build .
- ctest - ctest
- cd $TRAVIS_BUILD_DIR
- mkdir ./build_test_cmake
- cd ./build_test_cmake
- cmake -DCMAKE_CXX_COMPILER=$COMPILER $TRAVIS_BUILD_DIR/test/cmake/ -Dglm_DIR=$TRAVIS_BUILD_DIR/cmake/glm/
- cmake --build .
env: env:
- MATRIX_EVAL="INFO=C++17-pure-release" - MATRIX_EVAL="INFO=C++17-pure-release"
@ -131,6 +181,11 @@ matrix:
- cmake -DCMAKE_CXX_COMPILER=$COMPILER -DCMAKE_BUILD_TYPE=Debug -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_17=ON -DGLM_TEST_FORCE_PURE=ON .. - cmake -DCMAKE_CXX_COMPILER=$COMPILER -DCMAKE_BUILD_TYPE=Debug -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_17=ON -DGLM_TEST_FORCE_PURE=ON ..
- cmake -E time cmake --build . - cmake -E time cmake --build .
- ctest - ctest
- cd $TRAVIS_BUILD_DIR
- mkdir ./build_test_cmake
- cd ./build_test_cmake
- cmake -DCMAKE_CXX_COMPILER=$COMPILER $TRAVIS_BUILD_DIR/test/cmake/ -Dglm_DIR=$TRAVIS_BUILD_DIR/cmake/glm/
- cmake --build .
env: env:
- MATRIX_EVAL="INFO=C++17-pure-debug" - MATRIX_EVAL="INFO=C++17-pure-debug"
@ -143,6 +198,11 @@ matrix:
- cmake -DCMAKE_CXX_COMPILER=$COMPILER -DCMAKE_BUILD_TYPE=Release -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_17=ON -DGLM_TEST_ENABLE_LANG_EXTENSIONS=ON -DGLM_TEST_ENABLE_SIMD_AVX=ON .. - cmake -DCMAKE_CXX_COMPILER=$COMPILER -DCMAKE_BUILD_TYPE=Release -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_17=ON -DGLM_TEST_ENABLE_LANG_EXTENSIONS=ON -DGLM_TEST_ENABLE_SIMD_AVX=ON ..
- cmake -E time cmake --build . - cmake -E time cmake --build .
- ctest - ctest
- cd $TRAVIS_BUILD_DIR
- mkdir ./build_test_cmake
- cd ./build_test_cmake
- cmake -DCMAKE_CXX_COMPILER=$COMPILER $TRAVIS_BUILD_DIR/test/cmake/ -Dglm_DIR=$TRAVIS_BUILD_DIR/cmake/glm/
- cmake --build .
env: env:
- MATRIX_EVAL="INFO=C++17-avx-release" - MATRIX_EVAL="INFO=C++17-avx-release"
@ -155,6 +215,11 @@ matrix:
- cmake -DCMAKE_CXX_COMPILER=$COMPILER -DCMAKE_BUILD_TYPE=Debug -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_17=ON -DGLM_TEST_ENABLE_LANG_EXTENSIONS=ON -DGLM_TEST_ENABLE_SIMD_AVX=ON .. - cmake -DCMAKE_CXX_COMPILER=$COMPILER -DCMAKE_BUILD_TYPE=Debug -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_17=ON -DGLM_TEST_ENABLE_LANG_EXTENSIONS=ON -DGLM_TEST_ENABLE_SIMD_AVX=ON ..
- cmake -E time cmake --build . - cmake -E time cmake --build .
- ctest - ctest
- cd $TRAVIS_BUILD_DIR
- mkdir ./build_test_cmake
- cd ./build_test_cmake
- cmake -DCMAKE_CXX_COMPILER=$COMPILER $TRAVIS_BUILD_DIR/test/cmake/ -Dglm_DIR=$TRAVIS_BUILD_DIR/cmake/glm/
- cmake --build .
env: env:
- MATRIX_EVAL="INFO=C++17-avx-debug" - MATRIX_EVAL="INFO=C++17-avx-debug"
@ -174,6 +239,11 @@ matrix:
- cmake -DCMAKE_CXX_COMPILER=$COMPILER -DCMAKE_BUILD_TYPE=Release -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_98=ON -DGLM_TEST_FORCE_PURE=ON .. - cmake -DCMAKE_CXX_COMPILER=$COMPILER -DCMAKE_BUILD_TYPE=Release -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_98=ON -DGLM_TEST_FORCE_PURE=ON ..
- cmake --build . - cmake --build .
- ctest - ctest
- cd $TRAVIS_BUILD_DIR
- mkdir ./build_test_cmake
- cd ./build_test_cmake
- cmake -DCMAKE_CXX_COMPILER=$COMPILER $TRAVIS_BUILD_DIR/test/cmake/ -Dglm_DIR=$TRAVIS_BUILD_DIR/cmake/glm/
- cmake --build .
- os: linux - os: linux
addons: addons:
@ -191,6 +261,11 @@ matrix:
- cmake -DCMAKE_CXX_COMPILER=$COMPILER -DCMAKE_BUILD_TYPE=Debug -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_98=ON -DGLM_TEST_FORCE_PURE=ON .. - cmake -DCMAKE_CXX_COMPILER=$COMPILER -DCMAKE_BUILD_TYPE=Debug -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_98=ON -DGLM_TEST_FORCE_PURE=ON ..
- cmake --build . - cmake --build .
- ctest - ctest
- cd $TRAVIS_BUILD_DIR
- mkdir ./build_test_cmake
- cd ./build_test_cmake
- cmake -DCMAKE_CXX_COMPILER=$COMPILER $TRAVIS_BUILD_DIR/test/cmake/ -Dglm_DIR=$TRAVIS_BUILD_DIR/cmake/glm/
- cmake --build .
- os: linux - os: linux
addons: addons:
@ -208,6 +283,11 @@ matrix:
- cmake -DCMAKE_CXX_COMPILER=$COMPILER -DCMAKE_BUILD_TYPE=Release -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_98=ON -DGLM_TEST_ENABLE_LANG_EXTENSIONS=ON -DGLM_TEST_FORCE_PURE=ON .. - cmake -DCMAKE_CXX_COMPILER=$COMPILER -DCMAKE_BUILD_TYPE=Release -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_98=ON -DGLM_TEST_ENABLE_LANG_EXTENSIONS=ON -DGLM_TEST_FORCE_PURE=ON ..
- cmake --build . - cmake --build .
- ctest - ctest
- cd $TRAVIS_BUILD_DIR
- mkdir ./build_test_cmake
- cd ./build_test_cmake
- cmake -DCMAKE_CXX_COMPILER=$COMPILER $TRAVIS_BUILD_DIR/test/cmake/ -Dglm_DIR=$TRAVIS_BUILD_DIR/cmake/glm/
- cmake --build .
- os: linux - os: linux
addons: addons:
@ -225,6 +305,11 @@ matrix:
- cmake -DCMAKE_CXX_COMPILER=$COMPILER -DCMAKE_BUILD_TYPE=Release -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_11=ON -DGLM_TEST_FORCE_PURE=ON .. - cmake -DCMAKE_CXX_COMPILER=$COMPILER -DCMAKE_BUILD_TYPE=Release -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_11=ON -DGLM_TEST_FORCE_PURE=ON ..
- cmake --build . - cmake --build .
- ctest - ctest
- cd $TRAVIS_BUILD_DIR
- mkdir ./build_test_cmake
- cd ./build_test_cmake
- cmake -DCMAKE_CXX_COMPILER=$COMPILER $TRAVIS_BUILD_DIR/test/cmake/ -Dglm_DIR=$TRAVIS_BUILD_DIR/cmake/glm/
- cmake --build .
- os: linux - os: linux
addons: addons:
@ -242,6 +327,11 @@ matrix:
- cmake -DCMAKE_CXX_COMPILER=$COMPILER -DCMAKE_BUILD_TYPE=Release -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_11=ON -DGLM_TEST_FORCE_PURE=ON .. - cmake -DCMAKE_CXX_COMPILER=$COMPILER -DCMAKE_BUILD_TYPE=Release -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_11=ON -DGLM_TEST_FORCE_PURE=ON ..
- cmake --build . - cmake --build .
- ctest - ctest
- cd $TRAVIS_BUILD_DIR
- mkdir ./build_test_cmake
- cd ./build_test_cmake
- cmake -DCMAKE_CXX_COMPILER=$COMPILER $TRAVIS_BUILD_DIR/test/cmake/ -Dglm_DIR=$TRAVIS_BUILD_DIR/cmake/glm/
- cmake --build .
- os: linux - os: linux
addons: addons:
@ -259,6 +349,11 @@ matrix:
- cmake -DCMAKE_CXX_COMPILER=$COMPILER -DCMAKE_BUILD_TYPE=Release -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_11=ON -DGLM_TEST_ENABLE_LANG_EXTENSIONS=ON -DGLM_TEST_FORCE_PURE=ON .. - cmake -DCMAKE_CXX_COMPILER=$COMPILER -DCMAKE_BUILD_TYPE=Release -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_11=ON -DGLM_TEST_ENABLE_LANG_EXTENSIONS=ON -DGLM_TEST_FORCE_PURE=ON ..
- cmake --build . - cmake --build .
- ctest - ctest
- cd $TRAVIS_BUILD_DIR
- mkdir ./build_test_cmake
- cd ./build_test_cmake
- cmake -DCMAKE_CXX_COMPILER=$COMPILER $TRAVIS_BUILD_DIR/test/cmake/ -Dglm_DIR=$TRAVIS_BUILD_DIR/cmake/glm/
- cmake --build .
- os: linux - os: linux
addons: addons:
@ -276,6 +371,11 @@ matrix:
- cmake -DCMAKE_CXX_COMPILER=$COMPILER -DCMAKE_BUILD_TYPE=Release -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_11=ON -DGLM_TEST_ENABLE_LANG_EXTENSIONS=ON -DGLM_TEST_ENABLE_SIMD_SSE3=ON .. - cmake -DCMAKE_CXX_COMPILER=$COMPILER -DCMAKE_BUILD_TYPE=Release -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_11=ON -DGLM_TEST_ENABLE_LANG_EXTENSIONS=ON -DGLM_TEST_ENABLE_SIMD_SSE3=ON ..
- cmake --build . - cmake --build .
- ctest - ctest
- cd $TRAVIS_BUILD_DIR
- mkdir ./build_test_cmake
- cd ./build_test_cmake
- cmake -DCMAKE_CXX_COMPILER=$COMPILER $TRAVIS_BUILD_DIR/test/cmake/ -Dglm_DIR=$TRAVIS_BUILD_DIR/cmake/glm/
- cmake --build .
- os: linux - os: linux
addons: addons:
@ -293,6 +393,11 @@ matrix:
- cmake -DCMAKE_CXX_COMPILER=$COMPILER -DCMAKE_BUILD_TYPE=Release -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_14=ON -DGLM_TEST_FORCE_PURE=ON .. - cmake -DCMAKE_CXX_COMPILER=$COMPILER -DCMAKE_BUILD_TYPE=Release -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_14=ON -DGLM_TEST_FORCE_PURE=ON ..
- cmake --build . - cmake --build .
- ctest - ctest
- cd $TRAVIS_BUILD_DIR
- mkdir ./build_test_cmake
- cd ./build_test_cmake
- cmake -DCMAKE_CXX_COMPILER=$COMPILER $TRAVIS_BUILD_DIR/test/cmake/ -Dglm_DIR=$TRAVIS_BUILD_DIR/cmake/glm/
- cmake --build .
- os: linux - os: linux
addons: addons:
@ -310,6 +415,11 @@ matrix:
- cmake -DCMAKE_CXX_COMPILER=$COMPILER -DCMAKE_BUILD_TYPE=Release -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_14=ON -DGLM_TEST_FORCE_PURE=ON .. - cmake -DCMAKE_CXX_COMPILER=$COMPILER -DCMAKE_BUILD_TYPE=Release -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_14=ON -DGLM_TEST_FORCE_PURE=ON ..
- cmake --build . - cmake --build .
- ctest - ctest
- cd $TRAVIS_BUILD_DIR
- mkdir ./build_test_cmake
- cd ./build_test_cmake
- cmake -DCMAKE_CXX_COMPILER=$COMPILER $TRAVIS_BUILD_DIR/test/cmake/ -Dglm_DIR=$TRAVIS_BUILD_DIR/cmake/glm/
- cmake --build .
- os: linux - os: linux
addons: addons:
@ -327,6 +437,11 @@ matrix:
- cmake -DCMAKE_CXX_COMPILER=$COMPILER -DCMAKE_BUILD_TYPE=Release -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_14=ON -DGLM_TEST_ENABLE_LANG_EXTENSIONS=ON -DGLM_TEST_FORCE_PURE=ON .. - cmake -DCMAKE_CXX_COMPILER=$COMPILER -DCMAKE_BUILD_TYPE=Release -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_14=ON -DGLM_TEST_ENABLE_LANG_EXTENSIONS=ON -DGLM_TEST_FORCE_PURE=ON ..
- cmake --build . - cmake --build .
- ctest - ctest
- cd $TRAVIS_BUILD_DIR
- mkdir ./build_test_cmake
- cd ./build_test_cmake
- cmake -DCMAKE_CXX_COMPILER=$COMPILER $TRAVIS_BUILD_DIR/test/cmake/ -Dglm_DIR=$TRAVIS_BUILD_DIR/cmake/glm/
- cmake --build .
- os: linux - os: linux
addons: addons:
@ -344,6 +459,11 @@ matrix:
- cmake -DCMAKE_CXX_COMPILER=$COMPILER -DCMAKE_BUILD_TYPE=Release -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_14=ON -DGLM_TEST_ENABLE_LANG_EXTENSIONS=ON -DGLM_TEST_ENABLE_SIMD_SSE3=ON .. - cmake -DCMAKE_CXX_COMPILER=$COMPILER -DCMAKE_BUILD_TYPE=Release -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_14=ON -DGLM_TEST_ENABLE_LANG_EXTENSIONS=ON -DGLM_TEST_ENABLE_SIMD_SSE3=ON ..
- cmake --build . - cmake --build .
- ctest - ctest
- cd $TRAVIS_BUILD_DIR
- mkdir ./build_test_cmake
- cd ./build_test_cmake
- cmake -DCMAKE_CXX_COMPILER=$COMPILER $TRAVIS_BUILD_DIR/test/cmake/ -Dglm_DIR=$TRAVIS_BUILD_DIR/cmake/glm/
- cmake --build .
- os: linux - os: linux
addons: addons:
@ -361,6 +481,11 @@ matrix:
- cmake -DCMAKE_CXX_COMPILER=$COMPILER -DCMAKE_BUILD_TYPE=Release -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_17=ON -DGLM_TEST_FORCE_PURE=ON .. - cmake -DCMAKE_CXX_COMPILER=$COMPILER -DCMAKE_BUILD_TYPE=Release -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_17=ON -DGLM_TEST_FORCE_PURE=ON ..
- cmake -E time cmake --build . - cmake -E time cmake --build .
- ctest - ctest
- cd $TRAVIS_BUILD_DIR
- mkdir ./build_test_cmake
- cd ./build_test_cmake
- cmake -DCMAKE_CXX_COMPILER=$COMPILER $TRAVIS_BUILD_DIR/test/cmake/ -Dglm_DIR=$TRAVIS_BUILD_DIR/cmake/glm/
- cmake --build .
- os: linux - os: linux
addons: addons:
@ -378,6 +503,11 @@ matrix:
- cmake -DCMAKE_CXX_COMPILER=$COMPILER -DCMAKE_BUILD_TYPE=Release -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_17=ON -DGLM_TEST_ENABLE_LANG_EXTENSIONS=ON -DGLM_TEST_ENABLE_SIMD_SSE2=ON .. - cmake -DCMAKE_CXX_COMPILER=$COMPILER -DCMAKE_BUILD_TYPE=Release -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_17=ON -DGLM_TEST_ENABLE_LANG_EXTENSIONS=ON -DGLM_TEST_ENABLE_SIMD_SSE2=ON ..
- cmake -E time cmake --build . - cmake -E time cmake --build .
- ctest - ctest
- cd $TRAVIS_BUILD_DIR
- mkdir ./build_test_cmake
- cd ./build_test_cmake
- cmake -DCMAKE_CXX_COMPILER=$COMPILER $TRAVIS_BUILD_DIR/test/cmake/ -Dglm_DIR=$TRAVIS_BUILD_DIR/cmake/glm/
- cmake --build .
- os: linux - os: linux
addons: addons:
@ -395,6 +525,11 @@ matrix:
- cmake -DCMAKE_CXX_COMPILER=$COMPILER -DCMAKE_BUILD_TYPE=Release -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_17=ON -DGLM_TEST_ENABLE_LANG_EXTENSIONS=ON -DGLM_TEST_ENABLE_SIMD_SSE3=ON .. - cmake -DCMAKE_CXX_COMPILER=$COMPILER -DCMAKE_BUILD_TYPE=Release -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_17=ON -DGLM_TEST_ENABLE_LANG_EXTENSIONS=ON -DGLM_TEST_ENABLE_SIMD_SSE3=ON ..
- cmake -E time cmake --build . - cmake -E time cmake --build .
- ctest - ctest
- cd $TRAVIS_BUILD_DIR
- mkdir ./build_test_cmake
- cd ./build_test_cmake
- cmake -DCMAKE_CXX_COMPILER=$COMPILER $TRAVIS_BUILD_DIR/test/cmake/ -Dglm_DIR=$TRAVIS_BUILD_DIR/cmake/glm/
- cmake --build .
- os: linux - os: linux
addons: addons:
@ -412,6 +547,11 @@ matrix:
- cmake -DCMAKE_CXX_COMPILER=$COMPILER -DCMAKE_BUILD_TYPE=Release -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_17=ON -DGLM_TEST_ENABLE_LANG_EXTENSIONS=ON -DGLM_TEST_ENABLE_SIMD_AVX=ON .. - cmake -DCMAKE_CXX_COMPILER=$COMPILER -DCMAKE_BUILD_TYPE=Release -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_17=ON -DGLM_TEST_ENABLE_LANG_EXTENSIONS=ON -DGLM_TEST_ENABLE_SIMD_AVX=ON ..
- cmake -E time cmake --build . - cmake -E time cmake --build .
- ctest - ctest
- cd $TRAVIS_BUILD_DIR
- mkdir ./build_test_cmake
- cd ./build_test_cmake
- cmake -DCMAKE_CXX_COMPILER=$COMPILER $TRAVIS_BUILD_DIR/test/cmake/ -Dglm_DIR=$TRAVIS_BUILD_DIR/cmake/glm/
- cmake --build .
- os: linux - os: linux
addons: addons:
@ -429,6 +569,11 @@ matrix:
- cmake -DCMAKE_CXX_COMPILER=$COMPILER -DCMAKE_BUILD_TYPE=Release -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_17=ON -DGLM_TEST_ENABLE_LANG_EXTENSIONS=ON -DGLM_TEST_ENABLE_SIMD_AVX2=ON .. - cmake -DCMAKE_CXX_COMPILER=$COMPILER -DCMAKE_BUILD_TYPE=Release -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_17=ON -DGLM_TEST_ENABLE_LANG_EXTENSIONS=ON -DGLM_TEST_ENABLE_SIMD_AVX2=ON ..
- cmake -E time cmake --build . - cmake -E time cmake --build .
- ctest - ctest
- cd $TRAVIS_BUILD_DIR
- mkdir ./build_test_cmake
- cd ./build_test_cmake
- cmake -DCMAKE_CXX_COMPILER=$COMPILER $TRAVIS_BUILD_DIR/test/cmake/ -Dglm_DIR=$TRAVIS_BUILD_DIR/cmake/glm/
- cmake --build .
- os: linux - os: linux
addons: addons:
@ -447,6 +592,11 @@ matrix:
- cmake -DCMAKE_CXX_COMPILER=$COMPILER -DCMAKE_BUILD_TYPE=Release -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_14=ON -DGLM_TEST_FORCE_PURE=ON .. - cmake -DCMAKE_CXX_COMPILER=$COMPILER -DCMAKE_BUILD_TYPE=Release -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_14=ON -DGLM_TEST_FORCE_PURE=ON ..
- cmake -E time cmake --build . - cmake -E time cmake --build .
- ctest - ctest
- cd $TRAVIS_BUILD_DIR
- mkdir ./build_test_cmake
- cd ./build_test_cmake
- cmake -DCMAKE_CXX_COMPILER=$COMPILER $TRAVIS_BUILD_DIR/test/cmake/ -Dglm_DIR=$TRAVIS_BUILD_DIR/cmake/glm/
- cmake --build .
- os: linux - os: linux
addons: addons:
@ -465,6 +615,11 @@ matrix:
- cmake -DCMAKE_CXX_COMPILER=$COMPILER -DCMAKE_BUILD_TYPE=Debug -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_14=ON -DGLM_TEST_FORCE_PURE=ON .. - cmake -DCMAKE_CXX_COMPILER=$COMPILER -DCMAKE_BUILD_TYPE=Debug -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_14=ON -DGLM_TEST_FORCE_PURE=ON ..
- cmake -E time cmake --build . - cmake -E time cmake --build .
- ctest - ctest
- cd $TRAVIS_BUILD_DIR
- mkdir ./build_test_cmake
- cd ./build_test_cmake
- cmake -DCMAKE_CXX_COMPILER=$COMPILER $TRAVIS_BUILD_DIR/test/cmake/ -Dglm_DIR=$TRAVIS_BUILD_DIR/cmake/glm/
- cmake --build .
- os: linux - os: linux
addons: addons:
@ -483,11 +638,16 @@ matrix:
- cmake -DCMAKE_CXX_COMPILER=$COMPILER -DCMAKE_BUILD_TYPE=Debug -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_14=ON -DGLM_TEST_ENABLE_LANG_EXTENSIONS=ON -DGLM_TEST_ENABLE_SIMD_AVX=ON .. - cmake -DCMAKE_CXX_COMPILER=$COMPILER -DCMAKE_BUILD_TYPE=Debug -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_14=ON -DGLM_TEST_ENABLE_LANG_EXTENSIONS=ON -DGLM_TEST_ENABLE_SIMD_AVX=ON ..
- cmake -E time cmake --build . - cmake -E time cmake --build .
- ctest - ctest
- cd $TRAVIS_BUILD_DIR
- mkdir ./build_test_cmake
- cd ./build_test_cmake
- cmake -DCMAKE_CXX_COMPILER=$COMPILER $TRAVIS_BUILD_DIR/test/cmake/ -Dglm_DIR=$TRAVIS_BUILD_DIR/cmake/glm/
- cmake --build .
- os: linux - os: linux
dist: bionic dist: bionic
env: env:
- MATRIX_EVAL="CC=clang-7.0 && INFO=C++17-pure-release" - MATRIX_EVAL="CC=clang && CXX=clang++ && INFO=C++17-pure-release"
script: script:
- cmake --version - cmake --version
- mkdir ./build_pure_17_release - mkdir ./build_pure_17_release
@ -495,11 +655,16 @@ matrix:
- cmake -DCMAKE_CXX_COMPILER=$COMPILER -DCMAKE_BUILD_TYPE=Release -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_17=ON -DGLM_TEST_FORCE_PURE=ON .. - cmake -DCMAKE_CXX_COMPILER=$COMPILER -DCMAKE_BUILD_TYPE=Release -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_17=ON -DGLM_TEST_FORCE_PURE=ON ..
- cmake -E time cmake --build . - cmake -E time cmake --build .
- ctest - ctest
- cd $TRAVIS_BUILD_DIR
- mkdir ./build_test_cmake
- cd ./build_test_cmake
- cmake -DCMAKE_CXX_COMPILER=$COMPILER $TRAVIS_BUILD_DIR/test/cmake/ -Dglm_DIR=$TRAVIS_BUILD_DIR/cmake/glm/
- cmake --build .
- os: linux - os: linux
dist: bionic dist: bionic
env: env:
- MATRIX_EVAL="CC=clang-7.0 && INFO=C++17-pure-debug" - MATRIX_EVAL="CC=clang && CXX=clang++ && INFO=C++17-pure-debug"
script: script:
- cmake --version - cmake --version
- mkdir ./build_pure_17_debug - mkdir ./build_pure_17_debug
@ -507,11 +672,16 @@ matrix:
- cmake -DCMAKE_CXX_COMPILER=$COMPILER -DCMAKE_BUILD_TYPE=Debug -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_17=ON -DGLM_TEST_FORCE_PURE=ON .. - cmake -DCMAKE_CXX_COMPILER=$COMPILER -DCMAKE_BUILD_TYPE=Debug -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_17=ON -DGLM_TEST_FORCE_PURE=ON ..
- cmake -E time cmake --build . - cmake -E time cmake --build .
- ctest - ctest
- cd $TRAVIS_BUILD_DIR
- mkdir ./build_test_cmake
- cd ./build_test_cmake
- cmake -DCMAKE_CXX_COMPILER=$COMPILER $TRAVIS_BUILD_DIR/test/cmake/ -Dglm_DIR=$TRAVIS_BUILD_DIR/cmake/glm/
- cmake --build .
- os: linux - os: linux
dist: bionic dist: bionic
env: env:
- MATRIX_EVAL="CC=clang-7.0 && INFO=C++17-sse3-release" - MATRIX_EVAL="CC=clang && CXX=clang++ && INFO=C++17-sse3-release
script: script:
- cmake --version - cmake --version
- mkdir ./build_sse3_17_release - mkdir ./build_sse3_17_release
@ -519,11 +689,16 @@ matrix:
- cmake -DCMAKE_CXX_COMPILER=$COMPILER -DCMAKE_BUILD_TYPE=Release -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_17=ON -DGLM_TEST_ENABLE_LANG_EXTENSIONS=ON -DGLM_TEST_ENABLE_SIMD_SSE3=ON .. - cmake -DCMAKE_CXX_COMPILER=$COMPILER -DCMAKE_BUILD_TYPE=Release -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_17=ON -DGLM_TEST_ENABLE_LANG_EXTENSIONS=ON -DGLM_TEST_ENABLE_SIMD_SSE3=ON ..
- cmake -E time cmake --build . - cmake -E time cmake --build .
- ctest - ctest
- cd $TRAVIS_BUILD_DIR
- mkdir ./build_test_cmake
- cd ./build_test_cmake
- cmake -DCMAKE_CXX_COMPILER=$COMPILER $TRAVIS_BUILD_DIR/test/cmake/ -Dglm_DIR=$TRAVIS_BUILD_DIR/cmake/glm/
- cmake --build .
- os: linux - os: linux
dist: bionic dist: bionic
env: env:
- MATRIX_EVAL="CC=clang-7.0 && INFO=C++17-sse3-debug" - MATRIX_EVAL="CC=clang && CXX=clang++ && INFO=C++17-sse3-debug"
script: script:
- cmake --version - cmake --version
- mkdir ./build_sse3_17_debug - mkdir ./build_sse3_17_debug
@ -531,11 +706,16 @@ matrix:
- cmake -DCMAKE_CXX_COMPILER=$COMPILER -DCMAKE_BUILD_TYPE=Debug -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_17=ON -DGLM_TEST_ENABLE_LANG_EXTENSIONS=ON -DGLM_TEST_ENABLE_SIMD_SSE3=ON .. - cmake -DCMAKE_CXX_COMPILER=$COMPILER -DCMAKE_BUILD_TYPE=Debug -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_17=ON -DGLM_TEST_ENABLE_LANG_EXTENSIONS=ON -DGLM_TEST_ENABLE_SIMD_SSE3=ON ..
- cmake -E time cmake --build . - cmake -E time cmake --build .
- ctest - ctest
- cd $TRAVIS_BUILD_DIR
- mkdir ./build_test_cmake
- cd ./build_test_cmake
- cmake -DCMAKE_CXX_COMPILER=$COMPILER $TRAVIS_BUILD_DIR/test/cmake/ -Dglm_DIR=$TRAVIS_BUILD_DIR/cmake/glm/
- cmake --build .
- os: linux - os: linux
dist: bionic dist: bionic
env: env:
- MATRIX_EVAL="CC=clang-7.0 && INFO=C++17-ssse3-release" - MATRIX_EVAL="CC=clang && CXX=clang++ && INFO=C++17-ssse3-release"
script: script:
- cmake --version - cmake --version
- mkdir ./build_ssse3_17_release - mkdir ./build_ssse3_17_release
@ -543,6 +723,11 @@ matrix:
- cmake -DCMAKE_CXX_COMPILER=$COMPILER -DCMAKE_BUILD_TYPE=Release -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_17=ON -DGLM_TEST_ENABLE_LANG_EXTENSIONS=ON -DGLM_TEST_ENABLE_SIMD_SSSE3=ON .. - cmake -DCMAKE_CXX_COMPILER=$COMPILER -DCMAKE_BUILD_TYPE=Release -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_17=ON -DGLM_TEST_ENABLE_LANG_EXTENSIONS=ON -DGLM_TEST_ENABLE_SIMD_SSSE3=ON ..
- cmake -E time cmake --build . - cmake -E time cmake --build .
- ctest - ctest
- cd $TRAVIS_BUILD_DIR
- mkdir ./build_test_cmake
- cd ./build_test_cmake
- cmake -DCMAKE_CXX_COMPILER=$COMPILER $TRAVIS_BUILD_DIR/test/cmake/ -Dglm_DIR=$TRAVIS_BUILD_DIR/cmake/glm/
- cmake --build .
before_install: before_install:
- eval "${MATRIX_EVAL}" - eval "${MATRIX_EVAL}"

View File

@ -0,0 +1,13 @@
set(PACKAGE_VERSION 0.9.9)
if(${PACKAGE_FIND_VERSION_MAJOR} EQUAL 0)
if (${PACKAGE_FIND_VERSION} VERSION_LESS ${GLM_VERSION})
set(PACKAGE_VERSION_COMPATIBLE 1)
endif()
if(${PACKAGE_FIND_VERSION} VERSION_EQUAL ${GLM_VERSION})
set(PACKAGE_VERSION_EXACT 1)
endif()
else()
set(PACKAGE_VERSION_UNSUITABLE 1)
endif()

22
cmake/glm/glmConfig.cmake Normal file
View File

@ -0,0 +1,22 @@
cmake_minimum_required(VERSION 3.2 FATAL_ERROR)
cmake_policy(VERSION 3.2)
set(GLM_VERSION 0.9.9)
get_filename_component(_IMPORT_PREFIX "${CMAKE_CURRENT_LIST_FILE}" PATH)
get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH)
get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH)
if (_IMPORT_PREFIX STREQUAL "/")
set(_IMPORT_PREFIX "")
endif()
# Set the old GLM_INCLUDE_DIRS variable for backwards compatibility
set(GLM_INCLUDE_DIRS ${_IMPORT_PREFIX})
add_library(glm::glm INTERFACE IMPORTED)
set_target_properties(glm::glm PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES ${GLM_INCLUDE_DIRS})
mark_as_advanced(glm_DIR)
set(_IMPORT_PREFIX)

View File

@ -14,6 +14,7 @@
+ [1.2. Using separated headers](#section1_2) + [1.2. Using separated headers](#section1_2)
+ [1.3. Using extension headers](#section1_3) + [1.3. Using extension headers](#section1_3)
+ [1.4. Dependencies](#section1_4) + [1.4. Dependencies](#section1_4)
+ [1.5. Finding GLM with CMake](#section1_5)
+ [2. Preprocessor configurations](#section2) + [2. Preprocessor configurations](#section2)
+ [2.1. GLM\_FORCE\_MESSAGES: Platform auto detection and default configuration](#section2_1) + [2.1. GLM\_FORCE\_MESSAGES: Platform auto detection and default configuration](#section2_1)
+ [2.2. GLM\_FORCE\_PLATFORM\_UNKNOWN: Force GLM to no detect the build platform](#section2_2) + [2.2. GLM\_FORCE\_PLATFORM\_UNKNOWN: Force GLM to no detect the build platform](#section2_2)
@ -274,6 +275,10 @@ glm::mat4 transform(glm::vec2 const& Orientation, glm::vec3 const& Translate, gl
GLM does not depend on external libraries or headers such as `<GL/gl.h>`, [`<GL/glcorearb.h>`](http://www.opengl.org/registry/api/GL/glcorearb.h), `<GLES3/gl3.h>`, `<GL/glu.h>`, or `<windows.h>`. GLM does not depend on external libraries or headers such as `<GL/gl.h>`, [`<GL/glcorearb.h>`](http://www.opengl.org/registry/api/GL/glcorearb.h), `<GLES3/gl3.h>`, `<GL/glu.h>`, or `<windows.h>`.
### <a name="section1_5"></a> 1.5. Finding GLM with CMake
GLM packages a `glmConfig.cmake` and `glmConfig-version.cmake` in the root of the repository and the release archives. To find GLM with CMake you can pass `-Dglm_DIR=<path to glm root>/cmake/glm/` when running CMake. You can then either add `${GLM_INCLUDE_DIRS}` to your target's include directories, or link against the imported `glm::glm` target.
--- ---
<div style="page-break-after: always;"> </div> <div style="page-break-after: always;"> </div>

View File

@ -0,0 +1,8 @@
cmake_minimum_required(VERSION 3.2 FATAL_ERROR)
project(test_find_glm)
find_package(glm REQUIRED)
add_executable(test_find_glm test_find_glm.cpp)
target_link_libraries(test_find_glm glm::glm)

View File

@ -0,0 +1,22 @@
#include <iostream>
#include <glm/glm.hpp>
#include <glm/ext.hpp>
glm::mat4 camera(float Translate, glm::vec2 const& Rotate)
{
glm::mat4 Projection = glm::perspective(glm::pi<float>() * 0.25f, 4.0f / 3.0f, 0.1f, 100.f);
glm::mat4 View = glm::translate(glm::mat4(1.0f), glm::vec3(0.0f, 0.0f, -Translate));
View = glm::rotate(View, Rotate.y, glm::vec3(-1.0f, 0.0f, 0.0f));
View = glm::rotate(View, Rotate.x, glm::vec3(0.0f, 1.0f, 0.0f));
glm::mat4 Model = glm::scale(glm::mat4(1.0f), glm::vec3(0.5f));
return Projection * View * Model;
}
int main()
{
const glm::mat4 m = camera(1.f, glm::vec2(1.f, 0.5f));
std::cout << "matrix diagonal: " << m[0][0] << ", "
<< m[1][1] << ", " << m[2][2] << ", " << m[3][3] << "\n";
return 0;
}