Skip to content

Commit 5c9c3b2

Browse files
MythicLionManadamtharani
authored andcommitted
Fixed an issue resolving the locally compiled libetpan on osx
The naive way that the dependency script was calculating products worked for iOS, but not for osx. I now use a lookup table.
1 parent 98d1dc9 commit 5c9c3b2

File tree

1 file changed

+15
-4
lines changed

1 file changed

+15
-4
lines changed

scripts/include.sh/build-dep.sh

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -306,11 +306,22 @@ get_prebuilt_dep()
306306
if test ! -d "$scriptpath/../Externals/$name" ; then
307307
echo "$name is not in Externals. Checking built products dir"
308308

309-
if test -f "${BUILT_PRODUCTS_DIR}/${name}.a" ; then
310-
echo "Found product in built products dir, using that version. The version number of that"
311-
echo "version is unknown, it is your responsability to ensure that it is up to date and is"
309+
# Maps dependency names to their products in the build folder
310+
# (This should be an argument, but, whatever)
311+
product_libetpan_ios="libetpan-ios.a"
312+
product_libetpan_osx="libetpan.a"
313+
314+
i="product_${name/-/_}"
315+
product="${!i}"
316+
317+
if test -z "$product" ; then
318+
echo "No filename for a product in ${BUILT_PRODUCTS_DIR} defined for dependency ${name}. Triggering download"
319+
installed_version=
320+
elif test -f "${BUILT_PRODUCTS_DIR}/$product" ; then
321+
echo "Found product $product in built products dir. Using that version. The version number"
322+
echo "is unknown, it is your responsability to ensure that it is up to date and is"
312323
echo "configured properly with any required headers copied to $BUILT_PRODUCTS_DIR"
313-
324+
314325
# Mark the version as up to date, even though the true version number is not known
315326
installed_version="`defaults read "$versions_path" "$name" 2>/dev/null`"
316327
else

0 commit comments

Comments
 (0)