Hi,

We are using OSG for a cross-platform application that runs on Windows, Linux 
and Mac OS X (10.10 and 10.11).

The application uses OSG 3.4 and Qt 4.8 and we had to apply some patches to get 
this setup working. We maintain a public Git clone, based on the GitHub mirror 
of OpenSceneGraph.

I don't have enough posts on this forum to include a link to the repo. I can 
share it by private messages or some other way, if anybody is interested.

We are using this Git clone internally and we haven't had the time to clean it 
up and submit these changes back upstream (we're not even sure all the changes 
we've made are general enough to be integrated upstream).

Here is a patch that could help with the compilation:

diff --git a/CMakeLists.txt b/CMakeLists.txt
index ce2815b..3e496c1 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -180,7 +180,13 @@ IF(APPLE)
     STRING(REPLACE "." ";" MACOS_VERSION_LIST ${OSG_OSX_SDK_NAME})
     LIST(GET MACOS_VERSION_LIST 0 MACOS_VERSION_MAJOR)
     LIST(GET MACOS_VERSION_LIST 1 MACOS_VERSION_MINOR)
-    LIST(GET MACOS_VERSION_LIST 2 MACOS_VERSION_PATCH)
+
+    LIST(LENGTH MACOS_VERSION_LIST MACOS_VERSION_LIST_LENGTH)
+    IF(MACOS_VERSION_LIST_LENGTH EQUAL "3")
+        LIST(GET MACOS_VERSION_LIST 2 MACOS_VERSION_PATCH)
+    ELSE()
+        SET(MACOS_VERSION_PATCH "0")
+    ENDIF()
 
     SET(OSG_OSX_SDK_NAME "macosx${MACOS_VERSION_MAJOR}.${MACOS_VERSION_MINOR}")



Additionally, here are the CMake configuration flags we are using to compile 
OSG:

cmake \
-DCMAKE_BUILD_TYPE=Release \
-DOPENGL_PROFILE="GLCORE" \
-DCMAKE_EXE_LINKER_FLAGS="-stdlib=libc++" \
-DCMAKE_MODULE_LINKER_FLAGS="-stdlib=libc++" \
-DCMAKE_SHARED_LINKER_FLAGS="-stdlib=libc++" \
-DCMAKE_OSX_ARCHITECTURES="x86_64" \
-DOSG_DEFAULT_IMAGE_PLUGIN_FOR_OSX="imageio" \
-DOSG_WINDOWING_SYSTEM="Cocoa" \
-DDESIRED_QT_VERSION=4 \
-DQT_QMAKE_EXECUTABLE=/usr/bin/qmake \
-DDYNAMIC_OPENSCENEGRAPH=OFF \
-DDYNAMIC_OPENTHREADS=OFF


I hope this helps!

Best regards,
Radu

----------------------
Radu Popescu
Software Engineer
Pix4D SA

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=65477#65477





_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to