Skip to content

Commit ed4c83c

Browse files
committed
Fix Substrait static linking
1 parent 628605d commit ed4c83c

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

cpp/src/arrow/engine/CMakeLists.txt

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,10 +70,13 @@ foreach(LIB_TARGET ${ARROW_SUBSTRAIT_LIBRARIES})
7070
target_compile_definitions(${LIB_TARGET} PRIVATE ARROW_ENGINE_EXPORTING)
7171
endforeach()
7272

73+
if(ARROW_BUILD_STATIC AND WIN32)
74+
target_compile_definitions(arrow_substrait_static PUBLIC ARROW_ENGINE_STATIC)
75+
endif()
76+
7377
set(ARROW_SUBSTRAIT_TEST_LINK_LIBS ${ARROW_SUBSTRAIT_LINK_lIBS} ${ARROW_TEST_LINK_LIBS})
7478
if(ARROW_TEST_LINKAGE STREQUAL "static")
75-
list(APPEND ARROW_SUBSTRAIT_TEST_LINK_LIBS arrow_substrait_static
76-
arrow_substrait_static)
79+
list(APPEND ARROW_SUBSTRAIT_TEST_LINK_LIBS arrow_substrait_static)
7780
else()
7881
list(APPEND ARROW_SUBSTRAIT_TEST_LINK_LIBS arrow_substrait_shared)
7982
endif()

0 commit comments

Comments
 (0)