From df3988ede736cc47d20a2f7f5330bea96fcd4fd2 Mon Sep 17 00:00:00 2001 From: Matthias Kuhn Date: Sun, 23 Feb 2025 18:44:38 +0100 Subject: [PATCH 1/6] Allow to build with system dependencies Adds two build options to disable vendored dependencies fmt and nanoarrow - WITH_VENDORED_FMT - WITH_VENDORED_NANOARROW --- c/CMakeLists.txt | 15 ++++++++++++--- c/cmake_modules/DefineOptions.cmake | 4 ++++ c/driver/common/CMakeLists.txt | 8 ++++++-- 3 files changed, 22 insertions(+), 5 deletions(-) diff --git a/c/CMakeLists.txt b/c/CMakeLists.txt index be69103d06..e92a7fc683 100644 --- a/c/CMakeLists.txt +++ b/c/CMakeLists.txt @@ -29,9 +29,18 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON) include(CTest) -add_subdirectory(vendor/fmt EXCLUDE_FROM_ALL) -set_target_properties(fmt PROPERTIES POSITION_INDEPENDENT_CODE ON) -add_subdirectory(vendor/nanoarrow) + +if(WITH_VENDORED_FMT) + add_subdirectory(vendor/fmt EXCLUDE_FROM_ALL) + set_target_properties(fmt PROPERTIES POSITION_INDEPENDENT_CODE ON) +else() + find_package(fmt REQUIRED) +endif() +if(WITH_VENDORED_NANOARROW) + add_subdirectory(vendor/nanoarrow) +else() + find_package(nanoarrow REQUIRED) +endif() add_subdirectory(driver/common) add_subdirectory(driver/framework) diff --git a/c/cmake_modules/DefineOptions.cmake b/c/cmake_modules/DefineOptions.cmake index 13e6757347..c022d523a1 100644 --- a/c/cmake_modules/DefineOptions.cmake +++ b/c/cmake_modules/DefineOptions.cmake @@ -133,6 +133,10 @@ if("${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_CURRENT_SOURCE_DIR}") define_option(ADBC_GGDB_DEBUG "Pass -ggdb flag to debug builds" ON) + define_option(ADBC_WITH_VENDORED_FMT "Use vendored copy of fmt" ON) + + define_option(ADBC_WITH_VENDORED_NANOARROW "Use vendored copy of nanoarrow" ON) + #---------------------------------------------------------------------- set_option_category("Test and benchmark") diff --git a/c/driver/common/CMakeLists.txt b/c/driver/common/CMakeLists.txt index 751eda3632..5739e4e25e 100644 --- a/c/driver/common/CMakeLists.txt +++ b/c/driver/common/CMakeLists.txt @@ -18,8 +18,12 @@ add_library(adbc_driver_common STATIC utils.c) adbc_configure_target(adbc_driver_common) set_target_properties(adbc_driver_common PROPERTIES POSITION_INDEPENDENT_CODE ON) -target_include_directories(adbc_driver_common PRIVATE "${REPOSITORY_ROOT}/c/include" - "${REPOSITORY_ROOT}/c/vendor") +target_include_directories(adbc_driver_common PRIVATE "${REPOSITORY_ROOT}/c/include") +if(WITH_VENDORED_NANOARROW) + target_include_directories(adbc_driver_common PRIVATE "${REPOSITORY_ROOT}/c/vendor") +else() + target_link_libraries(adbc_driver_common PRIVATE nanoarrow::nanoarrow) +endif() if(ADBC_BUILD_TESTS) add_test_case(driver_common_test From fd051556aa4450fd47db1379b1dc8449860fa6ea Mon Sep 17 00:00:00 2001 From: Matthias Kuhn Date: Mon, 24 Feb 2025 06:35:37 +0100 Subject: [PATCH 2/6] Apply suggestions from code review Co-authored-by: Dewey Dunnington --- c/CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/c/CMakeLists.txt b/c/CMakeLists.txt index e92a7fc683..13b78bf7c5 100644 --- a/c/CMakeLists.txt +++ b/c/CMakeLists.txt @@ -30,13 +30,13 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON) include(CTest) -if(WITH_VENDORED_FMT) +if(ADBC_WITH_VENDORED_FMT) add_subdirectory(vendor/fmt EXCLUDE_FROM_ALL) set_target_properties(fmt PROPERTIES POSITION_INDEPENDENT_CODE ON) else() find_package(fmt REQUIRED) endif() -if(WITH_VENDORED_NANOARROW) +if(ADBC_WITH_VENDORED_NANOARROW) add_subdirectory(vendor/nanoarrow) else() find_package(nanoarrow REQUIRED) From 521c0a127075051978c0620bed8837076964c103 Mon Sep 17 00:00:00 2001 From: Matthias Kuhn Date: Mon, 24 Feb 2025 06:45:51 +0100 Subject: [PATCH 3/6] Fix variable name --- c/driver/common/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/c/driver/common/CMakeLists.txt b/c/driver/common/CMakeLists.txt index 5739e4e25e..7a37bd1a02 100644 --- a/c/driver/common/CMakeLists.txt +++ b/c/driver/common/CMakeLists.txt @@ -19,7 +19,7 @@ add_library(adbc_driver_common STATIC utils.c) adbc_configure_target(adbc_driver_common) set_target_properties(adbc_driver_common PROPERTIES POSITION_INDEPENDENT_CODE ON) target_include_directories(adbc_driver_common PRIVATE "${REPOSITORY_ROOT}/c/include") -if(WITH_VENDORED_NANOARROW) +if(ADBC_WITH_VENDORED_NANOARROW) target_include_directories(adbc_driver_common PRIVATE "${REPOSITORY_ROOT}/c/vendor") else() target_link_libraries(adbc_driver_common PRIVATE nanoarrow::nanoarrow) From 05dac2811277c87dd0f5eeb6023715fd303732a1 Mon Sep 17 00:00:00 2001 From: Matthias Kuhn Date: Mon, 24 Feb 2025 09:01:00 +0100 Subject: [PATCH 4/6] pre-commit --- c/CMakeLists.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/c/CMakeLists.txt b/c/CMakeLists.txt index 13b78bf7c5..746547636c 100644 --- a/c/CMakeLists.txt +++ b/c/CMakeLists.txt @@ -29,7 +29,6 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON) include(CTest) - if(ADBC_WITH_VENDORED_FMT) add_subdirectory(vendor/fmt EXCLUDE_FROM_ALL) set_target_properties(fmt PROPERTIES POSITION_INDEPENDENT_CODE ON) From c09929b55df37ad397683e87fd5023d53579401f Mon Sep 17 00:00:00 2001 From: Matthias Kuhn Date: Tue, 25 Feb 2025 09:19:02 +0100 Subject: [PATCH 5/6] Propagate nanoarrow via target --- c/driver/bigquery/CMakeLists.txt | 6 +----- c/driver/common/CMakeLists.txt | 12 +++--------- c/driver/flightsql/CMakeLists.txt | 3 --- c/driver/framework/CMakeLists.txt | 3 +-- c/driver/postgresql/CMakeLists.txt | 27 ++++++--------------------- c/driver/snowflake/CMakeLists.txt | 5 +---- c/driver/sqlite/CMakeLists.txt | 17 ++++------------- c/driver_manager/CMakeLists.txt | 6 ------ c/integration/duckdb/CMakeLists.txt | 4 +--- c/validation/CMakeLists.txt | 21 +++++++-------------- c/vendor/nanoarrow/CMakeLists.txt | 2 ++ 11 files changed, 26 insertions(+), 80 deletions(-) diff --git a/c/driver/bigquery/CMakeLists.txt b/c/driver/bigquery/CMakeLists.txt index fe3937878a..990f44d87f 100644 --- a/c/driver/bigquery/CMakeLists.txt +++ b/c/driver/bigquery/CMakeLists.txt @@ -36,7 +36,6 @@ add_go_lib("${REPOSITORY_ROOT}/go/adbc/pkg/bigquery/" foreach(LIB_TARGET ${ADBC_LIBRARIES}) target_include_directories(${LIB_TARGET} SYSTEM INTERFACE ${REPOSITORY_ROOT} ${REPOSITORY_ROOT}/c/ - ${REPOSITORY_ROOT}/c/vendor ${REPOSITORY_ROOT}/c/driver) endforeach() @@ -57,13 +56,10 @@ if(ADBC_BUILD_TESTS) EXTRA_LINK_LIBS adbc_driver_common adbc_validation - nanoarrow ${TEST_LINK_LIBS}) target_compile_features(adbc-driver-bigquery-test PRIVATE cxx_std_17) target_include_directories(adbc-driver-bigquery-test SYSTEM - PRIVATE ${REPOSITORY_ROOT}/c/ - ${REPOSITORY_ROOT}/c/include/ - ${REPOSITORY_ROOT}/c/vendor + PRIVATE ${REPOSITORY_ROOT}/c/ ${REPOSITORY_ROOT}/c/include/ ${REPOSITORY_ROOT}/c/driver ${REPOSITORY_ROOT}/c/driver/common) adbc_configure_target(adbc-driver-bigquery-test) diff --git a/c/driver/common/CMakeLists.txt b/c/driver/common/CMakeLists.txt index 7a37bd1a02..fec93c827d 100644 --- a/c/driver/common/CMakeLists.txt +++ b/c/driver/common/CMakeLists.txt @@ -19,11 +19,7 @@ add_library(adbc_driver_common STATIC utils.c) adbc_configure_target(adbc_driver_common) set_target_properties(adbc_driver_common PROPERTIES POSITION_INDEPENDENT_CODE ON) target_include_directories(adbc_driver_common PRIVATE "${REPOSITORY_ROOT}/c/include") -if(ADBC_WITH_VENDORED_NANOARROW) - target_include_directories(adbc_driver_common PRIVATE "${REPOSITORY_ROOT}/c/vendor") -else() - target_link_libraries(adbc_driver_common PRIVATE nanoarrow::nanoarrow) -endif() +target_link_libraries(adbc_driver_common PRIVATE nanoarrow::nanoarrow) if(ADBC_BUILD_TESTS) add_test_case(driver_common_test @@ -34,11 +30,9 @@ if(ADBC_BUILD_TESTS) SOURCES utils_test.cc EXTRA_LINK_LIBS - adbc_driver_common - nanoarrow) + adbc_driver_common) target_compile_features(adbc-driver-common-test PRIVATE cxx_std_17) target_include_directories(adbc-driver-common-test - PRIVATE "${REPOSITORY_ROOT}/c/include" - "${REPOSITORY_ROOT}/c/vendor") + PRIVATE "${REPOSITORY_ROOT}/c/include") adbc_configure_target(adbc-driver-common-test) endif() diff --git a/c/driver/flightsql/CMakeLists.txt b/c/driver/flightsql/CMakeLists.txt index 1101b82430..c946566f16 100644 --- a/c/driver/flightsql/CMakeLists.txt +++ b/c/driver/flightsql/CMakeLists.txt @@ -37,7 +37,6 @@ foreach(LIB_TARGET ${ADBC_LIBRARIES}) target_include_directories(${LIB_TARGET} SYSTEM INTERFACE ${REPOSITORY_ROOT}/c/ ${REPOSITORY_ROOT}/c/include/ - ${REPOSITORY_ROOT}/c/vendor ${REPOSITORY_ROOT}/c/driver) endforeach() @@ -59,12 +58,10 @@ if(ADBC_BUILD_TESTS) EXTRA_LINK_LIBS adbc_driver_common adbc_validation - nanoarrow ${TEST_LINK_LIBS}) target_compile_features(adbc-driver-flightsql-test PRIVATE cxx_std_17) target_include_directories(adbc-driver-flightsql-test SYSTEM PRIVATE ${REPOSITORY_ROOT}/c/ ${REPOSITORY_ROOT}/c/include/ - ${REPOSITORY_ROOT}/c/vendor ${REPOSITORY_ROOT}/c/driver) adbc_configure_target(adbc-driver-flightsql-test) endif() diff --git a/c/driver/framework/CMakeLists.txt b/c/driver/framework/CMakeLists.txt index f5c642b532..fa2e03b978 100644 --- a/c/driver/framework/CMakeLists.txt +++ b/c/driver/framework/CMakeLists.txt @@ -34,8 +34,7 @@ if(ADBC_BUILD_TESTS) SOURCES base_driver_test.cc EXTRA_LINK_LIBS - adbc_driver_framework - nanoarrow) + adbc_driver_framework) target_compile_features(adbc-driver-framework-test PRIVATE cxx_std_17) target_include_directories(adbc-driver-framework-test PRIVATE "${REPOSITORY_ROOT}/c/" diff --git a/c/driver/postgresql/CMakeLists.txt b/c/driver/postgresql/CMakeLists.txt index a720696c6a..92c4c9f92d 100644 --- a/c/driver/postgresql/CMakeLists.txt +++ b/c/driver/postgresql/CMakeLists.txt @@ -46,23 +46,18 @@ add_arrow_lib(adbc_driver_postgresql SHARED_LINK_LIBS adbc_driver_common adbc_driver_framework - nanoarrow ${LIBPQ_LINK_LIBRARIES} STATIC_LINK_LIBS ${LIBPQ_LINK_LIBRARIES} adbc_driver_common adbc_driver_framework - nanoarrow ${LIBPQ_STATIC_LIBRARIES}) foreach(LIB_TARGET ${ADBC_LIBRARIES}) target_compile_definitions(${LIB_TARGET} PRIVATE ADBC_EXPORTING) target_include_directories(${LIB_TARGET} SYSTEM - PRIVATE ${REPOSITORY_ROOT}/c/ - ${REPOSITORY_ROOT}/c/include/ - ${LIBPQ_INCLUDE_DIRS} - ${REPOSITORY_ROOT}/c/vendor - ${REPOSITORY_ROOT}/c/driver) + PRIVATE ${REPOSITORY_ROOT}/c/ ${REPOSITORY_ROOT}/c/include/ + ${LIBPQ_INCLUDE_DIRS} ${REPOSITORY_ROOT}/c/driver) endforeach() if(ADBC_TEST_LINKAGE STREQUAL "shared") @@ -83,15 +78,11 @@ if(ADBC_BUILD_TESTS) EXTRA_LINK_LIBS adbc_driver_common adbc_validation - nanoarrow ${TEST_LINK_LIBS}) target_compile_features(adbc-driver-postgresql-test PRIVATE cxx_std_17) target_include_directories(adbc-driver-postgresql-test SYSTEM - PRIVATE ${REPOSITORY_ROOT}/c/ - ${REPOSITORY_ROOT}/c/include/ - ${LIBPQ_INCLUDE_DIRS} - ${REPOSITORY_ROOT}/c/vendor - ${REPOSITORY_ROOT}/c/driver) + PRIVATE ${REPOSITORY_ROOT}/c/ ${REPOSITORY_ROOT}/c/include/ + ${LIBPQ_INCLUDE_DIRS} ${REPOSITORY_ROOT}/c/driver) adbc_configure_target(adbc-driver-postgresql-test) add_test_case(driver_postgresql_copy_test @@ -105,15 +96,11 @@ if(ADBC_BUILD_TESTS) EXTRA_LINK_LIBS adbc_driver_common adbc_validation - nanoarrow ${TEST_LINK_LIBS}) target_compile_features(adbc-driver-postgresql-copy-test PRIVATE cxx_std_17) target_include_directories(adbc-driver-postgresql-copy-test SYSTEM - PRIVATE ${REPOSITORY_ROOT}/c/ - ${REPOSITORY_ROOT}/c/include/ - ${LIBPQ_INCLUDE_DIRS} - ${REPOSITORY_ROOT}/c/vendor - ${REPOSITORY_ROOT}/c/driver) + PRIVATE ${REPOSITORY_ROOT}/c/ ${REPOSITORY_ROOT}/c/include/ + ${LIBPQ_INCLUDE_DIRS} ${REPOSITORY_ROOT}/c/driver) adbc_configure_target(adbc-driver-postgresql-copy-test) endif() @@ -124,12 +111,10 @@ if(ADBC_BUILD_BENCHMARKS) EXTRA_LINK_LIBS adbc_driver_common adbc_validation - nanoarrow ${TEST_LINK_LIBS} benchmark::benchmark) # add_benchmark replaces _ with - when creating target target_include_directories(postgresql-benchmark PRIVATE ${REPOSITORY_ROOT}/c/ ${REPOSITORY_ROOT}/c/include/ - ${REPOSITORY_ROOT}/c/vendor ${REPOSITORY_ROOT}/c/driver) endif() diff --git a/c/driver/snowflake/CMakeLists.txt b/c/driver/snowflake/CMakeLists.txt index 1d3874b41f..4d36876856 100644 --- a/c/driver/snowflake/CMakeLists.txt +++ b/c/driver/snowflake/CMakeLists.txt @@ -37,7 +37,6 @@ foreach(LIB_TARGET ${ADBC_LIBRARIES}) target_include_directories(${LIB_TARGET} SYSTEM INTERFACE ${REPOSITORY_ROOT}/c/ ${REPOSITORY_ROOT}/c/include/ - ${REPOSITORY_ROOT}/c/vendor ${REPOSITORY_ROOT}/c/driver) endforeach() @@ -62,9 +61,7 @@ if(ADBC_BUILD_TESTS) ${TEST_LINK_LIBS}) target_compile_features(adbc-driver-snowflake-test PRIVATE cxx_std_17) target_include_directories(adbc-driver-snowflake-test SYSTEM - PRIVATE ${REPOSITORY_ROOT}/c/ - ${REPOSITORY_ROOT}/c/include/ - ${REPOSITORY_ROOT}/c/vendor + PRIVATE ${REPOSITORY_ROOT}/c/ ${REPOSITORY_ROOT}/c/include/ ${REPOSITORY_ROOT}/c/driver ${REPOSITORY_ROOT}/c/driver/common) adbc_configure_target(adbc-driver-snowflake-test) diff --git a/c/driver/sqlite/CMakeLists.txt b/c/driver/sqlite/CMakeLists.txt index d0c45b7433..1b097546cd 100644 --- a/c/driver/sqlite/CMakeLists.txt +++ b/c/driver/sqlite/CMakeLists.txt @@ -52,23 +52,18 @@ add_arrow_lib(adbc_driver_sqlite ${SQLite3_LINK_LIBRARIES} adbc_driver_common adbc_driver_framework - nanoarrow STATIC_LINK_LIBS ${SQLite3_LINK_LIBRARIES} adbc_driver_common adbc_driver_framework - nanoarrow ${LIBPQ_STATIC_LIBRARIES}) foreach(LIB_TARGET ${ADBC_LIBRARIES}) target_compile_definitions(${LIB_TARGET} PRIVATE ADBC_EXPORTING ${ADBC_SQLITE_COMPILE_DEFINES}) target_include_directories(${LIB_TARGET} SYSTEM - PRIVATE ${REPOSITORY_ROOT}/c/ - ${REPOSITORY_ROOT}/c/include/ - ${SQLite3_INCLUDE_DIRS} - ${REPOSITORY_ROOT}/c/vendor - ${REPOSITORY_ROOT}/c/driver) + PRIVATE ${REPOSITORY_ROOT}/c/ ${REPOSITORY_ROOT}/c/include/ + ${SQLite3_INCLUDE_DIRS} ${REPOSITORY_ROOT}/c/driver) endforeach() include(CheckTypeSize) @@ -92,16 +87,12 @@ if(ADBC_BUILD_TESTS) EXTRA_LINK_LIBS adbc_driver_common adbc_validation - nanoarrow ${TEST_LINK_LIBS}) target_compile_definitions(adbc-driver-sqlite-test PRIVATE ${ADBC_SQLITE_COMPILE_DEFINES}) target_compile_features(adbc-driver-sqlite-test PRIVATE cxx_std_17) target_include_directories(adbc-driver-sqlite-test SYSTEM - PRIVATE ${REPOSITORY_ROOT}/c/ - ${REPOSITORY_ROOT}/c/include/ - ${LIBPQ_INCLUDE_DIRS} - ${REPOSITORY_ROOT}/c/vendor - ${REPOSITORY_ROOT}/c/driver) + PRIVATE ${REPOSITORY_ROOT}/c/ ${REPOSITORY_ROOT}/c/include/ + ${LIBPQ_INCLUDE_DIRS} ${REPOSITORY_ROOT}/c/driver) adbc_configure_target(adbc-driver-sqlite-test) endif() diff --git a/c/driver_manager/CMakeLists.txt b/c/driver_manager/CMakeLists.txt index 0eb17f0c8d..11582f86e3 100644 --- a/c/driver_manager/CMakeLists.txt +++ b/c/driver_manager/CMakeLists.txt @@ -60,11 +60,8 @@ if(ADBC_BUILD_TESTS) EXTRA_LINK_LIBS adbc_driver_common adbc_validation - nanoarrow ${TEST_LINK_LIBS}) target_compile_features(adbc-driver-manager-test PRIVATE cxx_std_17) - target_include_directories(adbc-driver-manager-test SYSTEM - PRIVATE ${REPOSITORY_ROOT}/c/vendor/nanoarrow/) add_test_case(version_100_compatibility_test PREFIX @@ -76,9 +73,6 @@ if(ADBC_BUILD_TESTS) adbc_version_100_compatibility_test.cc EXTRA_LINK_LIBS adbc_validation_util - nanoarrow ${TEST_LINK_LIBS}) target_compile_features(adbc-version-100-compatibility-test PRIVATE cxx_std_17) - target_include_directories(adbc-version-100-compatibility-test SYSTEM - PRIVATE ${REPOSITORY_ROOT}/c/vendor/nanoarrow/) endif() diff --git a/c/integration/duckdb/CMakeLists.txt b/c/integration/duckdb/CMakeLists.txt index 9065450b0d..2073a34fec 100644 --- a/c/integration/duckdb/CMakeLists.txt +++ b/c/integration/duckdb/CMakeLists.txt @@ -63,13 +63,11 @@ if(ADBC_BUILD_TESTS) adbc_driver_common adbc_driver_manager_static adbc_validation - duckdb - nanoarrow) + duckdb) add_dependencies(adbc-integration-duckdb-test duckdb) target_compile_features(adbc-integration-duckdb-test PRIVATE cxx_std_17) target_include_directories(adbc-integration-duckdb-test SYSTEM PRIVATE ${REPOSITORY_ROOT}/c/ ${REPOSITORY_ROOT}/c/include/ - ${REPOSITORY_ROOT}/c/vendor ${REPOSITORY_ROOT}/c/driver) adbc_configure_target(adbc-integration-duckdb-test) endif() diff --git a/c/validation/CMakeLists.txt b/c/validation/CMakeLists.txt index 04bc0115aa..02362259f5 100644 --- a/c/validation/CMakeLists.txt +++ b/c/validation/CMakeLists.txt @@ -20,23 +20,16 @@ adbc_configure_target(adbc_validation_util) target_compile_features(adbc_validation_util PRIVATE cxx_std_17) target_include_directories(adbc_validation_util SYSTEM PRIVATE "${REPOSITORY_ROOT}/c/include/" - "${REPOSITORY_ROOT}/c/driver/" - "${REPOSITORY_ROOT}/c/vendor/") -target_link_libraries(adbc_validation_util PUBLIC adbc_driver_common nanoarrow - GTest::gtest GTest::gmock) + "${REPOSITORY_ROOT}/c/driver/") +target_link_libraries(adbc_validation_util PUBLIC adbc_driver_common GTest::gtest + GTest::gmock) add_library(adbc_validation OBJECT adbc_validation.cc adbc_validation_connection.cc adbc_validation_database.cc adbc_validation_statement.cc) adbc_configure_target(adbc_validation) target_compile_features(adbc_validation PRIVATE cxx_std_17) -target_include_directories(adbc_validation SYSTEM - PRIVATE "${REPOSITORY_ROOT}/c/include/" - "${REPOSITORY_ROOT}/c/driver/" - "${REPOSITORY_ROOT}/c/vendor/") -target_link_libraries(adbc_validation - PUBLIC adbc_driver_common - adbc_validation_util - nanoarrow - GTest::gtest - GTest::gmock) +target_include_directories(adbc_validation SYSTEM PRIVATE "${REPOSITORY_ROOT}/c/include/" + "${REPOSITORY_ROOT}/c/driver/") +target_link_libraries(adbc_validation PUBLIC adbc_driver_common adbc_validation_util + GTest::gtest GTest::gmock) diff --git a/c/vendor/nanoarrow/CMakeLists.txt b/c/vendor/nanoarrow/CMakeLists.txt index 233f999c7f..978dc14059 100644 --- a/c/vendor/nanoarrow/CMakeLists.txt +++ b/c/vendor/nanoarrow/CMakeLists.txt @@ -21,6 +21,8 @@ add_library( nanoarrow.c ) +target_include_directories(nanoarrow PUBLIC "${CMAKE_CURRENT_LIST_DIR}/..") set_target_properties( nanoarrow PROPERTIES POSITION_INDEPENDENT_CODE ON ) +add_library(nanoarrow::nanoarrow ALIAS nanoarrow) From cf2f198d3fa132409a51b4f8779b8b3dc9403b00 Mon Sep 17 00:00:00 2001 From: Matthias Kuhn Date: Wed, 26 Feb 2025 09:27:17 +0100 Subject: [PATCH 6/6] make nanoarrow dependency public --- c/driver/common/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/c/driver/common/CMakeLists.txt b/c/driver/common/CMakeLists.txt index fec93c827d..5855056bb4 100644 --- a/c/driver/common/CMakeLists.txt +++ b/c/driver/common/CMakeLists.txt @@ -19,7 +19,7 @@ add_library(adbc_driver_common STATIC utils.c) adbc_configure_target(adbc_driver_common) set_target_properties(adbc_driver_common PROPERTIES POSITION_INDEPENDENT_CODE ON) target_include_directories(adbc_driver_common PRIVATE "${REPOSITORY_ROOT}/c/include") -target_link_libraries(adbc_driver_common PRIVATE nanoarrow::nanoarrow) +target_link_libraries(adbc_driver_common PUBLIC nanoarrow::nanoarrow) if(ADBC_BUILD_TESTS) add_test_case(driver_common_test