vcpkg/ports/libpng/fix-tools-static.patch
Osyotr a469702fe1
[libpng] Update to 1.6.44, add feature tools (#42058)
Co-authored-by: Kai Pastor <dg0yt@darc.de>
2024-11-14 03:10:41 -08:00

17 lines
559 B
Diff

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 3857b82..4c68989 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -963,9 +963,9 @@
FILES ${PNGSUITE_PNGS})
endif()
-if(PNG_SHARED AND PNG_TOOLS)
+if(PNG_TOOLS)
add_executable(pngfix ${pngfix_sources})
- target_link_libraries(pngfix PRIVATE png_shared)
+ target_link_libraries(pngfix PRIVATE $<TARGET_NAME_IF_EXISTS:png_shared> $<TARGET_NAME_IF_EXISTS:png_static>) # in vcpkg there's only one
set(PNG_BIN_TARGETS pngfix)
add_executable(png-fix-itxt ${png_fix_itxt_sources})