Revert "forces CMake use zlib version which is installed by vcpkg."

This reverts commit d62dda3b03.
This commit is contained in:
Patrick Bader 2017-01-05 19:39:14 +01:00
parent 5a59fd7ec6
commit 44c86f56db
2 changed files with 1 additions and 17 deletions

View File

@ -9,9 +9,7 @@ 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"
"${CMAKE_CURRENT_LIST_DIR}/set_zlib_root.patch"
PATCHES "${CMAKE_CURRENT_LIST_DIR}/use-abort-on-all-platforms.patch"
)
if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
@ -21,7 +19,6 @@ else()
set(PNG_STATIC_LIBS ON)
set(PNG_SHARED_LIBS OFF)
endif()
#message(STATUS ${CURRENT_INSTALL_DIR})
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
@ -32,7 +29,6 @@ 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

@ -1,12 +0,0 @@
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})