Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
inetol committed Jan 17, 2025
1 parent 220c2e6 commit 28be6cb
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 12 deletions.
6 changes: 5 additions & 1 deletion cmake/Globals.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down
2 changes: 1 addition & 1 deletion cmake/targets/BuildLibArchive.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
14 changes: 4 additions & 10 deletions cmake/targets/BuildZlib.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand All @@ -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
)

0 comments on commit 28be6cb

Please sign in to comment.