Browse Source

CMake: Skip optional subdirectories in a cleaner way

Instead of wrapping the whole subdirectory's CMakeLists in
a gigantic if block, we use if(NOT HAVE_FOO) + return()

This is tidier since it keeps the indentation generally consistent
across all CMakeLists files.
Sam Edwards 7 years ago
parent
commit
1fcb8a2748

+ 22 - 20
direct/src/distributed/CMakeLists.txt

@@ -1,23 +1,25 @@
-if(HAVE_PYTHON)
-  set(P3DISTRIBUTED_HEADERS
-      config_distributed.h
-      cConnectionRepository.I
-      cConnectionRepository.h
-      cDistributedSmoothNodeBase.I
-      cDistributedSmoothNodeBase.h)
+if(NOT HAVE_PYTHON)
+  return()
+endif()
 
 
-  set(P3DISTRIBUTED_SOURCES
-      config_distributed.cxx
-      cConnectionRepository.cxx
-      cDistributedSmoothNodeBase.cxx)
+set(P3DISTRIBUTED_HEADERS
+    config_distributed.h
+    cConnectionRepository.I
+    cConnectionRepository.h
+    cDistributedSmoothNodeBase.I
+    cDistributedSmoothNodeBase.h)
 
 
-  add_component_library(p3distributed SYMBOL BUILDING_DIRECT_DISTRIBUTED
-    ${P3DISTRIBUTED_HEADERS} ${P3DISTRIBUTED_SOURCES})
-  target_compile_definitions(p3distributed PUBLIC WITHIN_PANDA)
-  target_link_libraries(p3distributed p3directbase p3dcparser panda)
-  target_use_packages(p3distributed PYTHON)
-  target_interrogate(p3distributed ALL)
+set(P3DISTRIBUTED_SOURCES
+    config_distributed.cxx
+    cConnectionRepository.cxx
+    cDistributedSmoothNodeBase.cxx)
 
 
-  install(TARGETS p3distributed DESTINATION lib)
-  install(FILES ${P3DISTRIBUTED_HEADERS} DESTINATION include/panda3d)
-endif()
+add_component_library(p3distributed SYMBOL BUILDING_DIRECT_DISTRIBUTED
+  ${P3DISTRIBUTED_HEADERS} ${P3DISTRIBUTED_SOURCES})
+target_compile_definitions(p3distributed PUBLIC WITHIN_PANDA)
+target_link_libraries(p3distributed p3directbase p3dcparser panda)
+target_use_packages(p3distributed PYTHON)
+target_interrogate(p3distributed ALL)
+
+install(TARGETS p3distributed DESTINATION lib)
+install(FILES ${P3DISTRIBUTED_HEADERS} DESTINATION include/panda3d)

+ 8 - 6
panda/metalibs/pandaegg/CMakeLists.txt

@@ -1,8 +1,10 @@
-if(HAVE_EGG)
-  set(PANDAEGG_LINK_TARGETS p3egg p3egg2pg)
+if(NOT HAVE_EGG)
+  return()
+endif()
 
 
-  add_metalib(pandaegg pandaegg.cxx COMPONENTS ${PANDAEGG_LINK_TARGETS})
-  target_link_libraries(pandaegg panda)
+set(PANDAEGG_LINK_TARGETS p3egg p3egg2pg)
 
 
-  install(TARGETS pandaegg DESTINATION lib)
-endif()
+add_metalib(pandaegg pandaegg.cxx COMPONENTS ${PANDAEGG_LINK_TARGETS})
+target_link_libraries(pandaegg panda)
+
+install(TARGETS pandaegg DESTINATION lib)

+ 27 - 25
panda/src/audio/CMakeLists.txt

@@ -1,28 +1,30 @@
-if(HAVE_AUDIO)
-  set(P3AUDIO_HEADERS
-      config_audio.h
-      filterProperties.h filterProperties.I
-      audioLoadRequest.h audioLoadRequest.I
-      audioManager.h audioManager.I
-      audioSound.h audioSound.I
-      nullAudioManager.h
-      nullAudioSound.h)
+if(NOT HAVE_AUDIO)
+  return()
+endif()
 
 
-  set(P3AUDIO_SOURCES
-      config_audio.cxx
-      filterProperties.cxx
-      audioLoadRequest.cxx
-      audioManager.cxx
-      audioSound.cxx
-      nullAudioManager.cxx
-      nullAudioSound.cxx)
+set(P3AUDIO_HEADERS
+    config_audio.h
+    filterProperties.h filterProperties.I
+    audioLoadRequest.h audioLoadRequest.I
+    audioManager.h audioManager.I
+    audioSound.h audioSound.I
+    nullAudioManager.h
+    nullAudioSound.h)
 
 
-  composite_sources(p3audio P3AUDIO_SOURCES)
-  add_component_library(p3audio SYMBOL BUILDING_PANDA_AUDIO
-    ${P3AUDIO_HEADERS} ${P3AUDIO_SOURCES})
-  target_link_libraries(p3audio p3putil p3event p3movies p3linmath)
-  target_interrogate(p3audio ALL)
+set(P3AUDIO_SOURCES
+    config_audio.cxx
+    filterProperties.cxx
+    audioLoadRequest.cxx
+    audioManager.cxx
+    audioSound.cxx
+    nullAudioManager.cxx
+    nullAudioSound.cxx)
 
 
-  install(TARGETS p3audio DESTINATION lib)
-  install(FILES ${P3AUDIO_HEADERS} DESTINATION include/panda3d)
-endif()
+composite_sources(p3audio P3AUDIO_SOURCES)
+add_component_library(p3audio SYMBOL BUILDING_PANDA_AUDIO
+  ${P3AUDIO_HEADERS} ${P3AUDIO_SOURCES})
+target_link_libraries(p3audio p3putil p3event p3movies p3linmath)
+target_interrogate(p3audio ALL)
+
+install(TARGETS p3audio DESTINATION lib)
+install(FILES ${P3AUDIO_HEADERS} DESTINATION include/panda3d)

+ 56 - 58
panda/src/audiotraits/CMakeLists.txt

@@ -1,72 +1,70 @@
-if(HAVE_AUDIO)
-
-  if(HAVE_RAD_MSS)
-    set(P3MILES_HEADERS
-        config_milesAudio.h
-        milesAudioManager.h
-        milesAudioSound.I milesAudioSound.h
-        milesAudioSample.I milesAudioSample.h
-        milesAudioSequence.I milesAudioSequence.h
-        milesAudioStream.I milesAudioStream.h
-        globalMilesManager.I globalMilesManager.h)
-
-    set(P3MILES_SOURCES 
-        config_milesAudio.cxx milesAudioManager.cxx milesAudioSound.cxx
-        milesAudioStream.cxx globalMilesManager.cxx milesAudioSample.cxx
-        milesAudioSequence.cxx)
+if(NOT HAVE_AUDIO)
+  return()
+elseif(NOT HAVE_RAD_MSS AND NOT HAVE_FMODEX AND NOT HAVE_OPENAL)
+  message(SEND_ERROR
+    "You must have an audio backend for audio support! Turn off HAVE_AUDIO to ignore this.")
+endif()
 
 
-    composite_sources(p3miles_audio P3MILES_SOURCES)
-    include_directories(${MILES_INCLUDE_DIR})
-    add_library(p3miles_audio ${P3MILES_HEADERS} ${P3MILES_SOURCES})
-    set_target_properties(p3miles_audio PROPERTIES DEFINE_SYMBOL BUILDING_MILES_AUDIO)
-    target_link_libraries(p3miles_audio panda)
-    target_use_packages(p3miles_audio MILES)
+if(HAVE_RAD_MSS)
+  set(P3MILES_HEADERS
+      config_milesAudio.h
+      milesAudioManager.h
+      milesAudioSound.I milesAudioSound.h
+      milesAudioSample.I milesAudioSample.h
+      milesAudioSequence.I milesAudioSequence.h
+      milesAudioStream.I milesAudioStream.h
+      globalMilesManager.I globalMilesManager.h)
 
 
-    install(TARGETS p3miles_audio DESTINATION lib)
-  endif()
+  set(P3MILES_SOURCES
+      config_milesAudio.cxx milesAudioManager.cxx milesAudioSound.cxx
+      milesAudioStream.cxx globalMilesManager.cxx milesAudioSample.cxx
+      milesAudioSequence.cxx)
 
 
-  if(HAVE_FMODEX)
-    set(P3FMOD_HEADERS
-        config_fmodAudio.h
-        fmodAudioManager.h
-        fmodAudioSound.I fmodAudioSound.h)
+  composite_sources(p3miles_audio P3MILES_SOURCES)
+  include_directories(${MILES_INCLUDE_DIR})
+  add_library(p3miles_audio ${P3MILES_HEADERS} ${P3MILES_SOURCES})
+  set_target_properties(p3miles_audio PROPERTIES DEFINE_SYMBOL BUILDING_MILES_AUDIO)
+  target_link_libraries(p3miles_audio panda)
+  target_use_packages(p3miles_audio MILES)
 
 
-    set(P3FMOD_SOURCES      
-        config_fmodAudio.cxx fmodAudioManager.cxx fmodAudioSound.cxx)
+  install(TARGETS p3miles_audio DESTINATION lib)
+endif()
 
 
-    composite_sources(p3fmod_audio P3FMOD_SOURCES)
-    include_directories(${FMODEX_INCLUDE_DIR})
-    add_library(p3fmod_audio ${P3FMOD_HEADERS} ${P3FMOD_SOURCES})
-    set_target_properties(p3fmod_audio PROPERTIES DEFINE_SYMBOL BUILDING_FMOD_AUDIO)
-    target_link_libraries(p3fmod_audio panda)
-    target_use_packages(p3fmod_audio FMODEX)
+if(HAVE_FMODEX)
+  set(P3FMOD_HEADERS
+      config_fmodAudio.h
+      fmodAudioManager.h
+      fmodAudioSound.I fmodAudioSound.h)
 
 
-    install(TARGETS p3fmod_audio DESTINATION lib)
-  endif()
+  set(P3FMOD_SOURCES
+      config_fmodAudio.cxx fmodAudioManager.cxx fmodAudioSound.cxx)
 
 
-  if(HAVE_OPENAL)
-    set(P3OPENAL_HEADERS
-        config_openalAudio.h
-        openalAudioManager.h
-        openalAudioSound.I openalAudioSound.h)
+  composite_sources(p3fmod_audio P3FMOD_SOURCES)
+  include_directories(${FMODEX_INCLUDE_DIR})
+  add_library(p3fmod_audio ${P3FMOD_HEADERS} ${P3FMOD_SOURCES})
+  set_target_properties(p3fmod_audio PROPERTIES DEFINE_SYMBOL BUILDING_FMOD_AUDIO)
+  target_link_libraries(p3fmod_audio panda)
+  target_use_packages(p3fmod_audio FMODEX)
 
 
-    set(P3OPENAL_SOURCES
-        config_openalAudio.cxx openalAudioManager.cxx openalAudioSound.cxx)
+  install(TARGETS p3fmod_audio DESTINATION lib)
+endif()
 
 
+if(HAVE_OPENAL)
+  set(P3OPENAL_HEADERS
+      config_openalAudio.h
+      openalAudioManager.h
+      openalAudioSound.I openalAudioSound.h)
 
 
-    composite_sources(p3openal_audio P3OPENAL_SOURCES)
-    include_directories(${OPENAL_INCLUDE_DIR})
-    add_library(p3openal_audio ${P3OPENAL_HEADERS} ${P3OPENAL_SOURCES})
-    set_target_properties(p3openal_audio PROPERTIES DEFINE_SYMBOL BUILDING_OPENAL_AUDIO)
-    target_link_libraries(p3openal_audio panda)
-    target_use_packages(p3openal_audio OPENAL)
+  set(P3OPENAL_SOURCES
+      config_openalAudio.cxx openalAudioManager.cxx openalAudioSound.cxx)
 
 
-    install(TARGETS p3openal_audio DESTINATION lib)
-  endif()
 
 
-  if(NOT HAVE_RAD_MSS AND NOT HAVE_FMODEX AND NOT HAVE_OPENAL)
-    message(SEND_ERROR
-      "You must have an audio backend for audio support! Turn off HAVE_AUDIO to ignore this.")
-  endif()
+  composite_sources(p3openal_audio P3OPENAL_SOURCES)
+  include_directories(${OPENAL_INCLUDE_DIR})
+  add_library(p3openal_audio ${P3OPENAL_HEADERS} ${P3OPENAL_SOURCES})
+  set_target_properties(p3openal_audio PROPERTIES DEFINE_SYMBOL BUILDING_OPENAL_AUDIO)
+  target_link_libraries(p3openal_audio panda)
+  target_use_packages(p3openal_audio OPENAL)
 
 
+  install(TARGETS p3openal_audio DESTINATION lib)
 endif()
 endif()

