diff options
Diffstat (limited to 'zlibConfig.cmake.in')
-rw-r--r-- | zlibConfig.cmake.in | 27 |
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 @@ | |||
1 | set(zlib_VERSION @zlib_VERSION@) | ||
2 | @PACKAGE_INIT@ | 1 | @PACKAGE_INIT@ |
3 | INCLUDE (${CMAKE_CURRENT_LIST_DIR}/ZLIB.cmake) | 2 | |
3 | set(_ZLIB_supported_components "") | ||
4 | |||
5 | if(@ZLIB_BUILD_SHARED@) | ||
6 | list(APPEND _ZLIB_supported_components shared) | ||
7 | endif(@ZLIB_BUILD_SHARED@) | ||
8 | |||
9 | if(@ZLIB_BUILD_STATIC@) | ||
10 | list(APPEND _ZLIB_supported_components static) | ||
11 | endif(@ZLIB_BUILD_STATIC@) | ||
12 | |||
13 | if(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}) | ||
22 | else(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) | ||
26 | endif(ZLIB_FIND_COMPONENTS) | ||