diff --git a/cmake/exiv2Config.cmake.in b/cmake/exiv2Config.cmake.in index 1089786ff6..7ce3aad480 100644 --- a/cmake/exiv2Config.cmake.in +++ b/cmake/exiv2Config.cmake.in @@ -1,28 +1,30 @@ @PACKAGE_INIT@ -cmake_minimum_required(VERSION 3.5) +cmake_minimum_required(VERSION 3.12) include(CMakeFindDependencyMacro) -if(@EXIV2_ENABLE_PNG@) # if(EXIV2_ENABLE_PNG) - find_dependency(ZLIB REQUIRED) -endif() +if(NOT @BUILD_SHARED_LIBS@) # if(NOT BUILD_SHARED_LIBS) + if(@EXIV2_ENABLE_PNG@) # if(EXIV2_ENABLE_PNG) + find_dependency(ZLIB REQUIRED) + endif() -if(@EXIV2_ENABLE_WEBREADY@) # if(EXIV2_ENABLE_WEBREADY) - if(@EXIV2_ENABLE_CURL@) # if(EXIV2_ENABLE_CURL) - find_dependency(CURL REQUIRED) + if(@EXIV2_ENABLE_WEBREADY@) # if(EXIV2_ENABLE_WEBREADY) + if(@EXIV2_ENABLE_CURL@) # if(EXIV2_ENABLE_CURL) + find_dependency(CURL REQUIRED) + endif() endif() -endif() -if(@EXIV2_ENABLE_XMP@) # if(EXIV2_ENABLE_XMP) - find_dependency(EXPAT REQUIRED) -endif() + if(@EXIV2_ENABLE_XMP@) # if(EXIV2_ENABLE_XMP) + find_dependency(EXPAT REQUIRED) + endif() -if(@EXIV2_ENABLE_NLS@) # if(EXIV2_ENABLE_NLS) + if(@EXIV2_ENABLE_NLS@) # if(EXIV2_ENABLE_NLS) find_dependency(Intl REQUIRED) -endif() + endif() -if(@EXV_HAVE_LIBICONV@) # if(EXV_HAVE_LIBICONV) + if(@EXV_HAVE_LIBICONV@) # if(EXV_HAVE_LIBICONV) find_dependency(Iconv REQUIRED) + endif() endif() include("${CMAKE_CURRENT_LIST_DIR}/exiv2Export.cmake")