This is an automated email from the ASF dual-hosted git repository.

xuanwo pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/iceberg-cpp.git


The following commit(s) were added to refs/heads/main by this push:
     new 9a04468  Fix CMake to support being a subproject (#29)
9a04468 is described below

commit 9a044687a78bbf9c2c6c29ff6a30f91b645d4cfd
Author: Gang Wu <[email protected]>
AuthorDate: Tue Jan 14 22:59:01 2025 +0800

    Fix CMake to support being a subproject (#29)
---
 CMakeLists.txt                                                      | 6 +++---
 cmake_modules/{BuildUtils.cmake => IcebergBuildUtils.cmake}         | 0
 .../{ThirdpartyToolchain.cmake => IcebergThirdpartyToolchain.cmake} | 4 ----
 3 files changed, 3 insertions(+), 7 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index fd2c737..3c29687 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -46,7 +46,7 @@ set(ICEBERG_INSTALL_BINDIR "${CMAKE_INSTALL_BINDIR}")
 set(ICEBERG_INSTALL_INCLUDEDIR "${CMAKE_INSTALL_INCLUDEDIR}")
 set(ICEBERG_INSTALL_CMAKEDIR "${CMAKE_INSTALL_LIBDIR}/cmake")
 set(ICEBERG_INSTALL_DOCDIR "share/doc/${PROJECT_NAME}")
-set(ICEBERG_INCLUDES "${CMAKE_SOURCE_DIR}/src" "${CMAKE_BINARY_DIR}/src")
+set(ICEBERG_INCLUDES "${PROJECT_BINARY_DIR}/src" "${PROJECT_SOURCE_DIR}/src")
 
 if(WIN32 AND NOT MINGW)
   set(MSVC_TOOLCHAIN TRUE)
@@ -55,8 +55,8 @@ else()
 endif()
 
 include(CMakeParseArguments)
-include(BuildUtils)
-include(ThirdpartyToolchain)
+include(IcebergBuildUtils)
+include(IcebergThirdpartyToolchain)
 include(GenerateExportHeader)
 
 add_subdirectory(src)
diff --git a/cmake_modules/BuildUtils.cmake 
b/cmake_modules/IcebergBuildUtils.cmake
similarity index 100%
rename from cmake_modules/BuildUtils.cmake
rename to cmake_modules/IcebergBuildUtils.cmake
diff --git a/cmake_modules/ThirdpartyToolchain.cmake 
b/cmake_modules/IcebergThirdpartyToolchain.cmake
similarity index 96%
rename from cmake_modules/ThirdpartyToolchain.cmake
rename to cmake_modules/IcebergThirdpartyToolchain.cmake
index efd587a..1b00134 100644
--- a/cmake_modules/ThirdpartyToolchain.cmake
+++ b/cmake_modules/IcebergThirdpartyToolchain.cmake
@@ -92,10 +92,6 @@ function(resolve_arrow_dependency)
                        Arrow
                        CONFIG)
 
-  # Add Arrow cmake modules to the search path
-  list(PREPEND CMAKE_MODULE_PATH
-       ${CMAKE_CURRENT_BINARY_DIR}/_deps/arrow-src/cpp/cmake_modules)
-
   fetchcontent_makeavailable(Arrow)
 
   if(arrow_SOURCE_DIR)

Reply via email to