From 0ea174f0dd82347fe7ecefb7796ed677b37779b2 Mon Sep 17 00:00:00 2001 From: ISSOtm Date: Thu, 7 Mar 2024 01:35:41 +0100 Subject: [PATCH] Stop explicitly passing zlib/libpng path to CMake in Windows CI Turns out CMake auto-detects the libs just fine from the `CMAKE_INSTALL_PREFIX`, and `PNG_BUILD_ZLIB` was actually breaking things. --- .github/workflows/create-release-artifacts.yml | 4 ++-- .github/workflows/testing.yml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/create-release-artifacts.yml b/.github/workflows/create-release-artifacts.yml index 049dc6d0..602e31b9 100644 --- a/.github/workflows/create-release-artifacts.yml +++ b/.github/workflows/create-release-artifacts.yml @@ -45,7 +45,7 @@ jobs: - name: Build libpng shell: bash run: | - cmake -S libpng -B pngbuild -A ${{ matrix.platform }} -Wno-dev -DCMAKE_INSTALL_PREFIX=install_dir -DPNG_SHARED=ON -DPNG_STATIC=OFF -DPNG_TESTS=OFF -DPNG_BUILD_ZLIB=ON -DZLIB_INCLUDE_DIR="$PWD"/install_dir/include -DZLIB_LIBRARY="$PWD"/install_dir/lib/zlib.lib + cmake -S libpng -B pngbuild -A ${{ matrix.platform }} -Wno-dev -DCMAKE_INSTALL_PREFIX=install_dir -DPNG_SHARED=ON -DPNG_STATIC=OFF -DPNG_TESTS=OFF cmake --build pngbuild --config Release -j if: steps.cache.outputs.cache-hit != 'true' - name: Install libpng @@ -54,7 +54,7 @@ jobs: - name: Build Windows binaries shell: bash run: | - cmake -S . -B build -A ${{ matrix.platform }} -DCMAKE_INSTALL_PREFIX=install_dir -DCMAKE_BUILD_TYPE=Release -DZLIB_LIBRARY="$PWD"/install_dir/lib/zlib.lib -DZLIB_INCLUDE_DIR="$PWD"/install_dir/include -DPNG_LIBRARY="$PWD"/install_dir/lib/libpng16.lib -DPNG_INCLUDE_DIR="$PWD"/install_dir/include + cmake -S . -B build -A ${{ matrix.platform }} -DCMAKE_INSTALL_PREFIX=install_dir -DCMAKE_BUILD_TYPE=Release cmake --build build --config Release -j --verbose cmake --install build --verbose --prefix install_dir --strip - name: Package binaries diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index 70c71973..fd70f06c 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -172,7 +172,7 @@ jobs: - name: Build libpng shell: bash run: | - cmake -S libpng -B pngbuild -A ${{ matrix.platform }} -Wno-dev -DCMAKE_INSTALL_PREFIX=install_dir -DPNG_SHARED=ON -DPNG_STATIC=OFF -DPNG_TESTS=OFF -DPNG_BUILD_ZLIB=ON -DZLIB_INCLUDE_DIR="$PWD"/install_dir/include -DZLIB_LIBRARY="$PWD"/install_dir/lib/zlib.lib + cmake -S libpng -B pngbuild -A ${{ matrix.platform }} -Wno-dev -DCMAKE_INSTALL_PREFIX=install_dir -DPNG_SHARED=ON -DPNG_STATIC=OFF -DPNG_TESTS=OFF cmake --build pngbuild --config Release -j if: steps.cache.outputs.cache-hit != 'true' - name: Install libpng @@ -181,7 +181,7 @@ jobs: - name: Build Windows binaries shell: bash run: | - cmake -S . -B build -A ${{ matrix.platform }} -DCMAKE_INSTALL_PREFIX=install_dir -DCMAKE_BUILD_TYPE=Release -DZLIB_LIBRARY="$PWD"/install_dir/lib/zlib.lib -DZLIB_INCLUDE_DIR="$PWD"/install_dir/include -DPNG_LIBRARY="$PWD"/install_dir/lib/libpng16.lib -DPNG_INCLUDE_DIR="$PWD"/install_dir/include + cmake -S . -B build -A ${{ matrix.platform }} -DCMAKE_INSTALL_PREFIX=install_dir -DCMAKE_BUILD_TYPE=Release cmake --build build --config Release -j --verbose cmake --install build --verbose --prefix install_dir cmake --install build --verbose --component "Test support programs"