-
Notifications
You must be signed in to change notification settings - Fork 1
/
CMakeLists.txt
68 lines (54 loc) · 1.69 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
60
61
62
63
64
65
66
67
68
cmake_minimum_required(VERSION 3.6)
project(Pastelyst VERSION 0.6.0 LANGUAGES CXX)
if(WIN32)
if(MSVC)
add_definitions(-D_SCL_SECURE_NO_WARNINGS)
add_definitions(-D_CRT_SECURE_NO_DEPRECATE)
endif()
endif()
include(GNUInstallDirs)
include(FetchContent)
find_package(Qt6 COMPONENTS Core Network Sql Gui REQUIRED)
find_package(Cutelyst4Qt6 4.0.0 REQUIRED)
#find_package(KF5SyntaxHighlighting REQUIRED)
find_package(Cutelee6Qt6 REQUIRED)
FetchContent_Declare(
KF5SyntaxHighlighting
GIT_REPOSITORY https://invent.kde.org/frameworks/syntax-highlighting.git
GIT_TAG 598a9c4b # 5.92.0
)
FetchContent_MakeAvailable(KF5SyntaxHighlighting)
# Auto generate moc files
set(CMAKE_AUTOMOC ON)
# As moc files are generated in the binary dir, tell CMake
# to always look for includes there:
set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
file(GLOB_RECURSE TEMPLATES_SRC root/*)
add_subdirectory(src)
set(CPACK_PACKAGE_VENDOR "Cutelyst")
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Pastelyst.")
set(CPACK_PACKAGE_CONTACT "[email protected]")
add_definitions(
-DQT_NO_CAST_TO_ASCII
-DQT_NO_CAST_FROM_ASCII
-DQT_STRICT_ITERATORS
-DQT_NO_URL_CAST_FROM_STRING
-DQT_NO_CAST_FROM_BYTEARRAY
-DQT_USE_QSTRINGBUILDER
-DQT_USE_FAST_OPERATOR_PLUS
-DQT_DISABLE_DEPRECATED_BEFORE=0x060200
)
if(UNIX)
if(NOT CPACK_GENERATOR)
set(CPACK_GENERATOR "DEB")
endif()
set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON)
set(CPACK_STRIP_FILES 1)
set(CPACK_DEBIAN_FILE_NAME DEB-DEFAULT)
if(CMAKE_BUILD_TYPE STREQUAL "Debug" OR CMAKE_BUILD_TYPE STREQUAL "RelWithDebInfo")
set(CPACK_DEBIAN_DEBUGINFO_PACKAGE ON)
endif()
endif()
include(CPack)