Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for Apple framework builds #653

Merged
merged 2 commits into from
Jan 2, 2025
Merged

Add support for Apple framework builds #653

merged 2 commits into from
Jan 2, 2025

Conversation

Treata11
Copy link
Contributor

@Treata11 Treata11 commented Jan 2, 2025

Add CMake option PUGIXML_BUILD_APPLE_FRAMEWORKS to build PugiXML as Apple Frameworks.
This is needed to be able to create iOS-derived compatible app bundles which need to embed PugiXML as framework, as using dylibs is prohibited by Apple.

CMake officially made support for framework bundles in v3.14:
https://cmake.org/cmake/help/latest/prop_tgt/FRAMEWORK.html#prop_tgt:FRAMEWORK

Configure (iOS):

cmake -S. -B build -DPUGIXML_BUILD_APPLE_FRAMEWORKS=TRUE -DPUGIXML_INSTALL=TRUE -DCMAKE_SYSTEM_NAME=iOS

Build:

sudo cmake --build build --config Release --target install

Built frameworks would be written at: build/pugixml.framework

CMakeLists.txt Outdated Show resolved Hide resolved
CMakeLists.txt Show resolved Hide resolved
@zeux zeux merged commit 06318b0 into zeux:master Jan 2, 2025
24 checks passed
@zeux
Copy link
Owner

zeux commented Jan 2, 2025

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants