-
Notifications
You must be signed in to change notification settings - Fork 3
/
CMakeLists.txt
63 lines (56 loc) · 2.21 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
cmake_minimum_required(VERSION 3.16)
project(VSyntaxHighlighting VERSION 1.0 LANGUAGES C CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(QT_DEFAULT_MAJOR_VERSION 6 CACHE STRING "Qt version to use (5 or 6), defaults to 6")
find_package(Qt${QT_DEFAULT_MAJOR_VERSION} REQUIRED COMPONENTS Core Gui Network)
find_package(Qt${QT_DEFAULT_MAJOR_VERSION} OPTIONAL_COMPONENTS Core5Compat)
if ((QT_DEFAULT_MAJOR_VERSION GREATER 5))
qt_standard_project_setup()
else()
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
endif()
add_library(VSyntaxHighlighting
data/themes/theme-data.qrc
autogenerated/ksyntaxhighlighting_version.h
autogenerated/src/lib/ksyntaxhighlighting_logging.cpp autogenerated/src/lib/ksyntaxhighlighting_logging.h
src/lib/abstracthighlighter.cpp src/lib/abstracthighlighter.h src/lib/abstracthighlighter_p.h
src/lib/context.cpp src/lib/context_p.h
src/lib/contextswitch.cpp src/lib/contextswitch_p.h
src/lib/definition.cpp src/lib/definition.h src/lib/definition_p.h
src/lib/definitiondownloader.cpp src/lib/definitiondownloader.h
src/lib/definitionref_p.h
src/lib/foldingregion.cpp src/lib/foldingregion.h
src/lib/format.cpp src/lib/format.h src/lib/format_p.h
src/lib/htmlhighlighter.cpp src/lib/htmlhighlighter.h
src/lib/keywordlist.cpp src/lib/keywordlist_p.h
src/lib/ksyntaxhighlighting_export.h
src/lib/matchresult_p.h
src/lib/repository.cpp src/lib/repository.h src/lib/repository_p.h
src/lib/rule.cpp src/lib/rule_p.h
src/lib/state.cpp src/lib/state.h src/lib/state_p.h
src/lib/syntaxhighlighter.cpp src/lib/syntaxhighlighter.h
src/lib/textstyledata_p.h
src/lib/theme.cpp src/lib/theme.h
src/lib/themedata.cpp src/lib/themedata_p.h
src/lib/wildcardmatcher.cpp src/lib/wildcardmatcher_p.h
src/lib/xml_p.h
)
target_include_directories(VSyntaxHighlighting PUBLIC
autogenerated
autogenerated/src/lib
)
target_compile_definitions(VSyntaxHighlighting PUBLIC
KSYNTAXHIGHLIGHTING_LIBRARY
)
target_link_libraries(VSyntaxHighlighting PUBLIC
Qt::Core
Qt::Gui
Qt::Network
)
if((QT_DEFAULT_MAJOR_VERSION GREATER 5))
target_link_libraries(VSyntaxHighlighting PUBLIC
Qt::Core5Compat
)
endif()