forked from LinuxCNC/linuxcnc
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request LinuxCNC#2 from strahlex/master
Added namespace replace script for iOS
- Loading branch information
Showing
2 changed files
with
22 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#!/bin/sh | ||
# Replace "namespace google" with "namespace google_public" | ||
# in all source/header files. This is to address a | ||
# namespace collision issue when building for recent | ||
# versions of iOS. Apple is using the protobuf library | ||
# internally, and embeds it as a private framework. | ||
############################################################### | ||
|
||
( | ||
echo "------------------ Fixup namespace --------------------" | ||
cd $1 | ||
sed -i '' -e 's/namespace\ google /namespace\ google_public /g' $(find . -name \*.h -type f) | ||
sed -i '' -e 's/namespace\ google /namespace\ google_public /g' $(find . -name \*.cc -type f) | ||
sed -i '' -e 's/namespace\ google /namespace\ google_public /g' $(find . -name \*.proto -type f) | ||
sed -i '' -e 's/google::protobuf/google_public::protobuf/g' $(find . -name \*.h -type f) | ||
sed -i '' -e 's/google::protobuf/google_public::protobuf/g' $(find . -name \*.cc -type f) | ||
sed -i '' -e 's/google::protobuf/google_public::protobuf/g' $(find . -name \*.proto -type f) | ||
) | ||
|
||
exit 0 |