[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
On 2008-02-19, Peter Wang <novalazy@xxxxxxxxxx> wrote:
> On 2008-02-18, Peter Hull <peterhull90@xxxxxxxxxx> wrote:
> > I would like to get CMake working if someone can help me with it.
>
> If you didn't know, pretty much everything is in the top-level
> CMakeFiles.txt file. I will try to answer any questions about it.
>
> Hmm, I also have remote access to a Mac. I could probably test a CMake
> build on that using the makefile generator.
I hope this is enough to get you started. You probably need to manually
deselect WANT_X11. The build breaks at qtmidi.m.
Peter
Index: CMakeLists.txt
===================================================================
--- CMakeLists.txt (revision 10011)
+++ CMakeLists.txt (working copy)
@@ -133,14 +133,20 @@
set(CMAKE_INSTALL_PREFIX ${MINGDIR})
endif(MINGW)
-if(UNIX)
- set(ALLEGRO_UNIX 1)
-endif(UNIX)
-
if(COMPILER_MSVC)
set(ALLEGRO_MSVC 1)
endif(COMPILER_MSVC)
+if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
+ set(MACOSX 1)
+ set(ALLEGRO_MACOSX 1)
+else(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
+ # Note: UNIX includes MacOS X, but ALLEGRO_UNIX doesn't.
+ if(UNIX)
+ set(ALLEGRO_UNIX 1)
+ endif(UNIX)
+endif(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
+
# Begin tests.
include(TestBigEndian)
@@ -592,6 +598,10 @@
endif(SUPPORT_D3D)
endif(WIN32)
+if(MACOSX)
+ list(APPEND LIBRARY_SOURCES ${ALLEGRO_SRC_MACOSX_FILES})
+endif(MACOSX)
+
#-----------------------------------------------------------------------------#
if(STRICT_WARN)
Index: include/allegro5/platform/alplatf.h.cmake
===================================================================
--- include/allegro5/platform/alplatf.h.cmake (revision 10011)
+++ include/allegro5/platform/alplatf.h.cmake (working copy)
@@ -2,6 +2,8 @@
#cmakedefine ALLEGRO_MINGW32
#cmakedefine ALLEGRO_UNIX
#cmakedefine ALLEGRO_MSVC
+#cmakedefine ALLEGRO_MACOSX
+
#cmakedefine ALLEGRO_D3D
#cmakedefine ALLEGRO_NO_ASM