Skip to content

Commit b4d8dcf

Browse files
committed
Fixed build
Signed-off-by: Alejandro Hernandez Cordero <[email protected]>
1 parent 1702d46 commit b4d8dcf

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

turtlesim/CMakeLists.txt

+6-3
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,12 @@ find_package(turtlesim_msgs REQUIRED)
2323

2424
include_directories(include ${Qt${QT_VERSION_MAJOR}Widgets_INCLUDE_DIRS})
2525

26-
set (CMAKE_AUTOMOC ON)
27-
28-
# qt_wrap_cpp(turtlesim_node_MOCS include/turtlesim/turtle_frame.hpp)
26+
if (${QT_VERSION_MAJOR} GREATER "5")
27+
qt_standard_project_setup()
28+
qt_wrap_cpp(turtlesim_node_MOCS include/turtlesim/turtle_frame.hpp)
29+
else()
30+
qt5_wrap_cpp(turtlesim_node_MOCS include/turtlesim/turtle_frame.hpp)
31+
endif()
2932

3033
add_executable(turtlesim_node
3134
src/turtlesim.cpp

0 commit comments

Comments
 (0)