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

Improve Qt5 detection on macOS #7699

Merged
merged 2 commits into from
Feb 10, 2025
Merged

Improve Qt5 detection on macOS #7699

merged 2 commits into from
Feb 10, 2025

Conversation

tresf
Copy link
Member

@tresf tresf commented Feb 9, 2025

Supersedes:

Originally, the intention in #4067 was to fix Qt detection for all platforms, however due to a multitude of reasons, I don't think that's practical due to:

  1. The variety of Qt installation locations and types on Windows (e.g. mingw, msvc, etc)
  2. The changes in how deliberately difficult Qt has made it to obtain Qt > 5.14 standalone on Linux
  3. The fact that 99.9% of Linux devs will just use what their system provides, which is already detecting properly.

So, instead, I'll focus on macOS, that's historically always had to use CMAKE_PREFIX_PATH=$(brew --prefix qt@5) (which as a macOS user, I'm always forgetting to type before running cmake).

I've chosen to leverage Qt5_DIR and Qt5Test_DIR for simplicity, since the shell commands add much more conditional logic that's not necessarily warranted.

I've added future support for Qt6.

@tresf tresf mentioned this pull request Feb 9, 2025
@tresf
Copy link
Member Author

tresf commented Feb 10, 2025

I'm squashing this so that I can cherry-pick it atop #7339 for testing.

@tresf
Copy link
Member Author

tresf commented Feb 10, 2025

Qt5 and Qt6 both work out of the box now. I'll attempt MacPorts as well, but if I hit too many unrelated snags, I'll just merge.

Testing:

  • Homebrew + Qt5 (aarch64)
  • Homebrew + Qt6 (aarch64)
  • MacPorts + Qt5 (aarch64)
  • MacPorts + Qt6 (aarch64)

@tresf tresf merged commit 67d4a1c into LMMS:master Feb 10, 2025
10 checks passed
@tresf tresf deleted the detect-qt-mac branch February 10, 2025 07:06
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.

1 participant