[evolution-data-server] build: Disable libgdata dependency by default and check its soupapiversion



commit b41ab6298483a21e5476465b42d38bb104435785
Author: Milan Crha <mcrha redhat com>
Date:   Fri Jul 1 07:22:59 2022 +0200

    build: Disable libgdata dependency by default and check its soupapiversion
    
    There is currently no libgdata with libsoup3 support available, thus
    disable build of the Google Tasks support for now. Also add a check
    for soupapiversion, to avoid issues in runtime when the option is enabled.

 CMakeLists.txt | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)
---
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 3c4ca2901..8b078a6bb 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -854,13 +854,20 @@ pkg_check_modules(SQLITE3 REQUIRED sqlite3>=${sqlite_minimum_version})
 # Google flags
 # ******************************
 
-add_printable_option(ENABLE_GOOGLE "Enable Google support" ON)
+add_printable_option(ENABLE_GOOGLE "Enable Google support" OFF)
 if(ENABLE_GOOGLE)
        pkg_check_modules_for_option(ENABLE_GOOGLE "Google" LIBGDATA libgdata>=${libgdata_minimum_version})
        set(HAVE_LIBGDATA ON)
        set(LIBGDATA_GIR GData-1.0)
        set(LIBGDATA_VAPI libgdata)
 
+       # compatibility check
+       pkg_check_variable(libgdata_soupapiversion libgdata soupapiversion)
+       if(NOT "${libgdata_soupapiversion}" STREQUAL "3.0")
+               message(FATAL_ERROR "Requires libgdata compiled with libsoup 3.0 API, but found version 
'${libgdata_soupapiversion}' instead. If you want to disable Google tasks support, please use 
-DENABLE_GOOGLE=OFF argument to cmake command.")
+       endif(NOT "${libgdata_soupapiversion}" STREQUAL "3.0")
+       unset(libgdata_soupapiversion)
+
        set(CMAKE_REQUIRED_DEFINITIONS ${LIBGDATA_CFLAGS_OTHER})
        set(CMAKE_REQUIRED_INCLUDES ${LIBGDATA_INCLUDE_DIRS})
        set(CMAKE_REQUIRED_LIBRARIES ${LIBGDATA_LDFLAGS})


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]