Configure and Generate - nenetto/CMakeTemplates GitHub Wiki

Introduction

CMake allows user to prepare the IDE for developing solving all tedious problems about linking and importing. Also, many users offer their projects open-source so any other user could configure and compile them successfully . However, due to the many options that CMake allow for configuration, there is no a standard way to link different projects from different repositories, and developers are forced to learn CMake in most of cases.

The normal way of work with a CMake-based project consist on Configure and Generate your project.

Configure

  • Open CMake in your computer

CMake Window

  • Write the Source code directory on the first line
    • This folder MUST contain a CMakeList.txt file
  • Write the Binary code directory where you want to generate your project for compilation on the second line
  • Click on Configure button
    • Sometimes, CMake ask you to create a new folder for Binary, this happens if you did not create it first

CMake Window

  • Select the IDE/Platform that you will use for compilation, for example VS2013

CMake Window

  • Change or modify the options into CMake panel as you like or as tutorial for installation tells you to do it if you are generating an open-source project from other user

CMake Window

  • Click Configure button again CMake Window

Generate

  • When you finish without errors the CMake Configure step, click on Generate to create your IDE files

CMake Window

  • Open your IDE and start working!

CMake Window