Skip to content

Commit 398626a

Browse files
committed
Link static libraries
1 parent 3efb886 commit 398626a

File tree

3 files changed

+11
-15
lines changed

3 files changed

+11
-15
lines changed

.gitignore

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,8 @@ build-iPhoneOS/*
99
objective-git.bridgesupport
1010
ObjectiveGitFramework/build/*
1111
ObjectiveGit-iOS.framework/*
12-
External/libssh2.a
13-
External/libgit2*.a
14-
External/libgit2-ios
12+
External/*.a
13+
External/*.dylib
1514

1615
*.pbxuser
1716
*.perspective

ObjectiveGitFramework.xcodeproj/project.pbxproj

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1687,16 +1687,14 @@
16871687
INFOPLIST_FILE = Info.plist;
16881688
LIBRARY_SEARCH_PATHS = (
16891689
"$(inherited)",
1690-
"/usr/local/opt/[email protected]/lib",
1691-
"/opt/homebrew/Cellar/[email protected]/1.1.1m/lib",
16921690
"$(PROJECT_DIR)/External/build/lib",
16931691
);
16941692
MODULEMAP_FILE = ObjectiveGit.modulemap;
16951693
OTHER_LDFLAGS = (
16961694
"-force_load",
16971695
External/libgit2.a,
16981696
External/libssh2.a,
1699-
"-lcrypto",
1697+
External/libcrypto.a,
17001698
);
17011699
PRODUCT_BUNDLE_IDENTIFIER = "org.libgit2.$(PRODUCT_NAME:rfc1034identifier)";
17021700
PRODUCT_NAME = ObjectiveGit;
@@ -1715,16 +1713,14 @@
17151713
INFOPLIST_FILE = Info.plist;
17161714
LIBRARY_SEARCH_PATHS = (
17171715
"$(inherited)",
1718-
"/usr/local/opt/[email protected]/lib",
1719-
"/opt/homebrew/Cellar/[email protected]/1.1.1m/lib",
17201716
"$(PROJECT_DIR)/External/build/lib",
17211717
);
17221718
MODULEMAP_FILE = ObjectiveGit.modulemap;
17231719
OTHER_LDFLAGS = (
17241720
"-force_load",
17251721
External/libgit2.a,
17261722
External/libssh2.a,
1727-
"-lcrypto",
1723+
External/libcrypto.a,
17281724
);
17291725
PRODUCT_BUNDLE_IDENTIFIER = "org.libgit2.$(PRODUCT_NAME:rfc1034identifier)";
17301726
PRODUCT_NAME = ObjectiveGit;
@@ -1958,16 +1954,14 @@
19581954
INFOPLIST_FILE = Info.plist;
19591955
LIBRARY_SEARCH_PATHS = (
19601956
"$(inherited)",
1961-
"/usr/local/opt/[email protected]/lib",
1962-
"/opt/homebrew/Cellar/[email protected]/1.1.1m/lib",
19631957
"$(PROJECT_DIR)/External/build/lib",
19641958
);
19651959
MODULEMAP_FILE = ObjectiveGit.modulemap;
19661960
OTHER_LDFLAGS = (
19671961
"-force_load",
19681962
External/libgit2.a,
19691963
External/libssh2.a,
1970-
"-lcrypto",
1964+
External/libcrypto.a,
19711965
);
19721966
PRODUCT_BUNDLE_IDENTIFIER = "org.libgit2.$(PRODUCT_NAME:rfc1034identifier)";
19731967
PRODUCT_NAME = ObjectiveGit;
@@ -2178,16 +2172,14 @@
21782172
INFOPLIST_FILE = Info.plist;
21792173
LIBRARY_SEARCH_PATHS = (
21802174
"$(inherited)",
2181-
"/usr/local/opt/[email protected]/lib",
2182-
"/opt/homebrew/Cellar/[email protected]/1.1.1m/lib",
21832175
"$(PROJECT_DIR)/External/build/lib",
21842176
);
21852177
MODULEMAP_FILE = ObjectiveGit.modulemap;
21862178
OTHER_LDFLAGS = (
21872179
"-force_load",
21882180
External/libgit2.a,
21892181
External/libssh2.a,
2190-
"-lcrypto",
2182+
External/libcrypto.a,
21912183
);
21922184
PRODUCT_BUNDLE_IDENTIFIER = "org.libgit2.$(PRODUCT_NAME:rfc1034identifier)";
21932185
PRODUCT_NAME = ObjectiveGit;

script/bootstrap

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,11 @@ check_deps ()
100100
sudo ln -s "$brew_prefix/$product" "$destination"
101101
done
102102
fi
103+
104+
# openssl@1 is expected
105+
sslSource=$(find $brew_prefix -name libcrypto.a | grep openssl | sort | head -1 | xargs dirname)
106+
echo "Find libcrypto.a and take first $sslSource and copy to $install_path"
107+
cp $sslSource/* $install_path 2>/dev/null | echo "Copy and ignore subdirectory. This makes build work on x86 and arm64"
103108
}
104109

105110
main

0 commit comments

Comments
 (0)