Fixed zlib include dir when Aseprite is used as sub-project

For the Qt "qaseprite" image plugin, we're using Aseprite as git
submodule so that we can link to its laf, dio and render libraries.

In this case, `CMAKE_BINARY_DIR` refers to the build directory of
qaseprite. We need to use `CMAKE_CURRENT_BINARY_DIR` instead, which
always refers to the right location for the generated `zconf.h`.
This commit is contained in:
Thorbjørn Lindeijer 2025-01-10 09:39:36 +01:00 committed by David Capello
parent e5e1c746a6
commit db4f80ea91

View File

@ -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})