From ed487cb00a5f08f32459aa602a38e3258f016561 Mon Sep 17 00:00:00 2001 From: Frederik Gladhorn Date: Mon, 16 Sep 2019 16:23:39 +0200 Subject: [PATCH] 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 --- cmake/FindATSPI2.cmake | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/cmake/FindATSPI2.cmake b/cmake/FindATSPI2.cmake index 87e3838ee95..ca0045635be 100644 --- a/cmake/FindATSPI2.cmake +++ b/cmake/FindATSPI2.cmake @@ -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() +pkg_check_modules(ATSPI2 atspi-2 IMPORTED_TARGET) + +if (NOT TARGET PkgConfig::ATSPI2) + set(ATSPI2_FOUND 0) endif()