Skip to content

Commit

Permalink
run pre-commit hooks to fix cmake-format nagging
Browse files Browse the repository at this point in the history
  • Loading branch information
Marc Uecker committed Nov 18, 2024
1 parent 2ed20ef commit c235371
Show file tree
Hide file tree
Showing 9 changed files with 28 additions and 51 deletions.
1 change: 0 additions & 1 deletion cpp/include_example/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,3 @@ target_link_libraries(example PRIVATE kiss_icp::kiss_icp_pipeline)
#for other components (not used in example.cpp):
#target_link_libraries(example PRIVATE kiss_icp::kiss_icp_core)
#target_link_libraries(example PRIVATE kiss_icp::kiss_icp_metrics)

1 change: 0 additions & 1 deletion cpp/include_example/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,3 @@ See `CMakeLists.txt` for details on how to find the library and link the targets
cmake -Bbuild
cmake --build build -j$(nproc --all)
```

11 changes: 8 additions & 3 deletions cpp/kiss_icp/3rdparty/find_dependencies.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,10 @@ if(NOT DOWNLOAD_MISSING_DEPS)
find_package(Eigen3 REQUIRED) # sudo apt install libeigen3-dev
find_package(Sophus REQUIRED) # sudo apt install ros-noetic-sophus
find_package(TBB REQUIRED) # sudo apt install libtbb-dev
find_package(tsl-robin-map REQUIRED) # clone & install from https://github.com/Tessil/robin-map.git into misc_ws, and run `cmake -Bbuild && cmake --build build && sudo cmake --install build`)
find_package(
tsl-robin-map REQUIRED)

# clone & install from https://github.com/Tessil/robin-map.git into misc_ws, and run `cmake -Bbuild && cmake --build build && sudo cmake --install build`)

else()
find_package(Eigen3)
Expand All @@ -64,7 +67,9 @@ if(TARGET tsl::robin_map)
endif()

if(NOT (TARGET Eigen3::Eigen AND TARGET Sophus::Sophus AND TARGET tsl::robin_map AND TARGET TBB::tbb))
message(FATAL_ERROR "
message(
FATAL_ERROR
"
Exporting fetched dependencies is currently broken
I have no idea how to do it automatically ¯\\_(ツ)_/¯
please set DOWNLOAD_MISSING_DEPS to OFF in the main CMakeLists.txt and install the dependencies yourself.
Expand Down Expand Up @@ -105,4 +110,4 @@ if(DOWNLOAD_MISSING_DEPS)
message(FATAL_ERROR "loading tsl::robin_map failed.")
endif()
endif()
endif()
endif()
31 changes: 9 additions & 22 deletions cpp/kiss_icp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -54,30 +54,17 @@ include(${CMAKE_CURRENT_LIST_DIR}/cmake/CompilerOptions.cmake)

add_subdirectory(src)

install(EXPORT kiss_icpTargets
FILE kiss_icpTargets.cmake
NAMESPACE kiss_icp::
DESTINATION "share/cmake/kiss_icp")
install(EXPORT kiss_icpTargets FILE kiss_icpTargets.cmake NAMESPACE kiss_icp:: DESTINATION "share/cmake/kiss_icp")


configure_package_config_file(${CMAKE_CURRENT_LIST_DIR}/cmake/Config.cmake.in
"${CMAKE_CURRENT_BINARY_DIR}/kiss_icpConfig.cmake"
INSTALL_DESTINATION "share/cmake/kiss_icp"
)
configure_package_config_file(
${CMAKE_CURRENT_LIST_DIR}/cmake/Config.cmake.in "${CMAKE_CURRENT_BINARY_DIR}/kiss_icpConfig.cmake"
INSTALL_DESTINATION "share/cmake/kiss_icp")

# generate the version file for the config file
write_basic_package_version_file(
"${CMAKE_CURRENT_BINARY_DIR}/kiss_icpConfigVersion.cmake"
VERSION "${version}"
COMPATIBILITY SameMinorVersion
)

write_basic_package_version_file("${CMAKE_CURRENT_BINARY_DIR}/kiss_icpConfigVersion.cmake" VERSION "${version}"
COMPATIBILITY SameMinorVersion)

install(DIRECTORY "${CMAKE_CURRENT_LIST_DIR}/include/kiss_icp"
DESTINATION "include")
install(DIRECTORY "${CMAKE_CURRENT_LIST_DIR}/include/kiss_icp" DESTINATION "include")

install(FILES
"${CMAKE_CURRENT_BINARY_DIR}/kiss_icpConfig.cmake"
"${CMAKE_CURRENT_BINARY_DIR}/kiss_icpConfigVersion.cmake"
DESTINATION "share/cmake/kiss_icp"
)
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/kiss_icpConfig.cmake"
"${CMAKE_CURRENT_BINARY_DIR}/kiss_icpConfigVersion.cmake" DESTINATION "share/cmake/kiss_icp")
2 changes: 1 addition & 1 deletion cpp/kiss_icp/cmake/Config.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ find_dependency(tsl-robin-map REQUIRED)

include("${CMAKE_CURRENT_LIST_DIR}/kiss_icpTargets.cmake")

check_required_components(kiss_icp)
check_required_components(kiss_icp)
2 changes: 1 addition & 1 deletion cpp/kiss_icp/src/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
add_subdirectory(core)
add_subdirectory(metrics)
add_subdirectory(pipeline)
add_subdirectory(pipeline)
10 changes: 3 additions & 7 deletions cpp/kiss_icp/src/core/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,10 @@
add_library(kiss_icp_core STATIC)
target_sources(kiss_icp_core PRIVATE Registration.cpp Deskew.cpp VoxelHashMap.cpp VoxelUtils.cpp Preprocessing.cpp
Threshold.cpp)
target_include_directories(kiss_icp_core PUBLIC
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include/kiss_icp/core>
$<INSTALL_INTERFACE:include/kiss_icp/core>
)
target_include_directories(kiss_icp_core PUBLIC $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include/kiss_icp/core>
$<INSTALL_INTERFACE:include/kiss_icp/core>)
target_link_libraries(kiss_icp_core PUBLIC Eigen3::Eigen tsl::robin_map Sophus::Sophus)
target_link_libraries(kiss_icp_core PRIVATE TBB::tbb)
set_global_target_properties(kiss_icp_core)

install(TARGETS kiss_icp_core
DESTINATION lib/kiss_icp/core
EXPORT kiss_icpTargets)
install(TARGETS kiss_icp_core DESTINATION lib/kiss_icp/core EXPORT kiss_icpTargets)
10 changes: 3 additions & 7 deletions cpp/kiss_icp/src/metrics/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,9 @@
# SOFTWARE.
add_library(kiss_icp_metrics STATIC)
target_sources(kiss_icp_metrics PRIVATE Metrics.cpp)
target_include_directories(kiss_icp_metrics PUBLIC
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include/kiss_icp/metrics>
$<INSTALL_INTERFACE:include/kiss_icp/metrics>
)
target_include_directories(kiss_icp_metrics PUBLIC $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include/kiss_icp/metrics>
$<INSTALL_INTERFACE:include/kiss_icp/metrics>)
target_link_libraries(kiss_icp_metrics PUBLIC Eigen3::Eigen)
set_global_target_properties(kiss_icp_metrics)

install(TARGETS kiss_icp_metrics
DESTINATION lib/kiss_icp/metrics
EXPORT kiss_icpTargets)
install(TARGETS kiss_icp_metrics DESTINATION lib/kiss_icp/metrics EXPORT kiss_icpTargets)
11 changes: 3 additions & 8 deletions cpp/kiss_icp/src/pipeline/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,9 @@

add_library(kiss_icp_pipeline STATIC)
target_sources(kiss_icp_pipeline PRIVATE KissICP.cpp)
target_include_directories(kiss_icp_pipeline PUBLIC
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include/kiss_icp/pipeline>
$<INSTALL_INTERFACE:include/kiss_icp/pipeline>
)
target_include_directories(kiss_icp_pipeline PUBLIC $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include/kiss_icp/pipeline>
$<INSTALL_INTERFACE:include/kiss_icp/pipeline>)
target_link_libraries(kiss_icp_pipeline PUBLIC kiss_icp_core)
set_global_target_properties(kiss_icp_pipeline)

install(TARGETS kiss_icp_pipeline
DESTINATION lib/kiss_icp/pipeline
EXPORT kiss_icpTargets
)
install(TARGETS kiss_icp_pipeline DESTINATION lib/kiss_icp/pipeline EXPORT kiss_icpTargets)

0 comments on commit c235371

Please sign in to comment.