Skip to content

Commit 2a3cf33

Browse files
committed
add compute target
1 parent 45efcaa commit 2a3cf33

File tree

1 file changed

+28
-1
lines changed

1 file changed

+28
-1
lines changed

dependencies/O2Dependencies.cmake

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,34 @@ if(NOT TARGET ArrowAcero::arrow_acero_shared)
9292
)
9393
endif()
9494

95-
if (NOT TARGET Gandiva::gandiva_shared)
95+
if(NOT TARGET ArrowCompute::arrow_compute_shared)
96+
# ArrowCompute::arrow_compute_shared is linked for no reason to parquet
97+
# so we cannot use it because we do not want to build parquet itself.
98+
# For that reason at the moment we need to do the lookup by hand.
99+
get_target_property(ARROW_SHARED_LOCATION Arrow::arrow_shared LOCATION)
100+
get_filename_component(ARROW_SHARED_DIR ${ARROW_SHARED_LOCATION} DIRECTORY)
101+
102+
find_library(ARROW_COMPUTE_SHARED arrow_compute
103+
PATHS ${ARROW_SHARED_DIR}
104+
NO_DEFAULT_PATH
105+
)
106+
107+
if(ARROW_COMPUTE_SHARED)
108+
message(STATUS
109+
"Found arrow_compute_shared library at: ${ARROW_COMPUTE_SHARED}")
110+
else()
111+
message(FATAL_ERROR
112+
"arrow_compute_shared library not found in ${ARROW_SHARED_DIR}")
113+
endif()
114+
115+
# Step 3: Create a target for ArrowCompute::arrow_compute_shared
116+
add_library(ArrowCompute::arrow_compute_shared SHARED IMPORTED)
117+
set_target_properties(ArrowCompute::arrow_compute_shared PROPERTIES
118+
IMPORTED_LOCATION ${ARROW_COMPUTE_SHARED}
119+
)
120+
endif()
121+
122+
if(NOT TARGET Gandiva::gandiva_shared)
96123
add_library(Gandiva::gandiva_shared ALIAS gandiva_shared)
97124
endif()
98125

0 commit comments

Comments
 (0)