Skip to content

Commit 38c5fb2

Browse files
authored
Merge pull request #13 from Jan-E/PHP-7.4-VS16-libzip
[PHP 7.4 - Windows] Support libzip_a.lib for VS16
2 parents 24e669e + d8de754 commit 38c5fb2

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

ext/zip/config.w32

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ if (PHP_ZIP != "no") {
77
CHECK_HEADER_ADD_INCLUDE("zipconf.h", "CFLAGS_ZIP", PHP_PHP_BUILD + "\\lib\\libzip\\include;" + PHP_EXTRA_LIBS + "\\libzip\\include;" + PHP_ZIP) &&
88
(PHP_ZIP_SHARED && CHECK_LIB("libzip.lib", "zip", PHP_ZIP) || CHECK_LIB("libzip_a.lib", "zip", PHP_ZIP) && CHECK_LIB("libbz2_a.lib", "zip", PHP_ZIP) && CHECK_LIB("zlib_a.lib", "zip", PHP_ZIP))
99
) {
10+
if (VS_TOOLSET && VCVERS >= 1920) {
11+
// lipzip_a.lib for VS16 ships with zip_algorithm_xz and needs symbols for lzma_*
12+
CHECK_LIB("liblzma_a.lib", "zip", PHP_ZIP);
13+
}
1014
EXTENSION('zip', 'php_zip.c zip_stream.c');
1115

1216
if (get_define("LIBS_ZIP").match("libzip_a(?:_debug)?\.lib")) {

0 commit comments

Comments
 (0)