How to use Cmake in Codelite
Posted: Fri Apr 18, 2014 2:32 pm
Hello,
I understand the benefits in using cmake instead of custom build system and I red the tutorials from cmake to create a cmakeLists.txt and use the gui app to generate project files for different IDEs.
However I don't understand how Cmake is integrated in Codelite. Actually I don't understand how to use it through Codelite.
I downloaded the Cmake RC3.0 and under PlugIns ->Cmake->Settings I set the path to the Cmake exe. In this dialog I can choose the generators but here is the first I don't understand: I thought I can choose here between all generators Cmake can handle, e.g. VS11, C::B, Eclipse..., instead there is just Mingw Makefile to choose.
Then I noticed the Tab Cmake help and reloaded the help files - Impressive help lib and absolute complete, However it would be nice if there would be a Start page with a small tut how to use Cmake through CodeLite.
Next I searched the option how to activate Cmake, actually I don't even know that it have to be activated because I still don't understand what Codelite would do with a activated Cmake.
Under Project ->Settings there is a tab "Cmake" where you can enable Cmake for this project. There are some other options to choose from like the source Path and the Target Path and again the option to choose the generator to override the global one.
So after I enabled it and Build the project I expected that a CmakeLists.txt would be generated and my build would be transferred to the Target path I set in the Settings dialog. Instead an empty Target directory was created, nothing else.
Then I noticed if I right click the project there is a option "Cmake" with the 3 options: "Open CmakeLists.txt" (disabled), "ExportCmakeLists.txt", and "MakeDirty"(also disabled)
I exported the cmakeLists.txt and a file in my directory was created with all the linker settings and the paths I set in the Build Settings.
I think I can use this file from Cmake Gui exe and generate my project for VS for example.
So how CodeLite integrates Cmake. Is it just to generate the CmakeLists file? If so, what are all the settings for? I expected this plugin can call cmake.exe and generate the Project with the generator I choose.
I hope someone would read my long post and can clear some things out for me.
Thanks.
I understand the benefits in using cmake instead of custom build system and I red the tutorials from cmake to create a cmakeLists.txt and use the gui app to generate project files for different IDEs.
However I don't understand how Cmake is integrated in Codelite. Actually I don't understand how to use it through Codelite.
I downloaded the Cmake RC3.0 and under PlugIns ->Cmake->Settings I set the path to the Cmake exe. In this dialog I can choose the generators but here is the first I don't understand: I thought I can choose here between all generators Cmake can handle, e.g. VS11, C::B, Eclipse..., instead there is just Mingw Makefile to choose.
Then I noticed the Tab Cmake help and reloaded the help files - Impressive help lib and absolute complete, However it would be nice if there would be a Start page with a small tut how to use Cmake through CodeLite.
Next I searched the option how to activate Cmake, actually I don't even know that it have to be activated because I still don't understand what Codelite would do with a activated Cmake.
Under Project ->Settings there is a tab "Cmake" where you can enable Cmake for this project. There are some other options to choose from like the source Path and the Target Path and again the option to choose the generator to override the global one.
So after I enabled it and Build the project I expected that a CmakeLists.txt would be generated and my build would be transferred to the Target path I set in the Settings dialog. Instead an empty Target directory was created, nothing else.
Then I noticed if I right click the project there is a option "Cmake" with the 3 options: "Open CmakeLists.txt" (disabled), "ExportCmakeLists.txt", and "MakeDirty"(also disabled)
I exported the cmakeLists.txt and a file in my directory was created with all the linker settings and the paths I set in the Build Settings.
I think I can use this file from Cmake Gui exe and generate my project for VS for example.
So how CodeLite integrates Cmake. Is it just to generate the CmakeLists file? If so, what are all the settings for? I expected this plugin can call cmake.exe and generate the Project with the generator I choose.
I hope someone would read my long post and can clear some things out for me.
Thanks.