[geary] Generate GResource source code, add it to the build.
- From: Adam Dingle <adamd src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [geary] Generate GResource source code, add it to the build.
- Date: Sat, 9 Apr 2016 21:34:20 +0000 (UTC)
commit 2a6120ba49fc3bc0043c70791e94351eda09716a
Author: Michael James Gratton <mike vee net>
Date: Sun Apr 3 19:20:04 2016 +1000
Generate GResource source code, add it to the build.
CMakeLists.txt | 3 +-
src/CMakeLists.txt | 5 ++-
ui/CMakeLists.txt | 60 ++++++++++++++++++++++++++++++++++++---------------
3 files changed, 46 insertions(+), 22 deletions(-)
---
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 53abee1..245141f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -150,7 +150,6 @@ add_subdirectory(help)
add_subdirectory(icons)
add_subdirectory(po)
add_subdirectory(sql)
+add_subdirectory(ui)
add_subdirectory(src)
add_subdirectory(theming)
-add_subdirectory(ui)
-
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 722ccd0..d59d558 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -543,7 +543,7 @@ set(TARGET_GLIB 2.34)
pkg_check_modules(DEPS REQUIRED
gthread-2.0
glib-2.0>=${TARGET_GLIB}.0
- gio-2.0>=2.28.0
+ gio-2.0>=2.32.0
gtk+-3.0>=3.10.0
gee-0.8>=0.8.5
libnotify>=0.7.5
@@ -671,7 +671,8 @@ OPTIONS
--vapidir=${CMAKE_BINARY_DIR}/src
)
-add_executable(geary ${GEARY_VALA_C})
+set_property(SOURCE ${RESOURCES_C} PROPERTY GENERATED TRUE)
+add_executable(geary ${GEARY_VALA_C} ${RESOURCES_C})
target_link_libraries(geary m ${DEPS_LIBRARIES} gthread-2.0 geary-static)
install(TARGETS geary RUNTIME DESTINATION bin)
add_custom_command(
diff --git a/ui/CMakeLists.txt b/ui/CMakeLists.txt
index dc18fb6..4aa4c82 100644
--- a/ui/CMakeLists.txt
+++ b/ui/CMakeLists.txt
@@ -1,19 +1,43 @@
-set(UI_DEST share/geary/ui)
-install(FILES accelerators.ui DESTINATION ${UI_DEST})
-install(FILES account_list.glade DESTINATION ${UI_DEST})
-install(FILES account_cannot_remove.glade DESTINATION ${UI_DEST})
-install(FILES account_spinner.glade DESTINATION ${UI_DEST})
-install(FILES app_menu.interface DESTINATION ${UI_DEST})
-install(FILES certificate_warning_dialog.glade DESTINATION ${UI_DEST})
-install(FILES composer.glade DESTINATION ${UI_DEST})
-install(FILES composer_accelerators.ui DESTINATION ${UI_DEST})
-install(FILES edit_alternate_emails.glade DESTINATION ${UI_DEST})
-install(FILES find_bar.glade DESTINATION ${UI_DEST})
-install(FILES login.glade DESTINATION ${UI_DEST})
-install(FILES password-dialog.glade DESTINATION ${UI_DEST})
-install(FILES preferences.glade DESTINATION ${UI_DEST})
-install(FILES remove_confirm.glade DESTINATION ${UI_DEST})
-install(FILES toolbar_empty_menu.ui DESTINATION ${UI_DEST})
-install(FILES toolbar_mark_menu.ui DESTINATION ${UI_DEST})
-install(FILES upgrade_dialog.glade DESTINATION ${UI_DEST})
+set(RESOURCE_LIST
+ STRIPBLANKS "accelerators.ui"
+ STRIPBLANKS "account_cannot_remove.glade"
+ STRIPBLANKS "account_list.glade"
+ STRIPBLANKS "account_spinner.glade"
+ STRIPBLANKS "app_menu.interface"
+ STRIPBLANKS "certificate_warning_dialog.glade"
+ STRIPBLANKS "composer.glade"
+ STRIPBLANKS "composer_accelerators.ui"
+ STRIPBLANKS "edit_alternate_emails.glade"
+ STRIPBLANKS "find_bar.glade"
+ STRIPBLANKS "login.glade"
+ STRIPBLANKS "password-dialog.glade"
+ STRIPBLANKS "preferences.glade"
+ STRIPBLANKS "remove_confirm.glade"
+ STRIPBLANKS "toolbar_empty_menu.ui"
+ STRIPBLANKS "toolbar_mark_menu.ui"
+ STRIPBLANKS "upgrade_dialog.glade"
+)
+
+compile_gresources(
+ RESOURCES_C
+ RESOURCES_XML
+ TYPE EMBED_C
+ SOURCE_DIR "${CMAKE_SOURCE_DIR}/ui"
+ PREFIX "/org/gnome/Geary"
+ RESOURCES ${RESOURCE_LIST}
+)
+
+compile_gresources(
+ RESOURCES_H
+ RESOURCES_XML
+ TYPE EMBED_H
+ SOURCE_DIR "${CMAKE_SOURCE_DIR}/ui"
+ PREFIX "/org/gnome/Geary"
+ RESOURCES ${RESOURCE_LIST}
+)
+
+add_custom_target(resource_h ALL DEPENDS ${RESOURCES_H})
+add_custom_target(resource_c ALL DEPENDS ${RESOURCES_C})
+
+set(RESOURCES_C ${RESOURCES_C} PARENT_SCOPE)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]