Add build scripts for triage tool (#1862)

This commit is contained in:
Paul Fultz II 2019-06-01 03:48:39 -05:00 committed by Daniel Marjamäki
parent 5d10b57b04
commit 12f4353d40
3 changed files with 23 additions and 0 deletions

View File

@ -22,5 +22,6 @@ add_subdirectory(lib) # CppCheck Library
add_subdirectory(cli) # Client application
add_subdirectory(test) # Tests
ADD_SUBDIRECTORY(gui) # Graphical application
ADD_SUBDIRECTORY(tools/triage) # Triage tool
include(cmake/printInfo.cmake REQUIRED)

View File

@ -0,0 +1,21 @@
if (BUILD_GUI AND BUILD_TESTS)
set(CMAKE_AUTOMOC ON)
if (${CMAKE_BUILD_TYPE} STREQUAL "Release")
add_definitions(-DQT_NO_DEBUG)
add_definitions(-DQT_NO_DEBUG_OUTPUT)
add_definitions(-DQT_NO_WARNING_OUTPUT)
else()
add_definitions(-DQT_DEBUG)
endif()
file(GLOB hdrs "*.h")
file(GLOB srcs "*.cpp")
file(GLOB uis "*.ui")
qt5_wrap_ui(uis_hdrs ${uis})
add_executable(triage ${hdrs} ${srcs} ${uis_hdrs} ${PROJECT_SOURCE_DIR}/gui/codeeditor.cpp)
target_include_directories(triage PUBLIC ${PROJECT_SOURCE_DIR}/gui/)
target_link_libraries(triage Qt5::Core Qt5::Gui Qt5::Widgets)
set(CMAKE_AUTOMOC OFF)
endif()

View File

@ -8,6 +8,7 @@
#include <QFileInfo>
#include <QFileDialog>
#include <ctime>
#include <cstdlib>
const QString WORK_FOLDER(QDir::homePath() + "/triage");
const QString DACA2_PACKAGES(QDir::homePath() + "/daca2-packages");