vcpkg/ports/libpng/fix-export-targets.patch
Clinton Ingram ce8fd9e724
[libpng] Update to 1.6.40 (#35193)
* update libpng to 1.6.40

* update baseline

* fix patch files

* update baseline
2023-11-21 18:24:19 -08:00

18 lines
701 B
Diff

diff --git a/CMakeLists.txt b/CMakeLists.txt
index e355e4d..3e2f346 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1053,6 +1053,12 @@ if(NOT SKIP_INSTALL_EXPORT AND NOT SKIP_INSTALL_ALL)
install(EXPORT libpng
DESTINATION lib/libpng
FILE libpng${PNGLIB_ABI_VERSION}.cmake)
+ file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/libpng-config.cmake" "
+ include(CMakeFindDependencyMacro)
+ find_dependency(ZLIB)
+ include(\"\${CMAKE_CURRENT_LIST_DIR}/libpng${PNGLIB_ABI_VERSION}.cmake\")
+ ")
+ install(FILES "${CMAKE_CURRENT_BINARY_DIR}/libpng-config.cmake" DESTINATION "${CMAKE_INSTALL_LIBDIR}/libpng")
endif()
# TODO: Create MSVC import lib for MinGW-compiled shared lib.