CLion 2019.1 Help

Create New CMake Project from Sources

To work with non-CMake sources in CLion, you can convert them into a CMake project structure.

Create a new CMake project from sources

  1. On the main menu, choose File | New CMake Project from Sources and select the path to the sources.

  2. In the Import CMake Project dialog, specify the following:

    • Select project files - select the files to be imported as project files. Use the subdirectories checkboxes to import their entire contents or clear the checkboxes to import the contents selectively.

    • User Include Directories - select the directories to be included into the project and specified in the CMake include_directories command. CLion includes a directory automatically when it contains at least one header file, if it is named "include", or when it has subdirectories that contain header files only.

      Note that directories not selected in the Select Project Files pane are not presented in the User Include Directories list - select them first, and then the available include directories will appear in the list.

    import cmake project dialog
Last modified: 5 April 2019

See Also

Concepts:

External Links: