Skip to content

Commit

Permalink
try subdir build
Browse files Browse the repository at this point in the history
  • Loading branch information
paleolimbot committed Dec 20, 2023
1 parent b2c5665 commit dd71e4d
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
5 changes: 4 additions & 1 deletion extensions/nanoarrow_ipc/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,10 @@ if(NANOARROW_IPC_BUILD_TESTS)
endif()

# zlib for integration testing
find_package(ZLIB REQUIRED)
find_package(ZLIB)
if (NOT ZLIB_FOUND)
add_subdirectory(cmake/zlib)
endif()

enable_testing()

Expand Down
9 changes: 9 additions & 0 deletions extensions/nanoarrow_ipc/cmake/zlib/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@

fetchcontent_declare(nanoarrow_zlib
URL https://github.com/madler/zlib/releases/download/v1.3/zlib13.zip
URL_HASH SHA256=c561d09347f674f0d72692e7c75d9898919326c532aab7f8c07bb43b07efeb38
)
fetchcontent_makeavailable(nanoarrow_zlib)

add_library(ZLIB::ZLIB ALIAS zlibstatic)
target_include_directories(zlibstatic INTERFACE ${zlib_BINARY_DIR} ${zlib_SOURCE_DIR})

0 comments on commit dd71e4d

Please sign in to comment.