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

When using Slint via FetchContent, don't print a message on every re-configure #17

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

tronical
Copy link
Member

Require CMake 2.4 to intregate CMake FetchContent and find_package, according to https://cmake.org/cmake/help/latest/guide/using-dependencies/index.html#fetchcontent-and-find-package-integration

This way FetchContent_MakeAvailable will first try to call find_package(Slint) and if that fails then fall back to building via FetchContent.

Fixes #16

…configure

Require CMake 3.24 to intregate CMake FetchContent and find_package,
according to https://cmake.org/cmake/help/latest/guide/using-dependencies/index.html#fetchcontent-and-find-package-integration

This way FetchContent_MakeAvailable will first try to call
find_package(Slint) and if that fails then fall back to building via
FetchContent.

Fixes #16
@tronical tronical force-pushed the simon/integrate-fetchcontent-find-package branch from 9c8f997 to 1182fee Compare October 23, 2023 12:52
@ogoffart
Copy link
Member

ogoffart commented Oct 23, 2023

Maybe you want to use OVERRIDE_FIND_PACKAGE ?
This seems to do what is asked in #16

Edit: Never mind, this is incompatible with FIND_PACKAGE_ARGS and i prefer the behavour of FIND_PACKAGE_ARGS

# `release/1.0` will auto-upgrade to the latest Slint >= 1.0.0 and < 1.1.0
GIT_TAG release/1
SOURCE_SUBDIR api/cpp
FIND_PACKAGE_ARGS NAMES Slint
Copy link
Member

Choose a reason for hiding this comment

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

I think NAMES Slint is actually not deeded there since that's the same name as the first arg of FetchContent_Declare

@tronical
Copy link
Member Author

I'll defer this, as what we have does work after all and doesn't require a newer cmake.

@tronical tronical closed this Oct 26, 2023
@tronical
Copy link
Member Author

Edit: Keeping it open so that we won't forget about it :)

@tronical tronical reopened this Oct 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

find_package(Slint) never succeed even after FetchContent_MakeAvailable
2 participants