+ 31 - 29
panda/src/cocoadisplay/CMakeLists.txt

@@ -1,33 +1,35 @@
-if(APPLE AND HAVE_GL AND HAVE_COCOA)
-  set(P3COCOADISPLAY_HEADERS
-      config_cocoadisplay.h
-      cocoaGraphicsPipe.h cocoaGraphicsPipe.I
-      cocoaGraphicsWindow.h cocoaGraphicsWindow.I
-      cocoaGraphicsStateGuardian.h cocoaGraphicsStateGuardian.I
-      cocoaPandaApp.h cocoaPandaView.h cocoaPandaWindowDelegate.h)
+if(NOT APPLE OR NOT HAVE_GL OR NOT HAVE_COCOA)
+  return()
+endif()
 
 
-  set(P3COCOADISPLAY_SOURCES
-      config_cocoadisplay.mm
-      cocoaGraphicsBuffer.mm
-      cocoaGraphicsPipe.mm
-      cocoaGraphicsStateGuardian.mm
-      cocoaGraphicsWindow.mm
-      cocoaPandaApp.mm
-      cocoaPandaView.mm
-      cocoaPandaWindow.mm
-      cocoaPandaWindowDelegate.mm)
+set(P3COCOADISPLAY_HEADERS
+    config_cocoadisplay.h
+    cocoaGraphicsPipe.h cocoaGraphicsPipe.I
+    cocoaGraphicsWindow.h cocoaGraphicsWindow.I
+    cocoaGraphicsStateGuardian.h cocoaGraphicsStateGuardian.I
+    cocoaPandaApp.h cocoaPandaView.h cocoaPandaWindowDelegate.h)
 
 
-  #composite_sources(p3cocoadisplay P3COCOADISPLAY_SOURCES)
-  add_library(p3cocoadisplay ${P3COCOADISPLAY_HEADERS} ${P3COCOADISPLAY_SOURCES})
-  set_target_properties(p3cocoadisplay PROPERTIES DEFINE_SYMBOL BUILDING_PANDAGL)
-  target_link_libraries(p3cocoadisplay p3display p3putil p3glgsg)
+set(P3COCOADISPLAY_SOURCES
+    config_cocoadisplay.mm
+    cocoaGraphicsBuffer.mm
+    cocoaGraphicsPipe.mm
+    cocoaGraphicsStateGuardian.mm
+    cocoaGraphicsWindow.mm
+    cocoaPandaApp.mm
+    cocoaPandaView.mm
+    cocoaPandaWindow.mm
+    cocoaPandaWindowDelegate.mm)
 
 
-  # Frameworks:
-  find_library(APPLICATIONSERVICES_LIBRARY ApplicationServices)
-  find_library(APPKIT_LIBRARY AppKit)
-  find_library(CARBON_LIBRARY Carbon)
-  target_link_libraries(p3cocoadisplay
-    ${APPLICATIONSERVICES_LIBRARY} ${APPKIT_LIBRARY} ${CARBON_LIBRARY})
+#composite_sources(p3cocoadisplay P3COCOADISPLAY_SOURCES)
+add_library(p3cocoadisplay ${P3COCOADISPLAY_HEADERS} ${P3COCOADISPLAY_SOURCES})
+set_target_properties(p3cocoadisplay PROPERTIES DEFINE_SYMBOL BUILDING_PANDAGL)
+target_link_libraries(p3cocoadisplay p3display p3putil p3glgsg)
 
 
-  install(TARGETS p3cocoadisplay DESTINATION lib)
-endif()
+# Frameworks:
+find_library(APPLICATIONSERVICES_LIBRARY ApplicationServices)
+find_library(APPKIT_LIBRARY AppKit)
+find_library(CARBON_LIBRARY Carbon)
+target_link_libraries(p3cocoadisplay
+  ${APPLICATIONSERVICES_LIBRARY} ${APPKIT_LIBRARY} ${CARBON_LIBRARY})
+
+install(TARGETS p3cocoadisplay DESTINATION lib)

+ 105 - 103
panda/src/egg/CMakeLists.txt

