root/README.cmake

Revision 1533df4e58a8be63905b8a6a4a547159d425eaf9, 3.3 kB (checked in by Philip Herron <redbrain@…>, 2 years ago)

more cmake documentation in readme.cmake

  • Property mode set to 100644
Line 
1Crules - CMAKE
2======================
3
4Quick note:
5-------------
6This is something i didn't think i would support at all! I personaly
7really dislike Cmake, since it really is a hardcoded build system!
8
9Its merit is that it can help port software to windows, since to have
10a nice native build on windows its prefered to use MSVC(cl.exe+link.exe),
11and not reverting to CYGWIN. This may also be useful to Mac OSX users
12wanting to use Xcode, which i want to support so we can access mac osx
13frameworks easier. But in the end Cmakes is _only_ useful for Windows
14and MacOSX, but really i support *BSD, *linux, *solaris are my main
15interests in operating systems!
16
17Like it or not Autoconf+Automake are the STANDARD, and they work beautifly
18it wasn't until i saw Drizzle (http://drizzle.org) i really understood
19what a build system should do for developers and with Monty Taylors work
20on Pandora i hope this is open up Autotools for more people. Cmake just
21seems like a layer of abstraction to simply get users into an IDE and i
22dislike IDE's to build software because developers tend to get too focused
23in small areas and forget about deployment very quickly and the software
24becomes a maintenance nightmare!
25
26Autotools seem confusing but they are so extensive and very configurable
27for almost any setup! They really make your code much much much easier
28to maintain for outsiders. Having a configuered build system means,
29NOTHING is hardcoded to any paths the system literly configures your software
30without the developers having to worry that much! This makes software Highly
31portable and clean. Installs work easily, and creating a port very simple!
32Some people get hung up on autoconf but in my opinion the real benifits come from
33automake and libtool.
34
35HOWTO:
36----------------
37
38To build crules with cmake:
39
40** Linux/Unix:
41---------------
42# get the sources git clone... or wget a release etc..
43$ cd crules
44$ cmake .
45$ make
46
47** Mac OSX + XCode
48-------------------
49# install cmake use the shell cd to the toplevel source dir
50# of crules
51$ cmake -G Xcode .
52# open Xcode and file->open-project there should be an xcode
53# project file that xcode can open! Now you can work away in
54# xcode if you prefer
55
56** Windows (7) + MSVC 9.0/nmake
57--------------------------------
58# install cmake + MSVC express edition
59# install gnuwin32 flex + bison
60* http://gnuwin32.sourceforge.net/packages/bison.htm
61* http://gnuwin32.sourceforge.net/packages/flex.htm
62# add the C:\Program Files\gnuwin32\bin to your system PATH
63# test this by opening a command prompt
64$ bison.exe ...
65$ flex.exe
66# if they work your half way
67$ cd to the C:\Program Files\Microsoft Visual Studio 9.0\VC
68# vssetenv.bat to set the envoirment variables for using cl.exe
69# in the shell. Test by exec cl.exe
70$ cd to the crules sources
71---------
72* For nmake simply:
73$ cmake .
74$ nmake
75* for Visual Studio
76$ cmake -G <generator-string> . # see cmake --help for the correct generator string
77$ open the workspace file
78
79
80NOTE (Windows only):
81--------------------
82I need more time to fix up the windows builds using m4.exe on windows doesn't seem to like the
83windows style paths and flex and generating the lexer and parser seems to fail. I have only tested
84this on Windows 7 so far also but there shouldn't be a problem on other win32. If your using cygwin
85it would be prefered to using GCC/mingw and autoconf see README follow those build instructions.
Note: See TracBrowser for help on using the browser.