Skip to content

Commit 2c3a8bc

Browse files
committed
Add support to parse SETUP functions in config.w32
1 parent eb7b522 commit 2c3a8bc

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

extension/BuildPhpExtension/private/Get-LibrariesFromConfig.ps1

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,14 +71,17 @@ Function Get-LibrariesFromConfig {
7171

7272
$foundItems = @()
7373
$libraryFilesFound = @()
74-
[regex]::Matches($ConfigW32Content, 'CHECK_LIB\(["'']([^"'']+)["'']|["'']([^"'']+\.lib)["'']|(\w+\.lib)') | ForEach-Object {
75-
$_.Groups[1].Value.Split(';') + ($_.Groups[2].Value -Split '[^\w\.]') + ($_.Groups[3].Value -Split '[^\w\.]') | ForEach-Object {
74+
[regex]::Matches($ConfigW32Content, 'CHECK_LIB\(["'']([^"'']+)["'']|["'']([^"'']+\.lib)["'']|(\w+\.lib)|(SETUP_\w+)') | ForEach-Object {
75+
$_.Groups[1].Value.Split(';') + ($_.Groups[2].Value -Split '[^\w\.]') + ($_.Groups[3].Value -Split '[^\w\.]') + ($_.Groups[4].Value) | ForEach-Object {
7676
$libraryFilesFound += $_
7777
}
7878
}
7979
$libraryFilesFound | Select-Object -Unique | ForEach-Object {
8080
if($_) {
8181
switch ($_) {
82+
SETUP_ZLIB_LIB { $library = "zlib" }
83+
SETUP_OPENSSL { $library = "openssl" }
84+
SETUP_SQLITE3 { $library = "sqlite" }
8285
libeay32.lib { $library = "openssl" }
8386
ssleay32.lib { $library = "openssl" }
8487
Default { $library = Find-Library $_ $VsVersions }

0 commit comments

Comments
 (0)