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

[incubating][CMakeDeps] Apple Frameworks #17725

Draft
wants to merge 4 commits into
base: develop2
Choose a base branch
from

Conversation

franramirez688
Copy link
Contributor

Changelog: Feature: Added complete Apple Frameworks management to new CMakeDeps.
Changelog: Feature: Added new cpp_info.package_frameworks to cpp_info.
Docs: omit
Closes: #13017
Closes: #10140
Closes: #17224

@franramirez688 franramirez688 added this to the 2.13.0 milestone Feb 7, 2025
breakpoint()
assert "/System/Library/Frameworks/Foundation.framework;" in client.out
assert "/System/Library/Frameworks/CoreServices.framework;" in client.out
assert "/System/Library/Frameworks/CoreFoundation.framework" in client.out
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Working on that, it's just a copy&paste for now. Adapting this one and adding more 😁

@@ -346,7 +360,12 @@ def _template(self):
{% if lib_info.get("system_libs") %}
target_link_libraries({{lib}} INTERFACE {{lib_info["system_libs"]}})
{% endif %}

{% if lib_info.get("frameworks") %}
target_link_libraries({{lib}} INTERFACE {{lib_info["frameworks"]}})
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of defining an INTERFACE target, it would be better to follow https://cmake.org/cmake/help/latest/prop_tgt/IMPORTED_IMPLIB.html and do:

  • Define a proper IMPORTED SHARED target
  • Define its IMPORTED_LOCATION and IMPORTED_IMPLIB

It is not a big deal that it requires CMake>3.27, in https://github.com/conan-io/conan/pull/17459/files I am already requiring CMake>3.27 for some features.

@franramirez688 franramirez688 modified the milestones: 2.13.0, 2.14.0 Feb 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment