From c3422dc634937ee3269c0db723ff857457ca4cb7 Mon Sep 17 00:00:00 2001 From: Xerbo Date: Fri, 9 Oct 2020 22:21:37 +0100 Subject: [PATCH] Hopefully fix windows build Run in debug now instead of release to ignore warnings and use a glob to find the DLL's instead of hard coding their paths --- .github/workflows/win_debug.yml | 2 +- CMakeLists.txt | 3 ++- build_windows.sh | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/win_debug.yml b/.github/workflows/win_debug.yml index 7b70285..79c06b2 100644 --- a/.github/workflows/win_debug.yml +++ b/.github/workflows/win_debug.yml @@ -27,4 +27,4 @@ jobs: uses: actions/upload-artifact@v2 with: name: Debug build - path: ${{runner.workspace}}/winbuild/aptdec-1.7.0.zip + path: ${{runner.workspace}}/aptdec/winbuild/aptdec-1.7.0.zip diff --git a/CMakeLists.txt b/CMakeLists.txt index f24b9d3..19bec16 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -53,7 +53,8 @@ else() set(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}") install(TARGETS aptdec DESTINATION "bin/") - install(FILES libpng16.dll sndfile.dll libzlib.dll DESTINATION "bin/") + file(GLOB_RECURSE DLLS *.dll) + install(FILES ${DLLS} DESTINATION "bin/") install(DIRECTORY "${PROJECT_SOURCE_DIR}/palettes/" DESTINATION "palettes/") endif() diff --git a/build_windows.sh b/build_windows.sh index ecf84f6..1518223 100755 --- a/build_windows.sh +++ b/build_windows.sh @@ -42,6 +42,6 @@ cp $TEMP_PATH/bin/*.dll ../ # Build aptdec mkdir -p winbuild && cd winbuild -cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=../cmake/toolchain-mingw32.cmake -DCMAKE_INSTALL_PREFIX=$TEMP_PATH .. +cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_TOOLCHAIN_FILE=../cmake/toolchain-mingw32.cmake -DCMAKE_INSTALL_PREFIX=$TEMP_PATH .. make -j 4 make package