-
Notifications
You must be signed in to change notification settings - Fork 136
Tutorial for MacOS
Takuya Takeuchi edited this page May 30, 2018
·
7 revisions
- dlib
-
CMake
- 3.0 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 2.0
DlibDotNet.Native requires libdlib.a. You can refer official page
- Clone Dlib.Net repository to any directory
- Download dlib package from officail site
- Extract dlib file to any directory
- Install X11
- Please refer About X11 for Mac
- Open DlibDotNet/src/DlibDotNet.Native in console
- Type the following code in a console:
mkdir build
cd build
cmake -DDLIB_PATH=/Users/<UserName>/Work/Lib/DLib/19.8 ..
- Type the following code in a console:
cmake --build . --config Release
Or
cmake --build . --config Debug
- libDlibDotNet.Native.dylib will be in build
- Install .NET Core 2.0 by following the official page
- Open DlibDotNet/src/DlibDotNet.Native in console
- Type the following code in a console:
dotnet build -c Release
Or
dotnet build -c Debug
For now dotnet command does NOT support specify any executable directory. So please refer the following code in a console:
dotnet restore
dotnet msbuild /p:Configuration=ReleaseMac
mkdir -p bin/Release/netcoreapp2.0
mv bin/ReleaseMac/netcoreapp2.0/* bin/Release/netcoreapp2.0
cp ../../src/DlibDotNet.Native/build/libDlibDotNet.Native.dylib bin/Release/netcoreapp2.0/
dotnet run --configuration Release --no-build