-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
66 lines (53 loc) · 1.78 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
# Copyright 2018 Max Harmathy
#
# This program is free software; you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free Software
# Foundation; either version 2 of the License, or (at your option) any later
# version.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
# details.
#
# You should have received a copy of the GNU General Public License along with
# this program; if not, see <http://www.gnu.org/licenses/>.
cmake_minimum_required(VERSION 3.1)
project(harfbuzz-qml LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
find_package(Qt5 COMPONENTS Core Quick Widgets REQUIRED)
find_package(KF5Declarative REQUIRED)
find_package(Freetype REQUIRED)
find_package(PkgConfig REQUIRED)
pkg_check_modules(FONTCONFIG REQUIRED fontconfig)
pkg_check_modules(HARFBUZZ REQUIRED harfbuzz)
set(harfbuzz-qml_SRCS
main.cpp
qml.qrc
fontsettingsmodel.cpp
freetype-renderer.cpp
kxftconfig.cpp
menupreviewimageprovider.cpp
menupreview.cpp
)
include_directories( . )
add_executable(${PROJECT_NAME} ${harfbuzz-qml_SRCS})
target_include_directories(${PROJECT_NAME} PUBLIC
"${FREETYPE_INCLUDE_DIRS}"
"${FONTCONFIG_INCLUDE_DIRS}"
"${HARFBUZZ_INCLUDE_DIRS}"
)
target_compile_definitions(${PROJECT_NAME} PRIVATE $<$<OR:$<CONFIG:Debug>,$<CONFIG:RelWithDebInfo>>:QT_QML_DEBUG>)
target_link_libraries(${PROJECT_NAME} PRIVATE
Qt5::Core
Qt5::Quick
Qt5::Widgets
KF5::Declarative
"${FREETYPE_LIBRARIES}"
"${FONTCONFIG_LIBRARIES}"
"${HARFBUZZ_LIBRARIES}"
)