@@ -1,109 +1,111 @@
-if(HAVE_EGG)
-  add_bison_target(parser.cxx parser.yxx DEFINES parser.h PREFIX eggyy)
-  add_flex_target(lexer.cxx lexer.lxx CASE_INSENSITIVE PREFIX eggyy)
+if(NOT HAVE_EGG)
+  return()
+endif()
 
 
-  set(P3EGG_HEADERS
-    config_egg.h eggAnimData.I eggAnimData.h
-    eggAnimPreload.I eggAnimPreload.h
-    eggAttributes.I
-    eggAttributes.h eggBin.h eggBinMaker.h eggComment.I
-    eggComment.h
-    eggCompositePrimitive.I eggCompositePrimitive.h
-    eggCoordinateSystem.I eggCoordinateSystem.h
-    eggCurve.I eggCurve.h eggData.I eggData.h
-    eggExternalReference.I eggExternalReference.h
-    eggFilenameNode.I eggFilenameNode.h eggGroup.I eggGroup.h
-    eggGroupNode.I eggGroupNode.h eggGroupUniquifier.h
-    eggLine.I eggLine.h
-    eggMaterial.I eggMaterial.h eggMaterialCollection.I
-    eggMaterialCollection.h
-    eggMesher.h eggMesher.I
-    eggMesherEdge.h eggMesherEdge.I
-    eggMesherFanMaker.h eggMesherFanMaker.I
-    eggMesherStrip.h eggMesherStrip.I
-    eggMiscFuncs.I eggMiscFuncs.h
-    eggMorph.I eggMorph.h eggMorphList.I eggMorphList.h
-    eggNamedObject.I eggNamedObject.h eggNameUniquifier.h
-    eggNode.I eggNode.h eggNurbsCurve.I eggNurbsCurve.h
-    eggNurbsSurface.I eggNurbsSurface.h eggObject.I eggObject.h
-    eggParameters.h
-    eggPatch.I eggPatch.h
-    eggPoint.I eggPoint.h eggPolygon.I
-    eggPolygon.h eggPolysetMaker.h eggPoolUniquifier.h
-    eggPrimitive.I eggPrimitive.h
-    eggRenderMode.I eggRenderMode.h
-    eggSAnimData.I eggSAnimData.h eggSurface.I eggSurface.h
-    eggSwitchCondition.h eggTable.I eggTable.h eggTexture.I
-    eggTexture.h eggTextureCollection.I eggTextureCollection.h
-    eggTriangleFan.I eggTriangleFan.h
-    eggTriangleStrip.I eggTriangleStrip.h
-    eggTransform.I eggTransform.h
-    eggUserData.I eggUserData.h
-    eggUtilities.I eggUtilities.h
-    eggVertex.I eggVertex.h
-    eggVertexAux.I eggVertexAux.h
-    eggVertexPool.I eggVertexPool.h
-    eggVertexUV.I eggVertexUV.h
-    eggXfmAnimData.I
-    eggXfmAnimData.h eggXfmSAnim.I eggXfmSAnim.h parserDefs.h
-    parser.yxx lexerDefs.h lexer.lxx pt_EggMaterial.h
-    vector_PT_EggMaterial.h pt_EggTexture.h
-    vector_PT_EggTexture.h pt_EggVertex.h vector_PT_EggVertex.h
-  )
+add_bison_target(parser.cxx parser.yxx DEFINES parser.h PREFIX eggyy)
+add_flex_target(lexer.cxx lexer.lxx CASE_INSENSITIVE PREFIX eggyy)
 
 
-  set(P3EGG_SOURCES
-    config_egg.cxx eggAnimData.cxx
-    eggAnimPreload.cxx
-    eggAttributes.cxx eggBin.cxx
-    eggBinMaker.cxx eggComment.cxx
-    eggCompositePrimitive.cxx
-    eggCoordinateSystem.cxx
-    eggCurve.cxx eggData.cxx eggExternalReference.cxx
-    eggFilenameNode.cxx eggGroup.cxx eggGroupNode.cxx
-    eggGroupUniquifier.cxx eggLine.cxx eggMaterial.cxx
-    eggMaterialCollection.cxx
-    eggMesher.cxx
-    eggMesherEdge.cxx
-    eggMesherFanMaker.cxx
-    eggMesherStrip.cxx
-    eggMiscFuncs.cxx eggMorphList.cxx
-    eggNamedObject.cxx eggNameUniquifier.cxx eggNode.cxx
-    eggNurbsCurve.cxx eggNurbsSurface.cxx eggObject.cxx
-    eggParameters.cxx
-    eggPatch.cxx
-    eggPoint.cxx eggPolygon.cxx eggPolysetMaker.cxx
-    eggPoolUniquifier.cxx eggPrimitive.cxx eggRenderMode.cxx
-    eggSAnimData.cxx eggSurface.cxx eggSwitchCondition.cxx
-    eggTable.cxx eggTexture.cxx eggTextureCollection.cxx
-    eggTransform.cxx
-    eggTriangleFan.cxx
-    eggTriangleStrip.cxx
-    eggUserData.cxx
-    eggUtilities.cxx eggVertex.cxx
-    eggVertexAux.cxx
-    eggVertexPool.cxx eggVertexUV.cxx
-    eggXfmAnimData.cxx eggXfmSAnim.cxx pt_EggMaterial.cxx
-    vector_PT_EggMaterial.cxx pt_EggTexture.cxx
-    vector_PT_EggTexture.cxx pt_EggVertex.cxx
-    vector_PT_EggVertex.cxx
-  )
+set(P3EGG_HEADERS
+  config_egg.h eggAnimData.I eggAnimData.h
+  eggAnimPreload.I eggAnimPreload.h
+  eggAttributes.I
+  eggAttributes.h eggBin.h eggBinMaker.h eggComment.I
+  eggComment.h
+  eggCompositePrimitive.I eggCompositePrimitive.h
+  eggCoordinateSystem.I eggCoordinateSystem.h
+  eggCurve.I eggCurve.h eggData.I eggData.h
+  eggExternalReference.I eggExternalReference.h
+  eggFilenameNode.I eggFilenameNode.h eggGroup.I eggGroup.h
+  eggGroupNode.I eggGroupNode.h eggGroupUniquifier.h
+  eggLine.I eggLine.h
+  eggMaterial.I eggMaterial.h eggMaterialCollection.I
+  eggMaterialCollection.h
+  eggMesher.h eggMesher.I
+  eggMesherEdge.h eggMesherEdge.I
+  eggMesherFanMaker.h eggMesherFanMaker.I
+  eggMesherStrip.h eggMesherStrip.I
+  eggMiscFuncs.I eggMiscFuncs.h
+  eggMorph.I eggMorph.h eggMorphList.I eggMorphList.h
+  eggNamedObject.I eggNamedObject.h eggNameUniquifier.h
+  eggNode.I eggNode.h eggNurbsCurve.I eggNurbsCurve.h
+  eggNurbsSurface.I eggNurbsSurface.h eggObject.I eggObject.h
+  eggParameters.h
+  eggPatch.I eggPatch.h
+  eggPoint.I eggPoint.h eggPolygon.I
+  eggPolygon.h eggPolysetMaker.h eggPoolUniquifier.h
+  eggPrimitive.I eggPrimitive.h
+  eggRenderMode.I eggRenderMode.h
+  eggSAnimData.I eggSAnimData.h eggSurface.I eggSurface.h
+  eggSwitchCondition.h eggTable.I eggTable.h eggTexture.I
+  eggTexture.h eggTextureCollection.I eggTextureCollection.h
+  eggTriangleFan.I eggTriangleFan.h
+  eggTriangleStrip.I eggTriangleStrip.h
+  eggTransform.I eggTransform.h
+  eggUserData.I eggUserData.h
+  eggUtilities.I eggUtilities.h
+  eggVertex.I eggVertex.h
+  eggVertexAux.I eggVertexAux.h
+  eggVertexPool.I eggVertexPool.h
+  eggVertexUV.I eggVertexUV.h
+  eggXfmAnimData.I
+  eggXfmAnimData.h eggXfmSAnim.I eggXfmSAnim.h parserDefs.h
+  parser.yxx lexerDefs.h lexer.lxx pt_EggMaterial.h
+  vector_PT_EggMaterial.h pt_EggTexture.h
+  vector_PT_EggTexture.h pt_EggVertex.h vector_PT_EggVertex.h
+)
 
 
-  set(P3EGG_IGATEEXT
-    eggGroupNode_ext.cxx
-    eggGroupNode_ext.h
-  )
+set(P3EGG_SOURCES
+  config_egg.cxx eggAnimData.cxx
+  eggAnimPreload.cxx
+  eggAttributes.cxx eggBin.cxx
+  eggBinMaker.cxx eggComment.cxx
+  eggCompositePrimitive.cxx
+  eggCoordinateSystem.cxx
+  eggCurve.cxx eggData.cxx eggExternalReference.cxx
+  eggFilenameNode.cxx eggGroup.cxx eggGroupNode.cxx
+  eggGroupUniquifier.cxx eggLine.cxx eggMaterial.cxx
+  eggMaterialCollection.cxx
+  eggMesher.cxx
+  eggMesherEdge.cxx
+  eggMesherFanMaker.cxx
+  eggMesherStrip.cxx
+  eggMiscFuncs.cxx eggMorphList.cxx
+  eggNamedObject.cxx eggNameUniquifier.cxx eggNode.cxx
+  eggNurbsCurve.cxx eggNurbsSurface.cxx eggObject.cxx
+  eggParameters.cxx
+  eggPatch.cxx
+  eggPoint.cxx eggPolygon.cxx eggPolysetMaker.cxx
+  eggPoolUniquifier.cxx eggPrimitive.cxx eggRenderMode.cxx
+  eggSAnimData.cxx eggSurface.cxx eggSwitchCondition.cxx
+  eggTable.cxx eggTexture.cxx eggTextureCollection.cxx
+  eggTransform.cxx
+  eggTriangleFan.cxx
+  eggTriangleStrip.cxx
+  eggUserData.cxx
+  eggUtilities.cxx eggVertex.cxx
+  eggVertexAux.cxx
+  eggVertexPool.cxx eggVertexUV.cxx
+  eggXfmAnimData.cxx eggXfmSAnim.cxx pt_EggMaterial.cxx
+  vector_PT_EggMaterial.cxx pt_EggTexture.cxx
+  vector_PT_EggTexture.cxx pt_EggVertex.cxx
+  vector_PT_EggVertex.cxx
+)
 
 
-  # These cannot be interrogated, and are excluded from the composites.
-  set(P3EGG_PARSER_SOURCES
-    parser.cxx
-    lexer.cxx)
+set(P3EGG_IGATEEXT
+  eggGroupNode_ext.cxx
+  eggGroupNode_ext.h
+)
 
 
-  composite_sources(p3egg P3EGG_SOURCES)
-  add_component_library(p3egg SYMBOL BUILDING_PANDAEGG
-    ${P3EGG_HEADERS} ${P3EGG_SOURCES} ${P3EGG_PARSER_SOURCES})
-  target_link_libraries(p3egg panda)
-  target_interrogate(p3egg ${P3EGG_HEADERS} ${P3EGG_SOURCES} EXTENSIONS ${P3EGG_IGATEEXT})
+# These cannot be interrogated, and are excluded from the composites.
+set(P3EGG_PARSER_SOURCES
+  parser.cxx
+  lexer.cxx)
 
 
-  install(TARGETS p3egg DESTINATION lib)
-  install(FILES ${P3EGG_HEADERS} DESTINATION include/panda3d)
-endif()
+composite_sources(p3egg P3EGG_SOURCES)
+add_component_library(p3egg SYMBOL BUILDING_PANDAEGG
+  ${P3EGG_HEADERS} ${P3EGG_SOURCES} ${P3EGG_PARSER_SOURCES})
+target_link_libraries(p3egg panda)
+target_interrogate(p3egg ${P3EGG_HEADERS} ${P3EGG_SOURCES} EXTENSIONS ${P3EGG_IGATEEXT})
+
+install(TARGETS p3egg DESTINATION lib)
+install(FILES ${P3EGG_HEADERS} DESTINATION include/panda3d)

+ 39 - 37
panda/src/egg2pg/CMakeLists.txt

