Skip to content

Build instructions for Windows

Hugues Delorme edited this page Mar 4, 2024 · 2 revisions

Dependencies

The following tools are required:

The following libraries are required:

  • Qt ≥ 5.14
    Note: Qt5 and Qt6 are both supported
  • OpenCascade ≥ 7.3.0

The following libraries are optional:

Preparation

Get latest Mayo source code from GitHub repository(command prompt):

git clone https://github.com/fougue/mayo.git
mkdir build-mayo

Configuration process

On Windows the recommendation is to use cmake-gui, the cross-platform GUI tool provided by CMake:

cmake-gui

Once Mayo source and build directories are entered then click on the Configure button to start configuration process. First step is to select the cmake generator further used to build Mayo. In this example "Visual Studio 2022" is selected:

cmake-gui-generator

Click on Finish button. CMake then runs the first pass of configuration process and should report an error for Qt not being found:

cmake-gui-Qt-error

Specify a value for the QT_DIR variable which is the path to Qt cmake config files:

cmake-gui-QT_DIR

Click on Configure button. CMake runs the configuration process again, this time an error for OpenCascade location is reported:

cmake-gui-OpenCascade-error

Specify a value for the OpenCASCADE_DIR variable. On Windows this is the base path to OpenCascade(the folder containing file env.bat):

cmake-gui-OpenCASCADE_DIR

Click on Configure button, CMake now can finish the configuration process(there should be no error)

Click on Generate button so CMake creates(generates) the files to build Mayo. If some "Visual Studio" generator was selected then simply click on Open Project button to open mayo.sln in Visual Studio.

Make sure in Visual Studio to enable the "Multi-processor Compilation" flag for the mayo project:

msvc-multiprocessor-build