Skip to content

Commit 8e61cdd

Browse files
authored
GH-46231: [C++][CMake] Fix arrow_bundled_dependencies to be externally accessible by FetchContent (#46232)
### Rationale for this change `arrow_bundled_dependencies` is an IMPORTED library which links to `arrow_bundled_dependencies_merge`. When arrow-cpp is used externally as a third-party dependency via CMake `FetchContent`, target `arrow_bundled_dependencies` is not accessible by the parent project (but `arrow_bundled_dependencies_merge` is). It is difficult for the parent project to locate the built product of `arrow_bundled_dependencies_merge` and install it. ### What changes are included in this PR? Change `IMPORTED` library `arrow_bundled_dependencies` to be `GLOBAL`. ### Are these changes tested? - Pass all CIs. - Verified to work by apache/iceberg-cpp#89 ### Are there any user-facing changes? I don't think so. * GitHub Issue: #46231 Authored-by: Gang Wu <[email protected]> Signed-off-by: Sutou Kouhei <[email protected]>
1 parent 6e84d99 commit 8e61cdd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cpp/cmake_modules/BuildUtils.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ function(arrow_create_merged_static_lib output_target)
163163
message(STATUS "Creating bundled static library target ${output_target} at ${output_lib_path}"
164164
)
165165

166-
add_library(${output_target} STATIC IMPORTED)
166+
add_library(${output_target} STATIC IMPORTED GLOBAL)
167167
set_target_properties(${output_target} PROPERTIES IMPORTED_LOCATION ${output_lib_path})
168168
add_dependencies(${output_target} ${output_target}_merge)
169169
endfunction()

0 commit comments

Comments
 (0)