[evolution-data-server/wip/mcrha/libical-glib] Enable introspection generation for libedata-book
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-data-server/wip/mcrha/libical-glib] Enable introspection generation for libedata-book
- Date: Thu, 25 Apr 2019 15:19:20 +0000 (UTC)
commit e62a4450ecdb7b7ba35ca9aca98287a448e30bc5
Author: Milan Crha <mcrha redhat com>
Date: Thu Apr 25 17:20:38 2019 +0200
Enable introspection generation for libedata-book
src/addressbook/CMakeLists.txt | 2 +-
src/addressbook/libedata-book/CMakeLists.txt | 46 ++++++++++++++++
src/vala/CMakeLists.txt | 80 ++++++++++++++++++++++++++++
3 files changed, 127 insertions(+), 1 deletion(-)
---
diff --git a/src/addressbook/CMakeLists.txt b/src/addressbook/CMakeLists.txt
index 815e915e1..80a8633d4 100644
--- a/src/addressbook/CMakeLists.txt
+++ b/src/addressbook/CMakeLists.txt
@@ -1,4 +1,4 @@
add_subdirectory(backends)
-add_subdirectory(libedata-book)
add_subdirectory(libebook-contacts)
+add_subdirectory(libedata-book)
add_subdirectory(libebook)
diff --git a/src/addressbook/libedata-book/CMakeLists.txt b/src/addressbook/libedata-book/CMakeLists.txt
index 15ac13a77..ae405abb0 100644
--- a/src/addressbook/libedata-book/CMakeLists.txt
+++ b/src/addressbook/libedata-book/CMakeLists.txt
@@ -200,3 +200,49 @@ 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-contacts
+ ${CMAKE_BINARY_DIR}/src/addressbook/libedata-book
+ ${PHONENUMBER_LIB_DIRS}
+)
+set(gir_libs
+ camel
+ 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/libebackend/EBackend-${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 1266d1ed2..d8e45f9e6 100644
--- a/src/vala/CMakeLists.txt
+++ b/src/vala/CMakeLists.txt
@@ -1,6 +1,7 @@
# disabled until some issues are fixed;
# when fixed, then remove the conditions below and build the vala bindings unconditionally
set(ENABLE_DATACAL 0)
+set(ENABLE_DATABOOK 0)
set(valafiles
${CMAKE_CURRENT_SOURCE_DIR}/camel-${API_VERSION}.deps
@@ -22,6 +23,13 @@ if(ENABLE_DATACAL)
)
endif(ENABLE_DATACAL)
+if(ENABLE_DATABOOK)
+ list(APPEND valafiles
+ ${CMAKE_CURRENT_SOURCE_DIR}/libedata-book-${API_VERSION}.deps
+ ${CMAKE_CURRENT_BINARY_DIR}/libedata-book-${API_VERSION}.vapi
+ )
+endif(ENABLE_DATABOOK)
+
if(HAVE_GTK)
list(APPEND valafiles
${CMAKE_CURRENT_SOURCE_DIR}/libedataserverui-${API_VERSION}.deps
@@ -154,6 +162,41 @@ add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/libebook-contacts-${API_VE
${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}
+)
+
# ***********************************
# libebook
# ***********************************
@@ -187,6 +230,43 @@ add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/libebook-${API_VERSION}.va
${gir_deps}
)
+# ***********************************
+# libedata-book
+# ***********************************
+
+if(ENABLE_DATABOOK)
+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/libebackend
+ --girdir=${CMAKE_BINARY_DIR}/src/libedataserver
+ --girdir=${CMAKE_BINARY_DIR}/src/addressbook/libebook-contacts
+ --pkg libedataserver-${API_VERSION}
+ --pkg libebackend-${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-contacts-${API_VERSION}.vapi
+ ${CMAKE_CURRENT_BINARY_DIR}/libebackend-${API_VERSION}.vapi
+ ${gir_fullname}
+ ${gir_deps}
+)
+endif(ENABLE_DATABOOK)
+
# ***********************************
# libecal
# ***********************************
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]