Project(InventorMentorExamples)

add_oiv_executable(02.1.HelloCone
 02.1.HelloCone.cxx
)
add_oiv_executable(02.2.EngineSpin
 02.2.EngineSpin.cxx
)
add_oiv_executable(02.3.Trackball
 02.3.Trackball.cxx
)
add_oiv_executable(02.4.Examiner
 02.4.Examiner.cxx
)
add_oiv_executable(03.1.Molecule
 03.1.Molecule.cxx
)
add_oiv_executable(03.2.Robot
 03.2.Robot.cxx
)
add_oiv_executable(03.3.Naming
03.3.Naming.cxx 
)

add_oiv_executable(04.1.Cameras
04.1.Cameras.cxx   
)

add_oiv_executable(04.2.Lights
04.2.Lights.cxx
)

add_oiv_executable(05.1.FaceSet
05.1.FaceSet.cxx
)

add_oiv_executable(05.2.IndexedFaceSet
05.2.IndexedFaceSet.cxx
)

add_oiv_executable(05.3.TriangleStripSet
05.3.TriangleStripSet.cxx
)

add_oiv_executable(05.4.QuadMesh
05.4.QuadMesh.cxx
)

add_oiv_executable(05.5.Binding
05.5.Binding.cxx
)

add_oiv_executable(05.6.TransformOrdering
05.6.TransformOrdering.cxx
)

add_oiv_executable(06.1.Text
06.1.Text.cxx 
)

add_oiv_executable(06.2.Simple3DText
06.2.Simple3DText.cxx
)

add_oiv_executable(06.3.Complex3DText
06.3.Complex3DText.cxx
)

add_oiv_executable(07.1.BasicTexture
07.1.BasicTexture.cxx
)

add_oiv_executable(07.2.TextureCoordinates
07.2.TextureCoordinates.cxx
)

add_oiv_executable(07.3.TextureFunction
07.3.TextureFunction.cxx
)
add_oiv_executable(08.1.BSCurve
08.1.BSCurve.cxx
)

add_oiv_executable(08.2.UniCurve
08.2.UniCurve.cxx
)

add_oiv_executable(08.3.BezSurf
08.3.BezSurf.cxx 
)
add_oiv_executable(08.4.TrimSurf
08.4.TrimSurf.cxx
)
add_oiv_executable(09.1.Print
09.1.Print.cxx
)

add_oiv_executable(09.2.Texture
09.2.Texture.cxx
)

add_oiv_executable(09.3.Search
09.3.Search.cxx
)

add_oiv_executable(09.4.PickAction
09.4.PickAction.cxx
)

add_oiv_executable(09.5.GenSph
09.5.GenSph.cxx
)
add_oiv_executable(10.1.addEventCB
10.1.addEventCB.cxx
)

if(NOT APPLE)
add_oiv_executable(10.2.setEventCB
10.2.setEventCB.cxx
)
endif()

if(NOT WIN32 AND NOT APPLE)
  find_package(Motif REQUIRED)
  find_package(X11 REQUIRED)
  link_libraries(${MOTIF_LIBRARIES})
  link_libraries(${X11_Xt_LIB})
  add_oiv_executable(10.3and4.MotifList
  10.3and4.MotifList.cxx)
endif()

add_oiv_executable(10.5.SelectionCB
10.5.SelectionCB.cxx
)

add_oiv_executable(10.6.PickFilterTopLevel
10.6.PickFilterTopLevel.cxx
)

add_oiv_executable(10.7.PickFilterManip
10.7.PickFilterManip.cxx
)

add_oiv_executable(10.8.PickFilterNodeKit
10.8.PickFilterNodeKit.cxx
)

add_oiv_executable(11.1.ReadFile
11.1.ReadFile.cxx
)

add_oiv_executable(11.2.ReadString
11.2.ReadString.cxx 
)

add_oiv_executable(12.1.FieldSensor
12.1.FieldSensor.cxx 
)

add_oiv_executable(12.2.NodeSensor
12.2.NodeSensor.cxx 
)

add_oiv_executable(12.3.AlarmSensor
12.3.AlarmSensor.cxx
)

add_oiv_executable(12.4.TimerSensor
12.4.TimerSensor.cxx
)

add_oiv_executable(13.1.GlobalFlds
13.1.GlobalFlds.cxx
)

add_oiv_executable(13.2.ElapsedTime
13.2.ElapsedTime.cxx
)

add_oiv_executable(13.3.TimeCounter
13.3.TimeCounter.cxx 
)

add_oiv_executable(13.4.Gate
13.4.Gate.cxx
)

add_oiv_executable(13.5.Boolean
13.5.Boolean.cxx
)

add_oiv_executable(13.6.Calculator
13.6.Calculator.cxx
)

add_oiv_executable(13.7.Rotor
13.7.Rotor.cxx
)

add_oiv_executable(13.8.Blinker
13.8.Blinker.cxx
)

add_oiv_executable(14.1.FrolickingWords
14.1.FrolickingWords.cxx
)

add_oiv_executable(14.2.Editors
14.2.Editors.cxx
)

add_oiv_executable(14.3.Balance
14.3.Balance.cxx
)

add_oiv_executable(15.1.ConeRadius
15.1.ConeRadius.cxx
)

add_oiv_executable(15.2.SliderBox
15.2.SliderBox.cxx
)

add_oiv_executable(15.3.AttachManip
15.3.AttachManip.cxx
)

add_oiv_executable(15.4.Customize
15.4.Customize.cxx
)

add_oiv_executable(16.2.Callback
16.2.Callback.cxx
)

add_oiv_executable(16.3.AttachEditor
16.3.AttachEditor.cxx
)

if(NOT WIN32 AND NOT APPLE)
link_libraries(${X11_X11_LIB})
add_oiv_executable(16.4.OneWindow
16.4.OneWindow.cxx
)
endif()

add_oiv_executable(16.5.Examiner
16.5.Examiner.cxx
)

find_library(OPENGL_LIBRARY OpenGL)
find_package(OpenGL REQUIRED)

if(NOT WIN32)
  add_oiv_executable(17.1.ColorIndex 17.1.ColorIndex.cxx)
  target_link_libraries(17.1.ColorIndex ${OPENGL_LIBRARIES} ${OPENGL_glu_LIBRARY})
endif()

add_oiv_executable(17.3.GLFloor 17.3.GLFloor.cxx)
target_link_libraries(17.3.GLFloor ${OPENGL_LIBRARIES} ${OPENGL_glu_LIBRARY})

add_oiv_executable(17.2.GLCallback
17.2.GLCallback.cxx
)
