aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXavier Del Campo Romero <xavi.dcr@tutanota.com>2023-10-04 22:33:59 +0200
committerXavier Del Campo Romero <xavi.dcr@tutanota.com>2023-10-09 16:38:02 +0200
commit6717986e7b904b1299e58d6fe574f04e3d5d1bd8 (patch)
tree302e8980d1be227cb5be3c19cbd28aa6f0956d4c
parent8cd96e0a1481c767410585ebc5fbc4bb1dfc8ad5 (diff)
SoupVersion.cmake: Force version required by Nice
Otherwise, Dino would crash due to conflicting Soup 2 and 3 symbols.
-rw-r--r--cmake/SoupVersion.cmake12
1 files changed, 11 insertions, 1 deletions
diff --git a/cmake/SoupVersion.cmake b/cmake/SoupVersion.cmake
index 625a1513..f09543a8 100644
--- a/cmake/SoupVersion.cmake
+++ b/cmake/SoupVersion.cmake
@@ -1,5 +1,5 @@
find_package(Nice QUIET)
-if (Nice_FOUND AND NOT SOUP_VERSION AND NOT USE_SOUP3)
+if (Nice_FOUND)
file(GET_RUNTIME_DEPENDENCIES
RESOLVED_DEPENDENCIES_VAR Nice_DEPENDENCIES
UNRESOLVED_DEPENDENCIES_VAR Nice_UNRESOLVED_DEPENDENCIES
@@ -9,11 +9,21 @@ if (Nice_FOUND AND NOT SOUP_VERSION AND NOT USE_SOUP3)
)
foreach (lib ${Nice_DEPENDENCIES})
if (lib MATCHES ".*/libsoup-3.*")
+ if(SOUP_VERSION AND NOT SOUP_VERSION EQUAL 3)
+ message(FATAL_ERROR "libnice-${Nice_VERSION} depends on "
+ "libsoup-3, but SOUP_VERSION=${SOUP_VERSION} was given.")
+ endif()
+
set(SOUP_VERSION 3)
endif ()
endforeach ()
foreach (lib ${Nice_DEPENDENCIES})
if (lib MATCHES ".*/libsoup-2.*")
+ if(SOUP_VERSION AND NOT SOUP_VERSION EQUAL 2)
+ message(FATAL_ERROR "libnice-${Nice_VERSION} depends on "
+ "libsoup-2, but SOUP_VERSION=${SOUP_VERSION} was given.")
+ endif()
+
set(SOUP_VERSION 2)
endif ()
endforeach ()