diff options
author | Milan Crha <mcrha@redhat.com> | 2016-09-22 18:38:35 +0200 |
---|---|---|
committer | Milan Crha <mcrha@redhat.com> | 2016-09-22 18:38:35 +0200 |
commit | 371bc2a865dba65902e2304b0c884b48ad39ae99 (patch) | |
tree | 8376e9ec839bffbbc5ceef6876d3c3504ecd6057 | |
parent | eda51aa570ebd2a2d2f9a602bf19df058fc889a7 (diff) | |
download | evolution-data-server-371bc2a865dba65902e2304b0c884b48ad39ae99.tar.gz |
libedataserverui, libebackend, addressbook
31 files changed, 1192 insertions, 76 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index e2b3db5a3..9b85bf3be 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -250,6 +250,11 @@ if(NOT PERL) message(FATAL_ERROR "You need perl to build ${PROJECT_NAME}") endif(NOT PERL) +find_program(PYTHON python) +if(NOT PYTHON) + message(FATAL_ERROR "You need python to build ${PROJECT_NAME}") +endif(NOT PYTHON) + # ****************************** # deflateInit is a #define, use deflateEnd instead # ****************************** @@ -852,6 +857,9 @@ add_definitions(-DHAVE_CONFIG_H=1) print_build_options() +add_subdirectory(addressbook) add_subdirectory(camel) +add_subdirectory(libebackend) add_subdirectory(libedataserver) +add_subdirectory(libedataserverui) add_subdirectory(private) diff --git a/addressbook/CMakeLists.txt b/addressbook/CMakeLists.txt new file mode 100644 index 000000000..b1c70664b --- /dev/null +++ b/addressbook/CMakeLists.txt @@ -0,0 +1,5 @@ +add_subdirectory(backends) +add_subdirectory(libebook) +add_subdirectory(libebook-contacts) +add_subdirectory(libedata-book) +add_subdirectory(libegdbus) diff --git a/addressbook/backends/CMakeLists.txt b/addressbook/backends/CMakeLists.txt new file mode 100644 index 000000000..2d1693d5b --- /dev/null +++ b/addressbook/backends/CMakeLists.txt @@ -0,0 +1,11 @@ +add_subdirectory(file) + +if(ENABLE_GOOGLE) + add_subdirectory(google) +endif(ENABLE_GOOGLE) + +if(HAVE_LDAP) + add_subdirectory(ldap) +endif(HAVE_LDAP) + +add_subdirectory(webdav) diff --git a/addressbook/backends/file/CMakeLists.txt b/addressbook/backends/file/CMakeLists.txt new file mode 100644 index 000000000..bed2a0b75 --- /dev/null +++ b/addressbook/backends/file/CMakeLists.txt @@ -0,0 +1,57 @@ +set(DEPENDENCIES + ebackend + ebook + ebook-contacts + edataserver + edata-book +) + +set(SOURCES + e-book-backend-file.c + e-book-backend-file.h + e-book-backend-file-factory.c +) + +if(HAVE_LIBDB) + list(APPEND SOURCES + e-book-backend-file-migrate-bdb.c + e-book-backend-file-migrate-bdb.h + ) +endif(HAVE_LIBDB) + +add_library(ebookbackendfile MODULE + ${SOURCES} +) + +add_dependencies(ebookbackendfile + ${DEPENDENCIES} +) + +target_compile_definitions(ebookbackendfile PRIVATE + -DG_LOG_DOMAIN=\"e-book-backend-file\" + -DBACKENDDIR=\"${ebook_backenddir}\" +) + +target_compile_options(ebookbackendfile PUBLIC + ${ADDRESSBOOK_CFLAGS} + ${LIBDB_CFLAGS} +) + +target_include_directories(ebookbackendfile PUBLIC + ${CMAKE_BINARY_DIR} + ${CMAKE_SOURCE_DIR} + ${CMAKE_BINARY_DIR}/addressbook + ${CMAKE_SOURCE_DIR}/addressbook + ${ADDRESSBOOK_INCLUDE_DIRS} + ${LIBDB_INCLUDE_DIRS} +) + +target_link_libraries(ebookbackendfile + ${DEPENDENCIES} + ${ADDRESSBOOK_LDFLAGS} + ${LIBDB_LIBS} +) + +install(TARGETS ebookbackendfile + DESTINATION ${ebook_backenddir} +) diff --git a/addressbook/backends/google/CMakeLists.txt b/addressbook/backends/google/CMakeLists.txt new file mode 100644 index 000000000..21ac8b9b5 --- /dev/null +++ b/addressbook/backends/google/CMakeLists.txt @@ -0,0 +1,100 @@ +set(DEPENDENCIES + ebackend + ebook + ebook-contacts + edataserver + edata-book +) + +add_library(ebookbackendgoogle MODULE + e-book-backend-google-factory.c + e-book-backend-google.c + e-book-backend-google.h + e-book-google-utils.c + e-book-google-utils.h + e-gdata-oauth2-authorizer.c + e-gdata-oauth2-authorizer.h +) + +add_dependencies(ebookbackendgoogle + ${DEPENDENCIES} +) + +target_compile_definitions(ebookbackendgoogle PRIVATE + -DG_LOG_DOMAIN=\"e-book-backend-google\" + -DBACKENDDIR=\"${ebook_backenddir}\" +) + +target_compile_options(ebookbackendgoogle PUBLIC + ${ADDRESSBOOK_CFLAGS} + ${LIBGDATA_CFLAGS} +) + +target_include_directories(ebookbackendgoogle PUBLIC + ${CMAKE_BINARY_DIR} + ${CMAKE_SOURCE_DIR} + ${CMAKE_BINARY_DIR}/addressbook + ${CMAKE_SOURCE_DIR}/addressbook + ${ADDRESSBOOK_INCLUDE_DIRS} + ${LIBGDATA_INCLUDE_DIRS} +) + +target_link_libraries(ebookbackendgoogle + ${DEPENDENCIES} + ${ADDRESSBOOK_LDFLAGS} + ${LIBGDATA_LDFLAGS} +) + +install(TARGETS ebookbackendgoogle + DESTINATION ${ebook_backenddir} +) + +# Private utility library. +# This is split out to allow it to be unit tested. + +set(SOURCES + e-book-google-utils.c + e-book-google-utils.h +) + +add_library(ebook-google-utils STATIC + ${SOURCES} +) + +add_dependencies(ebook-google-utils + ebackend + ebook + ebook-contacts + edataserver + edata-book +) + +target_compile_definitions(ebook-google-utils PRIVATE + -DG_LOG_DOMAIN=\"e-book-google-utils\" +) + +target_compile_options(ebook-google-utils PUBLIC + ${ADDRESSBOOK_CFLAGS} + ${LIBGDATA_CFLAGS} +) + +target_include_directories(ebook-google-utils PUBLIC + ${CMAKE_BINARY_DIR} + ${CMAKE_SOURCE_DIR} + ${CMAKE_BINARY_DIR}/addressbook + ${CMAKE_SOURCE_DIR}/addressbook + ${ADDRESSBOOK_INCLUDE_DIRS} + ${LIBGDATA_INCLUDE_DIRS} +) + +target_link_libraries(ebook-google-utils + ebackend + ebook + ebook-contacts + edataserver + edata-book + ${ADDRESSBOOK_LDFLAGS} + ${LIBGDATA_LDFLAGS} +) + +add_subdirectory(tests) diff --git a/addressbook/backends/google/tests/CMakeLists.txt b/addressbook/backends/google/tests/CMakeLists.txt new file mode 100644 index 000000000..f4edf6f22 --- /dev/null +++ b/addressbook/backends/google/tests/CMakeLists.txt @@ -0,0 +1,38 @@ +set(DEPENDENCIES + ebook-google-utils +) + +add_executable(ebookbackendgoogle-phonenumber + EXCLUDE_FROM_ALL + phone-numbers.c +) + +add_dependencies(ebookbackendgoogle-phonenumber + ${DEPENDENCIES} +) + +target_compile_definitions(ebookbackendgoogle-phonenumber PRIVATE + -DG_LOG_DOMAIN=\"ebookbackendgoogle-phonenumber\" +) + +target_compile_options(ebookbackendgoogle-phonenumber PUBLIC + ${ADDRESSBOOK_CFLAGS} + ${LIBGDATA_CFLAGS} +) + +target_include_directories(ebookbackendgoogle-phonenumber PUBLIC + ${CMAKE_BINARY_DIR} + ${CMAKE_SOURCE_DIR} + ${CMAKE_SOURCE_DIR}/addressbook/backends/google + ${CMAKE_CURRENT_SOURCE_DIR} + ${ADDRESSBOOK_INCLUDE_DIRS} + ${LIBGDATA_INCLUDE_DIRS} +) + +target_link_libraries(ebookbackendgoogle-phonenumber + ${DEPENDENCIES} + ${ADDRESSBOOK_LDFLAGS} + ${LIBGDATA_LDFLAGS} +) + +add_check_test(ebookbackendgoogle-phonenumber) diff --git a/addressbook/backends/ldap/CMakeLists.txt b/addressbook/backends/ldap/CMakeLists.txt new file mode 100644 index 000000000..73aef66f5 --- /dev/null +++ b/addressbook/backends/ldap/CMakeLists.txt @@ -0,0 +1,50 @@ +set(DEPENDENCIES + ebackend + ebook + ebook-contacts + edataserver + edata-book +) + +add_library(ebookbackendldap MODULE + e-book-backend-ldap.c + e-book-backend-ldap.h + e-book-backend-ldap-factory.c +) + +add_dependencies(ebookbackendldap + ${DEPENDENCIES} +) + +target_compile_definitions(ebookbackendldap PRIVATE + -DG_LOG_DOMAIN=\"e-book-backend-ldap\" + -DBACKENDDIR=\"${ebook_backenddir}\" +) + +target_compile_options(ebookbackendldap PUBLIC + ${ADDRESSBOOK_CFLAGS} + ${LDAP_CFLAGS} +) + +target_include_directories(ebookbackendldap PUBLIC + ${CMAKE_BINARY_DIR} + ${CMAKE_SOURCE_DIR} + ${CMAKE_BINARY_DIR}/addressbook + ${CMAKE_SOURCE_DIR}/addressbook + ${ADDRESSBOOK_INCLUDE_DIRS} + ${LDAP_INCLUDE_DIRS} +) + +target_link_libraries(ebookbackendldap + ${DEPENDENCIES} + ${ADDRESSBOOK_LDFLAGS} + ${LDAP_LIBS} +) + +install(TARGETS ebookbackendldap + DESTINATION ${ebook_backenddir} +) + +install(FILES evolutionperson.schema + DESTINATION ${privdatadir} +) diff --git a/addressbook/backends/webdav/CMakeLists.txt b/addressbook/backends/webdav/CMakeLists.txt new file mode 100644 index 000000000..ad5a10474 --- /dev/null +++ b/addressbook/backends/webdav/CMakeLists.txt @@ -0,0 +1,43 @@ +set(DEPENDENCIES + ebackend + ebook + ebook-contacts + edataserver + edata-book +) + +add_library(ebookbackendwebdav MODULE + e-book-backend-webdav.c + e-book-backend-webdav.h + e-book-backend-webdav-factory.c +) + +add_dependencies(ebookbackendwebdav + ${DEPENDENCIES} +) + +target_compile_definitions(ebookbackendwebdav PRIVATE + -DG_LOG_DOMAIN=\"e-book-backend-webdav\" + -DBACKENDDIR=\"${ebook_backenddir}\" +) + +target_compile_options(ebookbackendwebdav PUBLIC + ${ADDRESSBOOK_CFLAGS} +) + +target_include_directories(ebookbackendwebdav PUBLIC + ${CMAKE_BINARY_DIR} + ${CMAKE_SOURCE_DIR} + ${CMAKE_BINARY_DIR}/addressbook + ${CMAKE_SOURCE_DIR}/addressbook + ${ADDRESSBOOK_INCLUDE_DIRS} +) + +target_link_libraries(ebookbackendwebdav + ${DEPENDENCIES} + ${ADDRESSBOOK_LDFLAGS} +) + +install(TARGETS ebookbackendwebdav + DESTINATION ${ebook_backenddir} +) diff --git a/addressbook/libebook-contacts/CMakeLists.txt b/addressbook/libebook-contacts/CMakeLists.txt new file mode 100644 index 000000000..615e6f7a0 --- /dev/null +++ b/addressbook/libebook-contacts/CMakeLists.txt @@ -0,0 +1,161 @@ +glib_mkenums(e-book-contacts-enumtypes e-book-contacts-types.h E_BOOK_CONTACTS_ENUMTYPES_H) + +add_pkgconfig_file(libebook-contacts.pc.in libebook-contacts-${API_VERSION}.pc) + +add_custom_command( + OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/e-name-western-tables.h + COMMAND ${PYTHON} ${CMAKE_CURRENT_SOURCE_DIR}/gen-western-table.py <${CMAKE_CURRENT_SOURCE_DIR}/e-name-western-tables.h.in >${CMAKE_CURRENT_BINARY_DIR}/e-name-western-tables.h + DEPENDS gen-western-table.py e-name-western-tables.h.in +) + +set(DEPENDENCIES + camel + edataserver +) + +set(SOURCES + e-address-western.c + e-book-contacts-types.c + e-book-query.c + e-contact.c + e-name-western.c + e-phone-number.c + e-phone-number-private.h + e-source-backend-summary-setup.c + e-vcard.c + ${CMAKE_CURRENT_BINARY_DIR}/e-book-contacts-enumtypes.c + ${CMAKE_CURRENT_BINARY_DIR}/e-name-western-tables.h +) + +set(HEADERS + libebook-contacts.h + e-address-western.h + e-book-contacts-types.h + e-book-query.h + e-contact.h + e-name-western.h + e-phone-number.h + e-source-backend-summary-setup.h + e-vcard.h + ${CMAKE_CURRENT_BINARY_DIR}/e-book-contacts-enumtypes.h +) + +if(ENABLE_PHONENUMBER) + # We put the C++ code into a separate static library, so that we can use + # the C linker for libebook-contacts. This avoids that libebook-contacts + # depends on the C++ Standard Library, even if phone number support is + # disabled. + + add_library(ephonenumber-private STATIC + e-alphabet-index-private.cpp + e-transliterator-private.cpp + ) + + target_compile_definitions(ephonenumber-private PRIVATE + -DG_LOG_DOMAIN=\"e-phone-number\" + -DLIBEBOOK_CONTACTS_COMPILATION + ) + + target_compile_options(ephonenumber-private PUBLIC + ${PHONENUMBER_CXXFLAGS} + ) + + target_include_directories(ephonenumber-private PUBLIC + ${CMAKE_BINARY_DIR} + ${CMAKE_CURRENT_BINARY_DIR} + ${PHONENUMBER_INCLUDE_DIRS} + ) + + target_link_libraries(ephonenumber-private + ${PHONENUMBER_LDFLAGS} + ) + + list(APPEND DEPENDENCIES + ephonenumber-private + ) +endif(ENABLE_PHONENUMBER) + +add_library(ebook-contacts SHARED + ${SOURCES} + ${HEADERS} +) + +add_dependencies(ebook-contacts + ${DEPENDENCIES} +) + +set_target_properties(ebook-contacts PROPERTIES + VERSION "${LIBEBOOK_CONTACTS_CURRENT}.${LIBEBOOK_CONTACTS_REVISION}.${LIBEBOOK_CONTACTS_AGE}" + SOVERSION ${LIBEBOOK_CONTACTS_CURRENT} + OUTPUT_NAME ebook-contacts-${API_VERSION} +) + +target_compile_definitions(ebook-contacts PRIVATE + -DG_LOG_DOMAIN=\"libebook-contacts\" + -DLOCALEDIR=\"${LOCALE_INSTALL_DIR}\" + -DLIBEBOOK_CONTACTS_COMPILATION +) + +target_compile_options(ebook-contacts PUBLIC + ${ADDRESSBOOK_CFLAGS} +) + +target_include_directories(ebook-contacts PUBLIC + ${CMAKE_BINARY_DIR} + ${CMAKE_BINARY_DIR}/addressbook + ${CMAKE_BINARY_DIR}/addressbook/libegdbus + ${CMAKE_BINARY_DIR}/private + ${CMAKE_SOURCE_DIR} + ${CMAKE_SOURCE_DIR}/private + ${CMAKE_SOURCE_DIR}/addressbook + ${CMAKE_SOURCE_DIR}/addressbook/libegdbus + ${CMAKE_CURRENT_BINARY_DIR} + ${ADDRESSBOOK_INCLUDE_DIRS} +) + +target_link_libraries(ebook-contacts + ${DEPENDENCIES} + ${ADDRESSBOOK_LDFLAGS} +) + +install(TARGETS ebook-contacts + DESTINATION ${LIB_INSTALL_DIR} +) + +install(FILES ${HEADERS} + DESTINATION ${privincludedir}/libebook +) + +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 + ${CAMEL_CFLAGS} ${DATA_SERVER_CFLAGS} + -DLIBEBOOK_CONTACTS_COMPILATION + -I${CMAKE_BINARY_DIR}/addressbook + -I${CMAKE_BINARY_DIR}/addressbook/libebook-contacts + -I${CMAKE_SOURCE_DIR}/addressbook + -I${CMAKE_SOURCE_DIR}/addressbook/libebook-contacts +) +set(gir_libdirs ${CMAKE_BINARY_DIR}/private) +set(gir_libs + ebook-contacts + edataserver +) +set(gir_deps + ${CMAKE_BINARY_DIR}/libedataserver/EDataServer-${API_VERSION}.gir +) + +gir_add_introspection_simple( + EBookContacts + libebook-contacts + ${API_VERSION} + "libebook-contacts/libebook-contacts.h" + gir_identifies_prefixes + gir_includes + gir_cflags + gir_libdirs + gir_libs + gir_deps + gir_sources +) diff --git a/addressbook/libebook-contacts/libebook-contacts.pc.in b/addressbook/libebook-contacts/libebook-contacts.pc.in index d1396fb35..e544afde9 100644 --- a/addressbook/libebook-contacts/libebook-contacts.pc.in +++ b/addressbook/libebook-contacts/libebook-contacts.pc.in @@ -1,16 +1,12 @@ -prefix=@prefix@ -exec_prefix=@exec_prefix@ -libdir=@libdir@ -includedir=@includedir@ -datarootdir=@datarootdir@ -datadir=@datadir@ +prefix=@CMAKE_INSTALL_PREFIX@ +libdir=@LIB_INSTALL_DIR@ privincludedir=@privincludedir@ Name: libebook-contacts Description: Client library for evolution contacts and vcard structures -Version: @VERSION@ -Requires: libedataserver-1.2 -Requires.private: camel-1.2 -Libs: -L${libdir} -lebook-contacts-1.2 +Version: @PROJECT_VERSION@ +Requires: libedataserver-@API_VERSION@ +Requires.private: camel-@API_VERSION@ +Libs: -L${libdir} -lebook-contacts-@API_VERSION@ Cflags: -I${privincludedir} diff --git a/addressbook/libebook/CMakeLists.txt b/addressbook/libebook/CMakeLists.txt new file mode 100644 index 000000000..06da3ec34 --- /dev/null +++ b/addressbook/libebook/CMakeLists.txt @@ -0,0 +1,130 @@ +glib_mkenums(e-book-enumtypes e-book-types.h E_BOOK_ENUMTYPES_H) + +add_pkgconfig_file(libebook.pc.in libebook-${API_VERSION}.pc) + +set(DEPENDENCIES + camel + ebackend + ebook-contacts + edbus-private + edataserver + edata-book + egdbus-book +) + +set(SOURCES + e-book.c + e-book-client.c + e-book-client-cursor.c + e-book-client-view.c + e-book-view-private.h + e-book-view.c + e-destination.c + e-error.h + ${CMAKE_CURRENT_BINARY_DIR}/e-book-enumtypes.c +) + +set(HEADERS + libebook.h + e-book.h + e-book-client.h + e-book-client-cursor.h + e-book-client-view.h + e-book-view.h + e-book-types.h + e-destination.h + ${CMAKE_CURRENT_BINARY_DIR}/e-book-enumtypes.h +) + +add_library(ebook SHARED + ${SOURCES} + ${HEADERS} +) + +add_dependencies(ebook + ${DEPENDENCIES} +) + +set_target_properties(ebook PROPERTIES + VERSION "${LIBEBOOK_CURRENT}.${LIBEBOOK_REVISION}.${LIBEBOOK_AGE}" + SOVERSION ${LIBEBOOK_CURRENT} + OUTPUT_NAME ebook-${API_VERSION} +) + +target_compile_definitions(ebook PRIVATE + -DG_LOG_DOMAIN=\"libebook\" + -DLOCALEDIR=\"${LOCALE_INSTALL_DIR}\" + -DLIBEBOOK_COMPILATION +) + +target_compile_options(ebook PUBLIC + ${ADDRESSBOOK_CFLAGS} +) + +target_include_directories(ebook PUBLIC + ${CMAKE_BINARY_DIR} + ${CMAKE_BINARY_DIR}/addressbook + ${CMAKE_BINARY_DIR}/addressbook/libegdbus + ${CMAKE_BINARY_DIR}/private + ${CMAKE_SOURCE_DIR} + ${CMAKE_SOURCE_DIR}/private + ${CMAKE_SOURCE_DIR}/addressbook + ${CMAKE_SOURCE_DIR}/addressbook/libegdbus + ${CMAKE_CURRENT_BINARY_DIR} + ${ADDRESSBOOK_INCLUDE_DIRS} +) + +target_link_libraries(ebook + ${DEPENDENCIES} + ${ADDRESSBOOK_LDFLAGS} +) + +install(TARGETS ebook + DESTINATION ${LIB_INSTALL_DIR} +) + +install(FILES ${HEADERS} + DESTINATION ${privincludedir}/libebook +) + +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 + ${CAMEL_CFLAGS} ${DATA_SERVER_CFLAGS} + -DLIBEBOOK_COMPILATION + -I${CMAKE_BINARY_DIR}/addressbook + -I${CMAKE_BINARY_DIR}/addressbook/libebook + -I${CMAKE_SOURCE_DIR}/addressbook + -I${CMAKE_SOURCE_DIR}/addressbook/libebook +) +set(gir_libdirs + ${CMAKE_BINARY_DIR}/private + ${CMAKE_BINARY_DIR}/libedataserver + ${CMAKE_BINARY_DIR}/addressbook/libebook-contacts + ${CMAKE_BINARY_DIR}/addressbook/libedata-book +) +set(gir_libs + ebook + ebook-contacts + edata-book + edataserver +) +set(gir_deps + ${CMAKE_BINARY_DIR}/libedataserver/EDataServer-${API_VERSION}.gir + ${CMAKE_BINARY_DIR}/addressbook/libebook-contacts/EBookContacts-${API_VERSION}.gir +) + +gir_add_introspection_simple( + EBook + libebook + ${API_VERSION} + "libebook/libebook.h" + gir_identifies_prefixes + gir_includes + gir_cflags + gir_libdirs + gir_libs + gir_deps + gir_sources +) diff --git a/addressbook/libebook/libebook.pc.in b/addressbook/libebook/libebook.pc.in index 293cdc059..ba435f61c 100644 --- a/addressbook/libebook/libebook.pc.in +++ b/addressbook/libebook/libebook.pc.in @@ -1,16 +1,12 @@ -prefix=@prefix@ -exec_prefix=@exec_prefix@ -libdir=@libdir@ -includedir=@includedir@ -datarootdir=@datarootdir@ -datadir=@datadir@ +prefix=@CMAKE_INSTALL_PREFIX@ +libdir=@LIB_INSTALL_DIR@ privincludedir=@privincludedir@ Name: libebook Description: Client library for evolution address books -Version: @VERSION@ -Requires: libedataserver-1.2 libebook-contacts-1.2 libedata-book-1.2 -Requires.private: camel-1.2 -Libs: -L${libdir} -lebook-1.2 +Version: @PROJECT_VERSION@ +Requires: libedataserver-@API_VERSION@ libebook-contacts-@API_VERSION@ libedata-book-@API_VERSION@ +Requires.private: camel-@API_VERSION@ +Libs: -L${libdir} -lebook-@API_VERSION@ Cflags: -I${privincludedir} diff --git a/addressbook/libedata-book/CMakeLists.txt b/addressbook/libedata-book/CMakeLists.txt new file mode 100644 index 000000000..bfd610a30 --- /dev/null +++ b/addressbook/libedata-book/CMakeLists.txt @@ -0,0 +1,197 @@ +add_pkgconfig_file(libedata-book.pc.in libedata-book-${API_VERSION}.pc) + +set(DEPENDENCIES + camel + ebackend + ebook-contacts + edbus-private + edataserver + egdbus-book +) + +set(SOURCES + e-book-backend-factory.c + e-book-backend-sexp.c + e-book-backend-summary.c + e-book-backend-cache.c + e-book-backend-sqlitedb.c + e-book-backend.c + e-book-sqlite.c + e-data-book.c + e-data-book-cursor.c + e-data-book-cursor-sqlite.c + e-data-book-direct.c + e-data-book-factory.c + e-data-book-view.c + e-subprocess-book-factory.c + ximian-vcard.h +) + +set(HEADERS + libedata-book.h + e-book-backend-factory.h + e-book-backend-sexp.h + e-book-backend-summary.h + e-book-backend.h + e-data-book-factory.h + e-data-book-view.h + e-data-book.h + e-data-book-cursor.h + e-data-book-cursor-sqlite.h + e-data-book-direct.h + e-book-backend-cache.h + e-book-backend-sqlitedb.h + e-book-sqlite.h + e-subprocess-book-factory.h +) + +if(WITH_LIBDB) + list(APPEND SOURCES + e-book-backend-db-cache.c + ) + + list(APPEND HEADERS + e-book-backend-db-cache.h + ) +endif(WITH_LIBDB) + +add_library(edata-book SHARED + ${SOURCES} + ${HEADERS} +) + +add_dependencies(edata-book + ${DEPENDENCIES} +) + +set_target_properties(edata-book PROPERTIES + VERSION "${LIBEDATABOOK_CURRENT}.${LIBEDATABOOK_REVISION}.${LIBDATAEBOOK_AGE}" + SOVERSION ${LIBEDATABOOK_CURRENT} + OUTPUT_NAME edata-book-${API_VERSION} +) + +target_compile_definitions(edata-book PRIVATE + -DG_LOG_DOMAIN=\"libedata-book\" + -DBACKENDDIR=\"${ebook_backenddir}\" + -DSUBPROCESS_BOOK_BACKEND_PATH=\"${LIBEXEC_INSTALL_DIR}/evolution-addressbook-factory-subprocess\" + -DLIBEDATA_BOOK_COMPILATION +) + +target_compile_options(edata-book PUBLIC + ${ADDRESSBOOK_CFLAGS} + ${LIBDB_CFLAGS} + ${SQLITE3_CFLAGS} +) + +target_include_directories(edata-book PUBLIC + ${CMAKE_BINARY_DIR} + ${CMAKE_BINARY_DIR}/addressbook + ${CMAKE_BINARY_DIR}/addressbook/libegdbus + ${CMAKE_BINARY_DIR}/private + ${CMAKE_SOURCE_DIR} + ${CMAKE_SOURCE_DIR}/private + ${CMAKE_SOURCE_DIR}/addressbook + ${CMAKE_SOURCE_DIR}/addressbook/libegdbus + ${CMAKE_CURRENT_BINARY_DIR} + ${ADDRESSBOOK_INCLUDE_DIRS} + ${LIBDB_INCLUDE_DIRS} + ${SQLITE3_INCLUDE_DIRS} +) + +target_link_libraries(edata-book + ${DEPENDENCIES} + ${ADDRESSBOOK_LDFLAGS} + ${LIBDB_LIBS} + ${SQLITE3_LDFLAGS} +) + +install(TARGETS edata-book + DESTINATION ${LIB_INSTALL_DIR} +) + +install(FILES ${HEADERS} + DESTINATION ${privincludedir}/libedata-book +) + +add_executable(e-book-backend-sqlitedb-test EXCLUDE_FROM_ALL e-book-backend-sqlitedb-test.c) + +target_compile_definitions(e-book-backend-sqlitedb-test PRIVATE + -DG_LOG_DOMAIN=\"libedata-book\" + -DBACKENDDIR=\"${ebook_backenddir}\" + -DSUBPROCESS_BOOK_BACKEND_PATH=\"${LIBEXEC_INSTALL_DIR}/evolution-addressbook-factory-subprocess\" + -DLIBEDATA_BOOK_COMPILATION +) + +target_compile_options(e-book-backend-sqlitedb-test PUBLIC + ${ADDRESSBOOK_CFLAGS} + ${LIBDB_CFLAGS} + ${SQLITE3_CFLAGS} +) + +target_include_directories(e-book-backend-sqlitedb-test PUBLIC + ${CMAKE_BINARY_DIR} + ${CMAKE_BINARY_DIR}/addressbook + ${CMAKE_BINARY_DIR}/addressbook/libegdbus + ${CMAKE_BINARY_DIR}/private + ${CMAKE_SOURCE_DIR} + ${CMAKE_SOURCE_DIR}/private + ${CMAKE_SOURCE_DIR}/addressbook + ${CMAKE_SOURCE_DIR}/addressbook/libegdbus + ${CMAKE_CURRENT_BINARY_DIR} + ${ADDRESSBOOK_INCLUDE_DIRS} + ${LIBDB_INCLUDE_DIRS} + ${SQLITE3_INCLUDE_DIRS} +) + +target_link_libraries(e-book-backend-sqlitedb-test + edata-book + ${DEPENDENCIES} + ${ADDRESSBOOK_LDFLAGS} + ${LIBDB_LIBS} + ${SQLITE3_LDFLAGS} +) + +set(DEPENDENCIES + ebackend + edataserver + edata-book + edbus-private +) + +add_executable(evolution-addressbook-factory-subprocess + evolution-addressbook-factory-subprocess.c) + +target_compile_definitions(evolution-addressbook-factory-subprocess PRIVATE + -DG_LOG_DOMAIN=\"evolution-addressbook-factory-subprocess\" + -DLOCALEDIR=\"${LOCALE_INSTALL_DIR}\" +) + +target_compile_options(evolution-addressbook-factory-subprocess PUBLIC + ${ADDRESSBOOK_CFLAGS} + ${GTK_CFLAGS} +) + +target_include_directories(evolution-addressbook-factory-subprocess PUBLIC + ${CMAKE_BINARY_DIR} + ${CMAKE_BINARY_DIR}/addressbook + ${CMAKE_BINARY_DIR}/addressbook/libegdbus + ${CMAKE_BINARY_DIR}/private + ${CMAKE_SOURCE_DIR} + ${CMAKE_SOURCE_DIR}/private + ${CMAKE_SOURCE_DIR}/addressbook + ${CMAKE_SOURCE_DIR}/addressbook/libegdbus + ${CMAKE_CURRENT_BINARY_DIR} + ${ADDRESSBOOK_INCLUDE_DIRS} + ${GTK_INCLUDE_DIRS} +) + +target_link_libraries(evolution-addressbook-factory-subprocess + edata-book + ${DEPENDENCIES} + ${ADDRESSBOOK_LDFLAGS} + ${GTK_LDFLAGS} +) + +install(TARGETS evolution-addressbook-factory-subprocess + DESTINATION ${LIBEXEC_INSTALL_DIR} +) diff --git a/addressbook/libedata-book/libedata-book.pc.in b/addressbook/libedata-book/libedata-book.pc.in index b1f871bed..0d26e90ba 100644 --- a/addressbook/libedata-book/libedata-book.pc.in +++ b/addressbook/libedata-book/libedata-book.pc.in @@ -1,10 +1,5 @@ -prefix=@prefix@ -exec_prefix=@exec_prefix@ -libdir=@libdir@ -libexecdir=@libexecdir@ -includedir=@includedir@ -datarootdir=@datarootdir@ -datadir=@datadir@ +prefix=@CMAKE_INSTALL_PREFIX@ +libdir=@LIB_INSTALL_DIR@ privlibdir=@privlibdir@ privincludedir=@privincludedir@ @@ -13,7 +8,7 @@ backenddir=@ebook_backenddir@ Name: libedatabook Description: Backend library for evolution address books -Version: @VERSION@ -Requires: libebackend-1.2 libebook-contacts-1.2 -Libs: -L${libdir} -ledata-book-1.2 +Version: @PROJECT_VERSION@ +Requires: libebackend-@API_VERSION@ libebook-contacts-@API_VERSION@ +Libs: -L${libdir} -ledata-book-@API_VERSION@ Cflags: -I${privincludedir} diff --git a/addressbook/libegdbus/CMakeLists.txt b/addressbook/libegdbus/CMakeLists.txt new file mode 100644 index 000000000..4144d3d83 --- /dev/null +++ b/addressbook/libegdbus/CMakeLists.txt @@ -0,0 +1,36 @@ +set(SOURCES + e-gdbus-book-view.h + e-gdbus-book-view.c +) + +set(DEPENDENCIES + edataserver +) + +add_library(egdbus-book STATIC + ${SOURCES} +) + +add_dependencies(egdbus-book + ${DEPENDENCIES} +) + +target_compile_definitions(egdbus-book PRIVATE + -DG_LOG_DOMAIN=\"egdbus-book\" +) + +target_compile_options(egdbus-book PUBLIC + ${DATA_SERVER_CFLAGS} +) + +target_include_directories(egdbus-book PUBLIC + ${CMAKE_BINARY_DIR} + ${CMAKE_CURRENT_BINARY_DIR} + ${CMAKE_SOURCE_DIR} + ${DATA_SERVER_INCLUDE_DIRS} +) + +target_link_libraries(egdbus-book + ${DEPENDENCIES} + ${DATA_SERVER_LDFLAGS} +) diff --git a/camel/CMakeLists.txt b/camel/CMakeLists.txt index 4a21b448d..80e8428e2 100644 --- a/camel/CMakeLists.txt +++ b/camel/CMakeLists.txt @@ -313,6 +313,7 @@ set(gir_includes GObject-2.0 Gio-2.0 libxml2-2.0) set(gir_cflags ${CAMEL_CFLAGS} -DCAMEL_COMPILATION) set(gir_libdirs) set(gir_libs camel) +set(gir_deps) # Enable once the typelib will be buildable; the gi-r-compiler crashes with # ERROR:girepository/girparser.c:343:state_switch: assertion failed: (ctx->state != newstate) @@ -327,6 +328,7 @@ set(gir_libs camel) # gir_cflags # gir_libdirs # gir_libs +# gir_deps # gir_sources #) diff --git a/camel/providers/imapx/CMakeLists.txt b/camel/providers/imapx/CMakeLists.txt index cadc4a9ef..77c2dbc51 100644 --- a/camel/providers/imapx/CMakeLists.txt +++ b/camel/providers/imapx/CMakeLists.txt @@ -39,6 +39,10 @@ set(SOURCES camel-imapx-utils.h ) +set(DEPENDENCIES + camel +) + add_custom_command( OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/camel-imapx-tokenise.h COMMAND ${GPERF} -H imapx_hash -N imapx_tokenise_struct -L ANSI-C -o -t -k1,$$ ${CMAKE_CURRENT_SOURCE_DIR}/camel-imapx-tokens.txt --output-file=${CMAKE_CURRENT_BINARY_DIR}/camel-imapx-tokenise.h @@ -47,7 +51,9 @@ add_custom_command( add_library(camelimapx MODULE ${SOURCES}) -add_dependencies(camelimapx camel) +add_dependencies(camelimapx + ${DEPENDENCIES} +) target_compile_definitions(camelimapx PRIVATE -DG_LOG_DOMAIN=\"camel-imapx-provider\" @@ -71,7 +77,7 @@ target_include_directories(camelimapx PUBLIC ) target_link_libraries(camelimapx - camel + ${DEPENDENCIES} ${CAMEL_LDFLAGS} ${GIO_UNIX_LDFLAGS} ${CALENDAR_LDFLAGS} diff --git a/camel/providers/local/CMakeLists.txt b/camel/providers/local/CMakeLists.txt index ce9a328ae..1077c90e2 100644 --- a/camel/providers/local/CMakeLists.txt +++ b/camel/providers/local/CMakeLists.txt @@ -30,6 +30,10 @@ set(SOURCES camel-mh-summary.h ) +set(DEPENDENCIES + camel +) + if(NOT WIN32) list(APPEND SOURCES camel-spool-folder.c @@ -45,7 +49,9 @@ endif(NOT WIN32) add_library(camellocal MODULE ${SOURCES}) -add_dependencies(camellocal camel) +add_dependencies(camellocal + ${DEPENDENCIES} +) target_compile_definitions(camellocal PRIVATE -DG_LOG_DOMAIN=\"camel-local-provider\" @@ -64,7 +70,7 @@ target_include_directories(camellocal PUBLIC ) target_link_libraries(camellocal - camel + ${DEPENDENCIES} ${CAMEL_LDFLAGS} ) diff --git a/camel/providers/nntp/CMakeLists.txt b/camel/providers/nntp/CMakeLists.txt index bdf2298a6..8a05bffe9 100644 --- a/camel/providers/nntp/CMakeLists.txt +++ b/camel/providers/nntp/CMakeLists.txt @@ -16,9 +16,15 @@ set(SOURCES camel-nntp-summary.h ) +set(DEPENDENCIES + camel +) + add_library(camelnntp MODULE ${SOURCES}) -add_dependencies(camelnntp camel) +add_dependencies(camelnntp + ${DEPENDENCIES} +) target_compile_definitions(camelnntp PRIVATE -DG_LOG_DOMAIN=\"camel-nntp-provider\" @@ -37,7 +43,7 @@ target_include_directories(camelnntp PUBLIC ) target_link_libraries(camelnntp - camel + ${DEPENDENCIES} ${CAMEL_LDFLAGS} ) diff --git a/camel/providers/pop3/CMakeLists.txt b/camel/providers/pop3/CMakeLists.txt index f3d8c6a7d..6a56cb4ad 100644 --- a/camel/providers/pop3/CMakeLists.txt +++ b/camel/providers/pop3/CMakeLists.txt @@ -12,9 +12,15 @@ set(SOURCES camel-pop3-store.h ) +set(DEPENDENCIES + camel +) + add_library(camelpop3 MODULE ${SOURCES}) -add_dependencies(camelpop3 camel) +add_dependencies(camelpop3 + ${DEPENDENCIES} +) target_compile_definitions(camelpop3 PRIVATE -DG_LOG_DOMAIN=\"camel-pop3-provider\" @@ -33,7 +39,7 @@ target_include_directories(camelpop3 PUBLIC ) target_link_libraries(camelpop3 - camel + ${DEPENDENCIES} ${CAMEL_LDFLAGS} ) diff --git a/camel/providers/sendmail/CMakeLists.txt b/camel/providers/sendmail/CMakeLists.txt index ee808e94e..ad7fc828f 100644 --- a/camel/providers/sendmail/CMakeLists.txt +++ b/camel/providers/sendmail/CMakeLists.txt @@ -6,9 +6,15 @@ set(SOURCES camel-sendmail-transport.h ) +set(DEPENDENCIES + camel +) + add_library(camelsendmail MODULE ${SOURCES}) -add_dependencies(camelsendmail camel) +add_dependencies(camelsendmail + ${DEPENDENCIES} +) target_compile_definitions(camelsendmail PRIVATE -DG_LOG_DOMAIN=\"camel-sendmail-provider\" @@ -27,7 +33,7 @@ target_include_directories(camelsendmail PUBLIC ) target_link_libraries(camelsendmail - camel + ${DEPENDENCIES} ${CAMEL_LDFLAGS} ) diff --git a/camel/providers/smtp/CMakeLists.txt b/camel/providers/smtp/CMakeLists.txt index b08ff12c4..d8b9cde98 100644 --- a/camel/providers/smtp/CMakeLists.txt +++ b/camel/providers/smtp/CMakeLists.txt @@ -6,9 +6,15 @@ set(SOURCES camel-smtp-transport.h ) +set(DEPENDENCIES + camel +) + add_library(camelsmtp MODULE ${SOURCES}) -add_dependencies(camelsmtp camel) +add_dependencies(camelsmtp + ${DEPENDENCIES} +) target_compile_definitions(camelsmtp PRIVATE -DG_LOG_DOMAIN=\"camel-smtp-provider\" @@ -27,7 +33,7 @@ target_include_directories(camelsmtp PUBLIC ) target_link_libraries(camelsmtp - camel + ${DEPENDENCIES} ${CAMEL_LDFLAGS} ) diff --git a/camel/tests/CMakeLists.txt b/camel/tests/CMakeLists.txt index 96c71ab4d..38c536923 100644 --- a/camel/tests/CMakeLists.txt +++ b/camel/tests/CMakeLists.txt @@ -1,7 +1,6 @@ macro(add_camel_test_one _part _name _src_file) set(_test_ident cameltest-${_part}-${_name}) - # not using EXCLUDE_FROM_ALL to have the tests verified that they can be built add_executable(${_test_ident} EXCLUDE_FROM_ALL ${_src_file}) target_compile_definitions(${_test_ident} PRIVATE diff --git a/cmake/modules/FindLDAP.cmake b/cmake/modules/FindLDAP.cmake index 450de685a..73c0d3166 100644 --- a/cmake/modules/FindLDAP.cmake +++ b/cmake/modules/FindLDAP.cmake @@ -13,6 +13,7 @@ # HAVE_LDAP - set to ON, if LDAP support is enabled and libraries found # SUNLDAP - set to ON, when using SunLDAP implementation # LDAP_CFLAGS - CFLAGS to use with target_compile_options() and similar commands +# LDAP_INCLDUE_DIRS - include directories to use with target_include_directories() and similar commands # LDAP_LDFLAGS - LDFLAGS to use with target_link_libraries() and similar commands include(CheckCSourceCompiles) @@ -64,11 +65,12 @@ else(WITH_OPENLDAP) set(SUNLDAP ON) endif(WITH_OPENLDAP) -set(LDAP_CFLAGS "-I${LDAP_PREFIX}/include") +set(LDAP_CFLAGS "") +set(LDAP_INCLUDE_DIRECTORIES "${LDAP_PREFIX}/include") set(LDAP_LIBS "-L${LDAP_PREFIX}/lib${LIB_SUFFIX}") -set(CMAKE_REQUIRED_INCLUDES "-I${LDAP_CFLAGS}") -set(CMAKE_REQUIRED_LIBRARIES "-L${LDAP_LIBS}") +set(CMAKE_REQUIRED_INCLUDES "${LDAP_INCLUDE_DIRECTORIES}") +set(CMAKE_REQUIRED_LIBRARIES "${LDAP_LIBS}") if(WITH_OPENLDAP) CHECK_C_SOURCE_COMPILES("#include \"ldap.h\" @@ -127,3 +129,5 @@ endif(libldap_provides_ldap_open) unset(CMAKE_REQUIRED_INCLUDES) unset(CMAKE_REQUIRED_LIBRARIES) + +add_definitions(-DLDAP_DEPRECATED) diff --git a/cmake/modules/GObjectIntrospection.cmake b/cmake/modules/GObjectIntrospection.cmake index 020f7a36f..004934ea6 100644 --- a/cmake/modules/GObjectIntrospection.cmake +++ b/cmake/modules/GObjectIntrospection.cmake @@ -38,12 +38,13 @@ endmacro(_gir_list_prefix) macro(_gir_list_prefix_libs _outvar _listvar _prefix) set(${_outvar}) foreach(_item IN LISTS ${_listvar}) - get_target_property(_output_name ${_item} OUTPUT_NAME) - if(_output_name) - list(APPEND ${_outvar} ${_prefix}${_output_name}) - else(_output_name) - list(APPEND ${_outvar} ${_prefix}${_item}) - endif(_output_name) + list(APPEND ${_outvar} ${_prefix}${_item}-${API_VERSION}) + #get_target_property(_output_name ${_item} OUTPUT_NAME) + #if(_output_name) + # list(APPEND ${_outvar} ${_prefix}${_output_name}) + #else(_output_name) + # list(APPEND ${_outvar} ${_prefix}${_item}) + #endif(_output_name) endforeach() endmacro(_gir_list_prefix_libs) @@ -112,6 +113,7 @@ macro(gir_add_introspection gir) --accept-unprefixed DEPENDS ${${_gir_name}_FILES} ${${_gir_name}_LIBS} + ${${_gir_name}_DEPS} OUTPUT ${gir} WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} VERBATIM @@ -138,7 +140,25 @@ macro(gir_add_introspection gir) endif(ENABLE_INTROSPECTION) endmacro(gir_add_introspection) -macro(gir_add_introspection_simple gir_library pkg_export_prefix gir_library_version c_include gir_identifies_prefixes_var gir_includes_var extra_cflags_var gir_extra_libdirs_var gir_libs_var gir_sources_var) +macro(_gir_deps_to_cmake_targets _outvar _inlist) + set(${_outvar}) + foreach(_item IN LISTS ${_inlist}) + get_filename_component(_filename "${_item}" NAME) + string(REPLACE "-" "_" _filename "${_filename}") + string(REPLACE "." "_" _filename "${_filename}") + list(APPEND ${_outvar} gir-girs-${_filename}) + endforeach() +endmacro(_gir_deps_to_cmake_targets) + +macro(_gir_deps_to_includedir _outvar _inlist) + set(${_outvar}) + foreach(_item IN LISTS ${_inlist}) + get_filename_component(_directory "${_item}" DIRECTORY) + list(APPEND ${_outvar} "--includedir=${_directory}") + endforeach() +endmacro(_gir_deps_to_includedir) + +macro(gir_add_introspection_simple gir_library pkg_export_prefix gir_library_version c_include gir_identifies_prefixes_var gir_includes_var extra_cflags_var gir_extra_libdirs_var gir_libs_var gir_deps_var gir_sources_var) gir_construct_names(${gir_library} ${gir_library_version} gir_name gir_vars_prefix) unset(INTROSPECTION_SCANNER_FLAGS) @@ -147,7 +167,7 @@ macro(gir_add_introspection_simple gir_library pkg_export_prefix gir_library_ver set(${gir_vars_prefix} ${gir_library}) set(${gir_vars_prefix}_SCANNERFLAGS "--warn-all") - set(${gir_vars_prefix}_VERSION "${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}") + set(${gir_vars_prefix}_VERSION "${gir_library_version}") set(${gir_vars_prefix}_LIBRARY "${gir_vars_prefix}") set(${gir_vars_prefix}_INCLUDES ${${gir_includes_var}}) set(${gir_vars_prefix}_CFLAGS @@ -160,8 +180,12 @@ macro(gir_add_introspection_simple gir_library pkg_export_prefix gir_library_ver set(${gir_vars_prefix}_LIBS ${${gir_libs_var}}) set(${gir_vars_prefix}_FILES ${${gir_sources_var}}) + _gir_deps_to_includedir(INTROSPECTION_COMPILER_ARGS ${gir_deps_var}) + _gir_deps_to_cmake_targets(${gir_vars_prefix}_DEPS ${gir_deps_var}) + _gir_list_prefix(_gir_identifies_prefixes ${gir_identifies_prefixes_var} "--identifier-prefix=") _gir_list_prefix(_gir_extra_libdirs ${gir_extra_libdirs_var} "--library-path=") + _gir_list_prefix(_gir_deps ${gir_deps_var} "--include-uninstalled=") set(INTROSPECTION_SCANNER_ARGS --add-include-path=${CMAKE_BINARY_DIR} @@ -173,6 +197,7 @@ macro(gir_add_introspection_simple gir_library pkg_export_prefix gir_library_ver --library-path=${CMAKE_CURRENT_BINARY_DIR} ${_gir_extra_libdirs} ${_gir_identifies_prefixes} + ${_gir_deps} --pkg-export ${pkg_export_prefix}-${gir_library_version} --c-include="${c_include}" --cflags-begin diff --git a/libebackend/CMakeLists.txt b/libebackend/CMakeLists.txt new file mode 100644 index 000000000..0deb6f0ac --- /dev/null +++ b/libebackend/CMakeLists.txt @@ -0,0 +1,134 @@ +glib_mkenums(e-backend-enumtypes e-backend-enums.h E_BACKEND_ENUMTYPES_H) + +add_pkgconfig_file(libebackend.pc.in libebackend-${API_VERSION}.pc) + +set(DEPENDENCIES + edataserver + edbus-private +) + +set(SOURCES + e-backend.c + e-backend-factory.c + e-cache-reaper.c + e-cache-reaper-utils.c + e-cache-reaper-utils.h + e-collection-backend.c + e-collection-backend-factory.c + e-data-factory.c + e-dbus-server.c + e-file-cache.c + e-oauth2-support.c + e-offline-listener.c + e-server-side-source.c + e-server-side-source-credentials-provider.c + e-source-registry-server.c + e-sqlite3-vfs.c + e-subprocess-factory.c + e-user-prompter.c + e-user-prompter-server.c + e-user-prompter-server-extension.c + ${CMAKE_CURRENT_BINARY_DIR}/e-backend-enumtypes.c +) + +set(HEADERS + libebackend.h + e-backend.h + e-backend-enums.h + e-backend-factory.h + e-cache-reaper.h + e-collection-backend.h + e-collection-backend-factory.h + e-data-factory.h + e-dbus-server.h + e-file-cache.h + e-oauth2-support.h + e-offline-listener.h + e-server-side-source.h + e-server-side-source-credentials-provider.h + e-source-registry-server.h + e-sqlite3-vfs.h + e-subprocess-factory.h + e-user-prompter.h + e-user-prompter-server.h + e-user-prompter-server-extension.h + ${CMAKE_CURRENT_BINARY_DIR}/e-backend-enumtypes.h +) + +if(HAVE_LIBDB) + list(APPEND SOURCES + e-dbhash.c + e-db3-utils.c + ) + list(APPEND HEADERS + e-dbhash.h + e-db3-utils.h + ) +endif(HAVE_LIBDB) + +add_library(ebackend SHARED + ${SOURCES} + ${HEADERS} +) + +add_dependencies(ebackend + ${DEPENDENCIES} +) + +set_target_properties(ebackend PROPERTIES + VERSION "${LIBEBACKEND_CURRENT}.${LIBEBACKEND_REVISION}.${LIBEBACKEND_AGE}" + SOVERSION ${LIBEBACKEND_CURRENT} + OUTPUT_NAME ebackend-${API_VERSION} +) + +target_compile_definitions(ebackend PRIVATE + -DG_LOG_DOMAIN=\"e-backend\" + -DE_DATA_SERVER_PREFIX=\"${CMAKE_INSTALL_PREFIX}\" + -DMODULE_DIRECTORY=\"${moduledir}\" + -DE_DATA_SERVER_PRIVDATADIR=\"${privdatadir}\" + -DSYSTEM_WIDE_RO_SOURCES_DIRECTORY=\"${ro_sourcesdir}\" + -DSYSTEM_WIDE_RW_SOURCES_DIRECTORY=\"${rw_sourcesdir}\" + -DLIBEBACKEND_COMPILATION +) + +target_compile_options(ebackend PUBLIC + ${BACKEND_CFLAGS} + ${LIBDB_CFLAGS} + ${CAMEL_CFLAGS} + ${SQLITE3_CFLAGS} + ${GCR_BASE_CFLAGS} + ${GIO_UNIX_CFLAGS} +) + +target_include_directories(ebackend PUBLIC + ${CMAKE_BINARY_DIR} + ${CMAKE_BINARY_DIR}/private + ${CMAKE_SOURCE_DIR} + ${CMAKE_SOURCE_DIR}/private + ${CMAKE_CURRENT_BINARY_DIR} + ${BACKEND_INCLUDE_DIRS} + ${LIBDB_INCLUDE_DIRS} + ${CAMEL_INCLUDE_DIRS} + ${SQLITE3_INCLUDE_DIRS} + ${GCR_BASE_INCLUDE_DIRS} + ${GIO_UNIX_INCLUDE_DIRS} +) + +target_link_libraries(ebackend + ${DEPENDENCIES} + ${BACKEND_LDFLAGS} + ${LIBDB_LDFLAGS} + ${LIBDB_LIBS} + ${CAMEL_LDFLAGS} + ${SQLITE3_LDFLAGS} + ${GCR_BASE_LDFLAGS} + ${GIO_UNIX_LDFLAGS} +) + +install(TARGETS ebackend + DESTINATION ${LIB_INSTALL_DIR} +) + +install(FILES ${HEADERS} + DESTINATION ${privincludedir}/libebackend +) diff --git a/libebackend/libebackend.pc.in b/libebackend/libebackend.pc.in index becf4e753..20f2899a0 100644 --- a/libebackend/libebackend.pc.in +++ b/libebackend/libebackend.pc.in @@ -1,9 +1,5 @@ -prefix=@prefix@ -exec_prefix=@exec_prefix@ -libdir=@libdir@ -includedir=@includedir@ -datarootdir=@datarootdir@ -datadir=@datadir@ +prefix=@CMAKE_INSTALL_PREFIX@ +libdir=@LIB_INSTALL_DIR@ privlibdir=@privlibdir@ privincludedir=@privincludedir@ @@ -12,7 +8,7 @@ moduledir=@moduledir@ Name: libebackend Description: Utility library for Evolution Data Server Backends -Version: @VERSION@ -Requires: libedataserver-1.2 +Version: @PROJECT_VERSION@ +Requires: libedataserver-@API_VERSION@ Libs: -L${libdir} -lebackend-@API_VERSION@ Cflags: -I${privincludedir} diff --git a/libedataserver/CMakeLists.txt b/libedataserver/CMakeLists.txt index 2574a8cf4..4e5e13bb7 100644 --- a/libedataserver/CMakeLists.txt +++ b/libedataserver/CMakeLists.txt @@ -38,6 +38,12 @@ target_link_libraries(edataserver-private ${ICU_LDFLAGS} ) +set(DEPENDENCIES + camel + edataserver-private + edbus-private +) + set(SOURCES e-alphabet-index-private.h e-cancellable-locks.c @@ -196,9 +202,8 @@ add_library(edataserver SHARED ) add_dependencies(edataserver - camel - edataserver-private - edbus-private) + ${DEPENDENCIES} +) set_target_properties(edataserver PROPERTIES VERSION "${LIBEDATASERVER_CURRENT}.${LIBEDATASERVER_REVISION}.${LIBEDATASERVER_AGE}" @@ -238,9 +243,7 @@ target_include_directories(edataserver PUBLIC ) target_link_libraries(edataserver - camel - edbus-private - edataserver-private + ${DEPENDENCIES} ${DATA_SERVER_LDFLAGS} ${GCR_BASE_LDFLAGS} ${GIO_UNIX_LDFLAGS} @@ -262,6 +265,7 @@ set(gir_includes GObject-2.0 Gio-2.0 Soup-2.4 libxml2-2.0) set(gir_cflags ${CAMEL_CFLAGS} ${DATA_SERVER_CFLAGS} -DLIBEDATASERVER_COMPILATION) set(gir_libdirs ${CMAKE_BINARY_DIR}/private) set(gir_libs camel edataserver) +set(gir_deps) gir_filter_out_sources(gir_sources e-sexp.h) gir_filter_out_sources(gir_sources -private.h) @@ -276,5 +280,6 @@ gir_add_introspection_simple( gir_cflags gir_libdirs gir_libs + gir_deps gir_sources ) diff --git a/libedataserverui/CMakeLists.txt b/libedataserverui/CMakeLists.txt new file mode 100644 index 000000000..d9eb31307 --- /dev/null +++ b/libedataserverui/CMakeLists.txt @@ -0,0 +1,96 @@ +add_pkgconfig_file(libedataserverui.pc.in libedataserverui-${API_VERSION}.pc) + +set(SOURCES + e-cell-renderer-color.c + e-credentials-prompter.c + e-credentials-prompter-impl.c + e-credentials-prompter-impl-google.c + e-credentials-prompter-impl-password.c + e-trust-prompt.c + e-webdav-discover-widget.c +) + +set(HEADERS + libedataserverui.h + e-cell-renderer-color.h + e-credentials-prompter.h + e-credentials-prompter-impl.h + e-credentials-prompter-impl-google.h + e-credentials-prompter-impl-password.h + e-trust-prompt.h + e-webdav-discover-widget.h +) + +set(DEPENDENCIES + camel + ebackend + edataserver +) + +add_library(edataserverui SHARED + ${SOURCES} + ${HEADERS} +) + +add_dependencies(edataserverui + ${DEPENDENCIES} +) + +set_target_properties(edataserverui PROPERTIES + VERSION "${LIBEDATASERVERUI_CURRENT}.${LIBEDATASERVERUI_REVISION}.${LIBEDATASERVERUI_AGE}" + SOVERSION ${LIBEDATASERVERUI_CURRENT} + OUTPUT_NAME edataserverui-${API_VERSION} +) + +target_compile_definitions(edataserverui PRIVATE + -DG_LOG_DOMAIN=\"e-data-server-ui\" + -DLIBEDATASERVERUI_COMPILATION +) + +target_compile_options(edataserverui PUBLIC + ${BACKEND_CFLAGS} + ${DATA_SERVER_CFLAGS} + ${CAMEL_CFLAGS} + ${CODE_COVERAGE_CFLAGS} + ${GNOME_PLATFORM_CFLAGS} + ${GCR_BASE_CFLAGS} + ${GCR_CFLAGS} + ${GTK_CFLAGS} + ${GOOGLE_AUTH_CFLAGS} +) + +target_include_directories(edataserverui PUBLIC + ${CMAKE_BINARY_DIR} + ${CMAKE_SOURCE_DIR} + ${CMAKE_CURRENT_BINARY_DIR} + ${BACKEND_INCLUDE_DIRS} + ${DATA_SERVER_INCLUDE_DIRS} + ${CAMEL_INCLUDE_DIRS} + ${CODE_COVERAGE_INCLUDE_DIRS} + ${GNOME_PLATFORM_INCLUDE_DIRS} + ${GCR_BASE_INCLUDE_DIRS} + ${GCR_INCLUDE_DIRS} + ${GTK_INCLUDE_DIRS} + ${GOOGLE_AUTH_INCLUDE_DIRS} +) + +target_link_libraries(edataserverui + ${DEPENDENCIES} + ${BACKEND_LDFLAGS} + ${DATA_SERVER_LDFLAGS} + ${CAMEL_LDFLAGS} + ${CODE_COVERAGE_LDFLAGS} + ${GNOME_PLATFORM_LDFLAGS} + ${GCR_BASE_LDFLAGS} + ${GCR_LDFLAGS} + ${GTK_LDFLAGS} + ${GOOGLE_AUTH_LDFLAGS} +) + +install(TARGETS edataserverui + DESTINATION ${LIB_INSTALL_DIR} +) + +install(FILES ${HEADERS} + DESTINATION ${privincludedir}/libedataserverui +) diff --git a/libedataserverui/libedataserverui.pc.in b/libedataserverui/libedataserverui.pc.in index e7bd6e8a6..2527965aa 100644 --- a/libedataserverui/libedataserverui.pc.in +++ b/libedataserverui/libedataserverui.pc.in @@ -1,9 +1,5 @@ -prefix=@prefix@ -exec_prefix=@exec_prefix@ -libdir=@libdir@ -includedir=@includedir@ -datarootdir=@datarootdir@ -datadir=@datadir@ +prefix=@CMAKE_INSTALL_PREFIX@ +libdir=@LIB_INSTALL_DIR@ privlibdir=@privlibdir@ privincludedir=@privincludedir@ @@ -12,7 +8,7 @@ credentialmoduledir=@credentialmoduledir@ Name: libedataserverui Description: UI utility library for Evolution Data Server -Version: @VERSION@ +Version: @PROJECT_VERSION@ Requires: gio-2.0 gmodule-2.0 libsecret-1 libxml-2.0 libsoup-2.4 gtk+-3.0 libedataserver-@API_VERSION@ Requires.private: camel-@API_VERSION@ Libs: -L${libdir} -ledataserver-@API_VERSION@ -ledataserverui-@API_VERSION@ diff --git a/private/CMakeLists.txt b/private/CMakeLists.txt index bbedce228..0de19ea18 100644 --- a/private/CMakeLists.txt +++ b/private/CMakeLists.txt @@ -143,7 +143,7 @@ set(GENERATED_DBUS_SUBPROCESS_BACKEND ) gdbus_codegen_custom(org.gnome.evolution.dataserver.Subprocess.Backend.xml - org.gnome.evolution.dataserver. + org.gnome.evolution.dataserver.Subprocess E_DBus_Subprocess e-dbus-subprocess-backend GENERATED_DBUS_SUBPROCESS_BACKEND |