mayo的编译
Build instructions for Windows MSVC
Mayo requires Qt ≥ 5.10 and OpenCascade ≥ 7.3.0
To get Mayo source code from GitHub you will need Git for Windows
Preparation
Let's agree with some variables that must be adapted to your workspace:
| Name | Description | Example |
|---|---|---|
MSVC |
Microsoft Visual Studio ≥ 2017 | |
OCCDIR |
Folder of OpenCascade, containing adm, inc, src, ... |
D:\libs\OpenCASCADE-7.5.0-vc14-64\opencascade-7.5.0 |
QTDIR |
Folder of Qt, containing bin, doc, include, ... |
D:\libs\Qt\5.15.0\msvc2017_64 |
WORKDIR |
Folder of the workspace where to get and build Mayo | D:\dev\myprojects |
Then follow this procedure before building:
- Open x64 Native Tools Command Prompt for MSVC
- Type:
call "%OCCDIR%\env.bat"
REM Warning: OpenCascade's env.bat overwrites QTDIR environment variable and sets another location
set QTDIR="path_to_your_Qt_root_directory_here"
set PATH="%QTDIR%\bin;%PATH%"
cd %WORKDIR%
git clone https://github.com/fougue/mayo.git
cd mayo
mkdir build && cd build
Build from command-line
qmake ..\mayo.pro
nmake all
Run Mayo with release\mayo.exe
Or build from Visual Studio
qmake -t vcapp ..\mayo.pro
This will create project mayo.vcxproj that you can open with Visual Studio to build and run Mayo.
Before executing Visual Studio make sure %QTDIR%\bin is in PATH and %OCCDIR%\env.bat was called.