Here are a set of patches against the SVN head, to get the CMake files working on the Mac. They provide a complete build, and even produce proper double-clickable .app packages:
Code:
Index: Horde3D/Source/Horde3DEngine/CMakeLists.txt
===================================================================
--- Horde3D/Source/Horde3DEngine/CMakeLists.txt (revision 38)
+++ Horde3D/Source/Horde3DEngine/CMakeLists.txt (working copy)
@@ -76,5 +76,7 @@
endif(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
- target_link_libraries(Horde3D GL)
+ FIND_LIBRARY(OPENGL_LIBRARY OpenGL)
+ FIND_LIBRARY(CORE_FOUNDATION_LIBRARY CoreFoundation)
+ target_link_libraries(Horde3D ${OPENGL_LIBRARY} ${CORE_FOUNDATION_LIBRARY})
endif(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
Code:
Index: Horde3D/Samples/Chicago/CMakeLists.txt
===================================================================
--- Horde3D/Samples/Chicago/CMakeLists.txt (revision 38)
+++ Horde3D/Samples/Chicago/CMakeLists.txt (working copy)
@@ -6,7 +6,7 @@
SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /ENTRY:mainCRTStartup ")
ENDIF(WIN32)
-add_executable(Chicago WIN32
+add_executable(Chicago WIN32 MACOSX_BUNDLE
app.h
crowd.h
app.cpp
Code:
Index: Horde3D/Samples/Knight/CMakeLists.txt
===================================================================
--- Horde3D/Samples/Knight/CMakeLists.txt (revision 38)
+++ Horde3D/Samples/Knight/CMakeLists.txt (working copy)
@@ -6,7 +6,7 @@
SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /ENTRY:mainCRTStartup ")
ENDIF(WIN32)
-add_executable(Knight WIN32
+add_executable(Knight WIN32 MACOSX_BUNDLE
app.h
app.cpp
main.cpp
Code:
Index: Extensions/Terrain/Sample/CMakeLists.txt
===================================================================
--- Extensions/Terrain/Sample/CMakeLists.txt (revision 38)
+++ Extensions/Terrain/Sample/CMakeLists.txt (working copy)
@@ -5,6 +5,12 @@
SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /ENTRY:mainCRTStartup ")
ENDIF(WIN32)
+add_executable(Terrain WIN32 MACOSX_BUNDLE
+ app.h
+ app.cpp
+ main.cpp
+ )
+
if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
FIND_LIBRARY(CARBON_LIBRARY Carbon)
FIND_LIBRARY(APPLICATION_SERVICES_LIBRARY ApplicationServices)
@@ -12,12 +18,5 @@
target_link_libraries(Terrain ${CARBON_LIBRARY} ${APPLICATION_SERVICES_LIBRARY} ${AGL_LIBRARY})
endif(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
-add_executable(Terrain WIN32
- app.h
- app.cpp
- main.cpp
- )
-
-
target_link_libraries(Terrain Horde3D Horde3DUtils glfw)
This is still far from perfect, however, because we are still waiting for CMake to implement several features. Firstly, Horde gets built as a dylib, instead of a packaged framework, and secondly, it doesn't get embedded in the samples, which means that they aren't distributable as is.
Would be great if someone can commit these to SVN, but I wouldn't suggest developing with them yet - the XCode project is far more mature.