-
Notifications
You must be signed in to change notification settings - Fork 24
Build for MacOS
Takuya Takeuchi edited this page Dec 29, 2022
·
1 revision
-
CMake
- 3.12.1 or higher
- If you do not want to add CMake path to environment variable, you must type fullpath of CMake when build library.
- .NET Core 3.1
- PowerShell Core 6
- Vulakn SDK
- Optional
$ git clone https://github.com/takuya-takeuchi/NcnnDotNet
$ cd NcnnDotNet
$ git submodule update --init --recursive- Please refer About X11 for Mac
$ wget https://sdk.lunarg.com/sdk/download/1.1.92.1/mac/vulkansdk-macos-1.1.92.1.tar.gz?Human=true -O vulkansdk-macos-1.1.92.1.tar.gz
$ tar -xf vulkansdk-macos-1.1.92.1.tar.gz
$ export VULKAN_SDK=`pwd`/vulkansdk-macos-1.1.92.1/macOSYou need to launch XQuarts when use GUI functions of NcnnDotNet
$ cd src/NcnnDotNet.Native
$ pwsh Build.ps1 <Debug/Release> cpu 64 desktopIf you want to make enable vulkan, you set environmental value VULKAN_SDK before kick script.
$ export VULKAN_SDK=~/VulkanSDK/1.2.189.0
$ pwsh Build.ps1 <Debug/Release> vulkan 64 desktop$ cd src/NcnnDotNet
$ dotnet build -c <Debug/Release>