tprk wrote:Hi,
I'm trying to build FlightGear by using CMake on Windows XP. (trying to compose a solution file to be used on Visual Studio 2008 Express Edition). Until now, I composed CMakeLists.txt files of the whole solution (includes many projects such as FlightGear, SimGear, fgadmin, fgviewer etc.) but I couldn't build solution yet.
I mean, I can "configure" successfully on CMake, then open that just created solution file using VS2008, the soution explorer displays all source codes of all projects.
But when i try to build solution, it gives me lots lots of errors like
..\src\FDM\YASim\YASim.cxx(6): Fatal error cannot open include file: "simgear/debug/logstream.hxx" No such a file or directory (this is just an example, not a specific one)
How can i handle this errors?
These are actually fairly trivial errors - you probably simply missed to set up the include paths properly, in this case apparently for simgear.
If you really want get good support, you should be as specific as possible, though.
What are the commands that i should use in CMakeLists.txt files to get rid of these errors?
Any help is appreciated.
Personally, I think the idea to port the autotools based FG build system to cmake is really good.
This will probably make things much easier for building FlightGear on different platforms (Win, Linux, Mac) and for keeping things up to date and in sync - that is exactly the thing that cmake is indeed very good at.
However, the nature of your questions makes me believe that you will either need to do a lot of reading first, or that you should forget about doing that yourself.
All of the questions you have raised could have been answered by reading either the cmake documentation, or by searching the FlightGear mailing lists.
While building FlightGear is certainly far from trivial, porting the whole FG build system to cmake should be ideally done by someone who at least understands cmake reasonably well and who is able to build FG with the conventional tools and systems.
Please don't get me wrong, I still think that the whole idea is great, and that this is the right thing to do for FlightGear in the long run, but given your questions I simply don't think you are currently up to the task of doing this on your own without reading up on cmake and FlightGear build instructions first.
Internally, cmake will still fall back to the platform specific build system - it is merely an abstraction wrapper for different platforms and operating systems.
The errors you have reported are easy to fix, these are typical errors that you get if you fail to set up dependencies properly - regardless of the build system being used. For cmake specifics, you will probably want to refer to the cmake FAQ, manual or mailing lists. And th FlightGear wiki,forums and mailing lists provide very good help for anything FlightGear related.
If you are totally new to cmake and/or FlightGear, this is a VERY ambitious project, and it would be far easier to either start building FlightGear using conventional means, or to learn cmake using a less complex project - FlightGear has a whole number of fairly complex dependencies that need to be satisfied in a specific build order.
If you are really interested in pursuing this, I would suggest to start a corresponding gitorious branch so that others can review, comment and fix things.
Having a wiki page for this effort would also probably be a very good idea, because it is likely that a cmake based build system for FlightGear will be of interest to many other users who might have issues building FG using conventional means.