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:

NameDescriptionExample
MSVC Microsoft Visual Studio ≥ 2017  
OCCDIR Folder of OpenCascade, containing admincsrc, ... D:\libs\OpenCASCADE-7.5.0-vc14-64\opencascade-7.5.0
QTDIR Folder of Qt, containing bindocinclude, ... 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:

  1. Open x64 Native Tools Command Prompt for MSVC
  2. 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.

posted @ 2022-10-23 20:07  unicornsir  阅读(292)  评论(0)    收藏  举报