CMake: Fix detection of AT-SPI-2 on second run

The if around the find logic meant that the module was never shown as
found after the first round.

Change-Id: I3dd47b37baf7c630c54adbce6872b99f9ff56ad0
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
This commit is contained in:
Frederik Gladhorn 2019-09-16 16:23:39 +02:00
parent 59b940ff41
commit ed487cb00a

View File

@ -1,8 +1,7 @@
include(FindPkgConfig)
if(NOT TARGET PkgConfig::ATSPI2)
pkg_check_modules(ATSPI2 atspi-2 IMPORTED_TARGET)
if (NOT TARGET PkgConfig::ATSPI2)
set(ATSPI2_FOUND 0)
endif()
endif()