diff --git a/cmake/Config.cmake.in b/cmake/Config.cmake.in index 9b4c9ee03..40b9de3a1 100644 --- a/cmake/Config.cmake.in +++ b/cmake/Config.cmake.in @@ -2,3 +2,12 @@ include("${CMAKE_CURRENT_LIST_DIR}/@targets_export_name@.cmake") check_required_components("@PROJECT_NAME@") + +if(NOT TARGET ZLIB::ZLIB) + set_target_properties( + ZLIB::zlib + PROPERTIES + IMPORTED_GLOBAL True + ) + add_library(ZLIB::ZLIB ALIAS ZLIB::zlib) +endif()