WillAyd opened a new issue, #364:
URL: https://github.com/apache/arrow-nanoarrow/issues/364
Not sure if this is an issue with the library or just a CMake thing, but I
am unable to get anything but a static library when using FetchContent to pull
in the nanoarrow dependency. My CMakeLists.txt looks like:
```
cmake_minimum_required(VERSION 3.18)
project(${SKBUILD_PROJECT_NAME} LANGUAGES C CXX)
set(CMAKE_C_STANDARD 17)
set(CMAKE_C_STANDARD_REQUIRED ON)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
if (MSVC)
else()
add_compile_options(-Wall -Wextra)
endif()
find_package(Python COMPONENTS Interpreter Development.Module REQUIRED)
# Detect the installed nanobind package and import it into CMake
execute_process(
COMMAND "${Python_EXECUTABLE}" -m nanobind --cmake_dir
OUTPUT_STRIP_TRAILING_WHITESPACE OUTPUT_VARIABLE NB_DIR)
list(APPEND CMAKE_PREFIX_PATH "${NB_DIR}")
find_package(nanobind CONFIG REQUIRED)
include(FetchContent)
FetchContent_Declare(nanoarrow-project
GIT_REPOSITORY https://github.com/apache/arrow-nanoarrow.git
GIT_TAG apache-arrow-nanoarrow-0.3.0
)
FetchContent_MakeAvailable(nanoarrow-project)
nanobind_add_module(somelib somelib.cpp)
target_link_libraries(somelib PRIVATE nanoarrow)
install(TARGETS somelib
LIBRARY DESTINATION ${SKBUILD_PROJECT_NAME})
```
You can see the full project
[here](https://github.com/WillAyd/capsule-capi-testing/tree/9baea78330b7a7cb9d336393a22d3830a8bf2a25)
I've had tried `cmake -S . -B build -DBUILD_SHARED_LIBS=ON` and scattering
`SET(BUILD_SHARED_LIBS ON)` throughout the CMakeLists.txt, but regardless of
what I do I always end up with a static libnananoarrow. Is that expected?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]