Remove default AUTOUIC=ON from all non-ui targets. Fixed yaml target not added correctly on Vcpkg. Fixed gui odom processing time.

This commit is contained in:
matlabbe
2023-11-19 19:40:20 -08:00
parent aaff1abc4f
commit a1d43d2353
7 changed files with 39 additions and 6 deletions
+5 -3
View File
@@ -325,9 +325,11 @@ IF(WITH_QT)
ENDIF()
IF(QT4_FOUND OR Qt5_FOUND OR Qt6_FOUND)
set(CMAKE_AUTOUIC ON)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
# For VCPKG build, set those global variables to off,
# we will enable them for jsut specific targets
set(CMAKE_AUTOMOC OFF)
set(CMAKE_AUTORCC OFF)
set(CMAKE_AUTOUIC OFF)
IF("${VTK_MAJOR_VERSION}" EQUAL 5)
FIND_PACKAGE(QVTK REQUIRED) # only for VTK 5
ELSE()
+8
View File
@@ -23,6 +23,14 @@ ADD_EXECUTABLE(noEventsExample main.cpp ${moc_srcs})
TARGET_LINK_LIBRARIES(noEventsExample rtabmap::gui)
SET_TARGET_PROPERTIES(
noEventsExample
PROPERTIES
AUTOUIC ON
AUTOMOC ON
AUTORCC ON
)
if(internal)
SET_TARGET_PROPERTIES( noEventsExample
PROPERTIES OUTPUT_NAME ${PROJECT_PREFIX}-noEventsExample)
+8
View File
@@ -23,6 +23,14 @@ ADD_EXECUTABLE(rgbd_mapping main.cpp ${moc_srcs})
TARGET_LINK_LIBRARIES(rgbd_mapping rtabmap::gui)
SET_TARGET_PROPERTIES(
rgbd_mapping
PROPERTIES
AUTOUIC ON
AUTOMOC ON
AUTORCC ON
)
if(internal)
SET_TARGET_PROPERTIES( rgbd_mapping
PROPERTIES OUTPUT_NAME ${PROJECT_PREFIX}-rgbd_mapping)
+8
View File
@@ -42,6 +42,14 @@ ENDIF(APPLE)
ADD_EXECUTABLE(wifi_mapping ${srcs} ${moc_srcs})
TARGET_LINK_LIBRARIES(wifi_mapping rtabmap::gui ${LIBRARIES})
SET_TARGET_PROPERTIES(
wifi_mapping
PROPERTIES
AUTOUIC ON
AUTOMOC ON
AUTORCC ON
)
if(internal)
SET_TARGET_PROPERTIES( wifi_mapping
PROPERTIES OUTPUT_NAME ${PROJECT_PREFIX}-wifi_mapping)
+3
View File
@@ -199,6 +199,9 @@ SET_TARGET_PROPERTIES(
VERSION ${RTABMAP_VERSION}
SOVERSION ${RTABMAP_MAJOR_VERSION}.${RTABMAP_MINOR_VERSION}
EXPORT_NAME "gui"
AUTOUIC ON
AUTOMOC ON
AUTORCC ON
)
INSTALL(TARGETS rtabmap_gui EXPORT rtabmap_guiTargets
+2 -1
View File
@@ -1018,6 +1018,7 @@ void MainWindow::processOdometry(const rtabmap::OdometryEvent & odom, bool dataI
UDEBUG("");
_processingOdometry = true;
UTimer time;
UTimer timeTotal;
// Process Data
// Set color code as tooltip
@@ -1898,7 +1899,7 @@ void MainWindow::processOdometry(const rtabmap::OdometryEvent & odom, bool dataI
_ui->statsToolBox->updateStat("Odometry/Distance/m", _preferencesDialog->isTimeUsedInFigures()?data->stamp()-_firstStamp:(float)data->id(), odom.info().distanceTravelled, _preferencesDialog->isCacheSavedInFigures());
}
_ui->statsToolBox->updateStat("GUI/Refresh odom/ms", _preferencesDialog->isTimeUsedInFigures()?data->stamp()-_firstStamp:(float)data->id(), time.elapsed()*1000.0, _preferencesDialog->isCacheSavedInFigures());
_ui->statsToolBox->updateStat("GUI/Refresh odom/ms", _preferencesDialog->isTimeUsedInFigures()?data->stamp()-_firstStamp:(float)data->id(), timeTotal.elapsed()*1000.0, _preferencesDialog->isCacheSavedInFigures());
UDEBUG("Time updating Stats toolbox: %fs", time.ticks());
}
_processingOdometry = false;
+5 -2
View File
@@ -2,9 +2,12 @@
FIND_PACKAGE(yaml-cpp QUIET)
IF(yaml-cpp_FOUND)
# yaml-cpp 0.8.0 uses the wrong target in YAML_CPP_LIBRARIES.
IF(yaml-cpp_VERSION VERSION_EQUAL "0.8.0")
IF (TARGET yaml-cpp::yaml-cpp)
# yaml-cpp 0.8.0 uses target yaml-cpp::yaml-cpp.
SET(YAML_CPP_LIBRARIES yaml-cpp::yaml-cpp)
ELSEIF (TARGET yaml-cpp)
# yaml-cpp 0.7.0 uses target yaml-cpp (VCPKG).
SET(YAML_CPP_LIBRARIES yaml-cpp)
ENDIF()
ELSE()
find_package(PkgConfig QUIET)