From 17ae4e1befb0e9a81b70e1792a4ae50a2fee8183 Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Sat, 13 Feb 2021 08:55:03 -0500 Subject: FindPNG: only mark used variables as advanced The `PNG_LIBRARY` variable is an output and not a cache variable. Fixes some CMP0102 warnings. --- Modules/FindPNG.cmake | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Modules/FindPNG.cmake b/Modules/FindPNG.cmake index 51f2c7d..94d15db 100644 --- a/Modules/FindPNG.cmake +++ b/Modules/FindPNG.cmake @@ -55,6 +55,7 @@ find_package(ZLIB ${_FIND_ZLIB_ARG}) if(ZLIB_FOUND) find_path(PNG_PNG_INCLUDE_DIR png.h PATH_SUFFIXES include/libpng) + mark_as_advanced(PNG_PNG_INCLUDE_DIR) list(APPEND PNG_NAMES png libpng) unset(PNG_NAMES_DEBUG) @@ -158,5 +159,3 @@ include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake) find_package_handle_standard_args(PNG REQUIRED_VARS PNG_LIBRARY PNG_PNG_INCLUDE_DIR VERSION_VAR PNG_VERSION_STRING) - -mark_as_advanced(PNG_PNG_INCLUDE_DIR PNG_LIBRARY ) -- cgit v0.12