Compiling SDK for Windows with CMake using NMake Makefiles

Short descriptions on how to use the SDK, the build environment and giving hints on some tricky issues.
Post Reply
User avatar
Support Team
Hero Member
Hero Member
Posts: 2521
Joined: 18 Mar 2011, 15:09

Compiling SDK for Windows with CMake using NMake Makefiles

Post by Support Team »

This HowTo will show you how to compile the SDK with CMake, but will not explain CMake in depth. For the interested reader we recommend to read the CMake Tutorial and the CMake Documentation to get a full understanding of CMake.

Important: This HowTo shows the possibility of building the source SDK (this will also work for all examples even in EVAL packages).

There are two different ways to compile the SDK with CMake:

Using the QT CMake-GUI:
  • To compile the SDK with NMake Makefiles, start up your Visual Studio Command Prompt, locate the cmake-gui.exe and start this application.
  • In the CMake-GUI locate the src folder of the SDK and set a folder where to create the NMake Makefiles. Press Configure and set NMake Makefiles as generator for this project. This will create the folder you have chosen before for the NMake Makefiles and will show you all available options of the SDKs master CMakeLists.txt.
  • Set all options as desired and do not forget to set also the install prefix.
  • After that press Configure again to adopt the options. Now you can press Generate to generate the NMake Makefiles.
  • Use your Visual Studio Command Prompt and locate your created folder.
  • Compile the SDK with nmake install.
Using the Visual Studio Command Prompt:
  • Start your Visual Studio Command Prompt, navigate into the installed folder of the SDK and create a temporary folder (e.g. bld) to store the created NMake Makefiles.
  • Step into this folder and create the NMake Makefiles with

    Code: Select all

    cmake -DCMAKE_INSTALL_PREFIX= -DCMAKE_BUILD_TYPE=Debug ../src
  • Compile and install the SDK with nmake install
  • If the path of CMAKE_INSTALL_PREFIX is different to the path of the SDK you have to copy the ServerConfig.xml file (located in sdk/bin) into the newly created bin folder to start up the Demo Server.
Best regards
Unified Automation Support Team

Post Reply