Skip to content

Commit aa25873

Browse files
committed
CAP: working refactor version of cmake project
1 parent 3cd0efb commit aa25873

Some content is hidden

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

41 files changed

+197
-37999
lines changed

.vscode/settings.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,8 @@
9494
"source_location": "cpp",
9595
"stack": "cpp",
9696
"valarray": "cpp",
97-
"*.inc": "cpp"
97+
"*.inc": "cpp",
98+
"coroutine": "cpp",
99+
"resumable": "cpp"
98100
}
99101
}

CMakeLists.txt

Lines changed: 13 additions & 98 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,6 @@ 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-
125
list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake)
136

147
# import the custom cmake utilities funcs
@@ -23,15 +16,15 @@ if(NOT GIT_SUBMOD_RESULT EQUAL "0")
2316
message(FATAL_ERROR "git submodule update --init --recursive failed with ${GIT_SUBMOD_RESULT}, please checkout submodules")
2417
endif()
2518

19+
2620
#--------------------------------------------------------------------------
2721
# diffCheck dynamic lib
2822
#--------------------------------------------------------------------------
2923
set(SHARED_LIB_NAME diffCheck)
3024

3125
file(GLOB_RECURSE SOURCES_LIB
3226
src/diffCheck.hh # diffCheck interface
33-
# src/diffCheck/*.cc src/diffCheck/*.hh # diffCheck src # TODO: temp reactivate
34-
src/IOManager.cc src/IOManager.hh # IOManager TOOD: a test erase
27+
src/diffCheck/*.cc src/diffCheck/*.hh # diffCheck src
3528
)
3629

3730
add_library(${SHARED_LIB_NAME} SHARED ${SOURCES_LIB})
@@ -53,102 +46,24 @@ target_include_directories(${SHARED_LIB_NAME}
5346
#--------------------------------------------------------------------------
5447
# 3rd party
5548
#--------------------------------------------------------------------------
56-
# # fmt ---------------------------------------------------------------------
57-
# download_submodule_project(fmt)
58-
# add_subdirectory(deps/fmt)
59-
# target_link_libraries(${SHARED_LIB_NAME} PUBLIC fmt::fmt)
6049

6150
# Eigen -------------------------------------------------------------------
6251
download_submodule_project(eigen)
6352
add_subdirectory(deps/eigen)
6453
target_link_libraries(${SHARED_LIB_NAME} PUBLIC Eigen3::Eigen)
6554

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)
70-
71-
# # Libigl + glfw -----------------------------------------------------------
72-
download_submodule_project(libigl)
73-
# all dependecies for libigl: https://libigl.github.io/third-party/
74-
# set compiling flags for libigl
75-
set(LIBIGL_USE_STATIC_LIBRARY OFF)
76-
set(LIBIGL_GLFW ON)
77-
add_subdirectory(deps/libigl)
78-
79-
target_link_libraries(${SHARED_LIB_NAME} PUBLIC igl::glfw)
80-
81-
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)
86-
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-
# )
93-
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()
145-
146-
# # CGAL ( ctories(${SHARED_LIB_NAME} PUBLIC ${CGAL_INCLUDE_DIRS})
147-
148-
149-
15055
# Open3D (from system) -----------------------------------------------------
151-
find_package(Open3D 0.18.0 REQUIRED)
56+
# The options need to be the same as Open3D's default
57+
# If Open3D is configured and built with custom options, you'll also need to
58+
# specify the same custom options.
59+
option(STATIC_WINDOWS_RUNTIME "Use static (MT/MTd) Windows runtime" ON)
60+
if(STATIC_WINDOWS_RUNTIME)
61+
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
62+
else()
63+
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>DLL")
64+
endif()
65+
66+
add_external_package(Open3D 0.18.0 REQUIRED)
15267

15368
# print the version debug or release of the package
15469
message(STATUS "Open3D version: ${Open3D_VERSION}"
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
{
2+
"class_name" : "PinholeCameraParameters",
3+
"extrinsic" :
4+
[
5+
0.9318274229773803,
6+
0.13596883735278759,
7+
0.33646712923592631,
8+
0.0,
9+
-0.11220763967397515,
10+
-0.77377639843160384,
11+
0.62344168197916616,
12+
0.0,
13+
0.34511896410676968,
14+
-0.6186942382947711,
15+
-0.70576932500266887,
16+
0.0,
17+
-99.955305083966053,
18+
19.548374439392845,
19+
238.32491328079061,
20+
1.0
21+
],
22+
"intrinsic" :
23+
{
24+
"height" : 800,
25+
"intrinsic_matrix" :
26+
[
27+
692.82032302755101,
28+
0.0,
29+
0.0,
30+
0.0,
31+
692.82032302755101,
32+
0.0,
33+
499.5,
34+
399.5,
35+
1.0
36+
],
37+
"width" : 1000
38+
},
39+
"version_major" : 1,
40+
"version_minor" : 0
41+
}
72 KB
Loading

cmake/clean_config.bat

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

deps/eigen

Submodule eigen updated from 4dccaa5 to d26e197

deps/glew/LICENSE.txt

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

0 commit comments

Comments
 (0)