[evolution-data-server/libedata-book-gir: 1/2] [EData-Book] Add GObject introspection
- From: Corentin Noël <corentinnoel src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-data-server/libedata-book-gir: 1/2] [EData-Book] Add GObject introspection
- Date: Thu, 7 Feb 2019 22:07:21 +0000 (UTC)
commit 11c4e6b86b46f2e6585a733ee705505cd4679a33
Author: Corentin Noël <corentin elementary io>
Date: Thu Feb 7 22:21:34 2019 +0100
[EData-Book] Add GObject introspection
src/addressbook/libedata-book/CMakeLists.txt | 48 ++++++++++++++++++++++++++++
src/vala/CMakeLists.txt | 37 +++++++++++++++++++++
2 files changed, 85 insertions(+)
---
diff --git a/src/addressbook/libedata-book/CMakeLists.txt b/src/addressbook/libedata-book/CMakeLists.txt
index 8972c9bd5..5eb36bf63 100644
--- a/src/addressbook/libedata-book/CMakeLists.txt
+++ b/src/addressbook/libedata-book/CMakeLists.txt
@@ -198,3 +198,51 @@ target_link_libraries(evolution-addressbook-factory-subprocess
install(TARGETS evolution-addressbook-factory-subprocess
DESTINATION ${LIBEXEC_INSTALL_DIR}
)
+
+set(gir_sources ${SOURCES} ${HEADERS})
+set(gir_identifies_prefixes E)
+set(gir_includes GObject-2.0 GLib-2.0 Gio-2.0 libxml2-2.0)
+set(gir_cflags
+ -DLIBEDATA_BOOK_COMPILATION
+ -I${CMAKE_BINARY_DIR}/src/addressbook
+ -I${CMAKE_BINARY_DIR}/src/addressbook/libedata-book
+ -I${CMAKE_SOURCE_DIR}/src/addressbook
+ -I${CMAKE_SOURCE_DIR}/src/addressbook/libedata-book
+)
+set(gir_libdirs
+ ${CMAKE_BINARY_DIR}/src/private
+ ${CMAKE_BINARY_DIR}/src/camel
+ ${CMAKE_BINARY_DIR}/src/libebackend
+ ${CMAKE_BINARY_DIR}/src/libedataserver
+ ${CMAKE_BINARY_DIR}/src/addressbook/libebook
+ ${CMAKE_BINARY_DIR}/src/addressbook/libebook-contacts
+ ${CMAKE_BINARY_DIR}/src/addressbook/libedata-book
+ ${PHONENUMBER_LIB_DIRS}
+)
+set(gir_libs
+ camel
+ ebook
+ ebook-contacts
+ edata-book
+ edataserver
+)
+set(gir_deps
+ ${CMAKE_BINARY_DIR}/src/camel/Camel-${API_VERSION}.gir
+ ${CMAKE_BINARY_DIR}/src/libedataserver/EDataServer-${API_VERSION}.gir
+ ${CMAKE_BINARY_DIR}/src/addressbook/libebook/EBook-${API_VERSION}.gir
+ ${CMAKE_BINARY_DIR}/src/addressbook/libebook-contacts/EBookContacts-${API_VERSION}.gir
+)
+
+gir_add_introspection_simple(
+ EDataBook
+ libedata-book
+ ${API_VERSION}
+ "libedata-book/libedata-book.h"
+ gir_identifies_prefixes
+ gir_includes
+ gir_cflags
+ gir_libdirs
+ gir_libs
+ gir_deps
+ gir_sources
+)
diff --git a/src/vala/CMakeLists.txt b/src/vala/CMakeLists.txt
index 1815ad78b..366b5616b 100644
--- a/src/vala/CMakeLists.txt
+++ b/src/vala/CMakeLists.txt
@@ -7,6 +7,8 @@ set(valafiles
${CMAKE_CURRENT_BINARY_DIR}/libebook-${API_VERSION}.vapi
${CMAKE_CURRENT_SOURCE_DIR}/libebook-contacts-${API_VERSION}.deps
${CMAKE_CURRENT_BINARY_DIR}/libebook-contacts-${API_VERSION}.vapi
+ ${CMAKE_CURRENT_SOURCE_DIR}/libedata-book-${API_VERSION}.deps
+ ${CMAKE_CURRENT_BINARY_DIR}/libedata-book-${API_VERSION}.vapi
)
if(HAVE_GTK)
@@ -166,6 +168,41 @@ add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/libebook-${API_VERSION}.va
${gir_deps}
)
+# ***********************************
+# libedata-book
+# ***********************************
+
+set(gir_fullname ${CMAKE_BINARY_DIR}/src/addressbook/libedata-book/EDataBook-${API_VERSION}.gir)
+gir_girfilename_to_target(gir_deps EDataBook-${API_VERSION}.gir)
+
+add_dependencies(vala ${gir_deps})
+
+add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/libedata-book-${API_VERSION}.vapi
+ COMMAND ${VAPIGEN}
+ --vapidir=${CMAKE_CURRENT_SOURCE_DIR}
+ --vapidir=${CMAKE_CURRENT_BINARY_DIR}
+ --girdir=${CMAKE_BINARY_DIR}/src/camel
+ --girdir=${CMAKE_BINARY_DIR}/src/libedataserver
+ --girdir=${CMAKE_BINARY_DIR}/src/addressbook/libebook
+ --girdir=${CMAKE_BINARY_DIR}/src/addressbook/libebook-contacts
+ --pkg libedataserver-${API_VERSION}
+ --pkg libebook-${API_VERSION}
+ --pkg libebook-contacts-${API_VERSION}
+ --pkg gio-2.0
+ --pkg libxml-2.0
+ --pkg libsoup-2.4
+ --pkg posix
+ --library libedata-book-${API_VERSION}
+ --metadatadir=${CMAKE_CURRENT_SOURCE_DIR}
+ ${gir_fullname}
+ DEPENDS libedata-book-${API_VERSION}.deps
+ ${CMAKE_CURRENT_BINARY_DIR}/libedataserver-${API_VERSION}.vapi
+ ${CMAKE_CURRENT_BINARY_DIR}/libebook-${API_VERSION}.vapi
+ ${CMAKE_CURRENT_BINARY_DIR}/libebook-contacts-${API_VERSION}.vapi
+ ${gir_fullname}
+ ${gir_deps}
+)
+
# ***********************************
# Install all VAPI files
# ***********************************
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]