Re: [hatari-devel] CMake features

[ Thread Index | Date Index | More Archives ]


i use this CMake feature for my work on the Hatari-based "Previous" emulator.
I generate Xcode projects using "cmake -G Xcode".
It works perfectly for me (tested with Xcode 3.1.3 and also Xcode 4.x).
This is really useful!



Am 13.06.2012 um 18:11 schrieb Matthias Arndt:

> Hello together,
> this is no bug report or something, just a generic discussion.
> For quite some time Hatari features CMake as its build system. For as
> long I was a bit unhappy with it and didn't see any benefit.
> BUT: a few days ago CMake again came to attention at my office as we
> discovered it cannot only generate Makefiles out of the CMakeLists.txt
> but also IDE configurations and projects right away.
> I personally always was disappointed that it was a bit problematic to
> click together an IDE project witzh all Hatari sources in.
> CMake now solves this problem nicely. For me it can generate at least an
> environment for the Code::Blocks IDE but it can also do for Eclipse CDT
> (untried by me yet) and ofcourse for non-Unix targets aswell.
> For Windows, it is possible to generate a complete solution and project
> collection for Visual Studio. I didn't try this with Hatari yet but at
> the office for some work stuffs, it did. 
> For Mac OS, CMake can generate XCode projects. i remember there were
> problems in the past that the supplied project was out-of-date. Maybe
> (if it hasn't been done already), CMake can be used to generate a fresh
> Xcode project or even provide only a clickablcallable piece of script so
> Mac developers can easily generate one? 
> Reading the CMake manual helps alot, the trick is to select a different
> "generator" with the -G option (or the CMake GUI under WIndows). Unter
> Unix, this is normally Makefile. I used the following today:
> $ pwd
> /home/marndt/src/hatari/build_codeblocks 
> $ cmake -G "CodeBlocks - Unix Makefiles" ../
> -- The C compiler identification is GNU
> [CMake output omitted]
> -- Configuring done
> -- Generating done
> -- Build files have been written
> to: /home/marndt/src/hatari/build_codeblocks
> and I could build and run Hatari from within Code::Blocks with no
> hazzle. I simply
> opened /home/marndt/src/hatari/build_codeblocks/hatari.cbp with
> Code::Blocks.
> It should work the same with Visual Studio solutions, or other IDE
> projects.
> For Visual Studio there is one point (independant of Hatari)
> If Visual Studio Express (2010) is used and you have a parallel
> installation of the Visual Studio ISOLATED Environment of the same
> version, you well get a problem by CMake. The isolated version is the
> full IDE but brings no compiler. Express is a crippled IDE but brings
> the compiler.
> CMake will by default select the ISOLATED Environment GUI and then
> subsequently fail because (ofcourse) it finds no compilers with this
> one. In that case we found out at the office that it is necessary to set
> CMAKE_MAKE_PROGRAM to MSBuild (found somewhere in the .NET installation)
> and not to the default "devenv" as a -D option to CMake.
> The error shouldn't matter if a full Visual Studio Professional edition
> is in use.
> I hope this was not unnecessary information posted here but I hope it
> will help someone trying to do something to Hatari's code ;)
> As a final word: Thanks for picking CMake for Hatari! This is a
> marvellous tool! :o)
> Regards,
> Matthias
> -- 
> Matthias Arndt <marndt@xxxxxxxxxxxxxx>
> PGP-Key:
> Jabber: simonsunnyboy@xxxxxxxxxxxxxxxx

Mail converted by MHonArc 2.6.19+