-
Notifications
You must be signed in to change notification settings - Fork 16
/
CMakeLists.txt
66 lines (51 loc) · 1.93 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
cmake_minimum_required(VERSION 3.0.2)
cmake_policy(SET CMP0048 NEW)
project(libertine
VERSION 1.7)
set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake" "${CMAKE_MODULE_PATH}")
find_package(PkgConfig REQUIRED)
include(GNUInstallDirs)
include(CheckIncludeFile)
include(CheckFunctionExists)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wall -Wextra -pedantic")
include_directories(${CMAKE_BINARY_DIR} ${CMAKE_SOURCE_DIR})
find_package(Qt5Core REQUIRED)
find_package(Qt5DBus REQUIRED)
find_package(Qt5Gui REQUIRED)
find_package(Qt5Quick REQUIRED)
find_package(Qt5Widgets REQUIRED)
find_package(Gettext REQUIRED)
find_package(Intltool REQUIRED)
find_package(X11 REQUIRED)
pkg_check_modules(GLIB2 REQUIRED glib-2.0)
include_directories(${GLIB2_INCLUDE_DIRS})
pkg_check_modules(PYTHON3 REQUIRED python3)
include_directories(${PYTHON3_INCLUDE_DIRS})
pkg_check_modules(DBUSTEST REQUIRED dbustest-1>=14.04.0)
include_directories(${DBUSTEST_INCLUDE_DIRS})
pkg_check_modules(GIO2 REQUIRED gio-2.0 gio-unix-2.0)
include_directories(${GIO2_INCLUDE_DIRS})
set(CMAKE_AUTOMOC ON)
set(LIBERTINE_COMMON libertine-common)
set(LIBERTINE_CORE libertine)
set(LIBERTINE_EXE_NAME libertine-manager-app)
set(LIBERTINE_QML_PATH ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DATAROOTDIR}/${CMAKE_PROJECT_NAME}/qml)
add_subdirectory(qml)
add_subdirectory(liblibertine)
add_subdirectory(common)
add_subdirectory(libertine)
add_subdirectory(system-settings-plugin)
add_subdirectory(python)
add_subdirectory(data)
add_subdirectory(tools)
add_subdirectory(pasted)
add_subdirectory(po)
include(CTest)
add_subdirectory(tests)
set(ARCHIVE_NAME ${CMAKE_PROJECT_NAME}-${LIBERTINE_VERSION})
add_custom_target(dist
COMMAND echo debian export-ignore >.gitattributes
&& git archive --worktree-attributes --prefix=${ARCHIVE_NAME}/ HEAD
| xz >${CMAKE_BINARY_DIR}/${ARCHIVE_NAME}.tar.xz
&& rm .gitattributes
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR})