kou commented on code in PR #252:
URL: https://github.com/apache/arrow-cookbook/pull/252#discussion_r963685387
##########
cpp/code/CMakeLists.txt:
##########
@@ -42,9 +49,14 @@ function(RECIPE TARGET)
common.cc
main.cc
)
+ if(TARGET Arrow::arrow_shared)
+ set(ARROW_SHARED_NAME Arrow::arrow_shared)
+ else()
+ set(ARROW_SHARED_NAME arrow_shared)
+ endif()
target_link_libraries(
${TARGET}
- arrow_shared
+ ${ARROW_SHARED_NAME}
arrow_dataset
arrow_flight
parquet
Review Comment:
Ah, sorry. I missed this.
CMake packages for Apache Arrow 10.0.0 have correct dependency information.
So we don't need to all Arrow related CMake targets explicitly:
```cmake
if(TARGET Arrow::arrow_shared)
target_link_libraries(${TARGET} ArrowDataset::arrow_dataset_shared
ArrowFlight::arrow_flight_shared gtest)
else()
target_link_libraries(parquet_shared arrow_shared)
target_link_libraries(arrow_dataset_shared parquet_shared)
target_link_libraries(arrow_flight_shared arrow_shared)
target_link_libraries(${TARGET} arrow_dataset_shared arrow_flight_shared
gtest)
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]