kou commented on code in PR #252:
URL: https://github.com/apache/arrow-cookbook/pull/252#discussion_r963499099
##########
cpp/code/CMakeLists.txt:
##########
@@ -23,8 +23,14 @@ if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libstdc++")
endif()
-# Add Arrow
-find_package(Arrow REQUIRED COMPONENTS dataset flight parquet)
+# Add Arrow and other required packages
+find_package(Arrow REQUIRED)
+
+if(${ARROW_VERSION} VERSION_GREATER "9.0.0")
Review Comment:
Ah, we need to specify directry for `ArrowDatasetConfig.cmake` and so on
only with 9.0.0:
```cmake
find_package(Arrow REQUIRED)
if(NOT ${ARROW_VERSION} VERSION_GREATER "9.0.0")
get_filename_component(ARROW_CMAKE_BASE_DIR ${Arrow_CONFIG} DIRECTORY)
list(INSERT CMAKE_MODULE_PATH 0 ${ARROW_CMAKE_BAE_DIR})
endif()
find_package(ArrowDataset REQUIRED)
find_package(ArrowFlight REQUIRED)
find_package(Parquet REQUIRED)
```
--
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]