diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt index 0c9ea6e..2063851 100755 --- a/cpp/CMakeLists.txt +++ b/cpp/CMakeLists.txt @@ -1,9 +1,10 @@ cmake_minimum_required(VERSION 3.11) -project(patchworkpp VERSION 1.0.0) +project(patchworkpp VERSION 1.0.1) set(CMAKE_CXX_STANDARD 20) set(PYTHON_EXECUTABLE python3) set(CMAKE_BUILD_TYPE Release) +set(CMAKE_EXPORT_COMPILE_COMMANDS ON) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${Open3D_C_FLAGS}") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${Open3D_CXX_FLAGS}") @@ -58,5 +59,4 @@ if (INCLUDE_CPP_EXAMPLES) target_link_libraries(demo_sequential PRIVATE ${PARENT_PROJECT_NAME}::${TARGET_NAME} ${Open3D_LIBRARIES} "stdc++fs") target_include_directories(demo_sequential PUBLIC ${Open3D_INCLUDE_DIRS}) set_target_properties(demo_sequential PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/examples") - -endif() \ No newline at end of file +endif() diff --git a/python/CMakeLists.txt b/python/CMakeLists.txt index 832f935..5cb7f57 100644 --- a/python/CMakeLists.txt +++ b/python/CMakeLists.txt @@ -15,14 +15,22 @@ set(TARGET_NAME ground_seg_cores) find_package(Python COMPONENTS Interpreter Development.Module REQUIRED) find_package(pybind11 CONFIG REQUIRED) +# See our `pyproject.toml` file. We use `scikit_build_core`, which turns on `SKBUILD` +if (DEFINED SKBUILD) + message(STATUS "Building with Scikit-Build") +endif () + if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/../cpp/) add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../cpp ${CMAKE_CURRENT_BINARY_DIR}/patchworkpp_cpp) else() cmake_minimum_required(VERSION 3.18) message(STATUS "Performing out-of-tree build, fetching Patchwork++ v${CMAKE_PROJECT_VERSION} Release from Github") include(FetchContent) - # Currently, out-of-source build is not supported. - # But, it will be updated soon! + FetchContent_Declare( + ext_ground_seg_cores PREFIX ${PARENT_PROJECT_NAME} + URL https://github.com/url-kaist/patchwork-plusplus/archive/refs/tags/v${CMAKE_PROJECT_VERSION}.tar.gz SOURCE_SUBDIR + cpp/patchworkpp) + FetchContent_MakeAvailable(ext_ground_seg_cores) endif() pybind11_add_module(pypatchworkpp patchworkpp/pybinding.cpp) diff --git a/python/pyproject.toml b/python/pyproject.toml index 064ecc6..17395ec 100644 --- a/python/pyproject.toml +++ b/python/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "scikit_build_core.build" [project] name = "pypatchworkpp" -version = "0.1.0" +version = "1.0.1" requires-python = ">=3.8" description = "ground segmentation" dependencies = [