vcpkg/ports/libpng/fix-tools-static.patch

17 lines
559 B
Diff
Raw Normal View History

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})