<div dir="ltr"><div><div><div>Hi Guys,<br><br></div>I don't have an OSX system to test against, but I've gone ahead and had a bash at implementing what I think might be appropriate. I need it tested by OSX users though before I check it into svn/trunk and OSG-3.4 branch. I've used Radu's suggest change to CMake to avoid checking the 3 entry in the MACOS_VERSION_LIST if it doesn't exist, and changed the OSX version check to use > 10.7 rather than one of 10.8, 10.9 and 10.10. This should provide support for future rev's of OSX till it hit's 11.x.<br><br></div>Could you guys these it out and let me know?<br><br></div><div>Cheers,<br></div>Robert<br><div><div><div><div><div><br>~/OpenSceneGraph$ svn diff CMakeLists.txt <br>Index: CMakeLists.txt<br>===================================================================<br>--- CMakeLists.txt (revision 15172)<br>+++ CMakeLists.txt (working copy)<br>@@ -180,8 +180,14 @@<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 GREATER "2")<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> # Trying to get CMake to generate an XCode IPhone project, current efforts are to get iphoneos sdk 3.1 working<br>@@ -1109,7 +1115,7 @@<br> # FORCE is used because the options are not reflected in the UI otherwise.<br> # Seems like a good place to add version specific compiler flags too.<br> IF(NOT OSG_CONFIG_HAS_BEEN_RUN_BEFORE)<br>- IF(${OSG_OSX_SDK_NAME} STREQUAL "macosx10.8" OR ${OSG_OSX_SDK_NAME} STREQUAL "macosx10.9" OR ${OSG_OSX_SDK_NAME} STREQUAL "macosx10.10")<br>+ IF(${MACOS_VERSION_MAJOR} EQUAL "10" AND ${MACOS_VERSION_MINOR} "7")<br> SET(OSG_DEFAULT_IMAGE_PLUGIN_FOR_OSX "imageio" CACHE STRING "Forced imageio default image plugin for OSX" FORCE)<br> # 64 Bit Works, i386,ppc is not supported any more<br> SET(CMAKE_OSX_ARCHITECTURES "x86_64" CACHE STRING "Build architectures for OSX" FORCE)<br><br></div></div></div></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On 29 October 2015 at 09:38, Robert Osfield <span dir="ltr"><<a href="mailto:robert.osfield@gmail.com" target="_blank">robert.osfield@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><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.<span class="HOEnZb"><font color="#888888"><br><br></font></span></div><span class="HOEnZb"><font color="#888888">Robert.<br></font></span></div><div class="HOEnZb"><div class="h5"><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><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><div><br>
<br>
<br>
<br>
<br>
_______________________________________________<br>
osg-users mailing list<br>
<a href="mailto:osg-users@lists.openscenegraph.org" target="_blank">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>
</div></div></blockquote></div><br></div>