@@ -1,40 +1,42 @@
-if(HAVE_EGG)
-  set(P3EGG2PG_HEADERS
-    animBundleMaker.h
-    characterMaker.h
-    config_egg2pg.h
-    deferredNodeProperty.h
-    eggBinner.h
-    eggLoader.h eggLoader.I
-    eggRenderState.h eggRenderState.I
-    eggSaver.h eggSaver.I
-    egg_parametrics.h
-    load_egg_file.h
-    save_egg_file.h
-    loaderFileTypeEgg.h
-  )
+if(NOT HAVE_EGG)
+  return()
+endif()
 
 
-  set(P3EGG2PG_SOURCES
-    animBundleMaker.cxx
-    characterMaker.cxx
-    config_egg2pg.cxx
-    deferredNodeProperty.cxx
-    eggBinner.cxx
-    eggLoader.cxx
-    eggRenderState.cxx
-    eggSaver.cxx
-    egg_parametrics.cxx
-    load_egg_file.cxx
-    save_egg_file.cxx
-    loaderFileTypeEgg.cxx
-  )
+set(P3EGG2PG_HEADERS
+  animBundleMaker.h
+  characterMaker.h
+  config_egg2pg.h
+  deferredNodeProperty.h
+  eggBinner.h
+  eggLoader.h eggLoader.I
+  eggRenderState.h eggRenderState.I
+  eggSaver.h eggSaver.I
+  egg_parametrics.h
+  load_egg_file.h
+  save_egg_file.h
+  loaderFileTypeEgg.h
+)
 
 
-  composite_sources(p3egg2pg P3EGG2PG_SOURCES)
-  add_component_library(p3egg2pg SYMBOL BUILDING_PANDAEGG
-    ${P3EGG2PG_HEADERS} ${P3EGG2PG_SOURCES})
-  target_link_libraries(p3egg2pg panda p3egg)
-  target_interrogate(p3egg2pg ALL)
+set(P3EGG2PG_SOURCES
+  animBundleMaker.cxx
+  characterMaker.cxx
+  config_egg2pg.cxx
+  deferredNodeProperty.cxx
+  eggBinner.cxx
+  eggLoader.cxx
+  eggRenderState.cxx
+  eggSaver.cxx
+  egg_parametrics.cxx
+  load_egg_file.cxx
+  save_egg_file.cxx
+  loaderFileTypeEgg.cxx
+)
 
 
-  install(TARGETS p3egg2pg DESTINATION lib)
-  install(FILES ${P3EGG2PG_HEADERS} DESTINATION include/panda3d)
-endif()
+composite_sources(p3egg2pg P3EGG2PG_SOURCES)
+add_component_library(p3egg2pg SYMBOL BUILDING_PANDAEGG
+  ${P3EGG2PG_HEADERS} ${P3EGG2PG_SOURCES})
+target_link_libraries(p3egg2pg panda p3egg)
+target_interrogate(p3egg2pg ALL)
+
+install(TARGETS p3egg2pg DESTINATION lib)
+install(FILES ${P3EGG2PG_HEADERS} DESTINATION include/panda3d)

+ 25 - 24
panda/src/ffmpeg/CMakeLists.txt

@@ -1,28 +1,29 @@
-if(HAVE_FFMPEG)
+if(NOT HAVE_FFMPEG)
+  return()
+endif()
 
 
-  set(P3FFMPEG_HEADERS
-      config_ffmpeg.h
-      ffmpegVideo.h ffmpegVideo.I
-      ffmpegVideoCursor.h ffmpegVideoCursor.I
-      ffmpegAudio.h ffmpegAudio.I
-      ffmpegAudioCursor.h ffmpegAudioCursor.I
-      ffmpegVirtualFile.h ffmpegVirtualFile.I)
-    
+set(P3FFMPEG_HEADERS
+    config_ffmpeg.h
+    ffmpegVideo.h ffmpegVideo.I
+    ffmpegVideoCursor.h ffmpegVideoCursor.I
+    ffmpegAudio.h ffmpegAudio.I
+    ffmpegAudioCursor.h ffmpegAudioCursor.I
+    ffmpegVirtualFile.h ffmpegVirtualFile.I)
 
 
-  set(P3FFMPEG_SOURCES
-      config_ffmpeg.cxx
-      ffmpegVideo.cxx
-      ffmpegVideoCursor.cxx
-      ffmpegAudio.cxx
-      ffmpegAudioCursor.cxx
-      ffmpegVirtualFile.cxx) 
 
 
-  composite_sources(p3ffmpeg P3FFMPEG_SOURCES)
-  add_library(p3ffmpeg ${P3FFMPEG_HEADERS} ${P3FFMPEG_SOURCES})
-  set_target_properties(p3ffmpeg PROPERTIES DEFINE_SYMBOL BUILDING_FFMPEG)
-  target_link_libraries(p3ffmpeg panda)
-  target_use_packages(p3ffmpeg FFMPEG SWSCALE SWRESAMPLE)
+set(P3FFMPEG_SOURCES
+    config_ffmpeg.cxx
+    ffmpegVideo.cxx
+    ffmpegVideoCursor.cxx
+    ffmpegAudio.cxx
+    ffmpegAudioCursor.cxx
+    ffmpegVirtualFile.cxx)
 
 
-  install(TARGETS p3ffmpeg DESTINATION lib)
-  install(FILES ${P3FFMPEG_HEADERS} DESTINATION include/panda3d)
-endif()
+composite_sources(p3ffmpeg P3FFMPEG_SOURCES)
+add_library(p3ffmpeg ${P3FFMPEG_HEADERS} ${P3FFMPEG_SOURCES})
+set_target_properties(p3ffmpeg PROPERTIES DEFINE_SYMBOL BUILDING_FFMPEG)
+target_link_libraries(p3ffmpeg panda)
+target_use_packages(p3ffmpeg FFMPEG SWSCALE SWRESAMPLE)
+
+install(TARGETS p3ffmpeg DESTINATION lib)
+install(FILES ${P3FFMPEG_HEADERS} DESTINATION include/panda3d)

+ 19 - 17
panda/src/glgsg/CMakeLists.txt

@@ -1,20 +1,22 @@
-if(HAVE_GL)
-  set(P3GLGSG_HEADERS
-    config_glgsg.h glgsg.h
-  )
+if(NOT HAVE_GL)
+  return()
+endif()
 
 
-  set(P3GLGSG_SOURCES
-    config_glgsg.cxx
-    glgsg.cxx
-  )
+set(P3GLGSG_HEADERS
+  config_glgsg.h glgsg.h
+)
 
 
-  composite_sources(p3glgsg P3GLGSG_SOURCES)
-  add_component_library(p3glgsg SYMBOL BUILDING_PANDAGL
-    ${P3GLGSG_HEADERS} ${P3GLGSG_SOURCES})
-  target_link_libraries(p3glgsg p3glstuff panda
-    ${OPENGL_LIBRARIES})
-  target_use_packages(p3glgsg CG)
+set(P3GLGSG_SOURCES
+  config_glgsg.cxx
+  glgsg.cxx
+)
 
 
-  install(TARGETS p3glgsg DESTINATION lib)
-  install(FILES ${P3GLGSG_HEADERS} DESTINATION include/panda3d)
-endif()
+composite_sources(p3glgsg P3GLGSG_SOURCES)
+add_component_library(p3glgsg SYMBOL BUILDING_PANDAGL
+  ${P3GLGSG_HEADERS} ${P3GLGSG_SOURCES})
+target_link_libraries(p3glgsg p3glstuff panda
+  ${OPENGL_LIBRARIES})
+target_use_packages(p3glgsg CG)
+
+install(TARGETS p3glgsg DESTINATION lib)
+install(FILES ${P3GLGSG_HEADERS} DESTINATION include/panda3d)

+ 38 - 36
panda/src/glstuff/CMakeLists.txt

@@ -1,39 +1,41 @@
-if(HAVE_GL)
-  set(P3GLSTUFF_HEADERS
-     glGeomContext_src.I
-     glGeomContext_src.h
-     glGeomMunger_src.I
-     glGeomMunger_src.h
-     glGraphicsStateGuardian_src.I
-     glGraphicsStateGuardian_src.h
-     glGraphicsBuffer_src.I
-     glGraphicsBuffer_src.h
-     glImmediateModeSender_src.I
-     glImmediateModeSender_src.h
-     glIndexBufferContext_src.I
-     glIndexBufferContext_src.h
-     glOcclusionQueryContext_src.I
-     glOcclusionQueryContext_src.h
-     glShaderContext_src.I
-     glShaderContext_src.h
-     glTextureContext_src.I
-     glTextureContext_src.h
-     glVertexBufferContext_src.I
-     glVertexBufferContext_src.h
-     glmisc_src.h
-     glstuff_src.h
-     glstuff_undef_src.h
-     panda_glext.h
-  )
+if(NOT HAVE_GL)
+  return()
+endif()
 
 
-  set(P3GLSTUFF_SOURCES
-    glpure.cxx
-  )
+set(P3GLSTUFF_HEADERS
+   glGeomContext_src.I
+   glGeomContext_src.h
+   glGeomMunger_src.I
+   glGeomMunger_src.h
+   glGraphicsStateGuardian_src.I
+   glGraphicsStateGuardian_src.h
+   glGraphicsBuffer_src.I
+   glGraphicsBuffer_src.h
+   glImmediateModeSender_src.I
+   glImmediateModeSender_src.h
+   glIndexBufferContext_src.I
+   glIndexBufferContext_src.h
+   glOcclusionQueryContext_src.I
+   glOcclusionQueryContext_src.h
+   glShaderContext_src.I
+   glShaderContext_src.h
+   glTextureContext_src.I
+   glTextureContext_src.h
+   glVertexBufferContext_src.I
+   glVertexBufferContext_src.h
+   glmisc_src.h
+   glstuff_src.h
+   glstuff_undef_src.h
+   panda_glext.h
+)
 
 
-  composite_sources(p3glstuff P3GLSTUFF_SOURCES)
-  add_component_library(p3glstuff ${P3GLSTUFF_HEADERS} ${P3GLSTUFF_SOURCES})
-  target_link_libraries(p3glstuff panda)
+set(P3GLSTUFF_SOURCES
+  glpure.cxx
+)
 
 
-  install(TARGETS p3glstuff DESTINATION lib)
-  install(FILES ${P3GLSTUFF_HEADERS} DESTINATION include/panda3d)
-endif()
+composite_sources(p3glstuff P3GLSTUFF_SOURCES)
+add_component_library(p3glstuff ${P3GLSTUFF_HEADERS} ${P3GLSTUFF_SOURCES})
+target_link_libraries(p3glstuff panda)
+
+install(TARGETS p3glstuff DESTINATION lib)
+install(FILES ${P3GLSTUFF_HEADERS} DESTINATION include/panda3d)

