Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions cmake/findDependencies.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,6 @@ if(HAVE_RULES)
endif()
endif()

set(CMAKE_INCLUDE_CURRENT_DIR ON)

find_package(Python COMPONENTS Interpreter)

if(NOT Python_Interpreter_FOUND)
Expand Down
7 changes: 4 additions & 3 deletions gui/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,10 @@ CheckOptions:
file(GLOB srcs "*.cpp")
file(GLOB uis "*.ui")
file(GLOB tss "*.ts")
QT_WRAP_UI(uis_hdrs ${uis})
QT_ADD_RESOURCES(resources "gui.qrc")
# TODO: passing "-no-obsolete" here breaks the translations
QT_CREATE_TRANSLATION(qms ${CMAKE_CURRENT_SOURCE_DIR} ${tss})
list(APPEND cppcheck-gui-deps ${hdrs} ${uis_hdrs} ${resources} ${qms})
list(APPEND cppcheck-gui-deps ${hdrs} ${uis} ${resources} ${qms})
add_custom_target(gui-build-deps SOURCES ${cppcheck-gui-deps})

list(APPEND cppcheck-gui_SOURCES ${srcs} $<TARGET_OBJECTS:frontend_objs>)
Expand All @@ -33,8 +32,10 @@ CheckOptions:

add_executable(cppcheck-gui ${cppcheck-gui-deps} ${cppcheck-gui_SOURCES})
set_target_properties(cppcheck-gui PROPERTIES AUTOMOC ON)
set_target_properties(cppcheck-gui PROPERTIES AUTOUIC ON)
set_target_properties(cppcheck-gui PROPERTIES WIN32_EXECUTABLE ON)
target_include_directories(cppcheck-gui PRIVATE ${PROJECT_SOURCE_DIR}/lib/ ${PROJECT_SOURCE_DIR}/frontend/)
# the GUI include is needed so the includes are found from the generated headers - TODO: is it possible to get rid of this?
target_include_directories(cppcheck-gui PRIVATE ${PROJECT_SOURCE_DIR}/lib/ ${PROJECT_SOURCE_DIR}/frontend/ ${PROJECT_SOURCE_DIR}/gui/)
if(USE_BUNDLED_TINYXML2)
target_externals_include_directories(cppcheck-gui PRIVATE ${PROJECT_SOURCE_DIR}/externals/tinyxml2/)
else()
Expand Down
4 changes: 2 additions & 2 deletions tools/triage/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,8 @@ CheckOptions:
file(GLOB hdrs "*.h")
file(GLOB srcs "*.cpp")
file(GLOB uis "*.ui")
qt_wrap_ui(uis_hdrs ${uis})

add_custom_target(triage-build-ui-deps SOURCES ${hdrs} ${uis_hdrs})
add_custom_target(triage-build-ui-deps SOURCES ${hdrs} ${uis})
add_executable(
triage
${hdrs}
Expand All @@ -22,6 +21,7 @@ CheckOptions:
${PROJECT_SOURCE_DIR}/gui/codeeditorstyle.cpp
${PROJECT_SOURCE_DIR}/gui/codeeditor.cpp)
set_target_properties(triage PROPERTIES AUTOMOC ON)
set_target_properties(triage PROPERTIES AUTOUIC ON)
set_target_properties(triage PROPERTIES WIN32_EXECUTABLE ON)
target_include_directories(triage PRIVATE ${PROJECT_SOURCE_DIR}/lib/ ${PROJECT_SOURCE_DIR}/gui/)
target_link_libraries(triage ${QT_CORE_LIB} ${QT_GUI_LIB} ${QT_WIDGETS_LIB})
Expand Down