c++ubuntucmakecodelite

Importing a CMake project into CodeLite


I was wondering if anyone knew of a way to import an existing cmake project into the CodeLite IDE?

This is a C++ project and I have all of the .c and .h files. I have the CMake lists and what not for the project too.

I am running on Ubuntu 16.04 with CodeLite 11.0.4.

If CodeLite is not able to do this, then is there an IDE that can import a CMake project?


Solution

  • You can generate a CodeLite workspace with cmake by using the -G option. First, look up all available CodeLite generators by doing

    cmake --help
    

    Keep in mind that not all might work for you, depending on your system configuration. Then use one of them as you like. For example, using Ninja you can do:

    cmake -G "CodeLite - Ninja" /path
    

    where /path is the directory where your CMakeLists.txt is located.