Skip to content

Commit 9a04468

Browse files
authored
Fix CMake to support being a subproject (#29)
1 parent e10d629 commit 9a04468

File tree

3 files changed

+3
-7
lines changed

3 files changed

+3
-7
lines changed

CMakeLists.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ set(ICEBERG_INSTALL_BINDIR "${CMAKE_INSTALL_BINDIR}")
4646
set(ICEBERG_INSTALL_INCLUDEDIR "${CMAKE_INSTALL_INCLUDEDIR}")
4747
set(ICEBERG_INSTALL_CMAKEDIR "${CMAKE_INSTALL_LIBDIR}/cmake")
4848
set(ICEBERG_INSTALL_DOCDIR "share/doc/${PROJECT_NAME}")
49-
set(ICEBERG_INCLUDES "${CMAKE_SOURCE_DIR}/src" "${CMAKE_BINARY_DIR}/src")
49+
set(ICEBERG_INCLUDES "${PROJECT_BINARY_DIR}/src" "${PROJECT_SOURCE_DIR}/src")
5050

5151
if(WIN32 AND NOT MINGW)
5252
set(MSVC_TOOLCHAIN TRUE)
@@ -55,8 +55,8 @@ else()
5555
endif()
5656

5757
include(CMakeParseArguments)
58-
include(BuildUtils)
59-
include(ThirdpartyToolchain)
58+
include(IcebergBuildUtils)
59+
include(IcebergThirdpartyToolchain)
6060
include(GenerateExportHeader)
6161

6262
add_subdirectory(src)
File renamed without changes.

cmake_modules/ThirdpartyToolchain.cmake renamed to cmake_modules/IcebergThirdpartyToolchain.cmake

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -92,10 +92,6 @@ function(resolve_arrow_dependency)
9292
Arrow
9393
CONFIG)
9494

95-
# Add Arrow cmake modules to the search path
96-
list(PREPEND CMAKE_MODULE_PATH
97-
${CMAKE_CURRENT_BINARY_DIR}/_deps/arrow-src/cpp/cmake_modules)
98-
9995
fetchcontent_makeavailable(Arrow)
10096

10197
if(arrow_SOURCE_DIR)

0 commit comments

Comments
 (0)