File: CMakeLists.txt

package info (click to toggle)
evolution-data-server 3.56.2-7
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 46,656 kB
  • sloc: ansic: 365,352; xml: 578; cpp: 482; perl: 297; sh: 62; makefile: 60; python: 35; javascript: 29
file content (165 lines) | stat: -rw-r--r-- 5,596 bytes parent folder | download | duplicates (2)
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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
# ********************************
# evolution-alarm-notify
# ********************************

set(autostartdir ${SYSCONF_INSTALL_DIR}/xdg/autostart)
set(desktopdir ${SHARE_INSTALL_PREFIX}/applications)
set(alarm_notify_icon hicolor_apps_scalable_org.gnome.Evolution-alarm-notify.svg)

configure_file(org.gnome.Evolution-alarm-notify.desktop.in.in
	org.gnome.Evolution-alarm-notify.desktop.in
	@ONLY
)

i18n_merge_file(${CMAKE_CURRENT_BINARY_DIR}/org.gnome.Evolution-alarm-notify.desktop.in org.gnome.Evolution-alarm-notify.desktop ${CMAKE_SOURCE_DIR}/po)

install(FILES ${CMAKE_CURRENT_BINARY_DIR}/org.gnome.Evolution-alarm-notify.desktop
	DESTINATION ${autostartdir}
)

# To have GNOME Shell show the GNotification notifications from it; otherwise it ignores them
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/org.gnome.Evolution-alarm-notify.desktop
	DESTINATION ${desktopdir}
)

add_icon_cache_files("${SHARE_INSTALL_PREFIX}" alarm_notify_icon)

# ********************************
# OAuth2 Handler helper
# ********************************

