aboutsummaryrefslogtreecommitdiff
path: root/zlibConfig.cmake.in
diff options
context:
space:
mode:
Diffstat (limited to 'zlibConfig.cmake.in')
-rw-r--r--zlibConfig.cmake.in27
1 files changed, 25 insertions, 2 deletions
diff --git a/zlibConfig.cmake.in b/zlibConfig.cmake.in
index 8e64b6f..d7a849b 100644
--- a/zlibConfig.cmake.in
+++ b/zlibConfig.cmake.in
@@ -1,3 +1,26 @@
1set(zlib_VERSION @zlib_VERSION@)
2@PACKAGE_INIT@ 1@PACKAGE_INIT@
3INCLUDE (${CMAKE_CURRENT_LIST_DIR}/ZLIB.cmake) 2
3set(_ZLIB_supported_components "")
4
5if(@ZLIB_BUILD_SHARED@)
6 list(APPEND _ZLIB_supported_components shared)
7endif(@ZLIB_BUILD_SHARED@)
8
9if(@ZLIB_BUILD_STATIC@)
10 list(APPEND _ZLIB_supported_components static)
11endif(@ZLIB_BUILD_STATIC@)
12
13if(ZLIB_FIND_COMPONENTS)
14 foreach(_comp ${ZLIB_FIND_COMPONENTS})
15 if (NOT _comp IN_LIST _ZLIB_supported_components)
16 set(ZLIB_FOUND False)
17 set(ZLIB_NOT_FOUND_MESSAGE "Unsupported component: ${_comp}")
18 endif(NOT _comp IN_LIST _ZLIB_supported_components)
19
20 include("${CMAKE_CURRENT_LIST_DIR}/ZLIB-${_comp}.cmake")
21 endforeach(_comp ${ZLIB_FIND_COMPONENTS})
22else(ZLIB_FIND_COMPONENTS)
23 foreach(_component_config IN LISTS _ZLIB_supported_components)
24 include("${CMAKE_CURRENT_LIST_DIR}/ZLIB-${_component_config}.cmake")
25 endforeach(_component_config IN LISTS _ZLIB_supported_components)
26endif(ZLIB_FIND_COMPONENTS)