forked from elementary/photos
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
112 lines (100 loc) · 2.57 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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
project (io.elementary.photos)
cmake_minimum_required (VERSION 2.8)
list (APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake)
include (GNUInstallDirs)
set (DATADIR "${CMAKE_INSTALL_FULL_DATAROOTDIR}")
set (PKGDATADIR "${DATADIR}/${CMAKE_PROJECT_NAME}")
set (GETTEXT_PACKAGE ${CMAKE_PROJECT_NAME})
set (EXEC_NAME ${CMAKE_PROJECT_NAME})
set (APP_NAME "Photos")
set (VERSION "0.2.4")
set (VERSION_INFO "Alpha")
set (DOLLAR "$")
option (BUILD_PLUGINS "Whether to build plugins or not." ON)
add_definitions (-DGETTEXT_PACKAGE=\"${GETTEXT_PACKAGE}\")
add_definitions (-w)
set (DEPS_PKG
gee-0.8>=0.8.5
gexiv2>=0.4.90
geocode-glib-1.0
gio-unix-2.0>=2.20
glib-2.0>=2.30.0
gmodule-2.0>=2.24.0
gstreamer-1.0>=1.0.0
gstreamer-base-1.0>=1.0.0
gstreamer-plugins-base-1.0>=1.0.0
gstreamer-pbutils-1.0>=1.0.0
granite
gtk+-3.0>=3.6.0
gudev-1.0>=145
json-glib-1.0
libexif>=0.6.16
libgphoto2>=2.4.2
libwebp>=0.4.4
libraw>=0.13.2
libsoup-2.4>=2.26.0
libxml-2.0>=2.6.32
rest-0.7>=0.7
sqlite3>=3.5.9
webkit2gtk-4.0>=2.0.0
)
set (DEPS_PACKAGES
atk
gdk-3.0
gee-0.8
geocode-glib-1.0
gexiv2
gio-unix-2.0
glib-2.0
gmodule-2.0
granite
gstreamer-1.0
gstreamer-base-1.0
gstreamer-pbutils-1.0
gtk+-3.0
gudev-1.0
libexif
libgphoto2
libwebp
json-glib-1.0
libraw
libsoup-2.4
libxml-2.0
sqlite3
webkit2gtk-4.0
linux
# Custom .vapis
LConv
)
set (GLOBAL_VALA_OPTIONS
--vapidir=${CMAKE_SOURCE_DIR}/vapi
--target-glib=2.32
--thread
# Remove it when vala bindings are no more experimental (see https://bugzilla.gnome.org/show_bug.cgi?id=719597)
--enable-experimental
)
find_package (PkgConfig)
pkg_check_modules (DEPS REQUIRED ${DEPS_PKG})
pkg_check_modules (UNITY QUIET unity)
if (UNITY_FOUND)
message("-- Unity support enabled")
set (DEPS_CFLAGS ${DEPS_CFLAGS} ${UNITY_CFLAGS})
set (DEPS_LIBRARY_DIRS ${DEPS_LIBRARY_DIRS} ${UNITY_LIBRARY_DIRS})
set (DEPS_LIBRARIES ${DEPS_LIBRARIES} ${UNITY_LIBRARIES})
set (DEPS_PACKAGES ${DEPS_PACKAGES} unity)
set (GLOBAL_VALA_OPTIONS ${GLOBAL_VALA_OPTIONS} --define UNITY_SUPPORT)
else ()
message("-- Unity support disabled")
endif ()
add_definitions (${DEPS_CFLAGS})
link_directories (${DEPS_LIBRARY_DIRS})
find_package (Vala REQUIRED)
include (ValaVersion)
ensure_vala_version ("0.26" MINIMUM)
include (ValaPrecompile)
add_subdirectory (po)
add_subdirectory (data)
add_subdirectory (schemas)
add_subdirectory (src)
add_subdirectory (thumbnailer)
add_subdirectory (plugins)