diff options
author | Brad King <brad.king@kitware.com> | 2023-12-14 14:43:08 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2023-12-14 14:43:08 (GMT) |
commit | 84930e9a4c9031c0b0abb5d42cce979466bfc26c (patch) | |
tree | 20a51a687c4f188aad85d27b2588689a2a27468e /Modules | |
parent | 828df1d9e4ccd7e226998bef8adbc7cf5e8649b8 (diff) | |
download | CMake-84930e9a4c9031c0b0abb5d42cce979466bfc26c.zip CMake-84930e9a4c9031c0b0abb5d42cce979466bfc26c.tar.gz CMake-84930e9a4c9031c0b0abb5d42cce979466bfc26c.tar.bz2 |
FindTIFF: Restore support for projects that do not enable CMP0057
Since commit 6a3059e66f (FindTIFF: bridge `tiff-config` into
FindTIFF-compatible interface, 2023-09-14, v3.28.0-rc1~87^2) we use the
`if(IN_LIST)` test that required CMP0057. Expand the scope over which
we enable that policy explicitly.
Issue: #25485
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/FindTIFF.cmake | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Modules/FindTIFF.cmake b/Modules/FindTIFF.cmake index 2a99314..58514a4 100644 --- a/Modules/FindTIFF.cmake +++ b/Modules/FindTIFF.cmake @@ -65,6 +65,9 @@ The following cache variables may also be set: Debug and Release variants are found separately. #]=======================================================================] +cmake_policy(PUSH) +cmake_policy(SET CMP0057 NEW) # if IN_LIST + set(_TIFF_args) if (TIFF_FIND_VERSION) list(APPEND _TIFF_args @@ -209,12 +212,10 @@ if (tiff_FOUND) HANDLE_COMPONENTS VERSION_VAR TIFF_VERSION_STRING) + cmake_policy(POP) return () endif () -cmake_policy(PUSH) -cmake_policy(SET CMP0057 NEW) - find_path(TIFF_INCLUDE_DIR tiff.h) set(TIFF_NAMES ${TIFF_NAMES} tiff libtiff tiff3 libtiff3) |