Skip to content

Commit 994bba3

Browse files
authored
Merge pull request #5 from diffCheckOrg/refactor_cmakeproj
Better CMake project for DiffCheck + CI fix
2 parents 9fd1421 + 12c5ac9 commit 994bba3

File tree

11 files changed

+27
-150
lines changed

11 files changed

+27
-150
lines changed

.github/workflows/win-build.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,6 @@ jobs:
2020
- uses: actions/checkout@v4
2121

2222
- name: CMAKE Configure
23-
run: >
24-
cmake -B ${{github.workspace}}/build -S ${{github.workspace}}
25-
-D CMAKE_BUILD_TYPE=Release
23+
run: ${{github.workspace}}/cmake/config.bat
2624
- name: CMake Build
27-
run: cmake --build ${{github.workspace}}/build --config Release
25+
run: ${{github.workspace}}/cmake/build.bat

.gitmodules

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,10 @@
44
branch = main
55
[submodule "deps/eigen"]
66
path = deps/eigen
7-
url = https://gitlab.com/libeigen/eigen.git
7+
url = https://gitlab.com/libeigen/eigen.git
8+
[submodule "deps/open3d"]
9+
path = deps/open3d
10+
url = https://github.com/diffCheckOrg/submodule-open3d.git
11+
[submodule "deps/boost"]
12+
path = deps/boost
13+
url = https://github.com/diffCheckOrg/submodule-boost.git

CMakeLists.txt

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ download_submodule_project(eigen)
5252
add_subdirectory(deps/eigen)
5353
target_link_libraries(${SHARED_LIB_NAME} PUBLIC Eigen3::Eigen)
5454

55-
# Open3D (from system) -----------------------------------------------------
55+
# Open3D (pre-built binaries) -----------------------------------------------------
5656
# The options need to be the same as Open3D's default
5757
# If Open3D is configured and built with custom options, you'll also need to
5858
# specify the same custom options.
@@ -63,6 +63,8 @@ else()
6363
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>DLL")
6464
endif()
6565

66+
download_submodule_project(open3d)
67+
set(Open3D_DIR ${CMAKE_CURRENT_SOURCE_DIR}/deps/open3d/win/0_18/CMake)
6668
find_package(Open3D 0.18.0 REQUIRED)
6769

6870
# print the version debug or release of the package
@@ -85,9 +87,9 @@ if(WIN32)
8587
endif()
8688
endif()
8789

88-
# Boost (from system) -----------------------------------------------------
89-
# download and install from https://sourceforge.net/projects/boost/files/boost-binaries/1.84.0/boost_1_84_0-msvc-14.3-64.exe/download
90-
find_package(Boost REQUIRED)
90+
# Boost (header only) -----------------------------------------------------
91+
download_submodule_project(boost)
92+
target_link_directories(${SHARED_LIB_NAME} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/deps/boost/win/1_89/include/boost-1_85)
9193

9294
# print boost include dir
9395
message(STATUS "Boost include dir: ${Boost_INCLUDE_DIRS}")

README.md

Lines changed: 3 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -47,24 +47,10 @@ gantt
4747
## 3rd party libraries
4848

4949
The project uses the following 3rd party libraries:
50-
- `Open3d 0.18.0` for 3D point cloud processing it needs to be installed from source [from here](https://github.com/isl-org/Open3D/archive/refs/tags/v0.18.0.zip), unzip the file and by following the instructions below:
51-
```terminal
52-
cd open3d
53-
mkdir build
54-
cmake -G "Visual Studio 16 2019" -A x64 -DCMAKE_INSTALL_PREFIX="C:\Program Files\Open3D" -S . -B build
55-
cmake --build build --config Release --target ALL_BUILD
56-
cmake --build build --config Release --target INSTALL
57-
```
58-
- `Eigen` for linear algebra (needed by `Open3d`)
50+
- `Open3d 0.18.0` for 3D point cloud processing as pre-build binaries ([store here](https://github.com/diffCheckOrg/submodule-open3d.git))
51+
- `Eigen` for linear algebra
5952
- `CGAL` for general geometric processing and IO
60-
- `Boost` for general utilities, it needs to be installed from source [from the repo](https://github.com/boostorg/boost) as such:
61-
```terminal
62-
git clone --recursive https://github.com/boostorg/boost.git
63-
cd boost
64-
cmake -G "Visual Studio 16 2019" -A x64 -DCMAKE_INSTALL_PREFIX="C:\Program Files\Boost" -S . -B build
65-
cmake --build build --config Release --target ALL_BUILD
66-
cmake --build build --config Release --target INSTALL
67-
```
53+
- `Boost` for general utilities as pre-build binaries ([store here](https://github.com/diffCheckOrg/submodule-boost.git))
6854

6955
## How to build c++ project
7056
To build and test the project, follow the following steps:

cmake/Dockerfile

Lines changed: 0 additions & 34 deletions
This file was deleted.

cmake/config.bat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
cmake -S . -B build -G "Visual Studio 16 2019" -A x64
1+
cmake -S . -B build

cmake/install_open3d.bat

Lines changed: 0 additions & 86 deletions
This file was deleted.

deps/boost

Submodule boost added at ac8c15b

deps/open3d

Submodule open3d added at 498699b

src/diffCheck.hh

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
#pragma once
22

33

4-
// include CGAL
5-
64
#include <open3d/Open3D.h>
75

86
// diffCheck includes

0 commit comments

Comments
 (0)