Skip to content

Commit

Permalink
Try applying patch to fix zlib include dir
Browse files Browse the repository at this point in the history
Also raised minimum CMake version to match the one of Aseprite.
  • Loading branch information
bjorn committed Jan 10, 2025
1 parent 0afdbc3 commit b3edeb9
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 3 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,9 @@ jobs:
CC: i686-w64-mingw32-gcc.exe
CXX: i686-w64-mingw32-g++.exe
run: |
cmake -B build -DCMAKE_BUILD_TYPE=Release \
-DUSE_SHARED_ZLIB=on
pushd aseprite
patch -p1 < ..\aseprite-fix-zlib-include.patch
popd
cmake -B build -DCMAKE_BUILD_TYPE=Release
cmake --build build --config Release
cmake --install build --config Release
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.14)
cmake_minimum_required(VERSION 3.16)

project(qaseprite LANGUAGES CXX)

Expand Down
13 changes: 13 additions & 0 deletions aseprite-fix-zlib-include.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index af09ed229..b1bd0189b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -234,7 +234,7 @@ else()
set(ZLIB_LIBRARIES ${ZLIB_LIBRARY})
set(ZLIB_INCLUDE_DIRS
${ZLIB_DIR}
- ${CMAKE_BINARY_DIR}/third_party/zlib) # Zlib generated zconf.h file
+ ${CMAKE_CURRENT_BINARY_DIR}/third_party/zlib) # Zlib generated zconf.h file
set(ZLIB_INCLUDE_DIR ${ZLIB_INCLUDE_DIRS} CACHE PATH "")
endif()
include_directories(${ZLIB_INCLUDE_DIRS})

0 comments on commit b3edeb9

Please sign in to comment.