cartographer-project / cartographer

Cartographer is a system that provides real-time simultaneous localization and mapping (SLAM) in 2D and 3D across multiple platforms and sensor configurations.
Apache License 2.0
7.09k stars 2.25k forks source link

CMakeLists.txt: don't include CERES_INCLUDE_DIRS if it's empty or not set #1808

Open shr-project opened 3 years ago

shr-project commented 3 years ago

set_target_properties(cartographer PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "FIXMESTAGINGDIRTARGET/usr/include/eigen3;/jenkins/mjansa/build/ros/ros1-melodic-hardknott/tmp-glibc/work/core2-64-oe-linux/cartographer/1.0.0-r0/git/;FIXMESTAGINGDIRTARGET/usr/include;FIXMESTAGINGDIRTARGET/usr/include;FIXMESTAGINGDIRTARGET/usr/include/cairo;FIXMESTAGINGDIRTARGET/usr/include/glib-2.0;FIXMESTAGINGDIRTARGET/usr/lib/glib-2.0/include;FIXMESTAGINGDIRTARGET/usr/include/pixman-1;FIXMESTAGINGDIRTARGET/usr/include/uuid;FIXMESTAGINGDIRTARGET/usr/include/freetype2;FIXMESTAGINGDIRTARGET/usr/include/libpng16;FIXMESTAGINGDIRTARGET/usr/include;${_IMPORT_PREFIX}/include" INTERFACE_LINK_LIBRARIES "Ceres::ceres;FIXMESTAGINGDIRTARGET/usr/lib/liblua.a;FIXMESTAGINGDIRTARGET/usr/lib/libm.so;Boost::iostreams;glog;gflags;cairo;FIXMESTAGINGDIRTARGET/usr/lib/libprotobuf.so;pthread" INTERFACE_SYSTEM_INCLUDE_DIRECTORIES "FIXMESTAGINGDIRTARGET/usr/include/eigen3;/jenkins/mjansa/build/ros/ros1-melodic-hardknott/tmp-glibc/work/core2-64-oe-linux/cartographer/1.0.0-r0/git/;FIXMESTAGINGDIRTARGET/usr/include;FIXMESTAGINGDIRTARGET/usr/include;FIXMESTAGINGDIRTARGET/usr/include/cairo;FIXMESTAGINGDIRTARGET/usr/include/glib-2.0;FIXMESTAGINGDIRTARGET/usr/lib/glib-2.0/include;FIXMESTAGINGDIRTARGET/usr/include/pixman-1;FIXMESTAGINGDIRTARGET/usr/include/uuid;FIXMESTAGINGDIRTARGET/usr/include/freetype2;FIXMESTAGINGDIRTARGET/usr/include/libpng16;FIXMESTAGINGDIRTARGET/usr/include" )

Signed-off-by: Martin Jansa martin.jansa@lge.com

Want to contribute? Great! Make sure you've read and understood CONTRIBUTING.md.

shr-project commented 3 years ago

Alternative solution is to remove quotes around CERES_INCLUDE_DIRS (and possibly other variables later used in target_include_directories calls).

Relevant discussion and a bug in CMake: https://discourse.cmake.org/t/target-include-directories-behavior-with-empty-value/2867 https://gitlab.kitware.com/cmake/cmake/-/issues/21879