<div dir="ltr"><div><div><div>Hi Radu,<br><br></div>What errors do you see with your build when you don't include the IF(MACOS_VERSION_LIST_LENGTH EQUAL "3") block to avoid querying the MACOS_VERSION_PATCH?<br><br></div>With this block I'd be inclined to use GREATER 2, rather than EQUAL 3 just in case the MACOS implementation adds a forth element to the list.<br><br></div>Robert.<br></div><div class="gmail_extra"><br><div class="gmail_quote">On 28 October 2015 at 14:07, Radu Popescu <span dir="ltr"><<a href="mailto:radu.popescu@pix4d.com" target="_blank">radu.popescu@pix4d.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
We are using OSG for a cross-platform application that runs on Windows, Linux and Mac OS X (10.10 and 10.11).<br>
<br>
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.<br>
<br>
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.<br>
<br>
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).<br>
<br>
Here is a patch that could help with the compilation:<br>
<br>
diff --git a/CMakeLists.txt b/CMakeLists.txt<br>
index ce2815b..3e496c1 100644<br>
--- a/CMakeLists.txt<br>
+++ b/CMakeLists.txt<br>
@@ -180,7 +180,13 @@ IF(APPLE)<br>
STRING(REPLACE "." ";" MACOS_VERSION_LIST ${OSG_OSX_SDK_NAME})<br>
LIST(GET MACOS_VERSION_LIST 0 MACOS_VERSION_MAJOR)<br>
LIST(GET MACOS_VERSION_LIST 1 MACOS_VERSION_MINOR)<br>
- LIST(GET MACOS_VERSION_LIST 2 MACOS_VERSION_PATCH)<br>
+<br>
+ LIST(LENGTH MACOS_VERSION_LIST MACOS_VERSION_LIST_LENGTH)<br>
+ IF(MACOS_VERSION_LIST_LENGTH EQUAL "3")<br>
+ LIST(GET MACOS_VERSION_LIST 2 MACOS_VERSION_PATCH)<br>
+ ELSE()<br>
+ SET(MACOS_VERSION_PATCH "0")<br>
+ ENDIF()<br>
<br>
SET(OSG_OSX_SDK_NAME "macosx${MACOS_VERSION_MAJOR}.${MACOS_VERSION_MINOR}")<br>
<br>
<br>
<br>
Additionally, here are the CMake configuration flags we are using to compile OSG:<br>
<br>
cmake \<br>
-DCMAKE_BUILD_TYPE=Release \<br>
-DOPENGL_PROFILE="GLCORE" \<br>
-DCMAKE_EXE_LINKER_FLAGS="-stdlib=libc++" \<br>
-DCMAKE_MODULE_LINKER_FLAGS="-stdlib=libc++" \<br>
-DCMAKE_SHARED_LINKER_FLAGS="-stdlib=libc++" \<br>
-DCMAKE_OSX_ARCHITECTURES="x86_64" \<br>
-DOSG_DEFAULT_IMAGE_PLUGIN_FOR_OSX="imageio" \<br>
-DOSG_WINDOWING_SYSTEM="Cocoa" \<br>
-DDESIRED_QT_VERSION=4 \<br>
-DQT_QMAKE_EXECUTABLE=/usr/bin/qmake \<br>
-DDYNAMIC_OPENSCENEGRAPH=OFF \<br>
-DDYNAMIC_OPENTHREADS=OFF<br>
<br>
<br>
I hope this helps!<br>
<br>
Best regards,<br>
Radu<br>
<br>
----------------------<br>
Radu Popescu<br>
Software Engineer<br>
Pix4D SA<br>
<span class=""><br>
------------------<br>
Read this topic online here:<br>
</span><a href="http://forum.openscenegraph.org/viewtopic.php?p=65477#65477" rel="noreferrer" target="_blank">http://forum.openscenegraph.org/viewtopic.php?p=65477#65477</a><br>
<div class="HOEnZb"><div class="h5"><br>
<br>
<br>
<br>
<br>
_______________________________________________<br>
osg-users mailing list<br>
<a href="mailto:osg-users@lists.openscenegraph.org">osg-users@lists.openscenegraph.org</a><br>
<a href="http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org" rel="noreferrer" target="_blank">http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org</a><br>
</div></div></blockquote></div><br></div>