Skip to content

Commit be0b959

Browse files
authored
build(c): automatically copy deps to output on Windows with vcpkg (#4647)
This is necessary so tests can find their dependencies. Right now you have to explicitly tell the build scripts to do this with a build option, but we can easily infer this from within CMake, so do that instead. Closes #3826. Assisted-by: GPT-5.6 Sol <codex@openai.com>
1 parent 92affc7 commit be0b959

3 files changed

Lines changed: 1 addition & 7 deletions

File tree

c/CMakePresets.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@
3838
"ADBC_BUILD_STATIC": "OFF",
3939
"ADBC_USE_ASAN": "OFF",
4040
"ADBC_USE_UBSAN": "OFF",
41-
"ADBC_BUILD_VCPKG": "ON",
4241
"CMAKE_TOOLCHAIN_FILE": "$env{VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake",
4342
"CMAKE_C_COMPILER": "cl.exe",
4443
"CMAKE_CXX_COMPILER": "cl.exe"

c/cmake_modules/BuildUtils.cmake

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -302,8 +302,7 @@ function(ADD_ARROW_LIB LIB_NAME)
302302
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
303303

304304
# If we're building on Windows using vcpkg, ensure the runtime dependencies of binaries are copied to the install folder.
305-
# TODO(https://github.com/apache/arrow-adbc/issues/3826): auto-detect this
306-
if(ADBC_BUILD_VCPKG)
305+
if(WIN32 AND VCPKG_TOOLCHAIN)
307306
install(TARGETS ${LIB_NAME}_shared
308307
RUNTIME_DEPENDENCIES
309308
PRE_EXCLUDE_REGEXES

c/cmake_modules/DefineOptions.cmake

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -237,10 +237,6 @@ if("${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_CURRENT_SOURCE_DIR}")
237237
define_option(ADBC_DRIVER_SQLITE "Build the SQLite driver" OFF)
238238

239239
define_option(ADBC_INTEGRATION_DUCKDB "Build the test suite for DuckDB" OFF)
240-
241-
define_option(ADBC_BUILD_VCPKG
242-
"Build on Windows using vcpkg for dependencies and Visual Studio generator."
243-
OFF)
244240
endif()
245241

246242
macro(validate_config)

0 commit comments

Comments
 (0)