Skip to content

Commit 833a200

Browse files
committed
Rename macOS libgit.a to stop Xcode from choosing wrong
1 parent f5cd655 commit 833a200

File tree

3 files changed

+17
-14
lines changed

3 files changed

+17
-14
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,6 @@
1313
*.xccheckout
1414
*.xcscmblueprint
1515

16+
External/libgit2-mac.a
1617
Carthage/Build
1718

ObjectiveGitFramework.xcodeproj/project.pbxproj

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,6 @@
9191
4D1C40D8182C006D00BE2960 /* GTBlobSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = 4D1C40D7182C006D00BE2960 /* GTBlobSpec.m */; };
9292
4D79C0EE17DF9F4D00997DE4 /* GTCredential.h in Headers */ = {isa = PBXBuildFile; fileRef = 4D79C0EC17DF9F4D00997DE4 /* GTCredential.h */; settings = {ATTRIBUTES = (Public, ); }; };
9393
4D79C0EF17DF9F4D00997DE4 /* GTCredential.m in Sources */ = {isa = PBXBuildFile; fileRef = 4D79C0ED17DF9F4D00997DE4 /* GTCredential.m */; };
94-
4D9BCD24206D84AD003CD3CE /* libgit2.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 4D9BCD23206D84AD003CD3CE /* libgit2.a */; };
9594
4D9BCD25206D84B2003CD3CE /* libgit2.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 4D9BCD23206D84AD003CD3CE /* libgit2.a */; };
9695
4DB9711D2645CA3700D14944 /* Quick.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4DB970A32645C8BB00D14944 /* Quick.framework */; };
9796
4DB9711F2645CA5200D14944 /* ZipArchive.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4DB971172645C8F300D14944 /* ZipArchive.framework */; };
@@ -104,6 +103,7 @@
104103
4DC55AE71AD859AD0032563C /* GTCheckoutOptions.m in Sources */ = {isa = PBXBuildFile; fileRef = 4DC55AE41AD859AD0032563C /* GTCheckoutOptions.m */; };
105104
4DC55AE81AD859AD0032563C /* GTCheckoutOptions.m in Sources */ = {isa = PBXBuildFile; fileRef = 4DC55AE41AD859AD0032563C /* GTCheckoutOptions.m */; };
106105
4DD769A92645D214007599B8 /* Nimble.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4DB971022645C8F300D14944 /* Nimble.framework */; };
106+
4DD7422C25D3F8CB009D9A17 /* libgit2-mac.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 4DD7422B25D3F8CB009D9A17 /* libgit2-mac.a */; };
107107
4DFFB15B183AA8D600D1565E /* GTRepository+RemoteOperations.h in Headers */ = {isa = PBXBuildFile; fileRef = 4DFFB159183AA8D600D1565E /* GTRepository+RemoteOperations.h */; settings = {ATTRIBUTES = (Public, ); }; };
108108
4DFFB15C183AA8D600D1565E /* GTRepository+RemoteOperations.m in Sources */ = {isa = PBXBuildFile; fileRef = 4DFFB15A183AA8D600D1565E /* GTRepository+RemoteOperations.m */; };
109109
55C8055013861FE7004DCB0F /* GTObjectDatabase.m in Sources */ = {isa = PBXBuildFile; fileRef = 55C8054D13861F34004DCB0F /* GTObjectDatabase.m */; };
@@ -705,6 +705,7 @@
705705
4DBA4A3117DA73CE006CD5F5 /* GTRemoteSpec.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTRemoteSpec.m; sourceTree = "<group>"; };
706706
4DC55AE31AD859AD0032563C /* GTCheckoutOptions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTCheckoutOptions.h; sourceTree = "<group>"; };
707707
4DC55AE41AD859AD0032563C /* GTCheckoutOptions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTCheckoutOptions.m; sourceTree = "<group>"; };
708+
4DD7422B25D3F8CB009D9A17 /* libgit2-mac.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = "libgit2-mac.a"; path = "External/libgit2-mac.a"; sourceTree = "<group>"; };
708709
4DE864341794A37E00371A65 /* GTRepository+Private.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "GTRepository+Private.h"; sourceTree = "<group>"; };
709710
4DFFB159183AA8D600D1565E /* GTRepository+RemoteOperations.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "GTRepository+RemoteOperations.h"; sourceTree = "<group>"; };
710711
4DFFB15A183AA8D600D1565E /* GTRepository+RemoteOperations.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "GTRepository+RemoteOperations.m"; sourceTree = "<group>"; };
@@ -882,7 +883,7 @@
882883
files = (
883884
F8D6385D207AC75100D1FD32 /* libz.tbd in Frameworks */,
884885
F8D6385C207AC74A00D1FD32 /* libiconv.tbd in Frameworks */,
885-
4D9BCD24206D84AD003CD3CE /* libgit2.a in Frameworks */,
886+
4DD7422C25D3F8CB009D9A17 /* libgit2-mac.a in Frameworks */,
886887
8DC2EF570486A6940098B216 /* Cocoa.framework in Frameworks */,
887888
);
888889
runOnlyForDeploymentPostprocessing = 0;
@@ -959,6 +960,7 @@
959960
6A1F2FD417C6A8F3003DFADE /* libssl.a */,
960961
6A502B8617D6892D00BAF4A5 /* libssh2.a */,
961962
4D9BCD23206D84AD003CD3CE /* libgit2.a */,
963+
4DD7422B25D3F8CB009D9A17 /* libgit2-mac.a */,
962964
1058C7B1FEA5585E11CA2CBB /* Cocoa.framework */,
963965
887DAFF615CB1C8000F30D0D /* Security.framework */,
964966
F8D63871207AE62A00D1FD32 /* XCTest.framework */,
@@ -2161,12 +2163,12 @@
21612163
"$(inherited)",
21622164
/usr/local/opt/openssl/lib,
21632165
"$(PROJECT_DIR)/External/build/lib",
2166+
"$(PROJECT_DIR)/External",
21642167
);
21652168
MODULEMAP_FILE = ObjectiveGit.modulemap;
21662169
OTHER_LDFLAGS = (
2167-
"-lgit2",
21682170
"-force_load",
2169-
External/libgit2.a,
2171+
"External/libgit2-mac.a",
21702172
/usr/local/lib/libssh2.a,
21712173
"-lcrypto",
21722174
"-lssl",
@@ -2190,12 +2192,12 @@
21902192
"$(inherited)",
21912193
/usr/local/opt/openssl/lib,
21922194
"$(PROJECT_DIR)/External/build/lib",
2195+
"$(PROJECT_DIR)/External",
21932196
);
21942197
MODULEMAP_FILE = ObjectiveGit.modulemap;
21952198
OTHER_LDFLAGS = (
2196-
"-lgit2",
21972199
"-force_load",
2198-
External/libgit2.a,
2200+
"External/libgit2-mac.a",
21992201
/usr/local/lib/libssh2.a,
22002202
"-lcrypto",
22012203
"-lssl",
@@ -2428,12 +2430,12 @@
24282430
"$(inherited)",
24292431
/usr/local/opt/openssl/lib,
24302432
"$(PROJECT_DIR)/External/build/lib",
2433+
"$(PROJECT_DIR)/External",
24312434
);
24322435
MODULEMAP_FILE = ObjectiveGit.modulemap;
24332436
OTHER_LDFLAGS = (
2434-
"-lgit2",
24352437
"-force_load",
2436-
External/libgit2.a,
2438+
"External/libgit2-mac.a",
24372439
/usr/local/lib/libssh2.a,
24382440
"-lcrypto",
24392441
"-lssl",
@@ -2647,12 +2649,12 @@
26472649
"$(inherited)",
26482650
/usr/local/opt/openssl/lib,
26492651
"$(PROJECT_DIR)/External/build/lib",
2652+
"$(PROJECT_DIR)/External",
26502653
);
26512654
MODULEMAP_FILE = ObjectiveGit.modulemap;
26522655
OTHER_LDFLAGS = (
2653-
"-lgit2",
26542656
"-force_load",
2655-
External/libgit2.a,
2657+
"External/libgit2-mac.a",
26562658
/usr/local/lib/libssh2.a,
26572659
"-lcrypto",
26582660
"-lssl",

script/update_libgit2

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ set -e
77
# ~/.MacOSX/environment.plist
88
PATH="/usr/local/bin:$PATH"
99

10-
if [ "External/libgit2.a" -nt "External/libgit2" ]
10+
if [ "External/libgit2-mac.a" -nt "External/libgit2" ]
1111
then
1212
echo "No update needed."
1313
exit 0
@@ -33,9 +33,9 @@ cmake -DBUILD_SHARED_LIBS:BOOL=OFF \
3333
cmake --build .
3434

3535
product="libgit2.a"
36-
install_path="../../${product}"
37-
if [ "${product}" -nt "${install_path}" ]; then
38-
cp -v "${product}" "${install_path}"
36+
install_path="../../"
37+
if [ "libgit2.a" -nt "${install_path}/libgit2-mac.a" ]; then
38+
cp -v "libgit2.a" "${install_path}/libgit2-mac.a"
3939
fi
4040

4141
echo "libgit2 has been updated."

0 commit comments

Comments
 (0)