From 1026fcda6a4091b6cd53f57b27c465042f7d06ba Mon Sep 17 00:00:00 2001 From: Jacob Heider Date: Wed, 24 Jan 2024 14:13:46 -0500 Subject: [PATCH] fix(glm) v1.0.0 stuff closes #4967 --- projects/glm.g-truc.net/package.yml | 63 ++++++++++++++--------------- 1 file changed, 30 insertions(+), 33 deletions(-) diff --git a/projects/glm.g-truc.net/package.yml b/projects/glm.g-truc.net/package.yml index fe3556c0..ab7c2721 100644 --- a/projects/glm.g-truc.net/package.yml +++ b/projects/glm.g-truc.net/package.yml @@ -1,5 +1,7 @@ distributable: - url: https://github.com/g-truc/glm/releases/download/{{version}}/glm-{{version}}.zip + - url: https://github.com/g-truc/glm/releases/download/{{version.tag}}/glm-{{version.tag}}.zip + # v1.0.0 added -light + - url: https://github.com/g-truc/glm/releases/download/{{version.tag}}/glm-{{version.tag}}-light.zip versions: github: g-truc/glm @@ -7,24 +9,21 @@ versions: build: dependencies: cmake.org: ^3 - working-directory: glm/build + working-directory: glm script: - - cmake .. $ARGS - - make --jobs {{ hw.concurrency }} - - run: | - mkdir -p {{prefix}}/include {{prefix}}/lib/pkgconfig - rm glm/CMakeLists.txt - mv glm {{prefix}}/include - mv cmake/glm {{prefix}}/lib/cmake + - cmake -S . -B build $ARGS + - cmake --build build -- all - cp $SRCROOT/props/glm.pc {{prefix}}/lib/pkgconfig - echo 'Version: {{version}}' >> {{prefix}}/lib/pkgconfig/glm.pc - working-directory: .. + - mkdir -p {{prefix}}/include {{prefix}}/lib/pkgconfig + - cp -a detail ext gtc gtx simd *.hpp '{{prefix}}/include' + - run: ln -s . glm + working-directory: '{{prefix}}/include' env: ARGS: - -DCMAKE_INSTALL_PREFIX={{prefix}} - -DCMAKE_BUILD_TYPE=Release - -DCMAKE_VERBOSE_MAKEFILE=ON + - -DBUILD_SHARED_LIBS=ON CXXFLAGS: - -std=c++17 # or fails to build with clang 15 @@ -38,25 +37,23 @@ build: CXXFLAGS: - -fPIC -# runtime: -# env: -# CPATH: /usr/include/c++ - test: - fixture: | - #include // glm::vec2 - int main() { - std::size_t const VertexCount = 4; - std::size_t const PositionSizeF32 = VertexCount * sizeof(glm::vec2); - glm::vec2 const PositionDataF32[VertexCount] = { - glm::vec2(-1.0f,-1.0f), - glm::vec2( 1.0f,-1.0f), - glm::vec2( 1.0f, 1.0f), - glm::vec2(-1.0f, 1.0f) - }; - return 0; - } - script: | - mv $FIXTURE b.cpp - c++ b.cpp - ./a.out + script: + - run: c++ $FIXTURE + fixture: + extname: cpp + content: | + #include // glm::vec2 + int main() { + std::size_t const VertexCount = 4; + std::size_t const PositionSizeF32 = VertexCount * sizeof(glm::vec2); + glm::vec2 const PositionDataF32[VertexCount] = { + glm::vec2(-1.0f,-1.0f), + glm::vec2( 1.0f,-1.0f), + glm::vec2( 1.0f, 1.0f), + glm::vec2(-1.0f, 1.0f) + }; + return 0; + } + + - ./a.out