wgtmac commented on code in PR #6:
URL: https://github.com/apache/iceberg-cpp/pull/6#discussion_r1897934087


##########
src/CMakeLists.txt:
##########
@@ -15,5 +15,20 @@
 # specific language governing permissions and limitations
 # under the License.
 
+add_subdirectory(arrow)
 add_subdirectory(core)
 add_subdirectory(puffin)
+
+include(CMakePackageConfigHelpers)
+
+configure_package_config_file("${CMAKE_CURRENT_SOURCE_DIR}/config.cmake.in"
+                              
"${CMAKE_CURRENT_BINARY_DIR}/iceberg-config.cmake"
+                              INSTALL_DESTINATION 
"${ICEBERG_INSTALL_CMAKEDIR}/Iceberg")
+
+write_basic_package_version_file(
+  "${CMAKE_CURRENT_BINARY_DIR}/iceberg-config-version.cmake"
+  COMPATIBILITY SameMajorVersion)
+
+install(FILES "${CMAKE_CURRENT_BINARY_DIR}/iceberg-config.cmake"

Review Comment:
   We need to install the arrow static lib only when we provided vendored arrow 
in the build process. There are several cases:
   
   1. If users run `cmake .. -DICEBERG_ARROW=OFF`, then we get rid of Arrow at 
all.
   2. If users run `cmake .. -DICEBERG_ARROW=ON`, then we vendor and install 
static Arrow lib.
   3. If users have installed arrow already, then they simply run `cmake .. 
-DCMAKE_PREFIX_PATH=/path/to/arrow -DICEBERG_ARROW=ON ` to point to that 
location and `FetchContent_MakeAvaiable` is smart enough to locate it. In this 
case, we don't install Arrow lib and it is the preferred use case in production.
   
   BTW, I have added components support in this PR as well. If users want to 
make sure iceberg_arrow is available, they can call `find_package(Iceberg 
REQUIRED CONFIG COMPONENTS Core Arrow)`.



-- 
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: issues-unsubscr...@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org
For additional commands, e-mail: issues-h...@iceberg.apache.org

Reply via email to