Hi,

Even though I've correctly set up my wxWidgets environment, the
osgviewerWX example isn't added to my OSG 3.2.1 Visual Studio
solution.

Looking at the examples\CMakeLists.txt file, I've noticed that
osgviewerWX inclusion is guarded against wxWidgets_FOUND (obviously)
but also against CMAKE_BUILD_TYPE (with a further check that it equals
to "Release"). Strangely enough, it appears that CMAKE_BUILD_TYPE
isn't defined when I'm generating the Visual Studio solution/projects
file with cmake-gui (at least for the Release|x64 target), so
osgviewerWX is never included in my OSG 3.2.1 solution.

Is this CMAKE_BUILD_TYPE guard really necessary? Indeed, osgviewerWX
should be able to build both in Debug and Release targes, as permitted
by the CMake's wxWidgets_USE_REL_AND_DBG variable.

I thus propose to simply remove the guard in the
examples\CMakeLists.txt file from:

    IF   (wxWidgets_FOUND AND CMAKE_BUILD_TYPE)
        IF (${CMAKE_BUILD_TYPE} STREQUAL "Release")
            ADD_SUBDIRECTORY(osgviewerWX)
        ENDIF()
    ENDIF()

to:

    IF   (wxWidgets_FOUND)
        ADD_SUBDIRECTORY(osgviewerWX)
    ENDIF()

BTW, this will be consistent with the other osgviewer examples (GLUT,
SDL, FLTK, FOX).

What's your opinion?

Chhers,

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

Reply via email to