Skip to content

Commit 497d3fb

Browse files
committed
WIP: testing docker windows
1 parent 9fd1421 commit 497d3fb

File tree

5 files changed

+27
-25
lines changed

5 files changed

+27
-25
lines changed

.gitmodules

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,7 @@
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

CMakeLists.txt

Lines changed: 11 additions & 9 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,17 +87,17 @@ 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 (from system) -----------------------------------------------------
91+
# # 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
92+
# find_package(Boost REQUIRED)
9193

92-
# print boost include dir
93-
message(STATUS "Boost include dir: ${Boost_INCLUDE_DIRS}")
94+
# # print boost include dir
95+
# message(STATUS "Boost include dir: ${Boost_INCLUDE_DIRS}")
9496

95-
target_include_directories(${SHARED_LIB_NAME} PUBLIC ${Boost_INCLUDE_DIRS})
97+
# target_include_directories(${SHARED_LIB_NAME} PUBLIC ${Boost_INCLUDE_DIRS})
9698

97-
# CGAL (header-only) ------------------------------------------------------
98-
target_include_directories(${SHARED_LIB_NAME} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/deps/cgal/include)
99+
# # CGAL (header-only) ------------------------------------------------------
100+
# target_include_directories(${SHARED_LIB_NAME} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/deps/cgal/include)
99101

100102
#--------------------------------------------------------------------------
101103
# executable for prototyping

cmake/Dockerfile renamed to Dockerfile

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -12,23 +12,14 @@ RUN powershell Start-Process -FilePath msiexec.exe -ArgumentList '/i', 'C:\\temp
1212
ADD https://github.com/git-for-windows/git/releases/download/v2.33.0.windows.2/Git-2.33.0.2-64-bit.exe C:\\temp\\git.exe
1313
RUN powershell Start-Process -FilePath C:\\temp\\git.exe -ArgumentList '/VERYSILENT' -NoNewWindow -Wait
1414

15-
# Download and install vcpkg
16-
RUN git clone https://github.com/microsoft/vcpkg.git C:\\vcpkg
17-
RUN C:\\vcpkg\\bootstrap-vcpkg.bat
18-
19-
# Install Open3D and other dependencies with vcpkg
20-
RUN C:\\vcpkg\\vcpkg install open3d
21-
RUN C:\\vcpkg\\vcpkg integrate install
22-
2315
# Set up the working directory
2416
WORKDIR C:/project
2517

26-
# Clone the project
27-
RUN git clone https://github.com/yourusername/yourproject.git .
18+
# make the code available in the container
19+
COPY . .
20+
21+
# Run the cmake/config.bat script
22+
RUN ["cmd", "/S", "/C", "cmake -DCMAKE_TOOLCHAIN_FILE=C:\\vcpkg\\scripts\\buildsystems\\vcpkg.cmake -S . -B build -G "Visual Studio 16 2019" -A x64"]
2823

2924
# Run the build script
30-
RUN ["cmd", "/S", "/C", "cmake -DCMAKE_TOOLCHAIN_FILE=C:\\vcpkg\\scripts\\buildsystems\\vcpkg.cmake -B build -S ."]
3125
RUN ["cmd", "/S", "/C", "cmake --build build --config Release"]
32-
33-
# Set the entrypoint to your application's main executable
34-
ENTRYPOINT ["C:\\project\\build\\YourApp.exe"]

deps/open3d

Submodule open3d added at 1841ca5

src/diffCheckApp.cc

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,13 @@ int main()
1818
std::string pathMesh = R"(F:\diffCheck\assets\dataset\mesh_fromRh_unfixedLength.ply)";
1919
// std::string pathMesh = R"(F:\diffCheck\temp\03_mesh.ply)";
2020

21-
21+
// create a sphere from o3d
22+
auto mesh = open3d::geometry::TriangleMesh::CreateSphere(1.0, 4);
2223
dfMeshPtr->LoadFromPLY(pathMesh);
24+
25+
26+
dfMeshPtr->Cvt2DFMesh(mesh);
27+
2328
// dfPointCloudPtr->LoadFromPLY(pathCloud);
2429

2530
std::shared_ptr<diffCheck::visualizer::Visualizer> vis = std::make_shared<diffCheck::visualizer::Visualizer>();

0 commit comments

Comments
 (0)