mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 18:22:07 +00:00
Avoid building test support programs by default with CMake (#1244)
Copy CMake-built test executables to test directory Fixes CI failures on Windows. CI should also have failed on Unices, but it turns out we instead merely hit the fallback that the `make` path relies on (building those executables with `make`), which fails on Windows since `make` is not set up to find libpng.
This commit is contained in:
2
.github/workflows/testing.yml
vendored
2
.github/workflows/testing.yml
vendored
@@ -41,6 +41,7 @@ jobs:
|
|||||||
cmake --build build -j --verbose
|
cmake --build build -j --verbose
|
||||||
cp build/src/rgb{asm,link,fix,gfx} .
|
cp build/src/rgb{asm,link,fix,gfx} .
|
||||||
sudo cmake --install build --verbose
|
sudo cmake --install build --verbose
|
||||||
|
cmake --install build --verbose --component "Test support programs"
|
||||||
- name: Package binaries
|
- name: Package binaries
|
||||||
run: |
|
run: |
|
||||||
mkdir bins
|
mkdir bins
|
||||||
@@ -122,6 +123,7 @@ jobs:
|
|||||||
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 -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 --build build --config Release -j --verbose
|
cmake --build build --config Release -j --verbose
|
||||||
cmake --install build --verbose --prefix install_dir
|
cmake --install build --verbose --prefix install_dir
|
||||||
|
cmake --install build --verbose --component "Test support programs"
|
||||||
- name: Package binaries
|
- name: Package binaries
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ add_executable(randtilegen gfx/randtilegen.cpp)
|
|||||||
|
|
||||||
add_executable(rgbgfx_test gfx/rgbgfx_test.cpp)
|
add_executable(rgbgfx_test gfx/rgbgfx_test.cpp)
|
||||||
|
|
||||||
install(TARGETS randtilegen rgbgfx_test DESTINATION ${rgbds_SOURCE_DIR}/test/gfx)
|
install(TARGETS randtilegen rgbgfx_test DESTINATION ${rgbds_SOURCE_DIR}/test/gfx COMPONENT "Test support programs" EXCLUDE_FROM_ALL)
|
||||||
|
|
||||||
foreach(TARGET randtilegen rgbgfx_test)
|
foreach(TARGET randtilegen rgbgfx_test)
|
||||||
if(LIBPNG_FOUND) # pkg-config
|
if(LIBPNG_FOUND) # pkg-config
|
||||||
|
|||||||
Reference in New Issue
Block a user