Hi Émeric, My guess is that check against build type had to be added to work around problems under Windows with mixing release and debug libraries in the context of WxWidgets. Have a check of the svn logs for the submission that added this workaround, it might give some more insight to why it exists.
Robert. On 25 September 2014 12:19, Émeric MASCHINO <[email protected]> wrote: > 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 >
_______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

