@@ -4,8 +4,8 @@ set(CMAKE_CXX_STANDARD 17)
44
55list (APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR} /cmake)
66
7- # import the custom cmake utilities funcs
87include (external_tools)
8+ include (options )
99
1010# do a submodule init if not done already
1111execute_process (COMMAND git submodule update --init --recursive
@@ -17,6 +17,13 @@ if(NOT GIT_SUBMOD_RESULT EQUAL "0")
1717endif ()
1818
1919
20+ #--------------------------------------------------------------------------
21+ # pre-compiled definitions
22+ #--------------------------------------------------------------------------
23+ if (SILENT_LOGGING)
24+ target_compile_definitions (${PROJECT_NAME} PRIVATE SILENT_LOGGING=true )
25+ endif ()
26+
2027#--------------------------------------------------------------------------
2128# diffCheck dynamic lib
2229#--------------------------------------------------------------------------
@@ -42,6 +49,9 @@ target_include_directories(${SHARED_LIB_NAME}
4249 PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} /src
4350 )
4451
52+ #set the MD_DynamicRelease flag for MSVC since we are compiling with /MD for py wrap
53+ set (CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>DLL" )
54+
4555
4656#--------------------------------------------------------------------------
4757# 3rd party
@@ -52,17 +62,7 @@ download_submodule_project(eigen)
5262add_subdirectory (deps/eigen)
5363target_link_libraries (${SHARED_LIB_NAME} PUBLIC Eigen3::Eigen)
5464
55- # Open3D (pre-built binaries) -----------------------------------------------------
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-
65+ # Open3D (pre-built binaries) ---------------------------------------------
6666download_submodule_project(open3d)
6767set (Open3D_DIR ${CMAKE_CURRENT_SOURCE_DIR} /deps/open3d/win/0_18/CMake)
6868find_package (Open3D 0.18.0 REQUIRED)
@@ -91,14 +91,14 @@ endif()
9191download_submodule_project(boost)
9292target_link_directories (${SHARED_LIB_NAME} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} /deps/boost/win/1_89/include /boost-1_85)
9393
94- # print boost include dir
95- message (STATUS "Boost include dir: ${Boost_INCLUDE_DIRS} " )
96-
97- target_include_directories (${SHARED_LIB_NAME} PUBLIC ${Boost_INCLUDE_DIRS} )
98-
9994# CGAL (header-only) ------------------------------------------------------
10095target_include_directories (${SHARED_LIB_NAME} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} /deps/cgal/include )
10196
97+ # loguru (header-only) ----------------------------------------------------
98+ download_submodule_project(loguru)
99+ add_subdirectory (deps/loguru)
100+ target_link_libraries (${SHARED_LIB_NAME} PUBLIC loguru::loguru)
101+
102102#--------------------------------------------------------------------------
103103# executable for prototyping
104104#--------------------------------------------------------------------------
0 commit comments