Skip to content

Commit fa38fa1

Browse files
committed
easier debugging for breakpoints
1 parent ee492dc commit fa38fa1

File tree

1 file changed

+15
-14
lines changed

1 file changed

+15
-14
lines changed

src/SPC/util/SPCConfigUtil.php

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -161,19 +161,6 @@ private function getLibsString(array $libraries, bool $use_short_libs = true): s
161161
$frameworks = [];
162162

163163
foreach ($libraries as $library) {
164-
// convert all static-libs to short names
165-
$libs = Config::getLib($library, 'static-libs', []);
166-
foreach ($libs as $lib) {
167-
// check file existence
168-
if (!file_exists(BUILD_LIB_PATH . "/{$lib}")) {
169-
throw new WrongUsageException("Library file '{$lib}' for lib [{$library}] does not exist in '" . BUILD_LIB_PATH . "'. Please build it first.");
170-
}
171-
$lib_names[] = $this->getShortLibName($lib);
172-
}
173-
// add frameworks for macOS
174-
if (SPCTarget::getTargetOS() === 'Darwin') {
175-
$frameworks = array_merge($frameworks, Config::getLib($library, 'frameworks', []));
176-
}
177164
// add pkg-configs libs
178165
$pkg_configs = Config::getLib($library, 'pkg-configs', []);
179166
foreach ($pkg_configs as $pkg_config) {
@@ -187,10 +174,24 @@ private function getLibsString(array $libraries, bool $use_short_libs = true): s
187174
$pc_libs = array_reverse(PkgConfigUtil::getLibsArray($pkg_configs));
188175
$lib_names = [...$lib_names, ...$pc_libs];
189176
}
177+
// convert all static-libs to short names
178+
$libs = Config::getLib($library, 'static-libs', []);
179+
foreach ($libs as $lib) {
180+
// check file existence
181+
if (!file_exists(BUILD_LIB_PATH . "/{$lib}")) {
182+
throw new WrongUsageException("Library file '{$lib}' for lib [{$library}] does not exist in '" . BUILD_LIB_PATH . "'. Please build it first.");
183+
}
184+
$lib_names[] = $this->getShortLibName($lib);
185+
}
186+
// add frameworks for macOS
187+
if (SPCTarget::getTargetOS() === 'Darwin') {
188+
$frameworks = array_merge($frameworks, Config::getLib($library, 'frameworks', []));
189+
}
190190
}
191191

192192
// post-process
193-
$lib_names = array_reverse(array_unique(array_filter($lib_names, fn ($x) => $x !== '')));
193+
$lib_names = array_filter($lib_names, fn ($x) => $x !== '');
194+
$lib_names = array_reverse(array_unique($lib_names));
194195
$frameworks = array_unique($frameworks);
195196

196197
// process frameworks to short_name

0 commit comments

Comments
 (0)