-
Notifications
You must be signed in to change notification settings - Fork 735
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
Include Headers in the lib #655
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: Treata11 <[email protected]>
…RK (singular) Signed-off-by: Treata11 <[email protected]>
@@ -182,8 +189,10 @@ if (PUGIXML_BUILD_APPLE_FRAMEWORK) | |||
set_target_properties(${libs} PROPERTIES | |||
FRAMEWORK TRUE | |||
FRAMEWORK_VERSION ${PROJECT_VERSION} | |||
XCODE_ATTRIBUTE_PRODUCT_BUNDLE_IDENTIFIER com.zeux.pugixml | |||
MACOSX_FRAMEWORK_IDENTIFIER com.zeux.pugixml | |||
XCODE_ATTRIBUTE_PRODUCT_BUNDLE_IDENTIFIER "github.com/zeux/pugixml" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure how these get determined but why did this change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I updated the identifiers to match the real URL (It'll be included in the .plist
of the framework).
And PUBLIC_HEADER
has to be specified. I overlooked it in the previous PR.
@@ -135,7 +141,8 @@ endif() | |||
|
|||
if (NOT BUILD_SHARED_LIBS OR PUGIXML_BUILD_SHARED_AND_STATIC_LIBS) | |||
add_library(pugixml-static STATIC |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why did this change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there another way to include the headers in the built library?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
target_include_directories
could be used instead... There isn't much of a difference, if any.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Static libraries don't include header files, so I'm not sure what this is changing. I'll need to look at how other projects do xcframework setup but it's surprising that any change is necessary here, beyond the change for framework installation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also worth noting I guess is that xcframework files are dynamic libraries... I'll need to test this fully to make sure I understand what is going on here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Static libraries don't include header files, so I'm not sure what this is changing. I'll need to look at how other projects do xcframework setup but it's surprising that any change is necessary here, beyond the change for framework installation.
iOS-derived frameworks are actually static & they require the header files... dylib
s are not allowed on iOS.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also worth noting I guess is that xcframework files are dynamic libraries...
xcframework
s are just a bunch of built framework
s bundled in a single package using XCode-CLI.
I'll need to test this fully to make sure I understand what is going on here.
Of course, I actually appreciate that.
https://cmake.org/cmake/help/latest/prop_tgt/FRAMEWORK.html#prop_tgt:FRAMEWORK
Greetings,
When I built the library for iOS, I realized that there were no
Header
directories included in theframework
bundle.I searched the entire build dir & didn't find any trace of the headers.
So, I included the headers in the lib & also added them in the framework's bundle.