From 72bdcb4e25d7153feb2e3d585bc27c607fb9ad5f Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 17 Aug 2023 11:53:52 +1000 Subject: [PATCH] CMake: use more conventional checks that libraries were found The method of checking the library was found cause an undefined variable warning when it was found. --- build_files/cmake/Modules/FindBrotli.cmake | 2 +- build_files/cmake/Modules/FindUSD.cmake | 2 +- build_files/cmake/Modules/FindWebP.cmake | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/build_files/cmake/Modules/FindBrotli.cmake b/build_files/cmake/Modules/FindBrotli.cmake index 37c0aad608f..8f35a6ca4c7 100644 --- a/build_files/cmake/Modules/FindBrotli.cmake +++ b/build_files/cmake/Modules/FindBrotli.cmake @@ -59,7 +59,7 @@ FIND_LIBRARY(BROTLI_LIBRARY_DEC ) -IF(${BROTLI_LIBRARY_COMMON_NOTFOUND} or ${BROTLI_LIBRARY_DEC_NOTFOUND}) +IF((NOT BROTLI_LIBRARY_COMMON) OR (NOT BROTLI_LIBRARY_DEC)) set(BROTLI_FOUND FALSE) ELSE() # handle the QUIETLY and REQUIRED arguments and set BROTLI_FOUND to TRUE if diff --git a/build_files/cmake/Modules/FindUSD.cmake b/build_files/cmake/Modules/FindUSD.cmake index d7d2c8806d9..ccd9c24bc46 100644 --- a/build_files/cmake/Modules/FindUSD.cmake +++ b/build_files/cmake/Modules/FindUSD.cmake @@ -52,7 +52,7 @@ FIND_LIBRARY(USD_LIBRARY DOC "Universal Scene Description (USD) monolithic library" ) -IF(${USD_LIBRARY_NOTFOUND}) +IF(NOT USD_LIBRARY) set(USD_FOUND FALSE) ELSE() # handle the QUIETLY and REQUIRED arguments and set USD_FOUND to TRUE if diff --git a/build_files/cmake/Modules/FindWebP.cmake b/build_files/cmake/Modules/FindWebP.cmake index d59d9410b2f..7a769d65319 100644 --- a/build_files/cmake/Modules/FindWebP.cmake +++ b/build_files/cmake/Modules/FindWebP.cmake @@ -59,7 +59,7 @@ FOREACH(COMPONENT ${_webp_FIND_COMPONENTS}) LIST(APPEND _webp_LIBRARIES "${WEBP_${UPPERCOMPONENT}_LIBRARY}") ENDFOREACH() -IF(${WEBP_WEBP_LIBRARY_NOTFOUND}) +IF(NOT WEBP_WEBP_LIBRARY) set(WEBP_FOUND FALSE) ELSE() # handle the QUIETLY and REQUIRED arguments and set WEBP_FOUND to TRUE if