forked from elementary/files
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
74 lines (63 loc) · 2.05 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
69
70
71
72
73
74
# Check https://elementary.io/docs/code/getting-started#the-build-system for documentation
cmake_minimum_required (VERSION 2.8)
cmake_policy (VERSION 2.8)
project (io.elementary.files C)
enable_testing ()
include (GNUInstallDirs)
list (APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake)
set (GETTEXT_PACKAGE ${CMAKE_PROJECT_NAME})
set (PIXMAP_DIR "${CMAKE_INSTALL_PREFIX}/share/pixmaps/${CMAKE_PROJECT_NAME}/")
set (GNOMELOCALEDIR "${CMAKE_INSTALL_PREFIX}/share/locale/")
set (PLUGIN_DIR "${CMAKE_INSTALL_FULL_LIBDIR}/${CMAKE_PROJECT_NAME}/plugins/")
set (UI_DIR "${CMAKE_INSTALL_PREFIX}/share/${CMAKE_PROJECT_NAME}/ui/")
set (TESTDATA_DIR "${CMAKE_SOURCE_DIR}/data/tests")
set (PACKAGE_VERSION 0.3.5)
set (VERSION 0.3.5)
configure_file (${CMAKE_SOURCE_DIR}/config.h.cmake ${CMAKE_BINARY_DIR}/config.h)
add_definitions ("-DGETTEXT_PACKAGE=\"${GETTEXT_PACKAGE}\"")
add_definitions ("-w")
option (LIB_ONLY "Build libcore and libwidgets only" FALSE)
option (MODULE_ONLY "Build only custom gtk filechooser dialog module" FALSE)
find_package (Vala REQUIRED)
include (ValaVersion)
ensure_vala_version ("0.34.0" MINIMUM)
include (ValaPrecompile)
find_package (PkgConfig)
OPTION (WITH_UNITY "Add Unity launcher support" ON)
pkg_check_modules (UNITY unity>=4.0.0)
set (COMMON_DEPS
granite>=0.3.0
glib-2.0>=2.29.0
gthread-2.0
gio-2.0
gio-unix-2.0
pango>=1.1.2
gtk+-3.0>=3.22
gmodule-2.0
gail-3.0
gee-0.8
sqlite3
dbus-glib-1
libcanberra>=0.30
zeitgeist-2.0
)
if (WITH_UNITY AND UNITY_FOUND)
pkg_check_modules (DEPS REQUIRED ${COMMON_DEPS} plank)
else ()
pkg_check_modules (DEPS REQUIRED ${COMMON_DEPS})
endif ()
if (MODULE_ONLY)
add_subdirectory (filechooser-module)
elseif (LIB_ONLY)
add_subdirectory (libcore)
add_subdirectory (libwidgets)
else ()
add_subdirectory (src)
add_subdirectory (data)
add_subdirectory (pantheon-files-daemon)
add_subdirectory (libcore)
add_subdirectory (libwidgets)
add_subdirectory (plugins)
add_subdirectory (filechooser-module)
endif ()
add_subdirectory (po)