#============================================================== # generate and link target for point_cloud_viewer #============================================================== set(TARGET_NAME aa_qt_main) add_executable(${TARGET_NAME}${SRC_LIST}${ui_FILES}${qrc_FILES})
# link qt libraries qt5_use_modules(${TARGET_NAME} Core Widgets OpenGL Xml Gui Sql)
# link vtk and pcl libraries target_link_libraries(${TARGET_NAME} ${CONFIG_TARGET} ${UTIL_TARGET} ${MODEL_TARGET} ${DETECTION_TARGET} ${DATABASE_TARGET}
If we reference qt dll which use QObject,when we include header in MainWindow.h,we must also include mocs_compilation.cpp in MainWindow.cpp. Otherwise error will occur: