aboutsummaryrefslogtreecommitdiff
path: root/ports/libpng/cmake.patch
diff options
context:
space:
mode:
authorStefano Sinigardi <stesinigardi@hotmail.com>2019-12-24 00:26:04 +0100
committerdan-shaw <51385773+dan-shaw@users.noreply.github.com>2019-12-23 15:26:04 -0800
commita5590520f050d9308337951d4e5aaefbbb168116 (patch)
tree5d132a752bbe5bd82a47fb8d771a28418493d64b /ports/libpng/cmake.patch
parent13c4d0c18dff57ce73c3ddf360ee5d0aa2f1540d (diff)
downloadvcpkg-a5590520f050d9308337951d4e5aaefbbb168116.tar.gz
vcpkg-a5590520f050d9308337951d4e5aaefbbb168116.zip
[libpng] Strong cleanup of the port (#9198)
* [libpng] strong cleanup of the port * [libpng] do not install unhandled tools * [libpng] restore library proper name on windows-static triplets
Diffstat (limited to 'ports/libpng/cmake.patch')
-rw-r--r--ports/libpng/cmake.patch47
1 files changed, 47 insertions, 0 deletions
diff --git a/ports/libpng/cmake.patch b/ports/libpng/cmake.patch
new file mode 100644
index 000000000..f2eb6aa8e
--- /dev/null
+++ b/ports/libpng/cmake.patch
@@ -0,0 +1,47 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 6451fcf..6599e1d 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -44,7 +44,7 @@ if(NOT PNG_BUILD_ZLIB)
+ endif()
+
+ if(UNIX AND NOT APPLE AND NOT BEOS AND NOT HAIKU)
+- find_library(M_LIBRARY m)
++ set(M_LIBRARY m)
+ else()
+ # libm is not needed and/or not available
+ set(M_LIBRARY "")
+@@ -551,21 +551,14 @@ endif()
+
+ if(PNG_STATIC)
+ # does not work without changing name
+- set(PNG_LIB_NAME_STATIC png_static)
+ add_library(png_static STATIC ${libpng_sources})
+ add_dependencies(png_static genfiles)
+ # MSVC doesn't use a different file extension for shared vs. static
+ # libs. We are able to change OUTPUT_NAME to remove the _static
+ # for all other platforms.
+- if(NOT MSVC)
+- set_target_properties(png_static PROPERTIES
+- OUTPUT_NAME "${PNG_LIB_NAME}"
+- CLEAN_DIRECT_OUTPUT 1)
+- else()
+- set_target_properties(png_static PROPERTIES
+- OUTPUT_NAME "${PNG_LIB_NAME}_static"
+- CLEAN_DIRECT_OUTPUT 1)
+- endif()
++ set_target_properties(png_static PROPERTIES
++ OUTPUT_NAME "${PNG_LIB_NAME}"
++ CLEAN_DIRECT_OUTPUT 1)
+ list(APPEND PNG_LIB_TARGETS png_static)
+ if(MSVC)
+ # msvc does not append 'lib' - do it here to have consistent name
+@@ -915,7 +908,7 @@ endif()
+
+ # Create an export file that CMake users can include() to import our targets.
+ if(NOT SKIP_INSTALL_EXPORT AND NOT SKIP_INSTALL_ALL)
+- install(EXPORT libpng DESTINATION lib/libpng FILE lib${PNG_LIB_NAME}.cmake)
++ install(EXPORT libpng DESTINATION lib/libpng FILE libpngConfig.cmake)
+ endif()
+
+ # what's with libpng-manual.txt and all the extra files?