qt5base-lts/cmake/FindXRender.cmake
Alexandru Croitor fe1a018d00 Fix some find modules not setting _FOUND variable
If the target exists or the find_package() call succeeds
we still need to set _FOUND to 1.

Change-Id: Ib2267c30580082dcc177ab21708a3bc5dbde974f
Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com>
Reviewed-by: Qt CMake Build Bot
2019-09-27 14:30:23 +00:00

12 lines
234 B
CMake

include(FindPkgConfig)
if(NOT TARGET PkgConfig::XRender)
pkg_check_modules(XRender xrender IMPORTED_TARGET)
if (NOT TARGET PkgConfig::XRender)
set(XRender_FOUND 0)
endif()
else()
set(XRender_FOUND 1)
endif()