2019-06-01 10:48:39 +02:00
|
|
|
if (BUILD_GUI AND BUILD_TESTS)
|
|
|
|
set(CMAKE_AUTOMOC ON)
|
2020-04-22 11:04:19 +02:00
|
|
|
if (CMAKE_BUILD_TYPE MATCHES "Release")
|
2019-06-01 10:48:39 +02:00
|
|
|
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})
|
|
|
|
|
2019-06-23 19:04:53 +02:00
|
|
|
add_executable(
|
|
|
|
triage
|
|
|
|
${hdrs}
|
|
|
|
${srcs}
|
|
|
|
${uis_hdrs}
|
|
|
|
${PROJECT_SOURCE_DIR}/gui/codeeditorstyle.cpp
|
|
|
|
${PROJECT_SOURCE_DIR}/gui/codeeditor.cpp)
|
2019-06-01 10:48:39 +02:00
|
|
|
target_include_directories(triage PUBLIC ${PROJECT_SOURCE_DIR}/gui/)
|
|
|
|
target_link_libraries(triage Qt5::Core Qt5::Gui Qt5::Widgets)
|
2020-04-21 17:27:51 +02:00
|
|
|
if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
2020-04-22 11:04:19 +02:00
|
|
|
if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS "8.0.0")
|
|
|
|
# Q_UNUSED() in generated code
|
|
|
|
target_compile_options(triage PRIVATE -Wno-extra-semi-stmt)
|
|
|
|
endif()
|
2020-04-21 17:27:51 +02:00
|
|
|
endif()
|
2019-06-01 10:48:39 +02:00
|
|
|
|
|
|
|
set(CMAKE_AUTOMOC OFF)
|
|
|
|
endif()
|