Programming Howto:Configure BCI2000 for Compilation

From BCI2000 Wiki
Revision as of 12:20, 30 March 2022 by Emilycohen (talk | contribs) (→‎Tell CMake which Qt installation to use)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Back

To this howto's overview page.

Run the CMake GUI

Double-click "Configure.sh.cmd" in your BCI2000 build directory.

Use cmake 1.PNG

Tell CMake which Qt installation to use

Click "AddEntry" in the CMake window ...

  • Note that checking off "Advanced" in Cmake is optional and does not impact the compilation
Use cmake 2.PNG

... and enter the path to a Qt directory that is consistent with the compiler you are going to use. Use CMAKE_PREFIX_PATH as the name for the new entry. Be aware that the entry's name is case sensitive. Be sure to download the correct version of Qt for the build version you plan to use, and verify the compatibility of the versions of Qt and Visual Studio used.

Visual Studio and Qt Compatibility
Visual Studio 2017 Qt 5.12.12
Visual Studio 2019 Qt 5.15.2
Visual Studio 2022 Qt 6.2.4

Note that BCI2000 is most frequently tested using Visual Studio 2019 and Qt 5.15.2, and that the table above shows the suggested versions of Visual Studio and Qt to use together.

Use cmake 3.PNG

Perform the configuration step

In the CMake window, click "Configure" ...

Use cmake 4.PNG

... and choose a generator that is consistent with your compiler, and with the Qt directory chosen above. Then click "Finish" to perform the configuration step.

Use cmake 5.PNG

You will see a list of targets scrolling by, and a number of new entries in the variable list at the top of the window, marked in red.

Use cmake 6.PNG

Choose build options

Make sure the "Grouped" checkbox is checked, and configure the build by customizing values in the "BUILD" ...

Use cmake 7.PNG

... "EXTENSIONS" group,

Use cmake 8.PNG

... and "USE" group. Make sure to uncheck USE_APPLICATION_BUNDLES to avoid problems with compiling. Then, click "Generate" to create build files.

USE APPLICATION BUNDLES.PNG

When CMake displays its "Generating done" message, ...

Use cmake 9.PNG

... your BCI2000 build directory will now contain a VisualStudio solution file, as well as a number of additional CMake-generated files.

Use cmake 10.PNG

Next step

As a next step, learn how to compile BCI2000.

See also

Programming Howto:Building and Customizing BCI2000