+ 28 - 26
panda/src/glxdisplay/CMakeLists.txt

@@ -1,29 +1,31 @@
-if(HAVE_GLX)
-  set(P3GLXDISPLAY_HEADERS
-    config_glxdisplay.h
-    glxGraphicsBuffer.h glxGraphicsBuffer.I
-    glxGraphicsPipe.h glxGraphicsPipe.I
-    glxGraphicsPixmap.h glxGraphicsPixmap.I
-    glxGraphicsWindow.h
-    glxGraphicsStateGuardian.h glxGraphicsStateGuardian.I
-    posixGraphicsStateGuardian.h posixGraphicsStateGuardian.I
-    panda_glxext.h
-  )
+if(NOT HAVE_GLX)
+  return()
+endif()
 
 
-  set(P3GLXDISPLAY_SOURCES
-    config_glxdisplay.cxx
-    glxGraphicsBuffer.cxx
-    glxGraphicsPipe.cxx
-    glxGraphicsPixmap.cxx
-    glxGraphicsWindow.cxx
-    glxGraphicsStateGuardian.cxx
-    posixGraphicsStateGuardian.cxx
-  )
+set(P3GLXDISPLAY_HEADERS
+  config_glxdisplay.h
+  glxGraphicsBuffer.h glxGraphicsBuffer.I
+  glxGraphicsPipe.h glxGraphicsPipe.I
+  glxGraphicsPixmap.h glxGraphicsPixmap.I
+  glxGraphicsWindow.h
+  glxGraphicsStateGuardian.h glxGraphicsStateGuardian.I
+  posixGraphicsStateGuardian.h posixGraphicsStateGuardian.I
+  panda_glxext.h
+)
 
 
-  composite_sources(p3glxdisplay P3GLXDISPLAY_SOURCES)
-  add_component_library(p3glxdisplay SYMBOL BUILDING_PANDAGL
-    ${P3GLXDISPLAY_HEADERS} ${P3GLXDISPLAY_SOURCES})
-  target_link_libraries(p3glxdisplay p3glgsg p3x11display)
+set(P3GLXDISPLAY_SOURCES
+  config_glxdisplay.cxx
+  glxGraphicsBuffer.cxx
+  glxGraphicsPipe.cxx
+  glxGraphicsPixmap.cxx
+  glxGraphicsWindow.cxx
+  glxGraphicsStateGuardian.cxx
+  posixGraphicsStateGuardian.cxx
+)
 
 
-  install(TARGETS p3glxdisplay DESTINATION lib)
-endif()
+composite_sources(p3glxdisplay P3GLXDISPLAY_SOURCES)
+add_component_library(p3glxdisplay SYMBOL BUILDING_PANDAGL
+  ${P3GLXDISPLAY_HEADERS} ${P3GLXDISPLAY_SOURCES})
+target_link_libraries(p3glxdisplay p3glgsg p3x11display)
+
+install(TARGETS p3glxdisplay DESTINATION lib)

+ 34 - 32
panda/src/nativenet/CMakeLists.txt

@@ -1,35 +1,37 @@
-if(WANT_NATIVE_NET)
-  set(P3NATIVENET_HEADERS
-      buffered_datagramconnection.h
-      buffered_datagramreader.h buffered_datagramreader.I
-      ringbuffer.h ringbuffer.I socket_ip.h
-      socket_tcp_listen.h time_accumulator.h time_out.h
-      socket_address.I socket_address.h
-      socket_portable.h  time_base.h time_span.h buffered_datagramwriter.h
-      socket_base.h socket_selector.h
-      socket_udp.h
-      socket_udp_incoming.h time_clock.h
-      membuffer.h membuffer.I socket_fdset.h socket_tcp.h
-      socket_udp_outgoing.h time_general.h)
+if(NOT WANT_NATIVE_NET)
+  return()
+endif()
 
 
-  set(P3NATIVENET_SOURCES
-      config_nativenet.cxx
-      buffered_datagramconnection.cxx
-      socket_address.cxx
-      socket_ip.cxx
-      socket_tcp.cxx
-      socket_tcp_listen.cxx
-      socket_tcp_ssl.cxx
-      socket_udp.cxx
-      socket_udp_incoming.cxx
-      socket_udp_outgoing.cxx)
+set(P3NATIVENET_HEADERS
+    buffered_datagramconnection.h
+    buffered_datagramreader.h buffered_datagramreader.I
+    ringbuffer.h ringbuffer.I socket_ip.h
+    socket_tcp_listen.h time_accumulator.h time_out.h
+    socket_address.I socket_address.h
+    socket_portable.h  time_base.h time_span.h buffered_datagramwriter.h
+    socket_base.h socket_selector.h
+    socket_udp.h
+    socket_udp_incoming.h time_clock.h
+    membuffer.h membuffer.I socket_fdset.h socket_tcp.h
+    socket_udp_outgoing.h time_general.h)
 
 
-  composite_sources(p3nativenet P3NATIVENET_SOURCES)
-  add_component_library(p3nativenet SYMBOL BUILDING_PANDA_NATIVENET
-    ${P3NATIVENET_HEADERS} ${P3NATIVENET_SOURCES})
-  target_link_libraries(p3nativenet p3express p3pandabase p3downloader)
-  target_interrogate(p3nativenet ALL)
+set(P3NATIVENET_SOURCES
+    config_nativenet.cxx
+    buffered_datagramconnection.cxx
+    socket_address.cxx
+    socket_ip.cxx
+    socket_tcp.cxx
+    socket_tcp_listen.cxx
+    socket_tcp_ssl.cxx
+    socket_udp.cxx
+    socket_udp_incoming.cxx
+    socket_udp_outgoing.cxx)
 
 
-  install(TARGETS p3nativenet DESTINATION lib)
-  install(FILES ${P3NATIVENET_HEADERS} DESTINATION include/panda3d)
-endif()
+composite_sources(p3nativenet P3NATIVENET_SOURCES)
+add_component_library(p3nativenet SYMBOL BUILDING_PANDA_NATIVENET
+  ${P3NATIVENET_HEADERS} ${P3NATIVENET_SOURCES})
+target_link_libraries(p3nativenet p3express p3pandabase p3downloader)
+target_interrogate(p3nativenet ALL)
+
+install(TARGETS p3nativenet DESTINATION lib)
+install(FILES ${P3NATIVENET_HEADERS} DESTINATION include/panda3d)

+ 37 - 35
panda/src/net/CMakeLists.txt

@@ -1,40 +1,42 @@
-if(HAVE_NET AND WANT_NATIVE_NET)
-  set(P3NET_HEADERS
-      config_net.h connection.h connectionListener.h
-      connectionManager.N connectionManager.h
-      connectionReader.I connectionReader.h
-      connectionWriter.h datagramQueue.h
-      datagramTCPHeader.I datagramTCPHeader.h
-      datagramUDPHeader.I datagramUDPHeader.h
-      netAddress.h netDatagram.I netDatagram.h
-      datagramGeneratorNet.I datagramGeneratorNet.h
-      datagramSinkNet.I datagramSinkNet.h
-      queuedConnectionListener.I
-      queuedConnectionListener.h queuedConnectionManager.h
-      queuedConnectionReader.h recentConnectionReader.h
-      queuedReturn.h queuedReturn.I)
+if(NOT HAVE_NET OR NOT WANT_NATIVE_NET)
+  return()
+endif()
 
 
-  set(P3NET_SOURCES
-      config_net.cxx connection.cxx connectionListener.cxx
-      connectionManager.cxx connectionReader.cxx
-      connectionWriter.cxx datagramQueue.cxx datagramTCPHeader.cxx
-      datagramUDPHeader.cxx netAddress.cxx netDatagram.cxx
-      datagramGeneratorNet.cxx
-      datagramSinkNet.cxx
-      queuedConnectionListener.cxx
-      queuedConnectionManager.cxx queuedConnectionReader.cxx
-      recentConnectionReader.cxx)
+set(P3NET_HEADERS
+    config_net.h connection.h connectionListener.h
+    connectionManager.N connectionManager.h
+    connectionReader.I connectionReader.h
+    connectionWriter.h datagramQueue.h
+    datagramTCPHeader.I datagramTCPHeader.h
+    datagramUDPHeader.I datagramUDPHeader.h
+    netAddress.h netDatagram.I netDatagram.h
+    datagramGeneratorNet.I datagramGeneratorNet.h
+    datagramSinkNet.I datagramSinkNet.h
+    queuedConnectionListener.I
+    queuedConnectionListener.h queuedConnectionManager.h
+    queuedConnectionReader.h recentConnectionReader.h
+    queuedReturn.h queuedReturn.I)
 
 
-  composite_sources(p3net P3NET_SOURCES)
-  add_component_library(p3net SYMBOL BUILDING_PANDA_NET
-    ${P3NET_HEADERS} ${P3NET_SOURCES})
-  target_link_libraries(p3net p3express p3downloader p3pandabase p3nativenet p3pipeline)
-  target_interrogate(p3net ALL)
+set(P3NET_SOURCES
+    config_net.cxx connection.cxx connectionListener.cxx
+    connectionManager.cxx connectionReader.cxx
+    connectionWriter.cxx datagramQueue.cxx datagramTCPHeader.cxx
+    datagramUDPHeader.cxx netAddress.cxx netDatagram.cxx
+    datagramGeneratorNet.cxx
+    datagramSinkNet.cxx
+    queuedConnectionListener.cxx
+    queuedConnectionManager.cxx queuedConnectionReader.cxx
+    recentConnectionReader.cxx)
 
 
-  if(WIN32)
-    target_link_libraries(p3net Iphlpapi.lib)
-  endif()
+composite_sources(p3net P3NET_SOURCES)
+add_component_library(p3net SYMBOL BUILDING_PANDA_NET
+  ${P3NET_HEADERS} ${P3NET_SOURCES})
+target_link_libraries(p3net p3express p3downloader p3pandabase p3nativenet p3pipeline)
+target_interrogate(p3net ALL)
 
 
-  install(TARGETS p3net DESTINATION lib)
-  install(FILES ${P3NET_HEADERS} DESTINATION include/panda3d)
+if(WIN32)
+  target_link_libraries(p3net Iphlpapi.lib)
 endif()
 endif()
