From 9b8a770d19828f998e34faa6d9eb3101ca4be2de Mon Sep 17 00:00:00 2001 From: Bas Couwenberg Date: Wed, 13 Mar 2024 15:06:09 +0100 Subject: [PATCH] Fix building with libproxy 0.5. proxy.h includes glib-object.h which needs to be found too. Use pkg-config to get these paths. --- CMakeLists.txt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 1aa5955b..e27c2cfa 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -474,6 +474,7 @@ set(PKGCONFIG_REQUIRED_LIBS gdal proj) option(ZBAR "Enable ZBar usage in MWalkingPapersBackground and Geoimage." OFF) option(GEOIMAGE "Enable Geoimage Dock (requires exiv2 library)." ON ) option(GPSD "Enable GPS Dock (requires gpsd library)." OFF) +option(LIBPROXY "Enable libproxy usage." OFF) option(WEBENGINE "Enable the use of QtWeb engine (not supported on all platforms)" OFF) option(PROTOBUF "Enable support for .osm.pbf format." ON) option(EXTRA_TESTS "Enable extra tests that cannot be run automatically on CI build." ON ) @@ -482,6 +483,7 @@ message(STATUS "Build options (use -DOPT=ON/OFF to enable/disable):") message(STATUS " * ZBAR ${ZBAR}") message(STATUS " * GEOIMAGE ${GEOIMAGE}") message(STATUS " * GPSD ${GPSD}") +message(STATUS " * LIBPROXY ${LIBPROXY}") message(STATUS " * WEBENGINE ${WEBENGINE}") message(STATUS " * PROTOBUF ${PROTOBUF}") message(STATUS " * EXTRA_TESTS ${EXTRA_TESTS}") @@ -502,6 +504,11 @@ if (GPSD) add_definitions(-DUSE_GPS=1) endif() +if (LIBPROXY) + list(APPEND PKGCONFIG_REQUIRED_LIBS libproxy-1.0) + add_definitions(-DUSE_LIBPROXY=1) +endif() + if (WEBENGINE) add_definitions(-DUSEWEBENGINE=1) # Actual macro is USE_WEBKIT # add_definitions(-DTHREADED_BROWSERIMAGEMANAGER=1) # TODO: Check if that even does something/works