-
Notifications
You must be signed in to change notification settings - Fork 102
/
CMakeLists.txt
50 lines (37 loc) · 1.09 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
# CMakeLists.txt
cmake_minimum_required(VERSION 3.16)
project(slate VERSION 0.10.0 LANGUAGES CXX C)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOMOC ON)
option(ENABLE_TESTING "" ON)
find_package(Qt6 COMPONENTS Core Gui Qml Quick Widgets Test LinguistTools)
qt_policy(SET QTP0001 NEW)
add_library(projectWarning INTERFACE)
target_compile_options(projectWarning INTERFACE
$<$<CXX_COMPILER_ID:GNU>:$<BUILD_INTERFACE:-Wall;-Wextra;-Wpedantic>>
$<$<CXX_COMPILER_ID:Clang>:$<BUILD_INTERFACE:-Weverything;-Wpedantic>>
$<$<CXX_COMPILER_ID:MSVC>:/W0>
)
set(ts_files
translations/slate_ar_EG.ts
translations/slate_nb_NO.ts
translations/slate_zh_CN.ts
)
set_source_files_properties(${ts_files}
PROPERTIES OUTPUT_LOCATION
"${CMAKE_CURRENT_BINARY_DIR}/app/translations"
)
add_subdirectory(lib)
add_subdirectory(app)
qt_add_translations(app
TS_FILES
${ts_files}
SOURCES
app/qml/qml.qrc
)
if(ENABLE_TESTING)
enable_testing()
add_subdirectory(tests)
endif()
set_property(DIRECTORY tests PROPERTY QT_EXCLUDE_FROM_TRANSLATION ON)