summaryrefslogtreecommitdiffstats
path: root/cmake/FindWrapSystemZLIB.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'cmake/FindWrapSystemZLIB.cmake')
-rw-r--r--cmake/FindWrapSystemZLIB.cmake12
1 files changed, 10 insertions, 2 deletions
diff --git a/cmake/FindWrapSystemZLIB.cmake b/cmake/FindWrapSystemZLIB.cmake
index 62c9947df1..f9a8f004ec 100644
--- a/cmake/FindWrapSystemZLIB.cmake
+++ b/cmake/FindWrapSystemZLIB.cmake
@@ -1,5 +1,5 @@
# Copyright (C) 2022 The Qt Company Ltd.
-# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+# SPDX-License-Identifier: BSD-3-Clause
# We can't create the same interface imported target multiple times, CMake will complain if we do
# that. This can happen if the find_package call is done in multiple different subdirectories.
@@ -28,5 +28,13 @@ if(ZLIB_FOUND)
endif()
endif()
+if(ZLIB_VERSION)
+ set(WrapSystemZLIB_VERSION "${ZLIB_VERSION}")
+elseif(ZLIB_VERSION_STRING)
+ set(WrapSystemZLIB_VERSION "${ZLIB_VERSION_STRING}")
+endif()
+
include(FindPackageHandleStandardArgs)
-find_package_handle_standard_args(WrapSystemZLIB DEFAULT_MSG WrapSystemZLIB_FOUND)
+find_package_handle_standard_args(WrapSystemZLIB
+ REQUIRED_VARS WrapSystemZLIB_FOUND
+ VERSION_VAR WrapSystemZLIB_VERSION)