kou commented on issue #44368:
URL: https://github.com/apache/arrow/issues/44368#issuecomment-2406444531
Could you try the following?
```diff
diff --git a/cpp/cmake_modules/BuildUtils.cmake
b/cpp/cmake_modules/BuildUtils.cmake
index 692efa7837..3e0a1536c3 100644
--- a/cpp/cmake_modules/BuildUtils.cmake
+++ b/cpp/cmake_modules/BuildUtils.cmake
@@ -119,6 +119,17 @@ function(arrow_create_merged_static_lib output_target)
set(BUNDLE_COMMAND ${LIBTOOL_MACOS} "-no_warning_for_no_symbols"
"-static" "-o"
${output_lib_path} ${all_library_paths})
+ elseif(MSVC)
+ if(CMAKE_LIBTOOL)
+ set(BUNDLE_TOOL ${CMAKE_LIBTOOL})
+ else()
+ find_program(BUNDLE_TOOL lib HINTS "${CMAKE_CXX_COMPILER}/..")
+ if(NOT BUNDLE_TOOL)
+ message(FATAL_ERROR "Cannot locate lib.exe to bundle libraries")
+ endif()
+ endif()
+ set(BUNDLE_COMMAND ${BUNDLE_TOOL} /NOLOGO /OUT:${output_lib_path}
+ ${all_library_paths})
elseif(CMAKE_CXX_COMPILER_ID MATCHES "^(Clang|GNU|Intel|IntelLLVM)$")
set(ar_script_path ${CMAKE_BINARY_DIR}/${ARG_NAME}.ar)
@@ -140,18 +151,6 @@ function(arrow_create_merged_static_lib output_target)
endif()
set(BUNDLE_COMMAND ${ar_tool} -M < ${ar_script_path})
-
- elseif(MSVC)
- if(CMAKE_LIBTOOL)
- set(BUNDLE_TOOL ${CMAKE_LIBTOOL})
- else()
- find_program(BUNDLE_TOOL lib HINTS "${CMAKE_CXX_COMPILER}/..")
- if(NOT BUNDLE_TOOL)
- message(FATAL_ERROR "Cannot locate lib.exe to bundle libraries")
- endif()
- endif()
- set(BUNDLE_COMMAND ${BUNDLE_TOOL} /NOLOGO /OUT:${output_lib_path}
- ${all_library_paths})
else()
message(FATAL_ERROR "Unknown bundle scenario!")
endif()
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]