Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -47,3 +47,9 @@
[submodule "3rdparty/unordered_dense"]
path = 3rdparty/unordered_dense
url = https://github.com/martinus/unordered_dense.git
[submodule "3rdparty/spdlog"]
path = 3rdparty/spdlog
url = https://github.com/gabime/spdlog.git
[submodule "3rdparty/UTL"]
path = 3rdparty/UTL
url = https://github.com/DmitriBogdanov/UTL.git
1 change: 1 addition & 0 deletions 3rdparty/UTL
Submodule UTL added at f98fa2
1 change: 1 addition & 0 deletions 3rdparty/spdlog
Submodule spdlog added at 79524d
11 changes: 11 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ if (MSVC)
add_definitions(-DWIN32_LEAN_AND_MEAN)
endif()

option(UTL_PROFILER_DISABLE "Disable UTL profiler (zero overhead when ON)" ON)

get_filename_component(REPOSITORY_DIRECTORY ${CMAKE_CURRENT_LIST_DIR} ABSOLUTE)
set(THIRDPARTY_DIRECTORY ${REPOSITORY_DIRECTORY}/3rdparty)
set(THIRDPARTY_DIRECTORY_BINARY ${REPOSITORY_DIRECTORY}/3rdpartyBinary)
Expand Down Expand Up @@ -366,6 +368,15 @@ endif()
add_subdirectory(${THIRDPARTY_DIRECTORY}/unordered_dense)
MESSAGE(STATUS "Using bundled unordered_dense from: ${THIRDPARTY_DIRECTORY}/unordered_dense")

# Add spdlog logging library
set(SPDLOG_BUILD_PIC ON CACHE BOOL "Build spdlog with position-independent code")
add_subdirectory(${THIRDPARTY_DIRECTORY}/spdlog)
MESSAGE(STATUS "Using bundled spdlog from: ${THIRDPARTY_DIRECTORY}/spdlog")

# Add UTL header-only utility library
add_subdirectory(${THIRDPARTY_DIRECTORY}/UTL)
MESSAGE(STATUS "Using bundled UTL from: ${THIRDPARTY_DIRECTORY}/UTL")

option(PYBIND "Enable pybind11 bindings" OFF)
if(PYBIND)
message(STATUS "PYBIND is enabled: fetching pybind.")
Expand Down
1 change: 1 addition & 0 deletions apps/compare_trajectories/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ target_link_libraries(
mandeye_compare_trajectories
PRIVATE Fusion
unordered_dense::unordered_dense
spdlog::spdlog
${FREEGLUT_LIBRARY}
${OPENGL_gl_LIBRARY}
OpenGL::GLU
Expand Down
1 change: 1 addition & 0 deletions apps/concatenate_multi_livox/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ target_include_directories(

target_link_libraries(concatenate_multi_livox PRIVATE core
unordered_dense::unordered_dense
spdlog::spdlog
${PLATFORM_LASZIP_LIB}
${PLATFORM_MISCELLANEOUS_LIBS})

Expand Down
6 changes: 5 additions & 1 deletion apps/lidar_odometry_step_1/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ add_executable(
lidar_odometry_step_1 ${SOURCES}
)

target_compile_definitions(lidar_odometry_step_1 PRIVATE -DWITH_GUI=1)
target_compile_definitions(lidar_odometry_step_1 PRIVATE
WITH_GUI=1
$<$<BOOL:${UTL_PROFILER_DISABLE}>:UTL_PROFILER_DISABLE>)

target_include_directories(
lidar_odometry_step_1
Expand All @@ -46,6 +48,8 @@ target_link_libraries(
lidar_odometry_step_1
PRIVATE Fusion
unordered_dense::unordered_dense
spdlog::spdlog
UTL::include
# PRIVATE ${THIRDPARTY_DIRECTORY}/glew-2.2.0/lib/Release/x64/glew32s.lib
${FREEGLUT_LIBRARY}
${OPENGL_gl_LIBRARY}
Expand Down
4 changes: 4 additions & 0 deletions apps/lidar_odometry_step_1/lidar_odometry_gui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@
#include <mutex>
#include <pfd_wrapper.hpp>
#include <session.h>
#include <spdlog/cfg/env.h>
#include <spdlog/spdlog.h>

#ifdef _WIN32
#include "resource.h"
Expand Down Expand Up @@ -2309,6 +2311,8 @@ void mouse(int glut_button, int state, int x, int y)

int main(int argc, char* argv[])
{
spdlog::cfg::load_env_levels();
spdlog::flush_on(spdlog::level::warn);
set_lidar_odometry_default_params(params);

try
Expand Down
Loading