Skip to content
DeHecht edited this page Feb 21, 2019 · 3 revisions

How to 'import' a non eclipse CMake project

Within a few simple steps you should be able to import most CMake based project with our CMake plugin.

Let's exercise on a prominent example: "googletest".

Step 1: Clone the github project locally

I usually prefer the console and check it out in my ~/git/ directory with:

~/git$ git clone https://github.com/google/googletest.git

Step 2: Open the "Import" Wizard

Open File -> Import and select "Git" -> Projects from Git and navigate to the local git repository.

Step 3: Import as general project

You should now see the following:

FirstImportScreen

Just select the option "Import as general project" and click on next.

Step 4: Finish Import Wizard

You should now see the following:

LastImportScreen

Just click on "Finish".

Step 5: Setup the Project

Now right-click on the project to open the context menu and select "CMake"->"Setup" (as shown below) ContextMenuSetup

Step 6: Project is ready to go

As shown in the screen-shot below CMake has been executed and the project can now be built within eclipse.

ImportDone

That's it basically. You may notice that a small icon has been added at the project. This shows that the plugin has been enabled for this project.