Skip to content

Commit 9c97f17

Browse files
authored
Feature/external content (#63)
* Support out-of-source build * (minor) update CMakeLists.txt files * Generalize version of tar.gz target * (minor) remove line and bump up the python version
1 parent af121f5 commit 9c97f17

File tree

3 files changed

+14
-6
lines changed

3 files changed

+14
-6
lines changed

cpp/CMakeLists.txt

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
cmake_minimum_required(VERSION 3.11)
2-
project(patchworkpp VERSION 1.0.0)
2+
project(patchworkpp VERSION 1.0.1)
33

44
set(CMAKE_CXX_STANDARD 20)
55
set(PYTHON_EXECUTABLE python3)
66
set(CMAKE_BUILD_TYPE Release)
7+
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
78

89
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${Open3D_C_FLAGS}")
910
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${Open3D_CXX_FLAGS}")
@@ -58,5 +59,4 @@ if (INCLUDE_CPP_EXAMPLES)
5859
target_link_libraries(demo_sequential PRIVATE ${PARENT_PROJECT_NAME}::${TARGET_NAME} ${Open3D_LIBRARIES} "stdc++fs")
5960
target_include_directories(demo_sequential PUBLIC ${Open3D_INCLUDE_DIRS})
6061
set_target_properties(demo_sequential PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/examples")
61-
62-
endif()
62+
endif()

python/CMakeLists.txt

+10-2
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,22 @@ set(TARGET_NAME ground_seg_cores)
1515
find_package(Python COMPONENTS Interpreter Development.Module REQUIRED)
1616
find_package(pybind11 CONFIG REQUIRED)
1717

18+
# See our `pyproject.toml` file. We use `scikit_build_core`, which turns on `SKBUILD`
19+
if (DEFINED SKBUILD)
20+
message(STATUS "Building with Scikit-Build")
21+
endif ()
22+
1823
if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/../cpp/)
1924
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../cpp ${CMAKE_CURRENT_BINARY_DIR}/patchworkpp_cpp)
2025
else()
2126
cmake_minimum_required(VERSION 3.18)
2227
message(STATUS "Performing out-of-tree build, fetching Patchwork++ v${CMAKE_PROJECT_VERSION} Release from Github")
2328
include(FetchContent)
24-
# Currently, out-of-source build is not supported.
25-
# But, it will be updated soon!
29+
FetchContent_Declare(
30+
ext_ground_seg_cores PREFIX ${PARENT_PROJECT_NAME}
31+
URL https://github.com/url-kaist/patchwork-plusplus/archive/refs/tags/v${CMAKE_PROJECT_VERSION}.tar.gz SOURCE_SUBDIR
32+
cpp/patchworkpp)
33+
FetchContent_MakeAvailable(ext_ground_seg_cores)
2634
endif()
2735

2836
pybind11_add_module(pypatchworkpp patchworkpp/pybinding.cpp)

python/pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "scikit_build_core.build"
44

55
[project]
66
name = "pypatchworkpp"
7-
version = "0.1.0"
7+
version = "1.0.1"
88
requires-python = ">=3.8"
99
description = "ground segmentation"
1010
dependencies = [

0 commit comments

Comments
 (0)