Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace zlib with zlib-ng #16100

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
cleanup
  • Loading branch information
inetol committed Jan 28, 2025
commit a1fe014f4a68b2900494f5398a20513fd9e47afd
6 changes: 5 additions & 1 deletion cmake/Globals.cmake
Original file line number Diff line number Diff line change
@@ -789,7 +789,11 @@ function(register_cmake_command)
if(include STREQUAL ".")
list(APPEND MAKE_EFFECTIVE_INCLUDES ${MAKE_CWD})
else()
list(APPEND MAKE_EFFECTIVE_INCLUDES ${MAKE_CWD}/${include})
if(IS_ABSOLUTE ${include})
list(APPEND MAKE_EFFECTIVE_INCLUDES ${include})
else()
list(APPEND MAKE_EFFECTIVE_INCLUDES ${MAKE_CWD}/${include})
endif()
endif()
endforeach()

2 changes: 1 addition & 1 deletion cmake/targets/BuildLibArchive.cmake
Original file line number Diff line number Diff line change
@@ -38,7 +38,7 @@ register_cmake_command(
# spawn a processes to compress instead of using the library.
-DENABLE_ZLIB=OFF
-DHAVE_ZLIB_H=ON
-DCMAKE_C_FLAGS="-I${VENDOR_PATH}/zlib"
-DCMAKE_C_FLAGS="-I${BUILD_PATH}/zlib"
LIB_PATH
libarchive
LIBRARIES
14 changes: 4 additions & 10 deletions cmake/targets/BuildZlib.cmake
Original file line number Diff line number Diff line change
@@ -7,12 +7,6 @@ register_repository(
cbb6ec1d74e8061efdf7251f8c2dae778bed14fd
)

# https://gitlab.kitware.com/cmake/cmake/-/issues/25755
if(APPLE)
set(ZLIB_CMAKE_C_FLAGS "-fno-define-target-os-macros")
set(ZLIB_CMAKE_CXX_FLAGS "-fno-define-target-os-macros")
endif()

if(WIN32)
if(DEBUG)
set(ZLIB_LIBRARY "zlibd")
@@ -30,12 +24,12 @@ register_cmake_command(
zlib
ARGS
-DBUILD_SHARED_LIBS=OFF
-DBUILD_EXAMPLES=OFF
"-DCMAKE_C_FLAGS=${ZLIB_CMAKE_C_FLAGS}"
"-DCMAKE_CXX_FLAGS=${ZLIB_CMAKE_CXX_FLAGS}"
-DWITH_GTEST=OFF
-DZLIB_COMPAT=ON
-DZLIB_ENABLE_TESTS=OFF
-DZLIBNG_ENABLE_TESTS=OFF
LIBRARIES
${ZLIB_LIBRARY}
INCLUDES
.
${BUILD_PATH}/zlib
)