Page 1 of 1

How to work with CMake projects

Posted: Fri Apr 01, 2011 9:16 pm
by plh
Hi,
I've built the latest sources for CodeLite on Centos 5. I read in the notes for the latest release and in the online documentation that there "should" be a Import Files option on the Workspace (using right click). This option is supposed to allow me to create a custom workspace using my CMake files.

I don't have this option. My CodeLite revision is 4774.
Is this supposed to work now? Otherwise, what's the best way for me to use the existing makefiles?

Thanks!
PLH

Re: How to work with CMake projects

Posted: Sat Apr 02, 2011 11:17 am
by eranif
After you create a workspace, you should create a project of type 'custom makefile' (from the menu: Workspace | New Project, and select the category 'Others')

Once you have a custom makefile project, right click it and select 'Improt files from directory'
Note that if you add new files to the disk, you can re-call 'Import files from directory' and it will only add the missing files.

All the settings, to make the project use 'cmake' is under the project settings dialog | customize | custom build (right click on your project and select 'settings)

For example, to add a 'cmake' command, click on the 'New..' button and add new command named: 'cmake' which executes 'cmake'.
Click OK, and now when right clicking the project, you will get new option named 'custom build targets | cmake' - use it to invoke cmake

Eran

Re: How to work with CMake projects

Posted: Sun Apr 03, 2011 10:38 pm
by plh
Eran,

Thanks! So, I"ve managed to setup the project to use CMake (thanks for the help here), but when I select "import files", no files show up in the right hand panel under the project.

I see a small blip appear (some dialog probably with status or something). I also have the checkbox marked that indicates all files will be imported, not just those with the listed extensions. I'm assuming I should at the minimum see the CMakeLists.txt file which is at the root of my project folders.

Do I need to setup virtual folders?

PLH

Re: How to work with CMake projects

Posted: Wed Apr 06, 2011 8:27 pm
by eranif
You dont need to setup anything, you need to make sure that you *check* the directories you want to import from

Eran