Skip to content

Build for Windows

Takuya Takeuchi edited this page Dec 31, 2022 · 2 revisions

Requirements

  • 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.
  • Visual Studio
    • Recommended 2017
      • If you can not install it, you have to modify build scripts.
  • .NET Core 3.1
  • PowerShell Core 6
  • Vulakn SDK
    • Optional

Preparations

$ git clone https://github.com/takuya-takeuchi/NcnnDotNet
$ cd NcnnDotNet
$ git submodule update --init --recursive

How to build NcnnDotNet.Native

$ cd src\NcnnDotNet.Native
$ pwsh Build.ps1 <Debug/Release> cpu 64 desktop

If you want to make enable vulkan, you set environmental value VULKAN_SDK before kick script.

$ set VULKAN_SDK=D:\Works\Lib\VulkanSDK\1.2.189.0
$ pwsh Build.ps1 <Debug/Release> vulkan 64 desktop

How to build NcnnDotNet

$ cd src\NcnnDotNet
$ dotnet build -c Release

Clone this wiki locally