+
+install(TARGETS p3net DESTINATION lib)
+install(FILES ${P3NET_HEADERS} DESTINATION include/panda3d)

+ 90 - 88
panda/src/ode/CMakeLists.txt

@@ -1,93 +1,95 @@
-if(HAVE_ODE)
-  set(P3ODE_HEADERS
-      ode_includes.h config_ode.h
-      odeWorld.I odeWorld.h
-      odeMass.I odeMass.h
-      odeBody.I odeBody.h
-      odeJointGroup.I odeJointGroup.h
-      odeJoint.I odeJoint.h
-      odeUtil.h
-      odeSpace.I odeSpace.h
-      odeGeom.I odeGeom.h
-      odeSurfaceParameters.I odeSurfaceParameters.h
-      odeContactGeom.I odeContactGeom.h
-      odeContact.I odeContact.h
-      odeAMotorJoint.I odeAMotorJoint.h
-      odeBallJoint.I odeBallJoint.h
-      odeContactJoint.I odeContactJoint.h
-      odeFixedJoint.I odeFixedJoint.h
-      odeHingeJoint.I odeHingeJoint.h
-      odeHinge2Joint.I odeHinge2Joint.h
-      odeLMotorJoint.I odeLMotorJoint.h
-      odeNullJoint.I odeNullJoint.h
-      odePlane2dJoint.I odePlane2dJoint.h
-      odeSliderJoint.I odeSliderJoint.h
-      odeUniversalJoint.I odeUniversalJoint.h
-      odeJointCollection.I odeJointCollection.h
-      odeSimpleSpace.I odeSimpleSpace.h
-      odeHashSpace.I odeHashSpace.h
-      odeQuadTreeSpace.I odeQuadTreeSpace.h
-      odeSphereGeom.I odeSphereGeom.h
-      odeBoxGeom.I odeBoxGeom.h
-      odePlaneGeom.I odePlaneGeom.h
-      odeCappedCylinderGeom.I odeCappedCylinderGeom.h
-      odeCylinderGeom.I odeCylinderGeom.h
-      odeRayGeom.I odeRayGeom.h
-      odeTriMeshData.I odeTriMeshData.h
-      odeTriMeshGeom.I odeTriMeshGeom.h
-      odeCollisionEntry.I odeCollisionEntry.h
-      odeHelperStructs.h)
+if(NOT HAVE_ODE)
+  return()
+endif()
 
 
-  set(P3ODE_SOURCES
-      config_ode.cxx
-      odeWorld.cxx odeMass.cxx odeBody.cxx
-      odeJointGroup.cxx odeJoint.cxx
-      odeUtil.cxx
-      odeSpace.cxx
-      odeGeom.cxx
-      odeSurfaceParameters.cxx
-      odeContactGeom.cxx odeContact.cxx
-      odeAMotorJoint.cxx odeBallJoint.cxx
-      odeContactJoint.cxx odeFixedJoint.cxx
-      odeHingeJoint.cxx odeHinge2Joint.cxx
-      odeLMotorJoint.cxx odeNullJoint.cxx
-      odePlane2dJoint.cxx odeSliderJoint.cxx
-      odeUniversalJoint.cxx odeJointCollection.cxx
-      odeSimpleSpace.cxx
-      odeHashSpace.cxx odeQuadTreeSpace.cxx
-      odeSphereGeom.cxx odeBoxGeom.cxx
-      odePlaneGeom.cxx odeCappedCylinderGeom.cxx
-      odeCylinderGeom.cxx odeRayGeom.cxx
-      odeTriMeshData.cxx  odeTriMeshGeom.cxx
-      odeCollisionEntry.cxx)
+set(P3ODE_HEADERS
+    ode_includes.h config_ode.h
+    odeWorld.I odeWorld.h
+    odeMass.I odeMass.h
+    odeBody.I odeBody.h
+    odeJointGroup.I odeJointGroup.h
+    odeJoint.I odeJoint.h
+    odeUtil.h
+    odeSpace.I odeSpace.h
+    odeGeom.I odeGeom.h
+    odeSurfaceParameters.I odeSurfaceParameters.h
+    odeContactGeom.I odeContactGeom.h
+    odeContact.I odeContact.h
+    odeAMotorJoint.I odeAMotorJoint.h
+    odeBallJoint.I odeBallJoint.h
+    odeContactJoint.I odeContactJoint.h
+    odeFixedJoint.I odeFixedJoint.h
+    odeHingeJoint.I odeHingeJoint.h
+    odeHinge2Joint.I odeHinge2Joint.h
+    odeLMotorJoint.I odeLMotorJoint.h
+    odeNullJoint.I odeNullJoint.h
+    odePlane2dJoint.I odePlane2dJoint.h
+    odeSliderJoint.I odeSliderJoint.h
+    odeUniversalJoint.I odeUniversalJoint.h
+    odeJointCollection.I odeJointCollection.h
+    odeSimpleSpace.I odeSimpleSpace.h
+    odeHashSpace.I odeHashSpace.h
+    odeQuadTreeSpace.I odeQuadTreeSpace.h
+    odeSphereGeom.I odeSphereGeom.h
+    odeBoxGeom.I odeBoxGeom.h
+    odePlaneGeom.I odePlaneGeom.h
+    odeCappedCylinderGeom.I odeCappedCylinderGeom.h
+    odeCylinderGeom.I odeCylinderGeom.h
+    odeRayGeom.I odeRayGeom.h
+    odeTriMeshData.I odeTriMeshData.h
+    odeTriMeshGeom.I odeTriMeshGeom.h
+    odeCollisionEntry.I odeCollisionEntry.h
+    odeHelperStructs.h)
 
 
-  set(P3ODE_IGATEEXT
-      odeBody_ext.h
-      odeBody_ext.I
-      odeGeom_ext.cxx
-      odeGeom_ext.h
-      odeGeom_ext.I
-      odeJoint_ext.cxx
-      odeJoint_ext.h
-      odeSpace_ext.cxx
-      odeSpace_ext.h
-      odeSpace_ext.I
-      odeUtil_ext.cxx
-      odeUtil_ext.h)
+set(P3ODE_SOURCES
+    config_ode.cxx
+    odeWorld.cxx odeMass.cxx odeBody.cxx
+    odeJointGroup.cxx odeJoint.cxx
+    odeUtil.cxx
+    odeSpace.cxx
+    odeGeom.cxx
+    odeSurfaceParameters.cxx
+    odeContactGeom.cxx odeContact.cxx
+    odeAMotorJoint.cxx odeBallJoint.cxx
+    odeContactJoint.cxx odeFixedJoint.cxx
+    odeHingeJoint.cxx odeHinge2Joint.cxx
+    odeLMotorJoint.cxx odeNullJoint.cxx
+    odePlane2dJoint.cxx odeSliderJoint.cxx
+    odeUniversalJoint.cxx odeJointCollection.cxx
+    odeSimpleSpace.cxx
+    odeHashSpace.cxx odeQuadTreeSpace.cxx
+    odeSphereGeom.cxx odeBoxGeom.cxx
+    odePlaneGeom.cxx odeCappedCylinderGeom.cxx
+    odeCylinderGeom.cxx odeRayGeom.cxx
+    odeTriMeshData.cxx  odeTriMeshGeom.cxx
+    odeCollisionEntry.cxx)
 
 
-  set(P3ODE_IGATE_SOURCES "${P3ODE_HEADERS};${P3ODE_SOURCES}")
-  list(REMOVE_ITEM P3ODE_IGATE_SOURCES "odeConvexGeom.h")
-  list(REMOVE_ITEM P3ODE_IGATE_SOURCES "odeHeightFieldGeom.h")
-  list(REMOVE_ITEM P3ODE_IGATE_SOURCES "odeHelperStructs.h")
+set(P3ODE_IGATEEXT
+    odeBody_ext.h
+    odeBody_ext.I
+    odeGeom_ext.cxx
+    odeGeom_ext.h
+    odeGeom_ext.I
+    odeJoint_ext.cxx
+    odeJoint_ext.h
+    odeSpace_ext.cxx
+    odeSpace_ext.h
+    odeSpace_ext.I
+    odeUtil_ext.cxx
+    odeUtil_ext.h)
 
 
-  composite_sources(p3ode P3ODE_SOURCES)
-  add_library(p3ode ${P3ODE_SOURCES} ${P3ODE_HEADERS})
-  set_target_properties(p3ode PROPERTIES DEFINE_SYMBOL BUILDING_PANDAODE)
-  target_compile_definitions(p3ode PUBLIC dSINGLE)
-  target_link_libraries(p3ode panda)
-  target_use_packages(p3ode ODE)
-  target_interrogate(p3ode ${P3ODE_IGATE_SOURCES} EXTENSIONS ${P3ODE_IGATEEXT})
+set(P3ODE_IGATE_SOURCES "${P3ODE_HEADERS};${P3ODE_SOURCES}")
+list(REMOVE_ITEM P3ODE_IGATE_SOURCES "odeConvexGeom.h")
+list(REMOVE_ITEM P3ODE_IGATE_SOURCES "odeHeightFieldGeom.h")
+list(REMOVE_ITEM P3ODE_IGATE_SOURCES "odeHelperStructs.h")
 
 
-  install(TARGETS p3ode DESTINATION lib)
-  install(FILES ${P3ODE_HEADERS} DESTINATION include/panda3d)
-endif()
+composite_sources(p3ode P3ODE_SOURCES)
+add_library(p3ode ${P3ODE_SOURCES} ${P3ODE_HEADERS})
+set_target_properties(p3ode PROPERTIES DEFINE_SYMBOL BUILDING_PANDAODE)
+target_compile_definitions(p3ode PUBLIC dSINGLE)
+target_link_libraries(p3ode panda)
+target_use_packages(p3ode ODE)
+target_interrogate(p3ode ${P3ODE_IGATE_SOURCES} EXTENSIONS ${P3ODE_IGATEEXT})
+
+install(TARGETS p3ode DESTINATION lib)
+install(FILES ${P3ODE_HEADERS} DESTINATION include/panda3d)

