From b4d8dcfbddc89a310dfa2770cd6d6569b22f707d Mon Sep 17 00:00:00 2001 From: Alejandro Hernandez Cordero Date: Thu, 27 Jun 2024 17:52:22 +0200 Subject: [PATCH] Fixed build Signed-off-by: Alejandro Hernandez Cordero --- turtlesim/CMakeLists.txt | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/turtlesim/CMakeLists.txt b/turtlesim/CMakeLists.txt index 0ae760d3..5ba87407 100644 --- a/turtlesim/CMakeLists.txt +++ b/turtlesim/CMakeLists.txt @@ -23,9 +23,12 @@ find_package(turtlesim_msgs REQUIRED) include_directories(include ${Qt${QT_VERSION_MAJOR}Widgets_INCLUDE_DIRS}) -set (CMAKE_AUTOMOC ON) - -# qt_wrap_cpp(turtlesim_node_MOCS include/turtlesim/turtle_frame.hpp) +if (${QT_VERSION_MAJOR} GREATER "5") + qt_standard_project_setup() + qt_wrap_cpp(turtlesim_node_MOCS include/turtlesim/turtle_frame.hpp) +else() + qt5_wrap_cpp(turtlesim_node_MOCS include/turtlesim/turtle_frame.hpp) +endif() add_executable(turtlesim_node src/turtlesim.cpp