From edbaeb1b588edc0e969b0eedd731758aad369391 Mon Sep 17 00:00:00 2001 From: "Antenore Gatta (tmow)" Date: Mon, 3 Oct 2022 17:38:35 +0000 Subject: Multiple changes to build and run with libsoup 3.0 --- cmake/FindLIBSOUP.cmake | 43 +++++++++++++++++++++++++++++++++++++++++++ cmake/FindLIBSOUP24.cmake | 46 ---------------------------------------------- cmake/FindWEBKIT2GTK.cmake | 6 ++++-- 3 files changed, 47 insertions(+), 48 deletions(-) create mode 100644 cmake/FindLIBSOUP.cmake delete mode 100644 cmake/FindLIBSOUP24.cmake (limited to 'cmake') diff --git a/cmake/FindLIBSOUP.cmake b/cmake/FindLIBSOUP.cmake new file mode 100644 index 000000000..23cc06ff6 --- /dev/null +++ b/cmake/FindLIBSOUP.cmake @@ -0,0 +1,43 @@ +# Remmina - The GTK+ Remote Desktop Client +# +# Copyright (C) 2016-2022 Antenore Gatta, Giovanni Panozzo +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, +# Boston, MA 02110-1301, USA. + +include(FindPackageHandleStandardArgs) + +pkg_search_module(PC_LIBSOUP REQUIRED libsoup-3.0 libsoup-2.4) + +find_path(LIBSOUP_INCLUDE_DIR NAMES libsoup/soup.h + HINTS ${PC_LIBSOUP_INCLUDEDIR} ${PC_LIBSOUP_INCLUDE_DIRS} +) + +find_library(LIBSOUP_LIBRARY + NAMES soup soup-3.0 soup-2.4 + HINTS ${PC_LIBSOUP_LIBDIR} ${PC_LIBSOUP_LIBRARY_DIRS} + ) + +if (LIBSOUP_INCLUDE_DIR AND LIBSOUP_LIBRARY) + find_package_handle_standard_args(LIBSOUP DEFAULT_MSG LIBSOUP_LIBRARY LIBSOUP_INCLUDE_DIR) +endif() + +if (LIBSOUP_FOUND) + set(LIBSOUP_LIBRARIES ${LIBSOUP_LIBRARY}) + set(LIBSOUP_INCLUDE_DIRS ${LIBSOUP_INCLUDE_DIR}) +endif() + +mark_as_advanced(LIBSOUP_INCLUDE_DIR LIBSOUP_LIBRARY) + diff --git a/cmake/FindLIBSOUP24.cmake b/cmake/FindLIBSOUP24.cmake deleted file mode 100644 index 96ec22239..000000000 --- a/cmake/FindLIBSOUP24.cmake +++ /dev/null @@ -1,46 +0,0 @@ -# Remmina - The GTK+ Remote Desktop Client -# -# Copyright (C) 2011 Marc-Andre Moreau -# Copyright (C) 2014-2015 Antenore Gatta, Fabio Castelli, Giovanni Panozzo -# Copyright (C) 2016-2022 Antenore Gatta, Giovanni Panozzo -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, -# Boston, MA 02110-1301, USA. - -include(FindPackageHandleStandardArgs) - -pkg_check_modules(PC_LIBSOUP24 libsoup-2.4) - - -find_path(LIBSOUP24_INCLUDE_DIR NAMES libsoup/soup.h - HINTS ${PC_LIBSOUP24_INCLUDEDIR} ${PC_LIBSOUP24_INCLUDE_DIRS} -) - -find_library(LIBSOUP24_LIBRARY - NAMES soup-2.4 - HINTS ${PC_LIBSOUP24_LIBDIR} ${PC_LIBSOUP24_LIBRARY_DIRS} - ) - -if (LIBSOUP24_INCLUDE_DIR AND LIBSOUP24_LIBRARY) - find_package_handle_standard_args(LIBSOUP24 DEFAULT_MSG LIBSOUP24_LIBRARY LIBSOUP24_INCLUDE_DIR) -endif() - -if (LIBSOUP24_FOUND) - set(LIBSOUP24_LIBRARIES ${LIBSOUP24_LIBRARY}) - set(LIBSOUP24_INCLUDE_DIRS ${LIBSOUP24_INCLUDE_DIR}) -endif() - -mark_as_advanced(LIBSOUP24_INCLUDE_DIR LIBSOUP24_LIBRARY) - diff --git a/cmake/FindWEBKIT2GTK.cmake b/cmake/FindWEBKIT2GTK.cmake index 391fdfe9d..0af554cff 100644 --- a/cmake/FindWEBKIT2GTK.cmake +++ b/cmake/FindWEBKIT2GTK.cmake @@ -33,7 +33,8 @@ find_package(PkgConfig) if(PKG_CONFIG_FOUND) - pkg_check_modules(_WEBKIT2GTK webkit2gtk-4.0) + #pkg_check_modules(_WEBKIT2GTK webkit2gtk-4.0) + pkg_search_module(_WEBKIT2GTK webkit2gtk-4.1 webkit2gtk-4.0) endif(PKG_CONFIG_FOUND) set(WEBKIT2GTK_DEFINITIONS ${_WEBKIT2GTK_CFLAGS_OTHER}) @@ -42,7 +43,8 @@ find_path(WEBKIT2GTK_INCLUDE_DIR NAMES webkit2/webkit2.h HINTS ${_WEBKIT2GTK_INCLUDEDIR} ${_WEBKIT2GTK_INCLUDE_DIRS} ) -find_library(WEBKIT2GTK_LIB webkit2gtk-4.0 +find_library(WEBKIT2GTK_LIB + NAMES webkit2gtk-4.1 webkit2gtk-4.0 HINTS ${_WEBKIT2GTK_LIBDIR} ${_WEBKIT2GTK_LIBRARY_DIRS} -- cgit v1.2.3