Skip to content

Commit 29276a0

Browse files
committed
WIP-TEMP: working with open3d as package
1 parent 8aa5767 commit 29276a0

File tree

3,770 files changed

+1252369
-190
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

3,770 files changed

+1252369
-190
lines changed

.gitmodules

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,7 @@
1414
url = https://github.com/fmtlib/fmt.git
1515
[submodule "deps/libigl"]
1616
path = deps/libigl
17-
url = https://github.com/libigl/libigl.git
17+
url = https://github.com/libigl/libigl.git
18+
[submodule "deps/glfw"]
19+
path = deps/glfw
20+
url = https://github.com/glfw/glfw.git

CMakeLists.txt

Lines changed: 119 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,13 @@ cmake_minimum_required(VERSION 3.16.)
22
project(DiffCheck VERSION 1.0.0 LANGUAGES CXX C)
33
set(CMAKE_CXX_STANDARD 17)
44

5+
# set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>DLL")
6+
7+
# # enable MT option for diffcheck
8+
# set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>DLL")
9+
# set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Release>:Release>DLL")
10+
11+
512
list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake)
613

714
# import the custom cmake utilities funcs
@@ -23,7 +30,8 @@ set(SHARED_LIB_NAME diffCheck)
2330

2431
file(GLOB_RECURSE SOURCES_LIB
2532
src/diffCheck.hh # diffCheck interface
26-
src/diffCheck/*.cc src/diffCheck/*.hh # diffCheck src
33+
# src/diffCheck/*.cc src/diffCheck/*.hh # diffCheck src # TODO: temp reactivate
34+
src/IOManager.cc src/IOManager.hh # IOManager TOOD: a test erase
2735
)
2836

2937
add_library(${SHARED_LIB_NAME} SHARED ${SOURCES_LIB})
@@ -35,33 +43,32 @@ if (WIN32)
3543
endif()
3644
set_target_properties(${SHARED_LIB_NAME} PROPERTIES
3745
RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin # for dll
38-
# ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin # for lib
46+
ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib # for lib
3947
)
4048
target_include_directories(${SHARED_LIB_NAME}
4149
PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/src
4250
)
4351

52+
4453
#--------------------------------------------------------------------------
4554
# 3rd party
4655
#--------------------------------------------------------------------------
47-
# fmt (header-only)--------------------------------------------------------
48-
download_submodule_project(fmt)
49-
add_subdirectory(deps/fmt)
56+
# # fmt ---------------------------------------------------------------------
57+
# download_submodule_project(fmt)
58+
# add_subdirectory(deps/fmt)
59+
# target_link_libraries(${SHARED_LIB_NAME} PUBLIC fmt::fmt)
5060

51-
target_link_libraries(${SHARED_LIB_NAME} PUBLIC fmt::fmt)
52-
53-
# Eigen (header-only)------------------------------------------------------
61+
# Eigen -------------------------------------------------------------------
5462
download_submodule_project(eigen)
5563
add_subdirectory(deps/eigen)
56-
5764
target_link_libraries(${SHARED_LIB_NAME} PUBLIC Eigen3::Eigen)
5865

59-
# OpenGL (from system) ----------------------------------------------------
60-
find_package(OpenGL REQUIRED)
61-
target_link_libraries(${SHARED_LIB_NAME} PUBLIC OpenGL::GL)
62-
target_link_libraries(${SHARED_LIB_NAME} INTERFACE OpenGL::GL)
66+
# # OpenGL (from system) ----------------------------------------------------
67+
# find_package(OpenGL REQUIRED)
68+
# target_link_libraries(${SHARED_LIB_NAME} PUBLIC OpenGL::GL)
69+
# target_link_libraries(${SHARED_LIB_NAME} INTERFACE OpenGL::GL)
6370

64-
# Libigl + glfw (header-only) ---------------------------------------------
71+
# # Libigl + glfw -----------------------------------------------------------
6572
download_submodule_project(libigl)
6673
# all dependecies for libigl: https://libigl.github.io/third-party/
6774
# set compiling flags for libigl
@@ -71,41 +78,115 @@ add_subdirectory(deps/libigl)
7178

7279
target_link_libraries(${SHARED_LIB_NAME} PUBLIC igl::glfw)
7380

74-
# Open3D (pre-build binaries /headless not visuals)------------------------
75-
download_submodule_project(open3d)
76-
set(O3D_VERSION 0_17) # 0.17.0
77-
set(OPEN3D_SHAREDLIB_PATH ${CMAKE_CURRENT_SOURCE_DIR}/deps/open3d/win/${O3D_VERSION}/bin)
78-
set(OPEN3D_LIB_PATH ${CMAKE_CURRENT_SOURCE_DIR}/deps/open3d/win/${O3D_VERSION}/lib)
79-
set(OPEN3D_INCLUDE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/deps/open3d/win/${O3D_VERSION}/include)
80-
81-
add_library(Open3D SHARED IMPORTED)
82-
set_target_properties(Open3D PROPERTIES
83-
IMPORTED_LOCATION ${OPEN3D_SHAREDLIB_PATH}/Open3D.dll
84-
IMPORTED_IMPLIB ${OPEN3D_LIB_PATH}/Open3D.lib
85-
INTERFACE_INCLUDE_DIRECTORIES ${OPEN3D_INCLUDE_PATH}
86-
)
8781

88-
target_link_libraries(${SHARED_LIB_NAME} PUBLIC Open3D)
89-
target_include_directories(${SHARED_LIB_NAME} PUBLIC ${OPEN3D_INCLUDE_PATH})
82+
# # glew (binaries) ------------------------------------------------------
83+
# # download_submodule_project(glew)
84+
# set(GLEW_LIB_PATH ${CMAKE_CURRENT_SOURCE_DIR}/deps/glew/lib/Release/x64)
85+
# set(GLEW_INCLUDE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/deps/glew/include)
9086

91-
# copy the o3d dll to the binary dir to make it available for the app
92-
set(DEPENDENCIES Open3D)
87+
# add_library(GLEW SHARED IMPORTED)
88+
# set_target_properties(GLEW PROPERTIES
89+
# IMPORTED_LOCATION ${GLEW_LIB_PATH}/glew32.dll
90+
# IMPORTED_IMPLIB ${GLEW_LIB_PATH}/glew32.lib
91+
# INTERFACE_INCLUDE_DIRECTORIES ${GLEW_INCLUDE_PATH}
92+
# )
9393

94-
foreach(DEP_LIB ${DEPENDENCIES})
95-
add_custom_command(TARGET ${SHARED_LIB_NAME} POST_BUILD
96-
COMMAND ${CMAKE_COMMAND} -E copy_if_different
97-
$<TARGET_FILE:${DEP_LIB}>
98-
$<TARGET_FILE_DIR:${SHARED_LIB_NAME}>
99-
)
100-
endforeach()
94+
# target_link_libraries(${SHARED_LIB_NAME} PUBLIC GLEW)
95+
# target_include_directories(${SHARED_LIB_NAME} PUBLIC ${GLEW_INCLUDE_PATH})
96+
97+
# # glfw (compile from source) ------------------------------------------------------
98+
# download_submodule_project(glfw)
99+
# add_subdirectory(deps/glfw)
100+
101+
# target_link_libraries(${SHARED_LIB_NAME} PUBLIC glfw)
102+
103+
104+
105+
106+
107+
# # Open3D (pre-build binaries /headless not visuals)------------------------
108+
109+
# # The options need to be the same as Open3D's default
110+
# # If Open3D is configured and built with custom options, you'll also need to
111+
# # specify the same custom options.
112+
# option(STATIC_WINDOWS_RUNTIME "Use static (MT/MTd) Windows runtime" ON)
113+
# if(STATIC_WINDOWS_RUNTIME)
114+
# set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
115+
# else()
116+
# set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>DLL")
117+
# endif()
118+
119+
# download_submodule_project(open3d) # TODO: temp reactivate
120+
# set(O3D_VERSION 0_18) # 0.18.0
121+
# set(OPEN3D_SHAREDLIB_PATH ${CMAKE_CURRENT_SOURCE_DIR}/deps/open3d/win/${O3D_VERSION}/bin)
122+
# set(OPEN3D_LIB_PATH ${CMAKE_CURRENT_SOURCE_DIR}/deps/open3d/win/${O3D_VERSION}/lib)
123+
# set(OPEN3D_INCLUDE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/deps/open3d/win/${O3D_VERSION}/include)
124+
125+
# # import open3d as a static lib
126+
# add_library(Open3D STATIC IMPORTED)
127+
# set_target_properties(Open3D PROPERTIES
128+
# IMPORTED_LOCATION ${OPEN3D_LIB_PATH}/Open3D.lib
129+
# INTERFACE_INCLUDE_DIRECTORIES ${OPEN3D_INCLUDE_PATH}
130+
# )
131+
132+
# target_link_libraries(${SHARED_LIB_NAME} PUBLIC Open3D)
133+
# target_include_directories(${SHARED_LIB_NAME} PUBLIC ${OPEN3D_INCLUDE_PATH})
134+
135+
# # copy the o3d dll to the binary dir to make it available for the app
136+
# set(DEPENDENCIES Open3D)
137+
138+
# foreach(DEP_LIB ${DEPENDENCIES})
139+
# add_custom_command(TARGET ${SHARED_LIB_NAME} POST_BUILD
140+
# COMMAND ${CMAKE_COMMAND} -E copy_if_different
141+
# $<TARGET_FILE:${DEP_LIB}>
142+
# $<TARGET_FILE_DIR:${SHARED_LIB_NAME}>
143+
# )
144+
# endforeach()
101145

102146
# # CGAL ( ctories(${SHARED_LIB_NAME} PUBLIC ${CGAL_INCLUDE_DIRS})
103147

148+
149+
150+
# Open3D (from system) -----------------------------------------------------
151+
find_package(Open3D 0.18.0 REQUIRED)
152+
153+
# print the version debug or release of the package
154+
message(STATUS "Open3D version: ${Open3D_VERSION}"
155+
"Open3D include dir: ${Open3D_INCLUDE_DIRS}"
156+
"Open3D library dir: ${Open3D_LIBRARIES}")
157+
158+
# link the release version of the open3d library
159+
target_link_libraries(${SHARED_LIB_NAME} PUBLIC Open3D::Open3D)
160+
161+
# On Windows if BUILD_SHARED_LIBS is enabled, copy .dll files to the executable directory
162+
if(WIN32)
163+
get_target_property(open3d_type Open3D::Open3D TYPE)
164+
if(open3d_type STREQUAL "SHARED_LIBRARY")
165+
message(STATUS "Copying Open3D.dll to ${CMAKE_CURRENT_BINARY_DIR}/$<CONFIG>")
166+
add_custom_command(TARGET ${SHARED_LIB_NAME} POST_BUILD
167+
COMMAND ${CMAKE_COMMAND} -E copy_if_different
168+
$<TARGET_FILE:Open3D::Open3D>
169+
$<TARGET_FILE_DIR:${SHARED_LIB_NAME}>)
170+
endif()
171+
endif()
172+
173+
# Boost (header-only) -----------------------------------------------------
174+
# download_submodule_project(boost)
175+
# add_subdirectory(deps/boost)
176+
# target_include_directories(${SHARED_LIB_NAME} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/deps/boost/include)
177+
178+
# CGAL (header-only) ------------------------------------------------------
179+
# download_submodule_project(cgal)
180+
# add_subdirectory(deps/cgal)
181+
# target_include_directories(${SHARED_LIB_NAME} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/deps/cgal/include)
182+
183+
104184
#--------------------------------------------------------------------------
105185
# executable for prototyping
106186
#--------------------------------------------------------------------------
107187
set(APP_NAME_EXE diffCheckApp)
108188

189+
109190
add_executable(${APP_NAME_EXE} src/diffCheckApp.cc)
110191

111192
set_target_properties(${APP_NAME_EXE} PROPERTIES

cmake/build.bat

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
cmake --build build --config Release

cmake/config.bat

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

deps/cgal

Lines changed: 0 additions & 1 deletion
This file was deleted.

deps/cgal/AUTHORS

Lines changed: 111 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
1+
AUTHORS
2+
-------------------------------------------------------------------------------
3+
4+
Pierre Alliez
5+
Matthias Bäsken
6+
Eric Berberich
7+
Olivier Billet
8+
Jean-Daniel Boissonnat
9+
Carine Bonetto
10+
Mario Botsch
11+
Hervé Brönnimann
12+
Fernando Cacciola
13+
Manuel Caroli
14+
Nicolas Carrez
15+
Frédéric Cazals
16+
Raphaëlle Chaine
17+
Tran Kai Frank Da
18+
Guillaume Damiand
19+
Christophe Delage
20+
Olivier Devillers
21+
Katrin Dobrindt
22+
Arno Eigenwillig
23+
Eti Ezra
24+
Andreas Fabri
25+
Frédéric Fichel
26+
Kaspar Fischer
27+
Eyal Flato
28+
Julia Flötotto
29+
Efi Fogel
30+
Wolfgang Freiseisen
31+
Bernd Gärtner
32+
Geert-Jan Giezeman
33+
Marc Glisse
34+
Shlomo Golubev
35+
Miguel Granados
36+
Gael Guennebaud
37+
Philippe Guigue
38+
Ankit Gupta
39+
Peter Hachenberger
40+
Iddo Hanniel
41+
Idit Haran
42+
Sariel Har-Peled
43+
Julien Hazebrouck
44+
Michael Hemmer
45+
Thomas Herrmann
46+
Susan Hert
47+
Shai Hirsch
48+
Michael Hoffmann
49+
Dominik Huelse
50+
Marcel Janer
51+
Athanasios Kakargias
52+
Menelaos Karavelas
53+
Michael Kerber
54+
Lutz Kettner
55+
Nico Kruithof
56+
Sylvain Lazard
57+
Eran Leiserowitz
58+
Bruno Lévy
59+
Sebastian Limbach
60+
Kapelushnik Lior
61+
Eugene Lipovetsky
62+
Sébastien Loriot
63+
Pedro Machado
64+
Bastien Manuel
65+
Naama Mayer
66+
Abdelkrim Mebarki
67+
Kurt Mehlhorn
68+
Naceur Meskini
69+
Andreas Meyer
70+
Michal Meyerovitch
71+
Liangliang Nan
72+
Oren Nechushtan
73+
Gabriele Neyer
74+
Ralf Osbild
75+
Steve Oudot
76+
Eli Packer
77+
Dmitrii Pasechnik
78+
Aymeric Pellé
79+
Luis Peñaranda
80+
Sylvain Pion
81+
Marc Pouget
82+
Sigal Raab
83+
François Rebufat
84+
Joachim Reichel
85+
David Rey
86+
Laurent Rineau
87+
Daniel Russel
88+
Niv Sabath
89+
Laurent Saboret
90+
Nader Salman
91+
Stefan Schirra
92+
Sven Schönherr
93+
Michael Seel
94+
Ophir Setter
95+
Le-Jeng Shiue
96+
Hans Tangelder
97+
Stéphane Tayeb
98+
Monique Teillaud
99+
Jane Tournois
100+
Constantinos Tsirogiannis
101+
Radu Ursu
102+
Carl Van Geem
103+
Remco Veltkamp
104+
Ron Wein
105+
Wieger Wesselink
106+
Camille Wormser
107+
Mariette Yvinec
108+
Afra Zomorodian
109+
Guy Zucker
110+
Baruch Zukerman
111+
Tali Zvi

deps/cgal/CGALConfig.cmake

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#
2+
# This file points to the CGALConfig.cmake for a header-only
3+
# CGAL installation.
4+
#
5+
6+
include(${CMAKE_CURRENT_LIST_DIR}/lib/cmake/CGAL/CGALConfig.cmake)

deps/cgal/CGALConfigVersion.cmake

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
include(${CMAKE_CURRENT_LIST_DIR}/lib/cmake/CGAL/CGALConfigVersion.cmake)

0 commit comments

Comments
 (0)