+ 26 - 24
panda/src/osxdisplay/CMakeLists.txt

@@ -1,28 +1,30 @@
-if(APPLE AND HAVE_GL AND HAVE_CARBON)
-  set(P3OSXDISPLAY_HEADERS
-      config_osxdisplay.h
-      osxGraphicsPipe.h
-      osxGraphicsWindow.h osxGraphicsWindow.I
-      osxGraphicsStateGuardian.h)
+if(NOT APPLE OR NOT HAVE_GL OR NOT HAVE_CARBON)
+  return()
+endif()
 
 
-  set(P3OSXDISPLAY_SOURCES
-      config_osxdisplay.cxx osxGraphicsPipe.cxx osxGraphicsStateGuardian.cxx
-      osxGraphicsBuffer.cxx)
+set(P3OSXDISPLAY_HEADERS
+    config_osxdisplay.h
+    osxGraphicsPipe.h
+    osxGraphicsWindow.h osxGraphicsWindow.I
+    osxGraphicsStateGuardian.h)
 
 
-  composite_sources(p3osxdisplay P3OSXDISPLAY_SOURCES)
-  add_library(p3osxdisplay ${P3OSXDISPLAY_HEADERS} ${P3OSXDISPLAY_SOURCES})
-  set_target_properties(p3osxdisplay PROPERTIES DEFINE_SYMBOL BUILDING_PANDAGL)
-  target_link_libraries(p3osxdisplay p3display p3putil p3glgsg)
+set(P3OSXDISPLAY_SOURCES
+    config_osxdisplay.cxx osxGraphicsPipe.cxx osxGraphicsStateGuardian.cxx
+    osxGraphicsBuffer.cxx)
 
 
-  # Frameworks:
-  find_library(APPLICATIONSERVICES_LIBRARY ApplicationServices)
-  find_library(CARBON_LIBRARY Carbon)
-  find_library(AGL_LIBRARY AGL)
-  find_library(CORESERVICES_LIBRARY CoreServices)
-  find_library(COCOA_LIBRARY Cocoa)
-  target_link_libraries(p3osxdisplay
-    ${APPLICATIONSERVICES_LIBRARY} ${CARBON_LIBRARY} ${AGL_LIBRARY}
-    ${CORESERVICES_LIBRARY} ${COCOA_LIBRARY})
+composite_sources(p3osxdisplay P3OSXDISPLAY_SOURCES)
+add_library(p3osxdisplay ${P3OSXDISPLAY_HEADERS} ${P3OSXDISPLAY_SOURCES})
+set_target_properties(p3osxdisplay PROPERTIES DEFINE_SYMBOL BUILDING_PANDAGL)
+target_link_libraries(p3osxdisplay p3display p3putil p3glgsg)
 
 
-  install(TARGETS p3osxdisplay DESTINATION lib)
-endif()
+# Frameworks:
+find_library(APPLICATIONSERVICES_LIBRARY ApplicationServices)
+find_library(CARBON_LIBRARY Carbon)
+find_library(AGL_LIBRARY AGL)
+find_library(CORESERVICES_LIBRARY CoreServices)
+find_library(COCOA_LIBRARY Cocoa)
+target_link_libraries(p3osxdisplay
+  ${APPLICATIONSERVICES_LIBRARY} ${CARBON_LIBRARY} ${AGL_LIBRARY}
+  ${CORESERVICES_LIBRARY} ${COCOA_LIBRARY})
+
+install(TARGETS p3osxdisplay DESTINATION lib)

+ 26 - 24
panda/src/pnmtext/CMakeLists.txt

@@ -1,26 +1,28 @@
-if(HAVE_FREETYPE)
-  set(P3PNMTEXT_HEADERS
-    config_pnmtext.h
-    freetypeFace.h freetypeFace.I
-    freetypeFont.h freetypeFont.I
-    pnmTextGlyph.h pnmTextGlyph.I
-    pnmTextMaker.h pnmTextMaker.I
-  )
-  set(P3PNMTEXT_SOURCES
-    config_pnmtext.cxx
-    freetypeFace.cxx
-    freetypeFont.cxx
-    pnmTextGlyph.cxx
-    pnmTextMaker.cxx
-  )
+if(NOT HAVE_FREETYPE)
+  return()
+endif()
 
 
-  composite_sources(p3pnmtext P3PNMTEXT_SOURCES)
-  add_component_library(p3pnmtext SYMBOL BUILDING_PANDA_PNMTEXT
-    ${P3PNMTEXT_HEADERS} ${P3PNMTEXT_SOURCES})
-  target_link_libraries(p3pnmtext p3parametrics p3pnmimage)
-  target_use_packages(p3pnmtext FREETYPE)
-  target_interrogate(p3pnmtext ALL)
+set(P3PNMTEXT_HEADERS
+  config_pnmtext.h
+  freetypeFace.h freetypeFace.I
+  freetypeFont.h freetypeFont.I
+  pnmTextGlyph.h pnmTextGlyph.I
+  pnmTextMaker.h pnmTextMaker.I
+)
+set(P3PNMTEXT_SOURCES
+  config_pnmtext.cxx
+  freetypeFace.cxx
+  freetypeFont.cxx
+  pnmTextGlyph.cxx
+  pnmTextMaker.cxx
+)
 
 
-  install(TARGETS p3pnmtext DESTINATION lib)
-  install(FILES ${P3PNMTEXT_HEADERS} DESTINATION include/panda3d)
-endif()
+composite_sources(p3pnmtext P3PNMTEXT_SOURCES)
+add_component_library(p3pnmtext SYMBOL BUILDING_PANDA_PNMTEXT
+  ${P3PNMTEXT_HEADERS} ${P3PNMTEXT_SOURCES})
+target_link_libraries(p3pnmtext p3parametrics p3pnmimage)
+target_use_packages(p3pnmtext FREETYPE)
+target_interrogate(p3pnmtext ALL)
+
+install(TARGETS p3pnmtext DESTINATION lib)
+install(FILES ${P3PNMTEXT_HEADERS} DESTINATION include/panda3d)

+ 21 - 19
panda/src/wgldisplay/CMakeLists.txt

@@ -1,22 +1,24 @@
-if(HAVE_WGL)
-  set(P3WGLDISPLAY_HEADERS
-      config_wgldisplay.h
-      wglGraphicsBuffer.I wglGraphicsBuffer.h
-      wglGraphicsPipe.I wglGraphicsPipe.h
-      wglGraphicsStateGuardian.I wglGraphicsStateGuardian.h
-      wglGraphicsWindow.I wglGraphicsWindow.h
-      wglext.h)
+if(NOT HAVE_WGL)
+  return()
+endif()
 
 
-  set(P3WGLDISPLAY_SOURCES
-      config_wgldisplay.cxx
-      wglGraphicsBuffer.cxx
-      wglGraphicsPipe.cxx
-      wglGraphicsStateGuardian.cxx
-      wglGraphicsWindow.cxx)
+set(P3WGLDISPLAY_HEADERS
+    config_wgldisplay.h
+    wglGraphicsBuffer.I wglGraphicsBuffer.h
+    wglGraphicsPipe.I wglGraphicsPipe.h
+    wglGraphicsStateGuardian.I wglGraphicsStateGuardian.h
+    wglGraphicsWindow.I wglGraphicsWindow.h
+    wglext.h)
 
 
+set(P3WGLDISPLAY_SOURCES
+    config_wgldisplay.cxx
+    wglGraphicsBuffer.cxx
+    wglGraphicsPipe.cxx
+    wglGraphicsStateGuardian.cxx
+    wglGraphicsWindow.cxx)
 
 
-  composite_sources(p3wgldisplay P3WGLDISPLAY_SOURCES)
-  add_library(p3wgldisplay ${P3WGLDISPLAY_HEADERS} ${P3WGLDISPLAY_SOURCES})
-  set_target_properties(p3wgldisplay PROPERTIES DEFINE_SYMBOL BUILDING_PANDAGL)
-  target_link_libraries(p3wgldisplay p3display p3putil p3windisplay p3glgsg)
-endif()
+
+composite_sources(p3wgldisplay P3WGLDISPLAY_SOURCES)
+add_library(p3wgldisplay ${P3WGLDISPLAY_HEADERS} ${P3WGLDISPLAY_SOURCES})
+set_target_properties(p3wgldisplay PROPERTIES DEFINE_SYMBOL BUILDING_PANDAGL)
+target_link_libraries(p3wgldisplay p3display p3putil p3windisplay p3glgsg)

+ 17 - 16
panda/src/windisplay/CMakeLists.txt

