Closed hsdk123 closed 6 months ago
We had the same issue in https://github.com/R2Northstar/NorthstarLauncher/ which submodules https://github.com/zlib-ng/minizip-ng which in turn uses FetchContent to get zlib.
Reverting the above commit in a fork of zlib and getting minizip to fetch that fork solved the issue.
@madler could you take a look?
@tr1cks
This might work with this instead?
add_library(zlib SHARED ${ZLIB_SRCS} ${ZLIB_DLL_SRCS} ${ZLIB_PUBLIC_HDRS} ${ZLIB_PRIVATE_HDRS})
target_include_directories(zlib PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}>
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>)
add_library(zlibstatic STATIC ${ZLIB_SRCS} ${ZLIB_PUBLIC_HDRS} ${ZLIB_PRIVATE_HDRS})
target_include_directories(zlibstatic PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}>
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>)
Perhaps somebody could test it.
Perhaps somebody could test it.
Seems to work for us, thanks!
@hsdk123 Can you try @nmoinvaz 's suggestion?
@hsdk123 Can you try @nmoinvaz 's suggestion?
Confirming working for us!
Hi, I use fetchcontent to build zlib and have recently started getting cmake configuration errors like:
This seems to be due to https://github.com/madler/zlib/commit/2e3d86c4e12c4c23db4229eea7d0c1cd4571273e