Add macOS (Apple Silicon) build support#1475
Open
mossishahi wants to merge 2 commits intok4yt3x:masterfrom
Open
Add macOS (Apple Silicon) build support#1475mossishahi wants to merge 2 commits intok4yt3x:masterfrom
mossishahi wants to merge 2 commits intok4yt3x:masterfrom
Conversation
- CMakeLists.txt: Add OpenMP discovery, Apple-specific linker flags (skip -Wl,--gc-sections which is Linux-only, add -L/opt/homebrew/lib for Homebrew dependencies) - vulkan_utils.cpp: Enable VK_KHR_portability_enumeration extension and VK_INSTANCE_CREATE_ENUMERATE_PORTABILITY_BIT_KHR flag, required for MoltenVK on macOS to enumerate Vulkan devices Tested on MacBook with Apple M3, macOS 26.3, with dependencies installed via Homebrew (ffmpeg, ncnn, vulkan-headers, vulkan-loader, molten-vk, spdlog, boost, libomp, cmake, ninja). Addresses k4yt3x#1189 Made-with: Cursor
…4yt3x#1367) Made-with: Cursor
Author
|
Updated to also include the This PR now covers the full set of changes needed:
|
|
I didn't make in MAC OS. I am having Macbook Air M4. |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Minimal changes to enable building Video2X on macOS with Apple Silicon (M1/M2/M3/M4) using Homebrew dependencies and MoltenVK.
find_package(OpenMP)), skip Linux-only linker flags (--gc-sections,-Wl,-s) on Apple, add Homebrew lib pathVK_KHR_portability_enumerationextension required by MoltenVK to enumerate Vulkan devices on macOSChanges
Only 2 files, 14 lines added/changed. No new dependencies. No breaking changes for Linux/Windows.
Build instructions (macOS)
Test environment
Apple M3 (Vulkan 1.0.334)References
Addresses #1189 — based on the patch shared by @savar in that thread, cleaned up and verified on current master.
Made with Cursor