OpenSceneGraph/examples/CMakeLists.txt
Robert Osfield 7f1cb32fc1 From Michael Hartman, "I have gone in and created a CMakeList.txt file for osgviewerMFC application.
Below is the changes made to the included files.  The examples CMakeList.txt file was not included but the code change needed for osgviewerMFC inclusion is listed below.

 

CMakeList.txt:

This is a little different than other example cmakelist.txt files in that I could not use the setup_example macro.   I had to go in and extract out the important parts of the macro and inline them in the CMakeList.txt file so that I could add the WIN32 declaration into the ADD_EXECUTABLE() statement.  In the future the setup_example macro might be modified to support osgviewerMFC but this is special case so you might not want to muddy the water for one example.

 

 

MFC_OSG.h:

This file had some small changes:

From: #include <osgViewer/GraphicsWindowWin32>

To:   #include <osgViewer/api/win32/GraphicsWindowWin32>

 

Also added two new function declarations

      Void PreFrameUpdate(void);

      Void PostFrameUpdate(void);

 

 

MFC_OSG.cpp:

This file changed only in that I am explicitly showing the viewer run loop and added the two new functions in the MFC_OSG.h file.

 

"
2007-05-17 11:04:57 +00:00

133 lines
3.5 KiB
CMake

#######################################################
# this are setting used in SETUP_EXAMPLE macro
#######################################################
SET(TARGET_DEFAULT_PREFIX "example_")
SET(TARGET_DEFAULT_LABEL_PREFIX "Examples")
SET(TARGET_COMMON_LIBRARIES
OpenThreads
osg
osgDB
osgUtil
osgGA
osgViewer
osgText
)
ADD_SUBDIRECTORY(osganimate)
ADD_SUBDIRECTORY(osgautotransform)
ADD_SUBDIRECTORY(osgbillboard)
ADD_SUBDIRECTORY(osgblendequation)
ADD_SUBDIRECTORY(osgcallback)
ADD_SUBDIRECTORY(osgcamera)
ADD_SUBDIRECTORY(osgcatch)
ADD_SUBDIRECTORY(osgclip)
ADD_SUBDIRECTORY(osgcopy)
ADD_SUBDIRECTORY(osgcubemap)
ADD_SUBDIRECTORY(osgdelaunay)
ADD_SUBDIRECTORY(osgdepthpartition)
ADD_SUBDIRECTORY(osgdepthshadow)
ADD_SUBDIRECTORY(osgdistortion)
ADD_SUBDIRECTORY(osgfadetext)
ADD_SUBDIRECTORY(osgforest)
ADD_SUBDIRECTORY(osgfxbrowser)
ADD_SUBDIRECTORY(osggeodemo)
ADD_SUBDIRECTORY(osggeometry)
ADD_SUBDIRECTORY(osghangglide)
ADD_SUBDIRECTORY(osghud)
ADD_SUBDIRECTORY(osgimpostor)
ADD_SUBDIRECTORY(osgintersection)
ADD_SUBDIRECTORY(osgkeyboard)
ADD_SUBDIRECTORY(osgkeyboardmouse)
ADD_SUBDIRECTORY(osglauncher)
ADD_SUBDIRECTORY(osglight)
ADD_SUBDIRECTORY(osglightpoint)
ADD_SUBDIRECTORY(osglogicop)
ADD_SUBDIRECTORY(osglogo)
ADD_SUBDIRECTORY(osgmanipulator)
ADD_SUBDIRECTORY(osgmotionblur)
ADD_SUBDIRECTORY(osgmovie)
ADD_SUBDIRECTORY(osgmultiplecameras)
ADD_SUBDIRECTORY(osgmultitexture)
ADD_SUBDIRECTORY(osgoccluder)
ADD_SUBDIRECTORY(osgpagedlod)
ADD_SUBDIRECTORY(osgparametric)
ADD_SUBDIRECTORY(osgparticle)
ADD_SUBDIRECTORY(osgparticleeffects)
ADD_SUBDIRECTORY(osgphotoalbum)
ADD_SUBDIRECTORY(osgpick)
ADD_SUBDIRECTORY(osgplanets)
ADD_SUBDIRECTORY(osgpoints)
ADD_SUBDIRECTORY(osgpointsprite)
ADD_SUBDIRECTORY(osgprecipitation)
ADD_SUBDIRECTORY(osgprerender)
ADD_SUBDIRECTORY(osgprerendercubemap)
ADD_SUBDIRECTORY(osgreflect)
ADD_SUBDIRECTORY(osgscalarbar)
ADD_SUBDIRECTORY(osgscribe)
ADD_SUBDIRECTORY(osgsequence)
ADD_SUBDIRECTORY(osgshaders)
ADD_SUBDIRECTORY(osgshaderterrain)
ADD_SUBDIRECTORY(osgshadowtexture)
ADD_SUBDIRECTORY(osgshadow)
ADD_SUBDIRECTORY(osgshape)
ADD_SUBDIRECTORY(osgsimple)
ADD_SUBDIRECTORY(osgsimplifier)
ADD_SUBDIRECTORY(osgsimulation)
ADD_SUBDIRECTORY(osgterrain)
ADD_SUBDIRECTORY(osgslice)
ADD_SUBDIRECTORY(osgspacewarp)
ADD_SUBDIRECTORY(osgspheresegment)
ADD_SUBDIRECTORY(osgspotlight)
ADD_SUBDIRECTORY(osgstereoimage)
ADD_SUBDIRECTORY(osgteapot)
ADD_SUBDIRECTORY(osgtessellate)#)
ADD_SUBDIRECTORY(osgtext)
ADD_SUBDIRECTORY(osgtexture1D)
ADD_SUBDIRECTORY(osgtexture2D)
ADD_SUBDIRECTORY(osgtexture3D)
ADD_SUBDIRECTORY(osgtexturerectangle)
ADD_SUBDIRECTORY(osgunittests)
ADD_SUBDIRECTORY(osgvertexprogram)
ADD_SUBDIRECTORY(osgvolume)
ADD_SUBDIRECTORY(osgwindows)
IF (BUILD_OSG_WRAPPERS)
ADD_SUBDIRECTORY(osgintrospection)
ENDIF(BUILD_OSG_WRAPPERS)
IF (GLUT_FOUND)
ADD_SUBDIRECTORY(osgGLUTkeyboardmouse)
ADD_SUBDIRECTORY(osgGLUTsimple)
ADD_SUBDIRECTORY(osgsimpleviewerGLUT)
ENDIF(GLUT_FOUND)
IF (SDL_FOUND)
ADD_SUBDIRECTORY(osgsimpleviewerSDL)
ENDIF(SDL_FOUND)
IF (wxWidgets_FOUND)
ADD_SUBDIRECTORY(osgsimpleviewerWX)
ENDIF(wxWidgets_FOUND)
IF (QT_FOUND)
IF (QT4_FOUND)
ADD_SUBDIRECTORY(osgsimpleviewerQT4)
ELSE(QT4_FOUND)
ADD_SUBDIRECTORY(osgsimpleviewerQT3)
ENDIF(QT4_FOUND)
ENDIF(QT_FOUND)
IF (FLTK_FOUND)
ADD_SUBDIRECTORY(osgsimpleviewerFLTK)
ENDIF(FLTK_FOUND)
IF (WIN32)
ADD_SUBDIRECTORY(osgviewerMFC)
ENDIF(WIN32)
#ADD_SUBDIRECTORY(osgcegui)
#to add subject to find socket#ADD_SUBDIRECTORY(osgcluster)