Skip to content

How to build the native plugin

Kazuki Matsumoto edited this page Jul 27, 2018 · 2 revisions

To build the cross-platform native plugin, use Conan and CMake.

Conan is a multi-platform package manager for C++. The following arguments will be listed as reasons for introducing Conan.

  • Automated dependency management
  • Controll multi-platform configration

Install Conan and CMake

Mac

# Install git, python3, cmake
brew install git
brew install git-lfs
brew install python
brew install cmake

# install conan
pip install conan

Windows

# Install Chocolatey
Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
# Install git, python3, cmake
# Need installargs when you install cmake  
choco install git
choco install git-lfs
choco install python
choco install cmake --installargs ADD_CMAKE_TO_PATH=System 

pip install conan

Build with Conan

# download the source code from github
git clone https://github.com/karasusan/OpenVDBForUnity.git

# create a folder to build the plugin
cd OpenVDBForUnity/Plugins
mkdir build
cd build

# execute conan commands
conan install ..
conan source ..
conan build ..
Clone this wiki locally