GTXiLib
GTXiLib copied to clipboard
Add protobuf sources to support building outside of cocoapods
v4.0.0 added a dependency on protobuf, and updated the podspec to declare this, but didn't update the xcodeproj itself. This broke Carthage support and prevents building from a clone of the repo.
This change:
- Adds a
protobuf
submodule checked out atv3.14.0
- Generates a
protobuf.xcodeproj
by runningcmake -G Xcode -T buildsystem=1 -DCMAKE_OSX_SYSROOT=iphoneos -DCMAKE_OSX_ARCHITECTURES='$(ARCHS_STANDARD)' -DCMAKE_OSX_DEPLOYMENT_TARGET=11.1 protobuf/cmake
-
buildsystem=1
: uses the legacy build system. protobuf specifies dependencies in such a way that cmake can't generate using the modern build system -
CMAKE_OSX_SYSROOT=iphoneos
: builds protobuf using the iOS SDK -
CMAKE_OSX_ARCHITECTURES='$(ARCHS_STANDARD)'
: prevents cmake from settings ONLY_ACTIVE_ARCHS=NO, which causes simulator release builds of GTXiLib to fail -
CMAKE_OSX_DEPLOYMENT_TARGET=11.1
: matches the GTXiLib's deployment target - If you think it'd be useful, I can add a Makefile target to regenerate this project in the future
-
- Creates a
GTXiLib.xcworkspace
which includes both projects - Configures the GTXiLib target to find headers from protobuf and link against libprotobuf
Testing done:
- Builds in Debug and Release configurations for iOS and iOS Simulator (x86-64) targets
- All tests pass except for GTXOOPFunctionalTests, where every test fails with
No target application path specified via test configuration
- I'm not sure whether I caused this – if there's a way to verify these tests on master i'd be happy to :)
-
pod spec lint .
fails, but it also fails on master. not sure whether there's an issue in the podspec, or if it's something on my end? -
carthage build --use-xcframeworks --no-skip-current
succeeds
Perhaps I misunderstand the PR, but I don't see GTXiLib.xcworkspace
committed, nor do I spot a rule for cmake
to generate it.
I'd sure love for this fix to land, so let me know how I can help. :-)