apotocki / boost-iosx

Builds Boost C++ libraries and packages them as XCFrameworks for iOS (simulator and device), visionOS (simulator and device), macOS, and Mac Catalyst (Intel & Apple Silicon M1).
Boost Software License 1.0
63 stars 17 forks source link

possibility to only build for specified platforms #13

Closed mesqueeb closed 5 months ago

mesqueeb commented 5 months ago

I currently work on a visionOS app, and in the future might expand to iOS, but for now, just getting the Boost framework for visionOS is what I am hoping to be able to do.

Is there any documentation you can give me on what to tweak in the build.sh script to make it so only the visionOS version will get built?

Sorry, I'm not that good at sh scripts. 🙇🏻

apotocki commented 5 months ago

Why do you want to build Boost for visionOS only? It only takes about 20 minutes on my M1 MacBook to build it for all platforms and architectures. This procedure is done only once, and you really only save 5-10 minutes if you modify the build script to exclude unnecessary platforms. Unused libraries do not increase your binaries or compile time, they just wait their time to be used.

Anyway, to exclude unnecessary platforms/architectures, you need to comment out calls like build_XXX_libs in build.sh (e.g. build_macos_libs, build_catalyst_libs, build_sim_libs, etc.), then comment out some lines in build_xcframework() that are related to combining unnecessary artifacts. Also, building Boost depends on the ICU library, which is also built for all platforms and architectures. And some similar steps will be required to patch it, and also to change the way the boost build script takes patched ICU libraries as dependencies.

mesqueeb commented 5 months ago

Thank you so much for the advice! I guess I'll just keep the others around as well as per your advice. : )