[osg-users] [build] Xocde 7.1 with osgDB compiler error

Robert Osfield robert.osfield at gmail.com
Thu Oct 29 02:38:45 PDT 2015


Hi Radu,

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?

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.

Robert.

On 28 October 2015 at 14:07, Radu Popescu <radu.popescu at pix4d.com> wrote:

> 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
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20151029/40ae746d/attachment-0003.htm>


More information about the osg-users mailing list