geary/ui/CMakeLists.txt
Michael James Gratton a3e0e474e7 Use GtkApplication built-in for loading app menu.
* src/client/application/geary-application.vala (GearyApplication): Set
  the resource_base_path to comply with the expected modern app id, so
  the app menu will be automatically loaded.

* ui/CMakeLists.txt: Replace app_menu.interface with gtk/menus.ui. Don't
  try ot copy interface files now that there aren't any.

* gtk/menus.ui: Replaces app_menu.interface.
2016-09-25 01:05:29 +10:00

61 lines
1.7 KiB
CMake

set(RESOURCE_LIST
STRIPBLANKS "accelerators.ui"
STRIPBLANKS "account_cannot_remove.glade"
STRIPBLANKS "account_list.glade"
STRIPBLANKS "account_spinner.glade"
STRIPBLANKS "certificate_warning_dialog.glade"
STRIPBLANKS "composer-headerbar.ui"
STRIPBLANKS "composer-menus.ui"
STRIPBLANKS "composer-widget.ui"
STRIPBLANKS "edit_alternate_emails.glade"
STRIPBLANKS "find_bar.glade"
STRIPBLANKS "folder-popover.ui"
STRIPBLANKS "gtk/menus.ui"
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"
"geary.css"
)
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})
# Work around valac wanting the resource files to be in the same
# directory as the XML file.
add_custom_target(resource_copy ALL
mkdir -p ${CMAKE_BINARY_DIR}/ui
COMMAND
cp ${RESOURCES_XML} ${CMAKE_BINARY_DIR}/ui
COMMAND
cp ${CMAKE_SOURCE_DIR}/ui/*.glade ${CMAKE_SOURCE_DIR}/ui/*.ui ${CMAKE_BINARY_DIR}/ui
COMMAND
cp ${CMAKE_SOURCE_DIR}/ui/*.css ${CMAKE_BINARY_DIR}/ui
)
add_dependencies(resource_copy resource_c)
# Export the file names so they can be used in the source build
set(RESOURCES_C ${RESOURCES_C} PARENT_SCOPE)
set(RESOURCES_XML "${CMAKE_BINARY_DIR}/ui/.gresource.xml" PARENT_SCOPE)