This commit is contained in:
Patrick Bader 2017-01-05 17:09:47 +01:00
commit 5a59fd7ec6
2 changed files with 17 additions and 1 deletions

View File

@ -9,7 +9,9 @@ vcpkg_download_distfile(ARCHIVE
vcpkg_extract_source_archive(${ARCHIVE})
vcpkg_apply_patches(
SOURCE_PATH ${SOURCE_PATH}
PATCHES "${CMAKE_CURRENT_LIST_DIR}/use-abort-on-all-platforms.patch"
PATCHES
"${CMAKE_CURRENT_LIST_DIR}/use-abort-on-all-platforms.patch"
"${CMAKE_CURRENT_LIST_DIR}/set_zlib_root.patch"
)
if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
@ -19,6 +21,7 @@ else()
set(PNG_STATIC_LIBS ON)
set(PNG_SHARED_LIBS OFF)
endif()
#message(STATUS ${CURRENT_INSTALL_DIR})
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
@ -29,6 +32,7 @@ vcpkg_configure_cmake(
-DSKIP_INSTALL_PROGRAMS=ON
-DSKIP_INSTALL_EXECUTABLES=ON
-DSKIP_INSTALL_FILES=ON
-DINSTALLED_DIR:PATH=${CURRENT_INSTALLED_DIR}
OPTIONS_DEBUG
-DSKIP_INSTALL_HEADERS=ON
)

View File

@ -0,0 +1,12 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 186b65a..e485fd9 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -40,6 +40,7 @@ set(PNGLIB_NAME libpng${PNGLIB_MAJOR}${PNGLIB_MINOR})
set(PNGLIB_VERSION ${PNGLIB_MAJOR}.${PNGLIB_MINOR}.${PNGLIB_RELEASE})
# needed packages
+set(ZLIB_ROOT ${INSTALLED_DIR})
find_package(ZLIB REQUIRED)
include_directories(${ZLIB_INCLUDE_DIR})