lafiona commented on a change in pull request #12004:
URL: https://github.com/apache/arrow/pull/12004#discussion_r796127733



##########
File path: matlab/CMakeLists.txt
##########
@@ -76,108 +96,96 @@ function(build_arrow)
   file(MAKE_DIRECTORY "${ARROW_INCLUDE_DIR}")
   add_library(${ARROW_LIBRARY_TARGET} SHARED IMPORTED)
   set_target_properties(${ARROW_LIBRARY_TARGET}
-                        PROPERTIES ${ARROW_IMPORTED_TYPE} ${ARROW_SHARED_LIB}
-                                   INTERFACE_INCLUDE_DIRECTORIES 
${ARROW_INCLUDE_DIR})
+                        PROPERTIES INTERFACE_INCLUDE_DIRECTORIES 
${ARROW_INCLUDE_DIR}
+                                   IMPORTED_LOCATION ${ARROW_SHARED_LIB})
+  if(WIN32)
+    set_target_properties(${ARROW_LIBRARY_TARGET} PROPERTIES IMPORTED_IMPLIB
+                                                             ${ARROW_LINK_LIB})

Review comment:
       Yes, it's true that the `IMPORTED_IMPLIB` variable is only used on 
Windows. Because imported libraries are not used on macOS and Linux, 
`CMAKE_IMPORT_LIBRARY_SUFFIX` and `CMAKE_IMPORT_LIBRARY_PREFIX` are not set on 
these platforms. They are used to create the file path contained by 
`ARROW_LINK_LIB`. Therefore, the value of `ARROW_LINK_LIB` is not set for macOS 
and Linux. 
   
   Because of this, I would prefer to only set `IMPORTED_IMPLIB` on Windows.




-- 
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]


Reply via email to