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
Feature: support OSX frameworks #5552
Conversation
@jgsogo please take a look at the proposal and lemme know what do you think |
I know nothing about apple frameworks 😞 . If this is going for the next release (cc @lasote) I need to have a look at it almost from scratch, right now I can only say that it looks like promising. |
Can you fix the failing test, @SSE4? As the issue is tagged for |
@jgsogo yeah, I am planning to add tests, but before going too deep, I want some feedback, if it's a right direction to go or not |
In general, I think the idea is ok. The default root dir I don't think is a good choice. We have seen for c3i that it is difficult to check if a package is built correctly without a well know folder structure. I don't know which one is the best, but we could enforce a new one if needed (convention). Please add tests, make a proposition for the default folder and specify which other generators are you going to adapt for the apple frameworks (if any) |
yeah, I think:
|
@jgsogo @lasote
|
1c46219
to
1d7d70a
Compare
just removed WIP title, as it was confusing |
@SSE4 Write and link the docs ASAP. It really helps to understand the PR (and it is needed to complete a feature) |
@lasote docs added |
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.
Looking good, some important comments
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.
Add a test for find package
Signed-off-by: SSE4 <tomskside@gmail.com>
@lasote added |
Changelog: Feature: Better support OSX frameworks by declaring
cppinfo.frameworks
.Docs: conan-io/docs#1414
closes: #5245
part 1
extend
CppInfo
andDepsCppInfo
classes to supportframeworks
andframework_paths
properties.right now many of bincrafters recipes have the following code to manage frameworks:
so, frameworks are currently managed with
exelinkflags
/sharedlinkflags
, which is kinda ugly. proposed changes allow to write just something like:by default,
self.cpp_info.framework_paths
includesrootpath
, not sure if it's wise choice, need to check where frameworks are usually installed by conventions (bin vs lib vs Frameworks vs root)part 2
set
DYLD_FRAMEWORK_PATH
inRunEnvironment
andConanFile.run
, similar to howDYLD_LIBRARY_PATH
is currently set. see https://www.manpagez.com/man/1/dyld/ for the details.part 3
use
frameworks
andframework_paths
in generators. right now implemented only incmake
generator via find_library - frameworks found are appended to theCONAN_LIBS
.changes were tested on SFML branch: https://github.com/bincrafters/conan-sfml/compare/framework/2.5.1?expand=1, which allows to compile frameworks instead of regular libraries via options:
-o sfml:shared=True -o sfml:framework=True
. as result, it creates two frameworks:SFML.framework
andsfml-system.framework
.TODO:
write some testsdecide which directories should be used by default inself.cpp_info.framework_paths
implement other generators (probably,xcode
,compiler_args
,virtualenv
/virtualrunenv
, othercmake_*
generators)check if we have to change something about editable mode in case of frameworks?Refer to the issue that supports this Pull Request.
If the issue has missing info, explain the purpose/use case/pain/need that covers this Pull Request.
I've read the Contributing guide.
I've followed the PEP8 style guides for Python code.
I've opened another PR in the Conan docs repo to the
develop
branch, documenting this one.Note: By default this PR will skip the slower tests and will use a limited set of python versions. Check here how to increase the testing level by writing some tags in the current PR body text.