set(OAUTH2_SCHEMES "x-scheme-handler/eds-oauth2;")
if(NOT WITH_GOOGLE_CLIENT_ID STREQUAL "")
	set(CMAKE_REQUIRED_DEFINITIONS ${DATA_SERVER_CFLAGS})
	set(CMAKE_REQUIRED_INCLUDES ${CMAKE_BINARY_DIR} ${DATA_SERVER_INCLUDE_DIRS})
	set(CMAKE_REQUIRED_LIBRARIES ${DATA_SERVER_LDFLAGS})
	list(APPEND CMAKE_REQUIRED_DEFINITIONS -DG_LOG_DOMAIN=\"oauth2-value-helper\" -DBUILDING_VALUE_HELPER=1)
	file(TO_NATIVE_PATH "${CMAKE_BINARY_DIR}/oauth2-google-client-id" _binary_dir_to_file)
	CHECK_C_SOURCE_RUNS("#define DECODE_KEY \"${WITH_GOOGLE_CLIENT_ID}\"
			     #define DECODE_TO_FILE \"${_binary_dir_to_file}\"
			     #define DECODE_REVERSED 1
			     #include \"${CMAKE_SOURCE_DIR}/src/libedataserver/e-oauth2-service.c\"" _decoded)
	file(READ ${_binary_dir_to_file} _google_oauth2_scheme)
	unset(_binary_dir_to_file)
	unset(_decoded)
	unset(CMAKE_REQUIRED_LIBRARIES)
	unset(CMAKE_REQUIRED_INCLUDES)
	unset(CMAKE_REQUIRED_DEFINITIONS)

	if(NOT _google_oauth2_scheme STREQUAL "")
		set(OAUTH2_SCHEMES "x-scheme-handler/${_google_oauth2_scheme};${OAUTH2_SCHEMES}")
	endif(NOT _google_oauth2_scheme STREQUAL "")
	unset(_google_oauth2_scheme)
endif(NOT WITH_GOOGLE_CLIENT_ID STREQUAL "")

configure_file(org.gnome.evolution-data-server.OAuth2-handler.desktop.in
	org.gnome.evolution-data-server.OAuth2-handler.desktop.in
	@ONLY
)

i18n_merge_file(${CMAKE_CURRENT_BINARY_DIR}/org.gnome.evolution-data-server.OAuth2-handler.desktop.in org.gnome.evolution-data-server.OAuth2-handler.desktop ${CMAKE_SOURCE_DIR}/po)

install(FILES ${CMAKE_CURRENT_BINARY_DIR}/org.gnome.evolution-data-server.OAuth2-handler.desktop
	DESTINATION ${desktopdir}
)

# ********************************
# GSettings schemas
# ********************************

set(SCHEMAS
	org.gnome.Evolution.DefaultSources.gschema.xml
	org.gnome.evolution-data-server.gschema.xml
	org.gnome.evolution-data-server.calendar.gschema.xml
	org.gnome.evolution-data-server.addressbook.gschema.xml
	org.gnome.evolution.eds-shell.gschema.xml
	org.gnome.evolution.shell.network-config.gschema.xml
)

set(BUILT_SCHEMAS)
foreach(_schema IN LISTS SCHEMAS)
	configure_file(${_schema}.in ${_schema} COPYONLY)
	list(APPEND BUILT_SCHEMAS ${CMAKE_CURRENT_BINARY_DIR}/${_schema})
endforeach(_schema)

add_custom_command(OUTPUT gschemas.compiled
	COMMAND ${GLIB_COMPILE_SCHEMAS} .
)

add_custom_target(data-files ALL
	DEPENDS gschemas.compiled
		org.gnome.Evolution-alarm-notify.desktop
		org.gnome.evolution-data-server.OAuth2-handler.desktop
)

add_gsettings_schemas(data-files ${BUILT_SCHEMAS})

# ********************************
# GConf convert file
# ********************************

install(FILES evolution-data-server.convert
	DESTINATION ${SHARE_INSTALL_PREFIX}/GConf/gsettings
)

# ********************************
# Images
# ********************************

set(IMAGES
	category_birthday_16.png
	category_business_16.png
	category_favorites_16.png
	category_gifts_16.png
	category_goals_16.png
	category_holiday_16.png
	category_holiday-cards_16.png
	category_hot-contacts_16.png
	category_ideas_16.png
	category_international_16.png
	category_key-customer_16.png
	category_miscellaneous_16.png
	category_personal_16.png
	category_phonecalls_16.png
	category_status_16.png
	category_strategies_16.png
	category_suppliers_16.png
	category_time-and-expenses_16.png
)

install(FILES ${IMAGES}
	DESTINATION ${imagesdir}
)

# ********************************
# Fallback icons
# ********************************

set(private_icons
	hicolor_status_16x16_appointment-missed.png
	hicolor_status_22x22_appointment-missed.png
	hicolor_status_24x24_appointment-missed.png
	hicolor_status_32x32_appointment-missed.png
	hicolor_status_48x48_appointment-missed.png
	hicolor_status_256x256_appointment-missed.png
	hicolor_status_16x16_appointment-soon.png
	hicolor_status_22x22_appointment-soon.png
	hicolor_status_24x24_appointment-soon.png
	hicolor_status_32x32_appointment-soon.png
	hicolor_status_48x48_appointment-soon.png
	hicolor_status_256x256_appointment-soon.png
	hicolor_status_16x16_dialog-password.png
	hicolor_status_22x22_dialog-password.png
	hicolor_status_24x24_dialog-password.png
	hicolor_status_32x32_dialog-password.png
	hicolor_status_48x48_dialog-password.png
	hicolor_status_256x256_dialog-password.png
	hicolor_status_16x16_dialog-warning.png
	hicolor_status_22x22_dialog-warning.png
	hicolor_status_24x24_dialog-warning.png
	hicolor_status_32x32_dialog-warning.png
	hicolor_status_48x48_dialog-warning.png
	hicolor_status_256x256_dialog-warning.png
)

add_icon_cache_files("${privdatadir}" private_icons)