SoupVersion.cmake: Force version required by Nice
Otherwise, Dino would crash due to conflicting Soup 2 and 3 symbols.
This commit is contained in:
parent
8cd96e0a14
commit
6717986e7b
|
@ -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 ()
|
||||
|
|
Loading…
Reference in New Issue