[CMake] From autotools to cmake for existing project

Carlos Lopez Gonzalez carloslopezgonzalez at yahoo.es
Tue Jan 11 07:40:03 EST 2011


Hi!
I'd like to use cmake on our project (Synfig - http://synfig.org)
Currently it uses autotools and pkconfig to prepare the code to the build and 
install processes. It is a C++/gtkmm application. Currently it builds fine on 
linux, builds with lots of hacking on windows under cgwin and nobody maintain 
the Mac builds.
The application has the following subprojects:

-ETL: it is a template library. 
There is not output binaries nor entry point. It just defines templates. It is 
used by the others subprojects so its headers should be locatable. It has 
external libraries dependences.
-synfig-core: This is the libraries of Synfig. It produces the libraries and a 
command line tool render animations documents. It needs ETL headers. It has 
external libraries dependences.
-synfig-studio: This is the graphical user interface that creates the synfig 
documents and uses the synfig-core libraries to render the animation on on the 
screen or to a file. It needs the synfig libraries and has dependences with 
external libraries. 


My proposed strategy is this: 
On linux start by ETL and port it to install properly on the computer. Continue 
with synfig-core and then synfig-studio. Once it works fine with cmake and linux 
continue with windows and then (hopefully womeone who owns a mac can help) 
continue with mac version.


So the question is: 
which is the best strategy to allow synfig to use cmake? I know that it might be 
a very complex question but I want to know which are the major roadblocks I 
would find. Anybody has previous experience with something similar? Can you 
point to me to any similar case of study?

I forecast the problem of replace pkconfig tools. Should I use pkconfig inside 
cmake or use the .cmake replacements to find the libraries and forget completely 
pkconfig? In the middle of porting, when ETL would be installed, would the 
unported synfig-core and synfig-studio parts (already with autotools) find 
properly the ETL libraries? How to proceed in that case?

Please be patience with me because I'm just start learning. I have the Mastering 
cmake book and have done a whole read once, so I can understand technical 
terminology (or at last can search for it), but I don't have any experience with 
cmake and my experience with autotools is ... well better don't remind me ;)

Thanks!
Carlos



      


More information about the CMake mailing list