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

Fix apple frameworks in CMake generators #6003

Merged
merged 31 commits into from Nov 4, 2019

Conversation

@danimtb
Copy link
Member

danimtb commented Oct 30, 2019

Changelog: Feature: Provide CONAN_FRAMEWORKS and CONAN_FRAMEWORKS_FOUND for Apple frameworks in CMake generators and conan_find_apple_frameworks() macro helper in CMake generators.
Docs: conan-io/docs#1472

#TAGS: slow

  • Refer to the issue that supports this Pull Request: closes #5909
  • 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.

@danimtb danimtb self-assigned this Oct 30, 2019
@danimtb danimtb added this to the 1.20 milestone Oct 30, 2019
@danimtb danimtb closed this Oct 30, 2019
@danimtb danimtb reopened this Oct 30, 2019
danimtb added 6 commits Oct 30, 2019
fix
Copy link
Contributor

lasote left a comment

I think it looks much better now. Fix the test of mac, should be changing the assert only. The messages for the framework are now much more explanatory.

@memsharded please review.

@@ -96,6 +106,11 @@ def cmake_dependencies(dependencies, build_type=""):
set(CONAN_SHARED_LINKER_FLAGS{build_type} "{deps.sharedlinkflags} ${{CONAN_SHARED_LINKER_FLAGS{build_type}}}")
set(CONAN_EXE_LINKER_FLAGS{build_type} "{deps.exelinkflags} ${{CONAN_EXE_LINKER_FLAGS{build_type}}}")
set(CONAN_C_FLAGS{build_type} "{deps.cflags} ${{CONAN_C_FLAGS{build_type}}}")
# Apple Frameworks
conan_find_apple_frameworks(CONAN_FRAMEWORKS{build_type} CONAN_FRAMEWORKS_FOUND{build_type})

This comment has been minimized.

Copy link
@lasote

lasote Oct 31, 2019

Contributor

I would do this call earlier before the first CONAN_LIBS declaration. It is not easy to see that it has been aggregated. Is it possible?

This comment has been minimized.

Copy link
@danimtb

danimtb Oct 31, 2019

Author Member

The thing here is that you need CONAN_FRAMEWORKS defined before this call and then assign the values found to CONAN_LIBS. So first frameworks, then function call, and finally conan_libs.

However, many tests check the library values of CONAN_LIBS and didn't want to modify all the tests for this PR.

If you advise me to do it, I will do it without any problem.

danimtb added 2 commits Oct 31, 2019
danimtb and others added 8 commits Oct 31, 2019
work around a failing test
danimtb added 3 commits Oct 31, 2019
danimtb added 5 commits Oct 31, 2019
@danimtb danimtb referenced this pull request Oct 31, 2019
danimtb and others added 4 commits Oct 31, 2019
# Append to aggregated values variable
set(CONAN_LIBS_{dep}{build_type} ${{CONAN_PKG_LIBS_{dep}{build_type}}} ${{CONAN_SYSTEM_LIBS_{dep}{build_type}}} ${{CONAN_FRAMEWORKS_FOUND_{dep}{build_type}}})
# Aggregate package libs and frameworks for conan_package_library_targets()
set(CONAN_LIBS_FRAMEWORKS_{dep}{build_type} ${{CONAN_PKG_LIBS_{dep}{build_type}}} ${{CONAN_FRAMEWORKS_FOUND_{dep}{build_type}}})

This comment has been minimized.

Copy link
@danimtb

danimtb Nov 4, 2019

Author Member

As we have no model to differentiate packaged frameworks from system frameworks, we are considering frameworks part of the libs of the package in order to create the targets later

@lasote
lasote approved these changes Nov 4, 2019
@lasote lasote merged commit c69c5bf into conan-io:develop Nov 4, 2019
2 checks passed
2 checks passed
continuous-integration/jenkins/pr-head This commit looks good
Details
license/cla Contributor License Agreement is signed.
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.