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 build failure when Qt Location is not available #2073

Merged
merged 1 commit into from
Apr 18, 2024

Conversation

dforsi
Copy link
Contributor

@dforsi dforsi commented Apr 17, 2024

When Qt Location is not available, cmake prints

-- Not building map (ENABLE_FEATURE_MAP=ON Qt6Quick_FOUND=1 Qt6QuickWidgets_FOUND=1 Qt6Positioning_FOUND=1 Qt6Location_FOUND=0)
[...]
CMake Error at plugins/feature/skymap/CMakeLists.txt:74 (target_link_libraries):
  Target "featureskymap" links to:

    Qt::Location

  but the target was not found.  Possible reasons include:

(I'm using Debian testing and at this time in not yet available for Qt 6, it's available in experimental.

The existing test was wrong in the part that checked for WebEngine/WebEngineCore the because precedence is from left to right (https://cmake.org/cmake/help/latest/command/if.html#and) and it didn't check for Qt Location.
In the top level CMakeLists.txt Qt Location is optional.

Adds parenthesis to fix the precedence in the existing test and adds
another condition that makes the presence of Qt Location actually
optional like in the top level CMakeLists.txt
@f4exb f4exb merged commit 6b41a77 into f4exb:master Apr 18, 2024
2 of 3 checks passed
@dforsi dforsi deleted the fix/skymap branch April 25, 2024 20:38
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.

2 participants