cmake: define all headers in target_sources
- Since version 6 QtCreator only counts header files as part of the project if they are explicitly listed with target_sources. This affects, for example, if the file is formatted with clang-format on save (if that is configured to only act on project files). - See also: https://www.qt.io/blog/qt-creator-6-cmake-update
This commit is contained in:
parent
f145723553
commit
4d50597b1e
117
CMakeLists.txt
117
CMakeLists.txt
|
@ -284,33 +284,98 @@ set_property(TARGET basalt::cli11 PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${CMAKE
|
||||||
add_library(basalt::magic_enum INTERFACE IMPORTED)
|
add_library(basalt::magic_enum INTERFACE IMPORTED)
|
||||||
set_property(TARGET basalt::magic_enum PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/magic_enum/include)
|
set_property(TARGET basalt::magic_enum PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/magic_enum/include)
|
||||||
|
|
||||||
|
# main library
|
||||||
|
add_library(basalt SHARED)
|
||||||
|
|
||||||
add_library(basalt SHARED
|
# List all header and source files with target_sources.
|
||||||
src/io/dataset_io.cpp
|
# This ensures, e.g., that QtCreator >= 6.0 properly recognize these headers to belong to the project.
|
||||||
src/io/marg_data_io.cpp
|
# To support cmake < 3.13, use absolute paths (see: https://crascit.com/2016/01/31/enhanced-source-file-handling-with-target_sources/)
|
||||||
src/calibration/aprilgrid.cpp
|
target_sources(basalt
|
||||||
src/calibration/calibraiton_helper.cpp
|
PUBLIC
|
||||||
src/calibration/vignette.cpp
|
${CMAKE_CURRENT_SOURCE_DIR}/include/basalt/calibration/aprilgrid.h
|
||||||
src/optical_flow/optical_flow.cpp
|
${CMAKE_CURRENT_SOURCE_DIR}/include/basalt/calibration/calibration_helper.h
|
||||||
src/linearization/landmark_block.cpp
|
${CMAKE_CURRENT_SOURCE_DIR}/include/basalt/calibration/cam_calib.h
|
||||||
src/linearization/linearization_base.cpp
|
${CMAKE_CURRENT_SOURCE_DIR}/include/basalt/calibration/cam_imu_calib.h
|
||||||
src/linearization/linearization_abs_qr.cpp
|
${CMAKE_CURRENT_SOURCE_DIR}/include/basalt/calibration/vignette.h
|
||||||
src/linearization/linearization_abs_sc.cpp
|
${CMAKE_CURRENT_SOURCE_DIR}/include/basalt/device/rs_t265.h
|
||||||
src/linearization/linearization_rel_sc.cpp
|
${CMAKE_CURRENT_SOURCE_DIR}/include/basalt/hash_bow/hash_bow.h
|
||||||
src/utils/vio_config.cpp
|
${CMAKE_CURRENT_SOURCE_DIR}/include/basalt/io/dataset_io.h
|
||||||
src/utils/system_utils.cpp
|
${CMAKE_CURRENT_SOURCE_DIR}/include/basalt/io/dataset_io_euroc.h
|
||||||
src/utils/time_utils.cpp
|
${CMAKE_CURRENT_SOURCE_DIR}/include/basalt/io/dataset_io_kitti.h
|
||||||
src/utils/keypoints.cpp
|
${CMAKE_CURRENT_SOURCE_DIR}/include/basalt/io/dataset_io_rosbag.h
|
||||||
src/vi_estimator/marg_helper.cpp
|
${CMAKE_CURRENT_SOURCE_DIR}/include/basalt/io/dataset_io_uzh.h
|
||||||
src/vi_estimator/sqrt_keypoint_vio.cpp
|
${CMAKE_CURRENT_SOURCE_DIR}/include/basalt/io/marg_data_io.h
|
||||||
src/vi_estimator/sqrt_keypoint_vo.cpp
|
${CMAKE_CURRENT_SOURCE_DIR}/include/basalt/linearization/block_diagonal.hpp
|
||||||
src/vi_estimator/vio_estimator.cpp
|
${CMAKE_CURRENT_SOURCE_DIR}/include/basalt/linearization/imu_block.hpp
|
||||||
src/vi_estimator/ba_base.cpp
|
${CMAKE_CURRENT_SOURCE_DIR}/include/basalt/linearization/landmark_block.hpp
|
||||||
src/vi_estimator/sqrt_ba_base.cpp
|
${CMAKE_CURRENT_SOURCE_DIR}/include/basalt/linearization/landmark_block_abs_dynamic.hpp
|
||||||
src/vi_estimator/sc_ba_base.cpp
|
${CMAKE_CURRENT_SOURCE_DIR}/include/basalt/linearization/linearization_abs_qr.hpp
|
||||||
src/vi_estimator/nfr_mapper.cpp
|
${CMAKE_CURRENT_SOURCE_DIR}/include/basalt/linearization/linearization_abs_sc.hpp
|
||||||
src/vi_estimator/landmark_database.cpp)
|
${CMAKE_CURRENT_SOURCE_DIR}/include/basalt/linearization/linearization_base.hpp
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/include/basalt/linearization/linearization_rel_sc.hpp
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/include/basalt/optical_flow/frame_to_frame_optical_flow.h
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/include/basalt/optical_flow/multiscale_frame_to_frame_optical_flow.h
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/include/basalt/optical_flow/optical_flow.h
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/include/basalt/optical_flow/patch.h
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/include/basalt/optical_flow/patch_optical_flow.h
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/include/basalt/optical_flow/patterns.h
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/include/basalt/optimization/accumulator.h
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/include/basalt/optimization/linearize.h
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/include/basalt/optimization/poses_linearize.h
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/include/basalt/optimization/poses_optimize.h
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/include/basalt/optimization/spline_linearize.h
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/include/basalt/optimization/spline_optimize.h
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/include/basalt/utils/ba_utils.h
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/include/basalt/utils/cast_utils.hpp
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/include/basalt/utils/common_types.h
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/include/basalt/utils/filesystem.h
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/include/basalt/utils/format.hpp
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/include/basalt/utils/imu_types.h
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/include/basalt/utils/keypoints.h
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/include/basalt/utils/nfr.h
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/include/basalt/utils/sim_utils.h
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/include/basalt/utils/system_utils.h
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/include/basalt/utils/test_utils.h
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/include/basalt/utils/time_utils.hpp
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/include/basalt/utils/tracks.h
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/include/basalt/utils/union_find.h
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/include/basalt/utils/vio_config.h
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/include/basalt/utils/vis_utils.h
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/include/basalt/vi_estimator/ba_base.h
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/include/basalt/vi_estimator/landmark_database.h
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/include/basalt/vi_estimator/marg_helper.h
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/include/basalt/vi_estimator/nfr_mapper.h
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/include/basalt/vi_estimator/sc_ba_base.h
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/include/basalt/vi_estimator/sqrt_ba_base.h
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/include/basalt/vi_estimator/sqrt_keypoint_vio.h
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/include/basalt/vi_estimator/sqrt_keypoint_vo.h
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/include/basalt/vi_estimator/vio_estimator.h
|
||||||
|
PRIVATE
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/src/calibration/aprilgrid.cpp
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/src/calibration/calibraiton_helper.cpp
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/src/calibration/vignette.cpp
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/src/io/dataset_io.cpp
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/src/io/marg_data_io.cpp
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/src/linearization/landmark_block.cpp
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/src/linearization/linearization_abs_qr.cpp
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/src/linearization/linearization_abs_sc.cpp
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/src/linearization/linearization_base.cpp
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/src/linearization/linearization_rel_sc.cpp
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/src/optical_flow/optical_flow.cpp
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/src/utils/keypoints.cpp
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/src/utils/system_utils.cpp
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/src/utils/time_utils.cpp
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/src/utils/vio_config.cpp
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/src/vi_estimator/ba_base.cpp
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/src/vi_estimator/landmark_database.cpp
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/src/vi_estimator/marg_helper.cpp
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/src/vi_estimator/nfr_mapper.cpp
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/src/vi_estimator/sc_ba_base.cpp
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/src/vi_estimator/sqrt_ba_base.cpp
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/src/vi_estimator/sqrt_keypoint_vio.cpp
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/src/vi_estimator/sqrt_keypoint_vo.cpp
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/src/vi_estimator/vio_estimator.cpp
|
||||||
|
)
|
||||||
|
|
||||||
target_link_libraries(basalt
|
target_link_libraries(basalt
|
||||||
PUBLIC ${STD_CXX_FS} basalt::opencv basalt::basalt-headers TBB::tbb
|
PUBLIC ${STD_CXX_FS} basalt::opencv basalt::basalt-headers TBB::tbb
|
||||||
|
|
Loading…
Reference in New Issue