Closed eyeplum closed 8 years ago
Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please sign up at https://code.facebook.com/cla - and if you have received this in error or have any questions, please drop us a line at cla@fb.com. Thanks!
@facebook-github-bot CLA signed 😃
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks!
Awesome catch!
Let's use @rpath
in this case, which is the most flexible option of all.
This change would basically require for pop
to always be embedded with the application, which might not be the case, where say a framework is shared between two or three applications, every one of which links it differently.
@rpath
asks the dynamic linker to search a list of locations for the library. That list is embedded in the application, and can be controlled by the application's build process.
This basically means that a single copy of a framework can thus work for multiple purposes.
@nlutsenko Thanks for the review.
I've changed the INSTALL_PATH
to @rpath
and have tested it in a simple Cocoa app, it works.
Also, it seems that the PUBLIC_HEADERS_FOLDER_PATH
was set to a folder adjacent to the framework build product, as a result, users of the framework may have to manually copy the header files in order to make use of the framework.
I changed the PUBLIC_HEADERS_FOLDER_PATH
to $(CONTENTS_FOLDER_PATH)/Headers
so the header files will be correctly copied into the framework bundle.
Thus users can use the framework as-is.
Yup, that's another amazing catch. I think we should just move all of the configurations to use our xctoolchain :)
Waiting for build and merging. Thanks again!
🎉 Great! Glad I can help!
Previously, the value of the build setting
INSTALL_PATH
is$(SYMROOT)/Headers
which may prevent the dynamic linking from working correctly.Usually, a dynamic linked OS X framework is copied to
APP_BUNDLE/Contents/Frameworks
, while the executable is usually located atAPP_BUNDLE/Content/MacOS/EXECUTABLE_NAME
. As per apple document, the suggested install path of an OS X framework is@executable_path/../Frameworks
.This pull request changes the build setting
INSTALL_PATH
for targetpop-osx-framework
to@executable_path/../Frameworks
.