[zziplib]Fix build error in linux. (#6471)

* [zziplib]Fix build error in linux.

* [zziplib]Use configure_file to generate config.h
This commit is contained in:
JackBoosY 2019-05-18 04:08:11 +08:00 committed by Victor Romero
parent 4f815ca520
commit 41c7755acf
3 changed files with 6 additions and 3 deletions

View File

@ -29,12 +29,14 @@ if(UNIX)
endforeach()
endif()
configure_file("${CMAKE_CURRENT_LIST_DIR}/config.h.in" "${CMAKE_CURRENT_LIST_DIR}/zzip/config.h")
# List the header files
set(HEADERS zzip/__debug.h
zzip/__dirent.h
zzip/__fnmatch.h
zzip/__hints.h
zzip/__mmap.h
zzip/config.h
zzip/_msvc.h
zzip/autoconf.h
zzip/conf.h

View File

@ -1,4 +1,4 @@
Source: zziplib
Version: 0.13.69-2
Version: 0.13.69-3
Build-Depends: zlib
Description: library providing read access on ZIP-archives
Description: library providing read access on ZIP-archives

View File

@ -11,7 +11,7 @@ vcpkg_from_github(
if (VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Linux" OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Darwin")
message(STATUS "Configuring zziplib")
vcpkg_execute_required_process(
COMMAND "./configure"
COMMAND "./configure" --prefix=${CURRENT_INSTALLED_DIR} --with-zlib
WORKING_DIRECTORY "${SOURCE_PATH}"
LOGNAME "autotools-config-${TARGET_TRIPLET}"
)
@ -22,6 +22,7 @@ file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
OPTIONS -DZLIB_INCLUDE_DIRS=${CURRENT_INSTALLED_DIR}/include
)
vcpkg_install_cmake()