-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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 locating moltenvk headers when with_vulkan=True #24903
Merged
conan-center-bot
merged 2 commits into
conan-io:master
from
jcar87:lcc/bugfix/qt-macos-vulkan
Aug 13, 2024
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -201,7 +201,7 @@ | |
|
||
def _debug_output(self, message): | ||
if Version(conan_version) >= "2": | ||
self.output.debug(message) | ||
Check failure on line 204 in recipes/qt/6.x.x/conanfile.py GitHub Actions / Lint changed conanfile.py (v2 migration)
|
||
|
||
def configure(self): | ||
if not self.options.gui: | ||
|
@@ -304,9 +304,6 @@ | |
if Version(self.version) >= "6.6.1" and self.settings.compiler == "apple-clang" and Version(self.settings.compiler.version) < "13.1": | ||
raise ConanInvalidConfiguration("apple-clang >= 13.1 is required by qt >= 6.6.1 cf QTBUG-119490") | ||
|
||
if self.settings.os == "Macos" and self.dependencies["double-conversion"].options.shared: | ||
raise ConanInvalidConfiguration("Test recipe fails because of Macos' SIP. Contributions are welcome.") | ||
|
||
if self.options.get_safe("qtwebengine"): | ||
if not self.options.shared: | ||
raise ConanInvalidConfiguration("Static builds of Qt WebEngine are not supported") | ||
|
@@ -366,7 +363,12 @@ | |
if self.options.with_pcre2: | ||
self.requires("pcre2/10.42") | ||
if self.options.get_safe("with_vulkan"): | ||
self.requires("vulkan-loader/1.3.268.0") | ||
# Note: the versions of vulkan-loader and moltenvk | ||
# must be exactly part of the same Vulkan SDK version | ||
# do not update either without checking both | ||
# require exactly the same version of vulkan-headers | ||
self.requires("vulkan-loader/1.3.239.0") | ||
self.requires("vulkan-headers/1.3.239.0", transitive_headers=True) | ||
if is_apple_os(self): | ||
self.requires("moltenvk/1.2.2") | ||
if self.options.with_glib: | ||
|
@@ -721,6 +723,13 @@ | |
"qt_auto_detect_vcpkg()", | ||
"# qt_auto_detect_vcpkg()") | ||
|
||
# Handle locating moltenvk headers when vulkan is enabled on macOS | ||
replace_in_file(self, os.path.join(self.source_folder, "qtbase", "cmake", "FindWrapVulkanHeaders.cmake"), | ||
"if(APPLE)", "if(APPLE)\n" | ||
" find_package(moltenvk REQUIRED QUIET)\n" | ||
" target_include_directories(WrapVulkanHeaders::WrapVulkanHeaders INTERFACE ${moltenvk_INCLUDE_DIR})" | ||
) | ||
|
||
def _xplatform(self): | ||
if self.settings.os == "Linux": | ||
if self.settings.compiler == "gcc": | ||
|
@@ -879,7 +888,7 @@ | |
filecontents += f"set(QT_VERSION_MINOR {ver.minor})\n" | ||
filecontents += f"set(QT_VERSION_PATCH {ver.patch})\n" | ||
if self.settings.os == "Macos": | ||
filecontents += f'set(__qt_internal_cmake_apple_support_files_path "${{CMAKE_CURRENT_LIST_DIR}}/../../../res/macos")\n' | ||
targets = ["moc", "rcc", "tracegen", "cmake_automoc_parser", "qlalr", "qmake"] | ||
if self.options.with_dbus: | ||
targets.extend(["qdbuscpp2xml", "qdbusxml2cpp"]) | ||
|
@@ -1118,6 +1127,7 @@ | |
gui_reqs.append("opengl::opengl") | ||
if self.options.get_safe("with_vulkan", False): | ||
gui_reqs.append("vulkan-loader::vulkan-loader") | ||
gui_reqs.append("vulkan-headers::vulkan-headers") | ||
if is_apple_os(self): | ||
gui_reqs.append("moltenvk::moltenvk") | ||
if self.options.with_harfbuzz: | ||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This restriction is artificial and not related to Qt itself, but rather Conan or Conan Center - lifting it. Have managed to reproduce the original problems, if issues are reported will propose a more robust fix (otherwise, this is not currently causing issues on CI).