-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
59 lines (45 loc) · 1.14 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
cmake_minimum_required(VERSION 3.21)
project(jgv LANGUAGES CXX)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_AUTOUIC ON)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
option(JGV_BUILD_TESTS "Build JGV tests" OFF)
list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake)
find_package(Graphviz REQUIRED)
find_package(Qt6 COMPONENTS Core Qml Quick LinguistTools QuickControls2 Network REQUIRED)
include_directories(src
${GRAPHVIZ_INCLUDE_DIR}
)
add_subdirectory(src)
if(JGV_BUILD_TESTS)
enable_testing()
add_subdirectory(tests)
endif()
set(TS_FILES src/jgv_ru_RU.ts)
set(PROJECT_SOURCES
src/main.cpp
src/qml.qrc
src/qtquickcontrols2.conf
${TS_FILES}
)
qt_add_executable(jgv
WIN32
${PROJECT_SOURCES}
)
qt_create_translation(QM_FILES ${CMAKE_SOURCE_DIR} ${TS_FILES})
target_compile_definitions(jgv
PRIVATE $<$<OR:$<CONFIG:Debug>,$<CONFIG:RelWithDebInfo>>:QT_QML_DEBUG>)
target_link_libraries(jgv
PRIVATE
Qt6::Core
Qt6::Gui
Qt6::Qml
Qt6::Quick
Qt6::QuickControls2
Qt6::Network
trace
graph
services
components
)