summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorBen Boeckel <ben.boeckel@kitware.com>2021-02-13 13:55:03 (GMT)
committerBen Boeckel <ben.boeckel@kitware.com>2021-02-15 15:33:01 (GMT)
commit17ae4e1befb0e9a81b70e1792a4ae50a2fee8183 (patch)
tree0d186223364f9b8ef0f31dbc5904b5c1d652c754 /Modules
parent36b0cc795850b73a1777ffc9bad435ce07e2c607 (diff)
downloadCMake-17ae4e1befb0e9a81b70e1792a4ae50a2fee8183.zip
CMake-17ae4e1befb0e9a81b70e1792a4ae50a2fee8183.tar.gz
CMake-17ae4e1befb0e9a81b70e1792a4ae50a2fee8183.tar.bz2
FindPNG: only mark used variables as advanced
The `PNG_LIBRARY` variable is an output and not a cache variable. Fixes some CMP0102 warnings.
Diffstat (limited to 'Modules')
-rw-r--r--Modules/FindPNG.cmake3
1 files changed, 1 insertions, 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 )