Here's what I get when I run cmake:
... -- Looking for pthread.h -- Looking for pthread.h - found -- Looking for pthread_create in pthreads -- Looking for pthread_create in pthreads - not found -- Looking for pthread_create in pthread -- Looking for pthread_create in pthread - found CMake Error: Error in cmake code at /Users/cgames/Projects/allegro/CMakeLists.txt:361: Unknown CMake command "pkg_check_modules". -- Configuring done
When I build with the XCode project, I get 768 errors, the first of which are:
| 1 | cd /Users/cgames/Projects/allegro |
| 2 | /Developer/Library/PrivateFrameworks/DevToolsCore.framework/Resources/pbxcp -exclude .DS_Store -exclude CVS -exclude .svn -resolve-src-symlinks /Users/cgames/Projects/allegro/include/allegro5/file.h /Users/cgames/Projects/allegro/build/Debug/usr/local/include |
| 3 | pbxcp: file.h: No such file or directory |
| 4 | pbxcp: file.h: No such file or directory |
| 5 | cd /Users/cgames/Projects/allegro |
| 6 | /Developer/Library/PrivateFrameworks/DevToolsCore.framework/Resources/pbxcp -exclude .DS_Store -exclude CVS -exclude .svn -resolve-src-symlinks /Users/cgames/Projects/allegro/include/allegro5/lzss.h /Users/cgames/Projects/allegro/build/Debug/usr/local/include |
| 7 | pbxcp: lzss.h: No such file or directory |
| 8 | pbxcp: lzss.h: No such file or directory |
| 9 | cd /Users/cgames/Projects/allegro |
| 10 | /Developer/usr/bin/gcc-4.0 [truncated] -c /Users/cgames/Projects/allegro/src/allegro.c -o /Users/cgames/Projects/allegro/build/AllegroNew.build/Debug/AllegroNew.build/Objects-normal/ppc/allegro.o |
| 11 | In file included from include/allegro5/internal/alconfig.h:64, |
| 12 | from include/allegro5/base.h:40, |
| 13 | from include/allegro5/allegro.h:26, |
| 14 | from include/allegro5/allegro5.h:4, |
| 15 | from /Users/cgames/Projects/allegro/src/allegro.c:23: |
| 16 | include/allegro5/platform/astdint.h:45:5: error: #error I dunno how to get the definitions of fixed-width integer types on your platform. Please report this to your friendly Allegro developer. |
| 17 | In file included from include/allegro5/internal/alconfig.h:65, |
| 18 | from include/allegro5/base.h:40, |
| 19 | from include/allegro5/allegro.h:26, |
| 20 | from include/allegro5/allegro5.h:4, |
| 21 | from /Users/cgames/Projects/allegro/src/allegro.c:23: |
| 22 | include/allegro5/platform/astdbool.h:29: error: two or more data types in declaration specifiers |
| 23 | include/allegro5/platform/astdbool.h:29: warning: useless type name in empty declaration |
| 24 | In file included from include/allegro5/base.h:40, |
| 25 | from include/allegro5/allegro.h:26, |
| 26 | from include/allegro5/allegro5.h:4, |
| 27 | from /Users/cgames/Projects/allegro/src/allegro.c:23: |
| 28 | include/allegro5/internal/alconfig.h:379:5: error: #error endianess not defined |
| 29 | In file included from /Developer/SDKs/MacOSX10.4u.sdk/usr/include/fcntl.h:23, |
| 30 | from include/allegro5/platform/alosx.h:30, |
| 31 | from include/allegro5/allegro.h:60, |
| 32 | from include/allegro5/allegro5.h:4, |
| 33 | from /Users/cgames/Projects/allegro/src/allegro.c:23: |
| 34 | /Developer/SDKs/MacOSX10.4u.sdk/usr/include/sys/fcntl.h:87: error: conflicting types for 'off_t' |
| 35 | include/allegro5/fshook.h:25: error: previous declaration of 'off_t' was here |
And finally when I try to build with scons, I get similar errors to XCode's.
Any rest for the weary?
looks like that xcode project is stale, file.c and lzss.c have been moved and are no longer part of the allegro core.
AS for the cmake error, I have no idea.
Your version of CMake is probably too old. You need CMake 2.6+.
In can confirm current SVN builds cleanly for me on OS X, so yes, try to upgrade your CMake version.
Don't use the XCode project, it's not maintained. If you want to use XCode, the currently proper way to do this is to generate on from CMake (or SCons?)
Actually it's not working for me at the moment, using a out-of-source build for either Xcode or makefiles. I think it might be picking up an old config file from somewhere.
Regarding the 'AllegroNew.xcodeproj', I suppose it can be deleted, though a 'hand-made' Xcode project is better than the one cmake generates (faster and easier to debug) so it might reappear once the source is more stable.
Pete
It might be worth noting that the newest version of CMake in fink (an OS X package manager), Ubuntu, and Debian is 2.4. This might change when a5 comes to near its release, of course, but compatibility might not be a bad idea.
Listen to me talk: fink, Ubuntu, and Debian all ship with scons 0.97 or 1.0.0, and the scons file only works with 1.1.0
OK it works for me now, it was down to some old config files.
I can recommend macports for all your dependency needs - it definitely has the latest cmake.
Pete