@@ -1,18 +1,19 @@
-if(WIN32)
-  set(P3WINDISPLAY_HEADERS
-      config_windisplay.h
-      winGraphicsPipe.I winGraphicsPipe.h
-      winGraphicsWindow.I winGraphicsWindow.h
-      winDetectDx.h)
+if(NOT WIN32)
+  return()
+endif()
 
 
-  set(P3WINDISPLAY_SOURCES
-      config_windisplay.cxx winGraphicsPipe.cxx
-      winGraphicsWindow.cxx
-      winDetectDx9.cxx)
+set(P3WINDISPLAY_HEADERS
+    config_windisplay.h
+    winGraphicsPipe.I winGraphicsPipe.h
+    winGraphicsWindow.I winGraphicsWindow.h
+    winDetectDx.h)
 
 
-  composite_sources(p3windisplay P3WINDISPLAY_SOURCES)
-  add_library(p3windisplay ${P3WINDISPLAY_HEADERS} ${P3WINDISPLAY_SOURCES})
-  set_target_properties(p3windisplay PROPERTIES DEFINE_SYMBOL BUILDING_PANDAWIN)
-  target_link_libraries(p3windisplay p3display p3putil
-    Imm32.lib)
-endif()
+set(P3WINDISPLAY_SOURCES
+    config_windisplay.cxx winGraphicsPipe.cxx
+    winGraphicsWindow.cxx
+    winDetectDx9.cxx)
+
+composite_sources(p3windisplay P3WINDISPLAY_SOURCES)
+add_library(p3windisplay ${P3WINDISPLAY_HEADERS} ${P3WINDISPLAY_SOURCES})
+set_target_properties(p3windisplay PROPERTIES DEFINE_SYMBOL BUILDING_PANDAWIN)
+target_link_libraries(p3windisplay p3display p3putil Imm32.lib)

+ 16 - 14
panda/src/x11display/CMakeLists.txt

@@ -1,17 +1,19 @@
-if(HAVE_X11)
-  set(P3X11DISPLAY_HEADERS
-    config_x11display.h x11GraphicsPipe.I x11GraphicsPipe.h
-    x11GraphicsWindow.h x11GraphicsWindow.I
-  )
+if(NOT HAVE_X11)
+  return()
+endif()
 
 
-  set(P3X11DISPLAY_SOURCES
-    config_x11display.cxx x11GraphicsPipe.cxx x11GraphicsWindow.cxx
-  )
+set(P3X11DISPLAY_HEADERS
+  config_x11display.h x11GraphicsPipe.I x11GraphicsPipe.h
+  x11GraphicsWindow.h x11GraphicsWindow.I
+)
 
 
-  composite_sources(p3x11display P3X11DISPLAY_SOURCES)
-  add_library(p3x11display ${P3X11DISPLAY_HEADERS} ${P3X11DISPLAY_SOURCES})
-  set_target_properties(p3x11display PROPERTIES DEFINE_SYMBOL BUILDING_PANDAX11)
-  target_link_libraries(p3x11display panda ${X11_LIBRARIES})
+set(P3X11DISPLAY_SOURCES
+  config_x11display.cxx x11GraphicsPipe.cxx x11GraphicsWindow.cxx
+)
 
 
-  install(TARGETS p3x11display DESTINATION lib)
-endif()
+composite_sources(p3x11display P3X11DISPLAY_SOURCES)
+add_library(p3x11display ${P3X11DISPLAY_HEADERS} ${P3X11DISPLAY_SOURCES})
+set_target_properties(p3x11display PROPERTIES DEFINE_SYMBOL BUILDING_PANDAX11)
+target_link_libraries(p3x11display panda ${X11_LIBRARIES})
+
+install(TARGETS p3x11display DESTINATION lib)

+ 35 - 33
pandatool/src/gtk-stats/CMakeLists.txt

@@ -1,38 +1,40 @@
-if(HAVE_GTK2 AND HAVE_NET)
-  set(GTKSTATS_HEADERS
-      gtkStatsChartMenu.h
-      gtkStatsGraph.h
-      gtkStatsLabel.h
-      gtkStatsLabelStack.h
-      gtkStatsMenuId.h
-      gtkStatsMonitor.h gtkStatsMonitor.I
-      gtkStatsPianoRoll.h
-      gtkStatsServer.h
-      gtkStatsStripChart.h)
+if(NOT HAVE_GTK2 OR NOT HAVE_NET)
+  return()
+endif()
 
 
-  set(GTKSTATS_SOURCES
-      gtkStats.cxx
-      gtkStatsChartMenu.cxx
-      gtkStatsGraph.cxx
-      gtkStatsLabel.cxx
-      gtkStatsLabelStack.cxx
-      gtkStatsMonitor.cxx
-      gtkStatsPianoRoll.cxx
-      gtkStatsServer.cxx
-      gtkStatsStripChart.cxx)
+set(GTKSTATS_HEADERS
+    gtkStatsChartMenu.h
+    gtkStatsGraph.h
+    gtkStatsLabel.h
+    gtkStatsLabelStack.h
+    gtkStatsMenuId.h
+    gtkStatsMonitor.h gtkStatsMonitor.I
+    gtkStatsPianoRoll.h
+    gtkStatsServer.h
+    gtkStatsStripChart.h)
 
 
-  composite_sources(gtkstats GTKSTATS_SOURCES)
-  add_executable(gtkstats ${GTKSTATS_HEADERS} ${GTKSTATS_SOURCES})
-  target_link_libraries(gtkstats p3progbase p3pstatserver p3pystub)
-  target_use_packages(gtkstats GTK2)
+set(GTKSTATS_SOURCES
+    gtkStats.cxx
+    gtkStatsChartMenu.cxx
+    gtkStatsGraph.cxx
+    gtkStatsLabel.cxx
+    gtkStatsLabelStack.cxx
+    gtkStatsMonitor.cxx
+    gtkStatsPianoRoll.cxx
+    gtkStatsServer.cxx
+    gtkStatsStripChart.cxx)
 
 
-  # This program is NOT actually called gtkstats. It's pstats-gtk on Win32 and
-  # pstats everywhere else (as the Win32 GUI is not built).
-  if(WIN32)
-    set_target_properties(gtkstats PROPERTIES OUTPUT_NAME "pstats-gtk")
-  else()
-    set_target_properties(gtkstats PROPERTIES OUTPUT_NAME "pstats")
-  endif()
+composite_sources(gtkstats GTKSTATS_SOURCES)
+add_executable(gtkstats ${GTKSTATS_HEADERS} ${GTKSTATS_SOURCES})
+target_link_libraries(gtkstats p3progbase p3pstatserver p3pystub)
+target_use_packages(gtkstats GTK2)
 
 
-  install(TARGETS gtkstats DESTINATION bin)
+# This program is NOT actually called gtkstats. It's pstats-gtk on Win32 and
+# pstats everywhere else (as the Win32 GUI is not built).
+if(WIN32)
+  set_target_properties(gtkstats PROPERTIES OUTPUT_NAME "pstats-gtk")
+else()
+  set_target_properties(gtkstats PROPERTIES OUTPUT_NAME "pstats")
 endif()
 endif()
+
+install(TARGETS gtkstats DESTINATION bin)

+ 25 - 23
pandatool/src/pstatserver/CMakeLists.txt

@@ -1,26 +1,28 @@
-if(HAVE_NET)
-  set(P3PSTATSERVER_HEADERS
-      pStatClientData.h pStatGraph.I
-      pStatGraph.h pStatListener.h pStatMonitor.I
-      pStatMonitor.h pStatPianoRoll.I
-      pStatPianoRoll.h pStatReader.h
-      pStatServer.h pStatStripChart.I
-      pStatStripChart.h pStatThreadData.I
-      pStatThreadData.h pStatView.I pStatView.h
-      pStatViewLevel.I pStatViewLevel.h)
+if(NOT HAVE_NET)
+  return()
+endif()
 
 
-  set(P3PSTATSERVER_SOURCES
-      pStatClientData.cxx pStatGraph.cxx
-      pStatListener.cxx
-      pStatMonitor.cxx pStatPianoRoll.cxx
-      pStatReader.cxx pStatServer.cxx
-      pStatStripChart.cxx pStatThreadData.cxx
-      pStatView.cxx pStatViewLevel.cxx)
+set(P3PSTATSERVER_HEADERS
+    pStatClientData.h pStatGraph.I
+    pStatGraph.h pStatListener.h pStatMonitor.I
+    pStatMonitor.h pStatPianoRoll.I
+    pStatPianoRoll.h pStatReader.h
+    pStatServer.h pStatStripChart.I
+    pStatStripChart.h pStatThreadData.I
+    pStatThreadData.h pStatView.I pStatView.h
+    pStatViewLevel.I pStatViewLevel.h)
 
 
-  composite_sources(p3pstatserver P3PSTATSERVER_SOURCES)
-  add_library(p3pstatserver STATIC ${P3PSTATSERVER_HEADERS} ${P3PSTATSERVER_SOURCES})
-  target_link_libraries(p3pstatserver p3pandatoolbase panda)
+set(P3PSTATSERVER_SOURCES
+    pStatClientData.cxx pStatGraph.cxx
+    pStatListener.cxx
+    pStatMonitor.cxx pStatPianoRoll.cxx
+    pStatReader.cxx pStatServer.cxx
+    pStatStripChart.cxx pStatThreadData.cxx
+    pStatView.cxx pStatViewLevel.cxx)
 
 
-  # This is only needed for binaries in the pandatool package. It is not useful
-  # for user applications, so it is not installed.
-endif()
+composite_sources(p3pstatserver P3PSTATSERVER_SOURCES)
+add_library(p3pstatserver STATIC ${P3PSTATSERVER_HEADERS} ${P3PSTATSERVER_SOURCES})
+target_link_libraries(p3pstatserver p3pandatoolbase panda)
+
+# This is only needed for binaries in the pandatool package. It is not useful
+# for user applications, so it is not installed.