mirror of https://github.com/FreeRDP/FreeRDP
[winpr] fallback to pkg-config for uriparser
older versions do not ship a CMake configuration, fall back to pkg-config based detection in that case.
This commit is contained in:
parent
eefe052690
commit
a7e8a72396
|
@ -106,9 +106,17 @@ set(CMAKE_REQUIRED_LIBRARIES rt)
|
|||
find_package(uriparser)
|
||||
option(WITH_URIPARSER "use uriparser library to handle URIs" ${uriparser_FOUND})
|
||||
if (WITH_URIPARSER)
|
||||
find_package(uriparser CONFIG REQUIRED char)
|
||||
find_package(uriparser CONFIG COMPONENTS char)
|
||||
if (uriparser_FOUND)
|
||||
winpr_library_add_private(uriparser::uriparser)
|
||||
else()
|
||||
find_package(PkgConfig REQUIRED)
|
||||
pkg_check_modules(uriparser REQUIRED liburiparser)
|
||||
winpr_include_directory_add(${uriparser_INCLUDEDIR})
|
||||
winpr_include_directory_add(${uriparser_INCLUDE_DIRS})
|
||||
winpr_library_add_private(${uriparser_LIBRARIES})
|
||||
endif()
|
||||
add_definitions("-DWITH_URIPARSER")
|
||||
winpr_library_add_private(uriparser::uriparser)
|
||||
endif()
|
||||
|
||||
if(NOT IOS)
|
||||
|
|
Loading…
Reference in New Issue