lafiona commented on a change in pull request #12004:
URL: https://github.com/apache/arrow/pull/12004#discussion_r796126455
##########
File path: matlab/CMakeLists.txt
##########
@@ -31,23 +32,42 @@ function(build_arrow)
message(SEND_ERROR "Error: unrecognized arguments:
${ARG_UNPARSED_ARGUMENTS}")
endif()
+ # If Arrow needs to be built, the default location will be within the build
tree.
+ set(ARROW_PREFIX "${CMAKE_CURRENT_BINARY_DIR}/arrow_ep-prefix")
+
if(WIN32)
- set(ARROW_IMPORTED_TYPE IMPORTED_IMPLIB)
- set(ARROW_LIBRARY_SUFFIX ${CMAKE_IMPORT_LIBRARY_SUFFIX})
+ # On Windows, the link time suffix (.lib) and runtime library suffixes
(.dll) are different.
+ set(ARROW_LINK_SUFFIX ${CMAKE_IMPORT_LIBRARY_SUFFIX})
+ # The shared library is located in the "bin" directory.
+ set(ARROW_SHARED_LIBRARY_DIR "${ARROW_PREFIX}/bin")
else()
- set(ARROW_IMPORTED_TYPE IMPORTED_LOCATION)
- set(ARROW_LIBRARY_SUFFIX ${CMAKE_SHARED_LIBRARY_SUFFIX})
+ # On Linux and macOS, the link time suffix and runtime suffixes are
consistent, (.so and .dylib).
+ set(ARROW_LINK_SUFFIX ${CMAKE_SHARED_LIBRARY_SUFFIX})
+ # The shared library is located in the "lib" directory.
+ set(ARROW_SHARED_LIBRARY_DIR "${ARROW_PREFIX}/lib")
endif()
- set(ARROW_PREFIX "${CMAKE_CURRENT_BINARY_DIR}/arrow_ep-prefix")
- set(ARROW_INCLUDE_DIR "${ARROW_PREFIX}/include")
- set(ARROW_LIBRARY_DIR "${ARROW_PREFIX}/lib")
- set(ARROW_SHARED_LIB
-
"${ARROW_LIBRARY_DIR}/${CMAKE_SHARED_LIBRARY_PREFIX}arrow${ARROW_LIBRARY_SUFFIX}")
+ set(ARROW_LINK_LIB_FILENAME
"${CMAKE_IMPORT_LIBRARY_PREFIX}arrow${ARROW_LINK_SUFFIX}")
Review comment:
Than you for this suggestion! I will make this change for arrow_shared
and the GTest targets.
--
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]