Skip to content

Commit 2eaf405

Browse files
committed
Switch macro to ADBC_STATIC
1 parent 82f5a68 commit 2eaf405

File tree

29 files changed

+51
-36
lines changed

29 files changed

+51
-36
lines changed

c/cmake_modules/GoUtils.cmake

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ function(adbc_add_static_library target_name base_name)
5252
set(static_base_name
5353
"${CMAKE_STATIC_LIBRARY_PREFIX}${base_name}${CMAKE_STATIC_LIBRARY_SUFFIX}")
5454
add_library(${target_name} STATIC IMPORTED)
55+
target_compile_definitions(${target_name} ADBC_STATIC)
5556
if(WINDOWS)
5657
set_target_properties(${target_name}
5758
PROPERTIES

c/driver/bigquery/adbc-driver-bigquery.pc.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,4 @@ Description: The ADBC BigQuery driver provides an ADBC driver for BigQuery.
2323
URL: https://github.com/apache/arrow-adbc
2424
Version: @ADBC_VERSION@
2525
Libs: -L${libdir} -ladbc_driver_bigquery
26+
Libs.private: -DADBC_STATIC

c/driver/bigquery/meson.build

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ pkg.generate(
5353
libraries: [adbc_driver_bigquery_lib],
5454
url: 'https://github.com/apache/arrow-adbc',
5555
filebase: 'adbc-driver-bigquery',
56+
libraries_private: '-DADBC_STATIC',
5657
)
5758

5859
exc = executable(

c/driver/common/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
# under the License.
1717

1818
add_library(adbc_driver_common STATIC utils.c)
19+
target_compile_definitions(adbc_driver_common PRIVATE ADBC_STATIC)
1920
adbc_configure_target(adbc_driver_common)
2021
set_target_properties(adbc_driver_common PROPERTIES POSITION_INDEPENDENT_CODE ON)
2122
target_include_directories(adbc_driver_common PRIVATE "${REPOSITORY_ROOT}/c/include")

c/driver/common/meson.build

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ adbc_common_lib = library(
2121
include_directories: [include_dir],
2222
dependencies: [nanoarrow_dep],
2323
install: true,
24-
c_shared_args: adbc_c_shared_args,
25-
cpp_shared_args: adbc_cpp_shared_args,
24+
c_static_args: adbc_c_static_args,
25+
cpp_static_args: adbc_cpp_static_args,
2626
)
2727

2828
exc = executable(

c/driver/flightsql/adbc-driver-flightsql.pc.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,4 @@ Description: The ADBC Flight SQL driver provides an ADBC driver for Flight SQL.
2323
URL: https://github.com/apache/arrow-adbc
2424
Version: @ADBC_VERSION@
2525
Libs: -L${libdir} -ladbc_driver_flightsql
26+
Libs.private: -DADBC_STATIC

c/driver/flightsql/meson.build

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ pkg.generate(
5353
url: 'https://github.com/apache/arrow-adbc',
5454
libraries: [adbc_driver_flightsql_lib],
5555
filebase: 'adbc-driver-flightsql',
56+
libraries_private: '-DADBC_STATIC',
5657
)
5758

5859
exc = executable(

c/driver/framework/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ target_include_directories(adbc_driver_framework
2424
PRIVATE "${REPOSITORY_ROOT}/c/" "${REPOSITORY_ROOT}/c/include"
2525
"${REPOSITORY_ROOT}/c/vendor")
2626
target_link_libraries(adbc_driver_framework PUBLIC adbc_driver_common fmt::fmt)
27-
target_compile_definitions(adbc_driver_framework PRIVATE ADBC_EXPORTING)
27+
target_compile_definitions(adbc_driver_framework PRIVATE ADBC_EXPORTING ADBC_STATIC)
2828

2929
if(ADBC_BUILD_TESTS)
3030
add_test_case(driver_framework_test

c/driver/framework/meson.build

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,6 @@ adbc_framework_lib = library(
2323
dependencies: [nanoarrow_dep, fmt_dep],
2424
install: true,
2525
gnu_symbol_visibility: 'hidden',
26-
c_shared_args: adbc_c_shared_args,
27-
cpp_shared_args: adbc_cpp_shared_args,
26+
c_static_args: adbc_c_static_args,
27+
cpp_static_args: adbc_cpp_static_args,
2828
)

c/driver/postgresql/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@ add_arrow_lib(adbc_driver_postgresql
5555

5656
foreach(LIB_TARGET ${ADBC_LIBRARIES})
5757
target_compile_definitions(${LIB_TARGET} PRIVATE ADBC_EXPORTING)
58-
if(ADBC_BUILD_SHARED)
59-
target_compile_definitions(${LIB_TARGET} PRIVATE ADBC_BUILD_DLL)
58+
if(ADBC_BUILD_STATIC)
59+
target_compile_definitions(${LIB_TARGET} PRIVATE ADBC_STATIC)
6060
endif()
6161
target_include_directories(${LIB_TARGET} SYSTEM
6262
PRIVATE ${REPOSITORY_ROOT}/c/ ${REPOSITORY_ROOT}/c/include/

0 commit comments

Comments
 (0)