Merge pull request #5670 from akallabeth/cairo_detection_fix

Fix #5669: If cairo is detected as part of other dependencies ignore it
This commit is contained in:
Martin Fleisz 2019-10-28 15:18:59 +01:00 committed by GitHub
commit c49dc3c67f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -89,20 +89,18 @@ if (WITH_CAIRO)
find_package(Cairo REQUIRED)
endif(WITH_CAIRO)
if (SWScale_FOUND)
# Prefer SWScale over Cairo, both at the same time are not possible.
if (WITH_SWSCALE)
add_definitions(-DSWSCALE_FOUND=1)
include_directories(${SWScale_INCLUDE_DIR})
freerdp_library_add(${SWScale_LIBRARY})
else(SWScale_FOUND)
if (CAIRO_FOUND)
add_definitions(-DCAIRO_FOUND=1)
include_directories(${CAIRO_INCLUDE_DIR})
freerdp_library_add(${CAIRO_LIBRARY})
else(CAIRO_FOUND)
message(WARNING "neither swscale nor libcairo detected, compiling without image scaling support!")
endif(CAIRO_FOUND)
endif(SWScale_FOUND)
elseif (WITH_CAIRO)
add_definitions(-DCAIRO_FOUND=1)
include_directories(${CAIRO_INCLUDE_DIR})
freerdp_library_add(${CAIRO_LIBRARY})
else()
message(WARNING "neither swscale nor libcairo detected, compiling without image scaling support!")
endif()
set(${MODULE_PREFIX}_SUBMODULES
utils