summaryrefslogtreecommitdiff
path: root/compat/zlib/zlibConfig.cmake.in
diff options
context:
space:
mode:
Diffstat (limited to 'compat/zlib/zlibConfig.cmake.in')
-rw-r--r--compat/zlib/zlibConfig.cmake.in18
1 files changed, 18 insertions, 0 deletions
diff --git a/compat/zlib/zlibConfig.cmake.in b/compat/zlib/zlibConfig.cmake.in
new file mode 100644
index 0000000..8252ab3
--- /dev/null
+++ b/compat/zlib/zlibConfig.cmake.in
@@ -0,0 +1,18 @@
+@PACKAGE_INIT@
+
+set(_ZLIB_supported_components "shared" "static")
+
+if(ZLIB_FIND_COMPONENTS)
+ foreach(_comp ${ZLIB_FIND_COMPONENTS})
+ if(NOT _comp IN_LIST _ZLIB_supported_components)
+ set(ZLIB_FOUND False)
+ set(ZLIB_NOT_FOUND_MESSAGE "Unsupported component: ${_comp}")
+ endif(NOT _comp IN_LIST _ZLIB_supported_components)
+
+ include("${CMAKE_CURRENT_LIST_DIR}/ZLIB-${_comp}.cmake")
+ endforeach(_comp ${ZLIB_FIND_COMPONENTS})
+else(ZLIB_FIND_COMPONENTS)
+ foreach(_component_config IN LISTS _ZLIB_supported_components)
+ include("${CMAKE_CURRENT_LIST_DIR}/ZLIB-${_component_config}.cmake")
+ endforeach(_component_config IN LISTS _ZLIB_supported_components)
+endif(ZLIB_FIND_COMPONENTS)