Update libpng cmake wrapper for dynamic libraries (#4590)

* Update libpng cmake wrapper for dynamic libraries

* [libpng] Bump control version

* [libgd] Fix parallel source directory writes
This commit is contained in:
LRFLEW 2018-11-08 00:57:08 -07:00 committed by Robert Schumacher
parent 550c9422ad
commit 848233b137
5 changed files with 28 additions and 16 deletions

View File

@ -1,4 +1,4 @@
Source: libgd Source: libgd
Version: 2.2.4-3 Version: 2.2.4-4
Description: Open source code library for the dynamic creation of images by programmers. Description: Open source code library for the dynamic creation of images by programmers.
Build-Depends: freetype, libjpeg-turbo, libpng, libwebp, tiff, fontconfig Build-Depends: freetype, libjpeg-turbo, libpng, libwebp, tiff, fontconfig

View File

@ -0,0 +1,14 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index b16d4a4..5126085 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -191,7 +191,8 @@ else (USE_EXT_GD)
CHECK_INCLUDE_FILE("stdint.h" HAVE_STDINT_H)
CHECK_INCLUDE_FILE("inttypes.h" HAVE_INTTYPES_H)
- CONFIGURE_FILE(${GD_SOURCE_DIR}/src/config.h.cmake ${GD_SOURCE_DIR}/src/config.h ESCAPE_QUOTES)
+ CONFIGURE_FILE(${GD_SOURCE_DIR}/src/config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/src/config.h ESCAPE_QUOTES)
+ include_directories(${CMAKE_CURRENT_BINARY_DIR}/src)
option(BUILD_SHARED_LIBS "Build shared libs" ON)
option(BUILD_STATIC_LIBS "Build static libs" OFF)

View File

@ -1,19 +1,15 @@
include(vcpkg_common_functions) include(vcpkg_common_functions)
set(LIBGD_VERSION 2.2.4) vcpkg_from_github(
set(LIBGD_HASH 02ce40c45f31cf1645ad1d3fd9b9b498323b2709d40b0681cd403c11072a1f2149f5af844a6bf9e695c29e3247013bb94c57c0225a54189d728f64caf0a938ee) OUT_SOURCE_PATH SOURCE_PATH
set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/libgd-gd-${LIBGD_VERSION}) REPO libgd/libgd
REF gd-2.2.4
vcpkg_download_distfile(ARCHIVE SHA512 02ce40c45f31cf1645ad1d3fd9b9b498323b2709d40b0681cd403c11072a1f2149f5af844a6bf9e695c29e3247013bb94c57c0225a54189d728f64caf0a938ee
URLS "https://github.com/libgd/libgd/archive/gd-${LIBGD_VERSION}.tar.gz" HEAD_REF master
FILENAME "gd-${LIBGD_VERSION}.tar.gz" PATCHES
SHA512 ${LIBGD_HASH}) 0001-fix-cmake.patch
no-write-source-dir.patch
vcpkg_extract_source_archive(${ARCHIVE}) )
vcpkg_apply_patches(
SOURCE_PATH ${SOURCE_PATH}
PATCHES "${CMAKE_CURRENT_LIST_DIR}/0001-fix-cmake.patch")
#delete CMake builtins modules #delete CMake builtins modules
file(REMOVE_RECURSE ${SOURCE_PATH}/cmake/modules/CMakeParseArguments.cmake) file(REMOVE_RECURSE ${SOURCE_PATH}/cmake/modules/CMakeParseArguments.cmake)

View File

@ -1,4 +1,4 @@
Source: libpng Source: libpng
Version: 1.6.35 Version: 1.6.35-1
Build-Depends: zlib Build-Depends: zlib
Description: libpng is a library implementing an interface for reading and writing PNG (Portable Network Graphics) format files. Description: libpng is a library implementing an interface for reading and writing PNG (Portable Network Graphics) format files.

View File

@ -1,4 +1,6 @@
if(EXISTS "${CMAKE_CURRENT_LIST_DIR}/../../lib/libpng16.a") if(EXISTS "${CMAKE_CURRENT_LIST_DIR}/../../lib/libpng16.a")
set(PNG_LIBRARY_RELEASE "${CMAKE_CURRENT_LIST_DIR}/../../lib/libpng16.a" CACHE FILEPATH "") set(PNG_LIBRARY_RELEASE "${CMAKE_CURRENT_LIST_DIR}/../../lib/libpng16.a" CACHE FILEPATH "")
elseif(EXISTS "${CMAKE_CURRENT_LIST_DIR}/../../lib/libpng16${CMAKE_SHARED_LIBRARY_SUFFIX}")
set(PNG_LIBRARY_RELEASE "${CMAKE_CURRENT_LIST_DIR}/../../lib/libpng16${CMAKE_SHARED_LIBRARY_SUFFIX}" CACHE FILEPATH "")
endif() endif()
_find_package(${ARGS}) _find_package(${ARGS})