File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -13,11 +13,10 @@ CheckOptions:
1313 file (GLOB srcs "*.cpp" )
1414 file (GLOB uis "*.ui" )
1515 file (GLOB tss "*.ts" )
16- QT_WRAP_UI (uis_hdrs ${uis} )
1716 QT_ADD_RESOURCES (resources "gui.qrc" )
1817 # TODO: passing "-no-obsolete" here breaks the translations
1918 QT_CREATE_TRANSLATION (qms ${CMAKE_CURRENT_SOURCE_DIR} ${tss} )
20- list (APPEND cppcheck-gui-deps ${hdrs} ${uis_hdrs } ${resources} ${qms} )
19+ list (APPEND cppcheck-gui-deps ${hdrs} ${uis } ${resources} ${qms} )
2120 add_custom_target (gui-build-deps SOURCES ${cppcheck-gui-deps} )
2221
2322 list (APPEND cppcheck-gui_SOURCES ${srcs} )
@@ -26,9 +25,12 @@ CheckOptions:
2625 endif ()
2726
2827 add_executable (cppcheck-gui ${cppcheck-gui-deps} ${cppcheck-gui_SOURCES} )
28+ # the GUI include is needed so the includes are found from the generated headers - TODO: is it possible to get rid of this?
29+ target_include_directories (cppcheck-gui PRIVATE ${PROJECT_SOURCE_DIR} /gui/ )
2930 target_link_libraries (cppcheck-gui cppcheck-core simplecpp tinyxml2 picojson frontend )
3031
3132 set_target_properties (cppcheck-gui PROPERTIES AUTOMOC ON )
33+ set_target_properties (cppcheck-gui PROPERTIES AUTOUIC ON )
3234 set_target_properties (cppcheck-gui PROPERTIES WIN32_EXECUTABLE ON )
3335 if (NOT CMAKE_DISABLE_PRECOMPILE_HEADERS)
3436 target_precompile_headers (cppcheck-gui PRIVATE precompiled.h )
Original file line number Diff line number Diff line change @@ -11,9 +11,8 @@ CheckOptions:
1111 file (GLOB hdrs "*.h" )
1212 file (GLOB srcs "*.cpp" )
1313 file (GLOB uis "*.ui" )
14- qt_wrap_ui (uis_hdrs ${uis} )
1514
16- add_custom_target (triage-build-ui-deps SOURCES ${hdrs} ${uis_hdrs } )
15+ add_custom_target (triage-build-ui-deps SOURCES ${hdrs} ${uis } )
1716 add_executable (
1817 triage
1918 ${hdrs}
@@ -22,6 +21,7 @@ CheckOptions:
2221 ${PROJECT_SOURCE_DIR} /gui/codeeditorstyle.cpp
2322 ${PROJECT_SOURCE_DIR} /gui/codeeditor.cpp )
2423 set_target_properties (triage PROPERTIES AUTOMOC ON )
24+ set_target_properties (triage PROPERTIES AUTOUIC ON )
2525 set_target_properties (triage PROPERTIES WIN32_EXECUTABLE ON )
2626 target_include_directories (triage PRIVATE ${PROJECT_SOURCE_DIR} /lib/ ${PROJECT_SOURCE_DIR} /gui/ )
2727 target_link_libraries (triage ${QT_CORE_LIB} ${QT_GUI_LIB} ${QT_WIDGETS_LIB} )
You can’t perform that action at this time.
0 commit comments