Horde3D

Next-Generation Graphics Engine
It is currently 29.03.2024, 14:40

All times are UTC + 1 hour




Post new topic Reply to topic  [ 17 posts ]  Go to page Previous  1, 2
Author Message
 Post subject: Re: MacOS X
PostPosted: 14.07.2008, 17:48 
Offline

Joined: 22.11.2007, 17:05
Posts: 707
Location: Boston, MA
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.

_________________
Tristam MacDonald - [swiftcoding]


Top
 Profile  
Reply with quote  
 Post subject: Re: MacOS X
PostPosted: 14.07.2008, 20:46 
Offline
Tool Developer

Joined: 13.11.2007, 11:07
Posts: 1150
Location: Germany
Added it! Thanks for the patch!


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 17 posts ]  Go to page Previous  1, 2

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 40 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group