Browse Source

CMake: Neatly format everything for readability and consistency

Sam Edwards 6 years ago
parent
commit
6097d34ead
74 changed files with 862 additions and 831 deletions
  1. 4 8
      CMakeLists.txt
  2. 1 1
      cmake/install/Panda3DConfig.cmake
  3. 4 2
      cmake/macros/AddBisonTarget.cmake
  4. 6 4
      cmake/macros/AddFlexTarget.cmake
  5. 52 5
      cmake/macros/BuildMetalib.cmake
  6. 2 4
      cmake/macros/CompositeSources.cmake
  7. 20 10
      cmake/macros/Interrogate.cmake
  8. 22 0
      cmake/macros/PackageConfig.cmake
  9. 17 0
      cmake/macros/Python.cmake
  10. 2 0
      cmake/macros/RunPzip.cmake
  11. 12 0
      cmake/macros/Versioning.cmake
  12. 3 1
      direct/CMakeLists.txt
  13. 56 40
      direct/src/dcparser/CMakeLists.txt
  14. 6 4
      direct/src/deadrec/CMakeLists.txt
  15. 10 8
      direct/src/distributed/CMakeLists.txt
  16. 35 33
      direct/src/interval/CMakeLists.txt
  17. 6 4
      direct/src/motiontrail/CMakeLists.txt
  18. 11 0
      dtool/CompilerFlags.cmake
  19. 5 0
      dtool/LocalSetup.cmake
  20. 34 1
      dtool/Package.cmake
  21. 1 0
      dtool/PandaVersion.cmake
  22. 2 3
      dtool/src/cppparser/CMakeLists.txt
  23. 65 66
      dtool/src/dtoolbase/CMakeLists.txt
  24. 1 1
      dtool/src/dtoolutil/CMakeLists.txt
  25. 2 1
      dtool/src/interrogate/CMakeLists.txt
  26. 2 3
      dtool/src/interrogatedb/CMakeLists.txt
  27. 8 6
      dtool/src/prc/CMakeLists.txt
  28. 8 5
      panda/CMakeLists.txt
  29. 7 4
      panda/metalibs/panda/CMakeLists.txt
  30. 5 0
      panda/metalibs/pandagl/CMakeLists.txt
  31. 2 0
      panda/metalibs/pandagles/CMakeLists.txt
  32. 16 14
      panda/src/audio/CMakeLists.txt
  33. 24 18
      panda/src/audiotraits/CMakeLists.txt
  34. 4 2
      panda/src/bullet/CMakeLists.txt
  35. 1 0
      panda/src/char/CMakeLists.txt
  36. 22 20
      panda/src/cocoadisplay/CMakeLists.txt
  37. 1 11
      panda/src/collide/CMakeLists.txt
  38. 3 6
      panda/src/configfiles/CMakeLists.txt
  39. 2 0
      panda/src/device/CMakeLists.txt
  40. 1 0
      panda/src/dgraph/CMakeLists.txt
  41. 1 12
      panda/src/display/CMakeLists.txt
  42. 12 4
      panda/src/downloadertools/CMakeLists.txt
  43. 3 6
      panda/src/egg/CMakeLists.txt
  44. 32 44
      panda/src/event/CMakeLists.txt
  45. 7 21
      panda/src/express/CMakeLists.txt
  46. 14 13
      panda/src/ffmpeg/CMakeLists.txt
  47. 6 19
      panda/src/framework/CMakeLists.txt
  48. 4 2
      panda/src/gles2gsg/CMakeLists.txt
  49. 4 2
      panda/src/glesgsg/CMakeLists.txt
  50. 24 24
      panda/src/glstuff/CMakeLists.txt
  51. 0 10
      panda/src/gobj/CMakeLists.txt
  52. 1 0
      panda/src/grutil/CMakeLists.txt
  53. 0 10
      panda/src/gsgbase/CMakeLists.txt
  54. 0 11
      panda/src/linmath/CMakeLists.txt
  55. 0 23
      panda/src/mathutil/CMakeLists.txt
  56. 42 40
      panda/src/movies/CMakeLists.txt
  57. 25 23
      panda/src/nativenet/CMakeLists.txt
  58. 24 22
      panda/src/net/CMakeLists.txt
  59. 1 10
      panda/src/parametrics/CMakeLists.txt
  60. 41 38
      panda/src/particlesystem/CMakeLists.txt
  61. 0 12
      panda/src/pgraph/CMakeLists.txt
  62. 40 40
      panda/src/pgraphnodes/CMakeLists.txt
  63. 1 18
      panda/src/pgui/CMakeLists.txt
  64. 36 34
      panda/src/physics/CMakeLists.txt
  65. 8 7
      panda/src/pipeline/CMakeLists.txt
  66. 1 0
      panda/src/pnmtext/CMakeLists.txt
  67. 20 18
      panda/src/pstatclient/CMakeLists.txt
  68. 0 58
      panda/src/putil/CMakeLists.txt
  69. 1 0
      panda/src/recorder/CMakeLists.txt
  70. 1 0
      panda/src/tform/CMakeLists.txt
  71. 13 12
      panda/src/wgldisplay/CMakeLists.txt
  72. 9 7
      panda/src/windisplay/CMakeLists.txt
  73. 3 3
      pandatool/src/vrml/CMakeLists.txt
  74. 3 3
      pandatool/src/xfile/CMakeLists.txt

+ 4 - 8
CMakeLists.txt

@@ -69,22 +69,18 @@ endif()
 if(BUILD_MODELS)
   # We don't really "build" the models, just pzip them
   file(COPY "${CMAKE_CURRENT_SOURCE_DIR}/models/maps/"
-    DESTINATION "${PROJECT_BINARY_DIR}/models/maps"
-  )
+    DESTINATION "${PROJECT_BINARY_DIR}/models/maps")
   run_pzip(models
     "${CMAKE_CURRENT_SOURCE_DIR}/models/"
     "${PROJECT_BINARY_DIR}/models"
-    *.egg
-  )
+    *.egg)
   file(COPY "${CMAKE_CURRENT_SOURCE_DIR}/dmodels/src/"
     DESTINATION "${PROJECT_BINARY_DIR}/models"
-    FILES_MATCHING PATTERN *.rgb PATTERN *.png PATTERN *.jpg PATTERN *.wav
-  )
+    FILES_MATCHING PATTERN *.rgb PATTERN *.png PATTERN *.jpg PATTERN *.wav)
   run_pzip(dmodels
     "${CMAKE_CURRENT_SOURCE_DIR}/dmodels/src/"
     "${PROJECT_BINARY_DIR}/models"
-    *.egg
-  )
+    *.egg)
   install(DIRECTORY "${PROJECT_BINARY_DIR}/models"
     COMPONENT Models DESTINATION share/panda3d)
 endif()

+ 1 - 1
cmake/install/Panda3DConfig.cmake

@@ -109,7 +109,7 @@
 #               Panda3D::VRPN::p3vrpn
 
 if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" LESS 3.0)
-   message(FATAL_ERROR "CMake >= 3.0.2 required")
+  message(FATAL_ERROR "CMake >= 3.0.2 required")
 endif()
 
 get_filename_component(_panda_config_prefix "${CMAKE_CURRENT_LIST_FILE}" PATH)

+ 4 - 2
cmake/macros/AddBisonTarget.cmake

@@ -17,17 +17,20 @@ function(add_bison_target output_cxx input_yxx)
   foreach(arg ${ARGN})
     if(arg STREQUAL "DEFINES")
       set(keyword "DEFINES")
+
     elseif(arg STREQUAL "PREFIX")
       set(keyword "PREFIX")
 
     elseif(keyword STREQUAL "PREFIX")
       list(APPEND arguments -p "${arg}")
+
     elseif(keyword STREQUAL "DEFINES")
       list(APPEND arguments --defines="${arg}")
       list(APPEND outputs "${arg}")
 
     else()
       message(SEND_ERROR "Unexpected argument ${arg} to add_bison_target")
+
     endif()
   endforeach()
 
@@ -67,7 +70,6 @@ function(add_bison_target output_cxx input_yxx)
     add_custom_command(
       OUTPUT ${outputs}
       ${commands}
-      DEPENDS ${depends}
-    )
+      DEPENDS ${depends})
   endif()
 endfunction(add_bison_target)

+ 6 - 4
cmake/macros/AddFlexTarget.cmake

@@ -17,19 +17,23 @@ function(add_flex_target output_cxx input_lxx)
   foreach(arg ${ARGN})
     if(arg STREQUAL "DEFINES")
       set(keyword "DEFINES")
+
     elseif(arg STREQUAL "PREFIX")
       set(keyword "PREFIX")
+
     elseif(arg STREQUAL "CASE_INSENSITIVE")
       list(APPEND arguments "-i")
 
     elseif(keyword STREQUAL "PREFIX")
       list(APPEND arguments "-P${arg}")
+
     elseif(keyword STREQUAL "DEFINES")
       list(APPEND arguments "--header-file=${arg}")
       list(APPEND outputs "${arg}")
 
     else()
       message(SEND_ERROR "Unexpected argument ${arg} to add_flex_target")
+
     endif()
   endforeach()
 
@@ -46,8 +50,7 @@ function(add_flex_target output_cxx input_lxx)
       COMMAND ${FLEX_EXECUTABLE}
         "-o${output_cxx}" ${arguments}
         "${input_lxx}"
-      MAIN_DEPENDENCY "${input_lxx}"
-    )
+      MAIN_DEPENDENCY "${input_lxx}")
 
   else()
     # Look for prebuilt versions of the outputs.
@@ -69,7 +72,6 @@ function(add_flex_target output_cxx input_lxx)
     add_custom_command(
       OUTPUT ${outputs}
       ${commands}
-      DEPENDS ${depends}
-    )
+      DEPENDS ${depends})
   endif()
 endfunction(add_flex_target)

+ 52 - 5
cmake/macros/BuildMetalib.cmake

@@ -51,6 +51,7 @@ if(CMAKE_VERSION VERSION_LESS "3.12")
           set(is_component 0)
           set(name_of_component "")
           set(name_of_non_component "${library}")
+
         else()
           set(is_component "$<TARGET_PROPERTY:${library},IS_COMPONENT>")
 
@@ -60,17 +61,20 @@ if(CMAKE_VERSION VERSION_LESS "3.12")
 
           set(name_of_component "$<${is_component}:$<TARGET_NAME:${library}>>")
           set(name_of_non_component "$<$<NOT:${is_component}>:$<TARGET_NAME:${library}>>")
+
         endif()
 
         # Libraries are only linked transitively if they aren't components.
         set_property(TARGET "${target}" APPEND PROPERTY
           INTERFACE_LINK_LIBRARIES "${name_of_non_component}")
+
       else()
         # This is a file path to an out-of-tree library - this needs to be
         # recorded so that the metalib can link them. (They aren't needed at
         # all for the object libraries themselves, so they don't have to work
         # transitively.)
         set_property(TARGET "${target}" APPEND PROPERTY INTERFACE_LINK_LIBRARIES "${library}")
+
       endif()
 
     endforeach(library)
@@ -106,9 +110,12 @@ function(add_component_library target_name)
 
   if(target_name MATCHES "^p3.*")
     string(SUBSTRING "${target_name}" 2 -1 name_without_prefix)
+
   else()
     set(name_without_prefix "${target_name}")
+
   endif()
+
   set(init_func "init_lib${name_without_prefix}")
   set(init_header "config_${name_without_prefix}.h")
 
@@ -118,23 +125,30 @@ function(add_component_library target_name)
     if(source STREQUAL "SYMBOL")
       set(symbol_keyword ON)
       set(init_keyword 0)
+
     elseif(source STREQUAL "INIT")
       set(symbol_keyword OFF)
       set(init_keyword 2)
+
     elseif(source STREQUAL "NOINIT")
       set(init_func)
       set(init_header)
+
     elseif(symbol_keyword)
       set(symbol_keyword OFF)
       set(symbol "${source}")
+
     elseif(init_keyword EQUAL 2)
       set(init_func "${source}")
       set(init_keyword 1)
+
     elseif(init_keyword EQUAL 1)
       set(init_header "${source}")
       set(init_keyword 0)
+
     else()
       list(APPEND sources "${source}")
+
     endif()
   endforeach()
 
@@ -148,14 +162,17 @@ function(add_component_library target_name)
     endforeach(source)
 
     add_library("${target_name}" OBJECT ${sources})
+
   else()
     add_library("${target_name}" ${sources})
+
   endif()
 
   set_target_properties("${target_name}" PROPERTIES 
     IS_COMPONENT ON
     INIT_FUNCTION "${init_func}"
     INIT_HEADER "${init_header}")
+
   if(symbol)
     set_property(TARGET "${target_name}" PROPERTY DEFINE_SYMBOL "${symbol}")
 
@@ -169,13 +186,16 @@ function(add_component_library target_name)
         INTERFACE_COMPILE_DEFINITIONS "$<$<BOOL:$<TARGET_PROPERTY:IS_COMPONENT>>:${symbol}>")
     endif()
   endif()
+
   if(BUILD_METALIBS)
     # Apparently neither is CMAKE_INCLUDE_CURRENT_DIR_IN_INTERFACE?
-    set_property(TARGET "${target_name}" PROPERTY INTERFACE_INCLUDE_DIRECTORIES "${CMAKE_CURRENT_SOURCE_DIR}")
+    set_property(TARGET "${target_name}" PROPERTY
+      INTERFACE_INCLUDE_DIRECTORIES "${CMAKE_CURRENT_SOURCE_DIR}")
 
     # If we're building dynamic libraries, the object library needs to be -fPIC
     if(BUILD_SHARED_LIBS)
-      set_property(TARGET "${target_name}" PROPERTY POSITION_INDEPENDENT_CODE ON)
+      set_property(TARGET "${target_name}" PROPERTY
+        POSITION_INDEPENDENT_CODE ON)
     endif()
   endif()
 
@@ -210,47 +230,59 @@ function(add_metalib target_name)
   set(component_init_headers)
   set(components)
   set(sources)
+
   foreach(arg ${ARGN})
     if(arg STREQUAL "COMPONENTS")
       set(components_keyword ON)
       set(include_keyword OFF)
       set(init_keyword 0)
       set(export_keyword 0)
+
     elseif(arg STREQUAL "INCLUDE")
       set(include_keyword ON)
       set(components_keyword OFF)
       set(init_keyword 0)
       set(export_keyword 0)
+
     elseif(arg STREQUAL "INIT")
       set(init_keyword 2)
       set(components_keyword OFF)
       set(include_keyword OFF)
       set(export_keyword 0)
+
     elseif(arg STREQUAL "EXPORT")
       if(NOT init_func)
         message(FATAL_ERROR "EXPORT cannot be used before INIT")
       endif()
+
       set(export_keyword 3)
       set(components_keyword OFF)
       set(include_keyword OFF)
       set(init_keyword 0)
+
     elseif(components_keyword)
       list(APPEND components "${arg}")
+
     elseif(include_keyword)
       set(component_init_headers
         "${component_init_headers}#include \"${arg}\"\n")
+
     elseif(init_keyword EQUAL 2)
       set(init_func "${arg}")
       set(init_keyword 1)
+
     elseif(init_keyword EQUAL 1)
       set(init_header "${arg}")
       set(init_keyword 0)
+
     elseif(export_keyword EQUAL 3)
       set(_export_type "${arg}")
       set(export_keyword 2)
+
     elseif(export_keyword EQUAL 2)
       set(_export_name "${arg}")
       set(export_keyword 1)
+
     elseif(export_keyword EQUAL 1)
       set(export_declarations
         "${export_declarations}\nextern \"C\" IMPORT_CLASS ${_export_type} ${_export_name}();")
@@ -259,8 +291,10 @@ function(add_metalib target_name)
       unset(_export_type)
       unset(_export_name)
       set(export_keyword 0)
+
     else()
       list(APPEND sources "${arg}")
+
     endif()
   endforeach()
 
@@ -292,6 +326,7 @@ function(add_metalib target_name)
       set(component_init_headers
         "${component_init_headers}#include \"${component_init_header}\"\n")
     endif()
+
     if(component_init_func)
       set(component_init_funcs
         "${component_init_funcs}  ${component_init_func}();\n")
@@ -303,6 +338,7 @@ function(add_metalib target_name)
 
       # Private defines: Just reference using a generator expression
       list(APPEND private_defines "$<TARGET_PROPERTY:${component},COMPILE_DEFINITIONS>")
+
       # Interface defines: Copy those, but filter out generator expressions
       # referencing a component library
       get_target_property(component_defines "${component}" INTERFACE_COMPILE_DEFINITIONS)
@@ -324,12 +360,15 @@ function(add_metalib target_name)
       foreach(component_include ${component_includes})
         if(component_include MATCHES "${component_genex_regex}")
           # Ignore component references
+
         elseif(component_include MATCHES "^${PROJECT_SOURCE_DIR}")
           # Include path within project; should only be included when building
           list(APPEND includes "$<BUILD_INTERFACE:${component_include}>")
+
         else()
           # Anything else gets included
           list(APPEND includes "${component_include}")
+
         endif()
       endforeach(component_include)
 
@@ -339,20 +378,26 @@ function(add_metalib target_name)
       foreach(component_library ${component_libraries})
         if(NOT component_library)
           # NOTFOUND - guess there are no INTERFACE_LINK_LIBRARIES
+
         elseif(component_library MATCHES "${component_genex_regex}")
           # Ignore component references
+
         elseif(component_library MATCHES ".*(${piped_components}).*")
           # Component library, ignore
+
         else()
           # Anything else gets included
           list(APPEND libs "${component_library}")
+
         endif()
       endforeach(component_library)
 
       # Consume this component's objects
       list(APPEND sources "$<TARGET_OBJECTS:${component}>")
-    else()
+
+    else() # NOT BUILD_METALIBS
       list(APPEND libs "${component}")
+
     endif()
   endforeach()
 
@@ -360,10 +405,12 @@ function(add_metalib target_name)
     set(init_source_path "${CMAKE_CURRENT_BINARY_DIR}/init_${target_name}.cxx")
     set(init_header_path "${CMAKE_CURRENT_BINARY_DIR}/${init_header}")
 
-    configure_file("${PROJECT_SOURCE_DIR}/cmake/templates/metalib_init.cxx.in" "${init_source_path}")
+    configure_file("${PROJECT_SOURCE_DIR}/cmake/templates/metalib_init.cxx.in"
+      "${init_source_path}")
     list(APPEND sources "${init_source_path}")
 
-    configure_file("${PROJECT_SOURCE_DIR}/cmake/templates/metalib_init.h.in" "${init_header_path}")
+    configure_file("${PROJECT_SOURCE_DIR}/cmake/templates/metalib_init.h.in"
+      "${init_header_path}")
     install(FILES "${init_header_path}" DESTINATION include/panda3d)
   endif()
 

+ 2 - 4
cmake/macros/CompositeSources.cmake

@@ -43,9 +43,7 @@ function(composite_sources target sources_var)
   # Don't composite if in the list of exclusions, and don't bother compositing
   # with too few sources
   list (FIND COMPOSITE_SOURCE_EXCLUSIONS ${target} _index)
-  if(num_sources LESS 2
-    OR ${COMPOSITE_SOURCE_LIMIT} LESS 2
-    OR ${_index} GREATER -1)
+  if(num_sources LESS 2 OR ${COMPOSITE_SOURCE_LIMIT} LESS 2 OR ${_index} GREATER -1)
     return()
   endif()
 
@@ -71,7 +69,6 @@ function(composite_sources target sources_var)
       list(LENGTH composite_sources num_composite_sources)
 
       if(num_sources EQUAL 0 OR NOT num_composite_sources LESS ${COMPOSITE_SOURCE_LIMIT})
-
         # It's pointless to make a composite source from just one file.
         if(num_composite_sources GREATER 1)
 
@@ -109,4 +106,5 @@ function(composite_sources target sources_var)
   # The new files are added to the existing files, which means the old files
   # are still there, but they won't be compiled due to the HEADER_FILE_ONLY setting.
   set(${sources_var} ${orig_sources} ${composite_files} PARENT_SCOPE)
+
 endfunction(composite_sources)

+ 20 - 10
cmake/macros/Interrogate.cmake

@@ -27,7 +27,8 @@ set(INTERROGATE_EXCLUDE_REGEXES
   ".*\\.c$"
   ".*\\.lxx$"
   ".*\\.yxx$"
-  ".*_src\\..*")
+  ".*_src\\..*"
+)
 
 if(WIN32)
   list(APPEND IGATE_FLAGS -D_X86_ -D__STDC__=1 -DWIN32_VC -D "_declspec(param)=" -D "__declspec(param)=" -D_near -D_far -D__near -D__far -D_WIN32 -D__stdcall -DWIN32)
@@ -57,12 +58,16 @@ function(target_interrogate target)
   foreach(arg ${ARGN})
     if(arg STREQUAL "ALL")
       set(want_all ON)
+
     elseif(arg STREQUAL "EXTENSIONS")
       set(extensions_keyword ON)
+
     elseif(extensions_keyword)
       list(APPEND extensions "${arg}")
+
     else()
       list(APPEND sources "${arg}")
+
     endif()
   endforeach()
 
@@ -77,7 +82,6 @@ function(target_interrogate target)
   # Now let's get everything's absolute path, so that it can be passed
   # through a property while still preserving the reference.
   set(absolute_sources)
-  set(absolute_extensions)
   foreach(source ${sources})
     get_source_file_property(exclude "${source}" WRAP_EXCLUDE)
     if(NOT exclude)
@@ -85,15 +89,17 @@ function(target_interrogate target)
       list(APPEND absolute_sources ${location})
     endif()
   endforeach(source)
+
+  set(absolute_extensions)
   foreach(extension ${extensions})
     get_source_file_property(location "${extension}" LOCATION)
     list(APPEND absolute_extensions ${location})
   endforeach(extension)
 
-  set_target_properties("${target}" PROPERTIES IGATE_SOURCES
-    "${absolute_sources}")
-  set_target_properties("${target}" PROPERTIES IGATE_EXTENSIONS
-    "${absolute_extensions}")
+  set_target_properties("${target}" PROPERTIES
+    IGATE_SOURCES "${absolute_sources}")
+  set_target_properties("${target}" PROPERTIES
+    IGATE_EXTENSIONS "${absolute_extensions}")
 
   # CMake has no property for determining the source directory where the
   # target was originally added. interrogate_sources makes use of this
@@ -227,9 +233,9 @@ function(interrogate_sources target output database language_flags)
       -S "${PYTHON_INCLUDE_DIRS}"
       ${include_flags}
       ${scan_sources}
+
     DEPENDS host_interrogate ${sources} ${extensions} ${nfiles}
-    COMMENT "Interrogating ${target}"
-  )
+    COMMENT "Interrogating ${target}")
 
   # Propagate the target's compile definitions to the output file
   set_source_files_properties("${output}" PROPERTIES
@@ -263,17 +269,22 @@ function(add_python_module module)
   foreach(arg ${ARGN})
     if(arg STREQUAL "LINK" OR arg STREQUAL "IMPORT" OR arg STREQUAL "COMPONENT")
       set(keyword "${arg}")
+
     elseif(keyword STREQUAL "LINK")
       list(APPEND link_targets "${arg}")
       set(keyword)
+
     elseif(keyword STREQUAL "IMPORT")
       list(APPEND import_flags "-import" "${arg}")
       set(keyword)
+
     elseif(keyword STREQUAL "COMPONENT")
       set(component "${arg}")
       set(keyword)
+
     else()
       list(APPEND targets "${arg}")
+
     endif()
   endforeach(arg)
 
@@ -310,8 +321,7 @@ function(add_python_module module)
       ${INTERROGATE_MODULE_OPTIONS}
       ${IMOD_FLAGS} ${infiles_rel}
     DEPENDS host_interrogate_module ${infiles_abs}
-    COMMENT "Generating module ${module}"
-  )
+    COMMENT "Generating module ${module}")
 
   add_python_target(panda3d.${module} COMPONENT "${component}" EXPORT "${component}"
     "${module}_module.cxx" ${sources_abs} ${extensions})

+ 22 - 0
cmake/macros/PackageConfig.cmake

@@ -18,6 +18,7 @@
 #                  [IMPORTED_AS CMake::Imported::Target [...]]
 #                  [FOUND_AS find_name]
 #                  [LICENSE license])
+#
 # Examples:
 #   package_option(LIBNAME "Enables LIBNAME support." DEFAULT OFF)
 #
@@ -38,6 +39,7 @@
 # Function: package_status
 # Usage:
 #   package_status(package_name "Package description" ["Config summary"])
+#
 # Examples:
 #   package_status(OpenAL "OpenAL Audio Output")
 #   package_status(ROCKET "Rocket" "without Python bindings")
@@ -127,9 +129,12 @@ function(package_option name)
         # If the license isn't in the accept listed, don't use the package
         if(${license_index} EQUAL "-1")
           set(default OFF)
+
         else()
           set(default "${${found_as}_FOUND}")
+
         endif()
+
       endif()
 
     elseif(IS_MINSIZE_BUILD)
@@ -151,9 +156,11 @@ function(package_option name)
   if(";${_ALL_PACKAGE_OPTIONS};" MATCHES ";${name};")
     message(SEND_ERROR "package_option(${name}) was called twice.
                         This is a bug in the cmake build scripts.")
+
   else()
     list(APPEND _ALL_PACKAGE_OPTIONS "${name}")
     set(_ALL_PACKAGE_OPTIONS "${_ALL_PACKAGE_OPTIONS}" CACHE INTERNAL "Internal variable")
+
   endif()
 
   set(PANDA_PACKAGE_DEFAULT_${name} "${default}" PARENT_SCOPE)
@@ -205,6 +212,7 @@ function(package_option name)
       else()
         set(includes "${${found_as}_INCLUDE_DIR}")
       endif()
+
       if(${found_as}_LIBRARIES)
         set(libs ${${found_as}_LIBRARIES})
       else()
@@ -240,9 +248,11 @@ function(package_status name desc)
   if(";${_ALL_CONFIG_PACKAGES};" MATCHES ";${name};")
     message(SEND_ERROR "package_status(${name}) was called twice.
                         This is a bug in the cmake build scripts.")
+
   else()
     list(APPEND _ALL_CONFIG_PACKAGES "${name}")
     set(_ALL_CONFIG_PACKAGES "${_ALL_CONFIG_PACKAGES}" CACHE INTERNAL "Internal variable")
+
   endif()
 
   set(PANDA_PACKAGE_DESC_${name} "${desc}" PARENT_SCOPE)
@@ -265,6 +275,7 @@ function(show_packages)
       else()
         message("+ ${desc}")
       endif()
+
     else()
       if(NOT ${package}_FOUND)
         set(reason "not found")
@@ -273,7 +284,9 @@ function(show_packages)
       else()
         set(reason "disabled")
       endif()
+
       message("- ${desc} (${reason})")
+
     endif()
   endforeach()
 endfunction()
@@ -303,8 +316,10 @@ function(export_packages filename)
         INTERFACE_POSITION_INDEPENDENT_CODE
        #INTERFACE_SYSTEM_INCLUDE_DIRECTORIES  # Let the consumer dictate this
         INTERFACE_SOURCES)
+
       set(prop_ex "$<TARGET_PROPERTY:PKG::${pkg},${prop}>")
       string(APPEND exports "$<$<BOOL:${prop_ex}>:  ${prop} \"${prop_ex}\"\n>")
+
     endforeach(prop)
 
     # Ugh, INTERFACE_LINK_LIBRARIES isn't transitive.  Fine.  Take care of it
@@ -357,8 +372,10 @@ function(export_packages filename)
                 if(configs MATCHES ".*;.*")
                   set(_bling "$<1:$>") # genex-escaped $
                   list(APPEND libraries "${_bling}<${_bling}<CONFIG:${config}>:${imported_location}>")
+
                 else()
                   list(APPEND libraries ${imported_location})
+
                 endif()
               endif()
             endforeach(config)
@@ -377,8 +394,10 @@ function(export_packages filename)
       elseif("${head}" MATCHES "\\$<TARGET_NAME:\([^>]+\)>")
         string(REGEX REPLACE ".*\\$<TARGET_NAME:\([^>]+\)>.*" "\\1" match "${head}")
         list(APPEND stack "${match}")
+
       else()
         list(APPEND libraries "${head}")
+
       endif()
     endwhile(stack)
 
@@ -444,6 +463,7 @@ macro(find_package name)
   if(";${ARGN};" MATCHES ";(CONFIG|MODULE|NO_MODULE);")
     # Caller explicitly asking for a certain mode; so be it.
     _find_package(${ARGV})
+
   else()
     string(TOUPPER "${name}" __pkgname_upper)
 
@@ -452,9 +472,11 @@ macro(find_package name)
     if(NOT ${name}_FOUND)
       # CONFIG didn't work, fall back to MODULE
       _find_package("${name}" MODULE ${ARGN})
+
     else()
       # Case-sensitivity
       set(${__pkgname_upper}_FOUND 1)
+
     endif()
   endif()
 endmacro(find_package)

+ 17 - 0
cmake/macros/Python.cmake

@@ -31,13 +31,17 @@ function(add_python_target target)
   foreach(arg ${ARGN})
     if(arg STREQUAL "COMPONENT")
       set(keyword "component")
+
     elseif(arg STREQUAL "EXPORT")
       set(keyword "export")
+
     elseif(keyword)
       set(${keyword} "${arg}")
       unset(keyword)
+
     else()
       list(APPEND sources "${arg}")
+
     endif()
   endforeach(arg)
 
@@ -57,12 +61,14 @@ function(add_python_target target)
     if(PYTHON_ARCH_INSTALL_DIR)
       install(TARGETS ${target} EXPORT "${export}" COMPONENT "${component}" DESTINATION "${PYTHON_ARCH_INSTALL_DIR}/${slash_namespace}")
     endif()
+
   else()
     set_target_properties(${target} PROPERTIES
       OUTPUT_NAME "${basename}"
       PREFIX "libpy.${namespace}.")
 
     install(TARGETS ${target} EXPORT "${export}" COMPONENT "${component}" DESTINATION lib)
+
   endif()
 
   set(keywords OVERWRITE ARCH)
@@ -97,15 +103,20 @@ function(install_python_package path)
   foreach(arg ${ARGN})
     if(arg STREQUAL "ARCH")
       set(type "ARCH")
+
     elseif(arg STREQUAL "LIB")
       set(type "LIB")
+
     elseif(arg STREQUAL "COMPONENT")
       set(component_keyword ON)
+
     elseif(component_keyword)
       set(component "${arg}")
       set(component_keyword OFF)
+
     else()
       message(FATAL_ERROR "install_python_package got unexpected argument: ${ARGN}")
+
     endif()
   endforeach(arg)
 
@@ -163,12 +174,16 @@ function(ensure_python_init path)
   foreach(arg ${ARGN})
     if(arg STREQUAL "ARCH")
       set(arch ON)
+
     elseif(arg STREQUAL "ROOT")
       set(root ON)
+
     elseif(arg STREQUAL "OVERWRITE")
       set(overwrite ON)
+
     else()
       message(FATAL_ERROR "ensure_python_init got unexpected argument: ${arg}")
+
     endif()
   endforeach(arg)
 
@@ -217,6 +232,7 @@ def _fixup_path():
 _fixup_path()
 del _fixup_path
 ")
+
   endif()
 
   if(root AND WIN32 AND NOT CYGWIN)
@@ -244,6 +260,7 @@ def _fixup_dlls():
 _fixup_dlls()
 del _fixup_dlls
 ")
+
   endif()
 
 endfunction(ensure_python_init)

+ 2 - 0
cmake/macros/RunPzip.cmake

@@ -4,6 +4,7 @@ function(run_pzip target_name source destination glob)
     file(COPY "${source}"
       DESTINATION "${destination}"
       FILES_MATCHING PATTERN "${glob}")
+
     return()
   endif()
 
@@ -31,4 +32,5 @@ function(run_pzip target_name source destination glob)
   add_custom_target(${target_name} ALL
     DEPENDS ${dstfiles}
     WORKING_DIRECTORY "${destination}")
+
 endfunction(run_pzip)

+ 12 - 0
cmake/macros/Versioning.cmake

@@ -1,9 +1,21 @@
+# Filename: Versioning.cmake
+#
+# Description: Contains an override for add_library to set the
+#   VERSION and SOVERSION properties on all shared libraries, automatically, to
+#   the project version.
+#
+# Functions:
+#   add_library(...)
+#
+
 function(add_library target_name)
   _add_library("${target_name}" ${ARGN})
+
   get_target_property(type "${target_name}" TYPE)
   if(type STREQUAL "SHARED_LIBRARY")
     set_target_properties("${target_name}" PROPERTIES
       VERSION "${PROJECT_VERSION}"
       SOVERSION "${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}")
   endif()
+
 endfunction(add_library)

+ 3 - 1
direct/CMakeLists.txt

@@ -16,10 +16,12 @@ add_subdirectory(src/showbase)
 
 set(P3DIRECT_COMPONENTS
   p3dcparser p3deadrec
-  p3interval p3motiontrail p3showbase)
+  p3interval p3motiontrail p3showbase
+)
 if(HAVE_PYTHON)
   list(APPEND P3DIRECT_COMPONENTS p3distributed)
 endif()
+
 set(CMAKE_INSTALL_DEFAULT_COMPONENT_NAME "DirectDevel")
 add_metalib(p3direct INIT init_libdirect direct.h COMPONENTS ${P3DIRECT_COMPONENTS})
 unset(CMAKE_INSTALL_DEFAULT_COMPONENT_NAME)

+ 56 - 40
direct/src/dcparser/CMakeLists.txt

@@ -1,46 +1,62 @@
-add_bison_target(dcParser.cxx dcParser.yxx DEFINES dcParser.h PREFIX dcyy)
-add_flex_target(dcLexer.cxx dcLexer.lxx CASE_INSENSITIVE PREFIX dcyy)
-
 set(P3DCPARSER_HEADERS
-     dcAtomicField.h dcAtomicField.I dcClass.h dcClass.I
-     dcDeclaration.h
-     dcField.h dcField.I
-     dcFile.h dcFile.I
-     dcKeyword.h dcKeywordList.h
-     dcLexer.lxx
-     dcLexerDefs.h dcMolecularField.h dcParser.yxx dcParserDefs.h
-     dcSubatomicType.h
-     dcPackData.h dcPackData.I
-     dcPacker.h dcPacker.I
-     dcPackerCatalog.h dcPackerCatalog.I
-     dcPackerInterface.h dcPackerInterface.I
-     dcParameter.h dcClassParameter.h dcArrayParameter.h
-     dcSimpleParameter.h dcSwitchParameter.h
-     dcNumericRange.h dcNumericRange.I
-     dcSwitch.h
-     dcTypedef.h
-     dcPython.h
-     dcbase.h dcindent.h
-     dcmsgtypes.h
-     hashGenerator.h
-     primeNumberGenerator.h)
+  dcAtomicField.h dcAtomicField.I
+  dcClass.h dcClass.I
+  dcDeclaration.h
+  dcField.h dcField.I
+  dcFile.h dcFile.I
+  dcKeyword.h dcKeywordList.h
+  dcLexer.lxx dcLexerDefs.h
+  dcMolecularField.h
+  dcParser.yxx dcParserDefs.h
+  dcSubatomicType.h
+  dcPackData.h dcPackData.I
+  dcPacker.h dcPacker.I
+  dcPackerCatalog.h dcPackerCatalog.I
+  dcPackerInterface.h dcPackerInterface.I
+  dcParameter.h
+  dcClassParameter.h
+  dcArrayParameter.h
+  dcSimpleParameter.h
+  dcSwitchParameter.h
+  dcNumericRange.h dcNumericRange.I
+  dcSwitch.h
+  dcTypedef.h
+  dcPython.h
+  dcbase.h
+  dcindent.h
+  dcmsgtypes.h
+  hashGenerator.h
+  primeNumberGenerator.h
+)
 
 set(P3DCPARSER_SOURCES
-     dcAtomicField.cxx dcClass.cxx
-     dcDeclaration.cxx
-     dcField.cxx dcFile.cxx
-     dcKeyword.cxx dcKeywordList.cxx
-     dcMolecularField.cxx dcSubatomicType.cxx
-     dcPackData.cxx
-     dcPacker.cxx
-     dcPackerCatalog.cxx
-     dcPackerInterface.cxx
-     dcParameter.cxx dcClassParameter.cxx dcArrayParameter.cxx
-     dcSimpleParameter.cxx dcSwitchParameter.cxx
-     dcSwitch.cxx
-     dcTypedef.cxx
-     dcindent.cxx
-     hashGenerator.cxx primeNumberGenerator.cxx)
+  dcAtomicField.cxx
+  dcClass.cxx
+  dcDeclaration.cxx
+  dcField.cxx
+  dcFile.cxx
+  dcKeyword.cxx
+  dcKeywordList.cxx
+  dcMolecularField.cxx
+  dcSubatomicType.cxx
+  dcPackData.cxx
+  dcPacker.cxx
+  dcPackerCatalog.cxx
+  dcPackerInterface.cxx
+  dcParameter.cxx
+  dcClassParameter.cxx
+  dcArrayParameter.cxx
+  dcSimpleParameter.cxx
+  dcSwitchParameter.cxx
+  dcSwitch.cxx
+  dcTypedef.cxx
+  dcindent.cxx
+  hashGenerator.cxx
+  primeNumberGenerator.cxx
+)
+
+add_bison_target(dcParser.cxx dcParser.yxx DEFINES dcParser.h PREFIX dcyy)
+add_flex_target(dcLexer.cxx dcLexer.lxx CASE_INSENSITIVE PREFIX dcyy)
 
 # These cannot be interrogated, and are excluded from the composites.
 set(P3DCPARSER_PARSER_SOURCES

+ 6 - 4
direct/src/deadrec/CMakeLists.txt

@@ -1,10 +1,12 @@
 set(P3DEADREC_HEADERS
-    config_deadrec.h
-    smoothMover.h smoothMover.I)
+  config_deadrec.h
+  smoothMover.h smoothMover.I
+)
 
 set(P3DEADREC_SOURCES
-    config_deadrec.cxx
-    smoothMover.cxx)
+  config_deadrec.cxx
+  smoothMover.cxx
+)
 
 add_component_library(p3deadrec SYMBOL BUILDING_DIRECT_DEADREC
   ${P3DEADREC_HEADERS} ${P3DEADREC_SOURCES})

+ 10 - 8
direct/src/distributed/CMakeLists.txt

@@ -3,16 +3,18 @@ if(NOT HAVE_PYTHON)
 endif()
 
 set(P3DISTRIBUTED_HEADERS
-    config_distributed.h
-    cConnectionRepository.I
-    cConnectionRepository.h
-    cDistributedSmoothNodeBase.I
-    cDistributedSmoothNodeBase.h)
+  config_distributed.h
+  cConnectionRepository.I
+  cConnectionRepository.h
+  cDistributedSmoothNodeBase.I
+  cDistributedSmoothNodeBase.h
+)
 
 set(P3DISTRIBUTED_SOURCES
-    config_distributed.cxx
-    cConnectionRepository.cxx
-    cDistributedSmoothNodeBase.cxx)
+  config_distributed.cxx
+  cConnectionRepository.cxx
+  cDistributedSmoothNodeBase.cxx
+)
 
 add_component_library(p3distributed SYMBOL BUILDING_DIRECT_DISTRIBUTED
   ${P3DISTRIBUTED_HEADERS} ${P3DISTRIBUTED_SOURCES})

+ 35 - 33
direct/src/interval/CMakeLists.txt

@@ -1,39 +1,41 @@
 set(P3INTERVAL_HEADERS
-    config_interval.h
-    cInterval.I cInterval.h
-    cIntervalManager.I cIntervalManager.h
-    cConstraintInterval.I cConstraintInterval.h
-    cConstrainTransformInterval.I cConstrainTransformInterval.h
-    cConstrainPosInterval.I cConstrainPosInterval.h
-    cConstrainHprInterval.I cConstrainHprInterval.h
-    cConstrainPosHprInterval.I cConstrainPosHprInterval.h
-    cLerpInterval.I cLerpInterval.h
-    cLerpNodePathInterval.I cLerpNodePathInterval.h
-    cLerpAnimEffectInterval.I cLerpAnimEffectInterval.h
-    cMetaInterval.I cMetaInterval.h
-    hideInterval.I hideInterval.h
-    lerpblend.h
-    showInterval.I showInterval.h
-    waitInterval.I waitInterval.h
-    lerp_helpers.h)
+  config_interval.h
+  cInterval.I cInterval.h
+  cIntervalManager.I cIntervalManager.h
+  cConstraintInterval.I cConstraintInterval.h
+  cConstrainTransformInterval.I cConstrainTransformInterval.h
+  cConstrainPosInterval.I cConstrainPosInterval.h
+  cConstrainHprInterval.I cConstrainHprInterval.h
+  cConstrainPosHprInterval.I cConstrainPosHprInterval.h
+  cLerpInterval.I cLerpInterval.h
+  cLerpNodePathInterval.I cLerpNodePathInterval.h
+  cLerpAnimEffectInterval.I cLerpAnimEffectInterval.h
+  cMetaInterval.I cMetaInterval.h
+  hideInterval.I hideInterval.h
+  lerpblend.h
+  showInterval.I showInterval.h
+  waitInterval.I waitInterval.h
+  lerp_helpers.h
+)
 
 set(P3INTERVAL_SOURCES
-    config_interval.cxx
-    cInterval.cxx
-    cIntervalManager.cxx
-    cConstraintInterval.cxx
-    cConstrainTransformInterval.cxx
-    cConstrainPosInterval.cxx
-    cConstrainHprInterval.cxx
-    cConstrainPosHprInterval.cxx
-    cLerpInterval.cxx
-    cLerpNodePathInterval.cxx
-    cLerpAnimEffectInterval.cxx
-    cMetaInterval.cxx
-    hideInterval.cxx
-    lerpblend.cxx
-    showInterval.cxx
-    waitInterval.cxx)
+  config_interval.cxx
+  cInterval.cxx
+  cIntervalManager.cxx
+  cConstraintInterval.cxx
+  cConstrainTransformInterval.cxx
+  cConstrainPosInterval.cxx
+  cConstrainHprInterval.cxx
+  cConstrainPosHprInterval.cxx
+  cLerpInterval.cxx
+  cLerpNodePathInterval.cxx
+  cLerpAnimEffectInterval.cxx
+  cMetaInterval.cxx
+  hideInterval.cxx
+  lerpblend.cxx
+  showInterval.cxx
+  waitInterval.cxx
+)
 
 composite_sources(p3interval P3INTERVAL_SOURCES)
 add_component_library(p3interval SYMBOL BUILDING_DIRECT_INTERVAL

+ 6 - 4
direct/src/motiontrail/CMakeLists.txt

@@ -1,10 +1,12 @@
 set(P3MOTIONTRAIL_HEADERS
-    config_motiontrail.h
-    cMotionTrail.h)
+  config_motiontrail.h
+  cMotionTrail.h
+)
 
 set(P3MOTIONTRAIL_SOURCES
-    config_motiontrail.cxx
-    cMotionTrail.cxx)
+  config_motiontrail.cxx
+  cMotionTrail.cxx
+)
 
 add_component_library(p3motiontrail SYMBOL BUILDING_DIRECT_MOTIONTRAIL
   ${P3MOTIONTRAIL_HEADERS} ${P3MOTIONTRAIL_SOURCES})

+ 11 - 0
dtool/CompilerFlags.cmake

@@ -17,8 +17,10 @@ if(CMAKE_VERSION VERSION_LESS "3.1")
   else()
     string(APPEND CMAKE_CXX_FLAGS " -std=gnu++0x")
   endif()
+
 else()
   set(CMAKE_CXX_STANDARD 11)
+
 endif()
 
 # Set certain CMake flags we expect
@@ -52,10 +54,13 @@ endif()
 if(MSVC)
   string(APPEND CMAKE_C_FLAGS " /W3")
   string(APPEND CMAKE_CXX_FLAGS " /W3")
+
 else()
   string(APPEND CMAKE_C_FLAGS " -Wall")
   string(APPEND CMAKE_CXX_FLAGS " -Wall")
+
 endif()
+
 if(NOT "x${CMAKE_CXX_COMPILER_ID}" STREQUAL "xMSVC")
   set(disable_flags "-Wno-unused-function -Wno-unused-parameter")
   string(APPEND CMAKE_C_FLAGS " ${disable_flags}")
@@ -71,6 +76,7 @@ if(NOT "x${CMAKE_CXX_COMPILER_ID}" STREQUAL "xMSVC")
       "${CMAKE_CXX_FLAGS} -Wno-microsoft-template -Wno-unused-command-line-argument")
   endif()
 endif()
+
 if(WIN32)
   add_definitions(-D_CRT_SECURE_NO_WARNINGS)
 endif()
@@ -87,16 +93,21 @@ set(CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS "")
 if(MSVC)
   set(cxx_exceptions_on "/EHsc")
   set(cxx_exceptions_off "/D_HAS_EXCEPTIONS=0")
+
 else()
   check_cxx_compiler_flag("-fno-exceptions" COMPILER_SUPPORTS_FEXCEPTIONS)
   if(COMPILER_SUPPORTS_FEXCEPTIONS)
     set(cxx_exceptions_on "-fexceptions")
     set(cxx_exceptions_off "-fno-exceptions")
+
   else()
     set(cxx_exceptions_on)
     set(cxx_exceptions_off)
+
   endif()
+
 endif()
+
 set(cxx_exceptions_property "$<BOOL:$<TARGET_PROPERTY:CXX_EXCEPTIONS>>")
 add_compile_options(
   "$<${cxx_exceptions_property}:${cxx_exceptions_on}>"

+ 5 - 0
dtool/LocalSetup.cmake

@@ -95,6 +95,7 @@ if(IS_LINUX)
   set(HAVE_PROC_SELF_ENVIRON 1)
   set(HAVE_PROC_SELF_CMDLINE 1)
 endif()
+
 if(IS_FREEBSD)
   set(HAVE_PROC_CURPROC_FILE 1)
   set(HAVE_PROC_CURPROC_MAP 1)
@@ -146,10 +147,12 @@ if(BUILD_SHARED_LIBS)
   set(LINK_ALL_STATIC OFF)
   set(MODULE_TYPE "MODULE"
     CACHE INTERNAL "" FORCE)
+
 else()
   set(LINK_ALL_STATIC ON)
   set(MODULE_TYPE "STATIC"
     CACHE INTERNAL "" FORCE)
+
 endif()
 
 # Now go through all the packages and report whether we have them.
@@ -170,8 +173,10 @@ if(HAVE_THREADS)
   else()
     message("Compilation will include nonpipelined threading support.")
   endif()
+
 else()
   message("Configuring Panda without threading support.")
+
 endif()
 
 message("")

+ 34 - 1
dtool/Package.cmake

@@ -12,6 +12,7 @@ if(Python_FOUND)
   set(PYTHON_EXECUTABLE ${Python_EXECUTABLE})
   set(PYTHON_INCLUDE_DIRS ${Python_INCLUDE_DIRS})
   set(PYTHON_VERSION_STRING ${Python_VERSION})
+
 else()
   find_package(PythonInterp ${WANT_PYTHON_VERSION} QUIET)
   find_package(PythonLibs ${PYTHON_VERSION_STRING} QUIET)
@@ -23,6 +24,7 @@ else()
       set(PYTHON_VERSION_STRING ${PYTHONLIBS_VERSION_STRING})
     endif()
   endif()
+
 endif()
 
 package_option(PYTHON
@@ -36,6 +38,7 @@ if(HAVE_PYTHON)
   if(WIN32 AND NOT CYGWIN)
     set(_LIB_DIR ".")
     set(_ARCH_DIR ".")
+
   elseif(PYTHON_EXECUTABLE)
     execute_process(
       COMMAND ${PYTHON_EXECUTABLE}
@@ -47,11 +50,12 @@ if(HAVE_PYTHON)
         -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(True))"
       OUTPUT_VARIABLE _ARCH_DIR
       OUTPUT_STRIP_TRAILING_WHITESPACE)
+
   else()
     set(_LIB_DIR "")
     set(_ARCH_DIR "")
-  endif()
 
+  endif()
 
   execute_process(
     COMMAND ${PYTHON_EXECUTABLE}
@@ -78,6 +82,7 @@ if(HAVE_PYTHON)
 
   set(PYTHON_EXTENSION_SUFFIX "${_EXT_SUFFIX}" CACHE STRING
     "Suffix for Python binary extension modules.")
+
 endif()
 
 
@@ -119,25 +124,33 @@ package_status(ZLIB "zlib")
 
 # JPEG
 find_package(JPEG QUIET)
+
 package_option(JPEG DEFAULT ON "Enable support for loading .jpg images.")
+
 package_status(JPEG "libjpeg")
 
 # PNG
 find_package(PNG QUIET)
+
 package_option(PNG
   DEFAULT ON
   "Enable support for loading .png images."
   IMPORTED_AS PNG::PNG)
+
 package_status(PNG "libpng")
 
 # TIFF
 find_package(TIFF QUIET)
+
 package_option(TIFF "Enable support for loading .tif images.")
+
 package_status(TIFF "libtiff")
 
 # OpenEXR
 find_package(OpenEXR QUIET)
+
 package_option(OPENEXR "Enable support for loading .exr images.")
+
 package_status(OPENEXR "OpenEXR")
 
 # libsquish
@@ -156,8 +169,10 @@ package_status(SQUISH "libsquish")
 
 # libtar
 find_package(Tar QUIET)
+
 package_option(TAR
   "This is used to optimize patch generation against tar files.")
+
 package_status(TAR "libtar")
 
 
@@ -167,15 +182,19 @@ package_status(TAR "libtar")
 
 # Assimp
 find_package(Assimp QUIET)
+
 package_option(ASSIMP
   "Build pandatool with support for loading 3D assets supported by Assimp.")
+
 package_status(ASSIMP "Assimp")
 
 # FCollada
 find_package(FCollada QUIET)
+
 package_option(FCOLLADA
   "Build pandatool with support for loading Collada files using FCollada."
   IMPORTED_AS FCollada::FCollada)
+
 package_status(FCOLLADA "FCollada")
 
 
@@ -253,16 +272,20 @@ package_status(FFMPEG "FFmpeg" "${ffmpeg_features}")
 
 # Vorbis
 find_package(VorbisFile QUIET)
+
 package_option(VORBIS
   FOUND_AS VORBISFILE
   "Enables support for decoding Vorbis-encoded .ogg audio files via libvorbisfile.")
+
 package_status(VORBIS "Vorbis")
 
 # Opus
 find_package(OpusFile QUIET)
+
 package_option(OPUS
   FOUND_AS OPUSFILE
   "Enables support for decoding .opus audio files via libopusfile.")
+
 package_status(OPUS "Opus")
 
 #
@@ -271,31 +294,37 @@ package_status(OPUS "Opus")
 
 # Miles Sound System
 find_package(Miles QUIET)
+
 package_option(RAD_MSS
   "This enables support for audio output via the Miles Sound System,
   by RAD Game Tools. This requires a commercial license to use, so you'll know
   if you need to enable this option."
   FOUND_AS Miles
   LICENSE "Miles")
+
 package_status(RAD_MSS "Miles Sound System")
 
 # FMOD Ex
 find_package(FMODEx QUIET)
+
 package_option(FMODEX
   "This enables support for the FMOD Ex sound library,
   from Firelight Technologies. This audio library is free for non-commercial
   use."
   LICENSE "FMOD")
+
 package_status(FMODEX "FMOD Ex sound library")
 
 # OpenAL
 find_package(OpenAL QUIET)
+
 package_option(OPENAL
   "This enables support for audio output via OpenAL. Some platforms, such as
   macOS, provide their own OpenAL implementation, which Panda3D can use. But,
   on most platforms this will imply OpenAL Soft, which is LGPL licensed."
   IMPORTED_AS OpenAL::OpenAL
   LICENSE "LGPL")
+
 package_status(OPENAL "OpenAL sound library")
 
 if(OPENAL_FOUND AND APPLE)
@@ -335,7 +364,9 @@ package_status(HARFBUZZ "HarfBuzz")
 set(Freetype_FIND_QUIETLY TRUE) # Fix for builtin FindGTK2
 set(GTK2_GTK_FIND_QUIETLY TRUE) # Fix for builtin FindGTK2
 find_package(GTK2 QUIET COMPONENTS gtk)
+
 package_option(GTK2)
+
 package_status(GTK2 "gtk+-2")
 
 
@@ -513,9 +544,11 @@ package_status(OPENCV "OpenCV")
 # CMake <3.7 doesn't support GREATER_EQUAL, so this uses NOT LESS instead.
 if(NOT OpenCV_VERSION_MAJOR LESS 3)
   set(OPENCV_VER_3 ON)
+
 elseif(NOT OpenCV_VERSION_MAJOR LESS 2 AND
        NOT OpenCV_VERSION_MINOR LESS 3)
   set(OPENCV_VER_23 ON)
+
 endif()
 
 # ARToolKit

+ 1 - 0
dtool/PandaVersion.cmake

@@ -98,5 +98,6 @@ if(PANDA_OFFICIAL_VERSION)
 else()
   set(P3D_PLUGIN_DLL_DOT_VERSION "${P3D_PLUGIN_VERSION}.0")
 endif()
+
 # The same thing as a comma-delimited quad.
 string(REPLACE "." "," P3D_PLUGIN_DLL_COMMA_VERSION "${P3D_PLUGIN_DLL_DOT_VERSION}")

+ 2 - 3
dtool/src/cppparser/CMakeLists.txt

@@ -1,5 +1,3 @@
-add_bison_target(cppBison.cxx cppBison.yxx DEFINES cppBison.h PREFIX cppyy)
-
 set(P3CPPPARSER_HEADERS
   cppArrayType.h cppBison.yxx cppBisonDefs.h
   cppClassTemplateParameter.h cppCommentBlock.h
@@ -37,8 +35,9 @@ set(P3CPPPARSER_SOURCES
   cppUsing.cxx cppVisibility.cxx
 )
 
-composite_sources(p3cppParser P3CPPPARSER_SOURCES)
+add_bison_target(cppBison.cxx cppBison.yxx DEFINES cppBison.h PREFIX cppyy)
 
+composite_sources(p3cppParser P3CPPPARSER_SOURCES)
 add_library(p3cppParser STATIC ${P3CPPPARSER_HEADERS} ${P3CPPPARSER_SOURCES})
 target_link_libraries(p3cppParser p3dtool)
 

+ 65 - 66
dtool/src/dtoolbase/CMakeLists.txt

@@ -10,83 +10,82 @@ if(CMAKE_CXX_STANDARD GREATER 16)
 endif()
 
 set(P3DTOOLBASE_HEADERS
-    ${CMAKE_CURRENT_BINARY_DIR}/checkPandaVersion.h
-    ${CMAKE_CURRENT_BINARY_DIR}/pandaVersion.h
-    addHash.I addHash.h
-    atomicAdjust.h
-    atomicAdjustDummyImpl.h atomicAdjustDummyImpl.I
-    atomicAdjustGccImpl.h atomicAdjustGccImpl.I
-    atomicAdjustI386Impl.h atomicAdjustI386Impl.I
-    atomicAdjustPosixImpl.h atomicAdjustPosixImpl.I
-    atomicAdjustWin32Impl.h atomicAdjustWin32Impl.I
-    cmath.I cmath.h
-    deletedBufferChain.h deletedBufferChain.I
-    deletedChain.h deletedChain.T
-    dtoolbase.h dtoolbase_cc.h dtoolsymbols.h
-    dtool_platform.h
-    fakestringstream.h
-    indent.I indent.h
-    memoryBase.h
-    memoryHook.h memoryHook.I
-    mutexImpl.h
-    mutexDummyImpl.h mutexDummyImpl.I
-    mutexPosixImpl.h mutexPosixImpl.I
-    mutexWin32Impl.h mutexWin32Impl.I
-    mutexSpinlockImpl.h mutexSpinlockImpl.I
-    nearly_zero.h
-    neverFreeMemory.h neverFreeMemory.I
-    numeric_types.h
-    pdtoa.h
-    pstrtod.h
-    register_type.I register_type.h
-    selectThreadImpl.h
-    stl_compares.I stl_compares.h
-    typeHandle.I typeHandle.h
-    typeRegistry.I typeRegistry.h
-    typeRegistryNode.I typeRegistryNode.h
-    typedObject.I typedObject.h
-    pallocator.T pallocator.h
-    pdeque.h plist.h pmap.h pset.h
-    pvector.h epvector.h
-    lookup3.h
-    version.h
+  ${CMAKE_CURRENT_BINARY_DIR}/checkPandaVersion.h
+  ${CMAKE_CURRENT_BINARY_DIR}/pandaVersion.h
+  addHash.I addHash.h
+  atomicAdjust.h
+  atomicAdjustDummyImpl.h atomicAdjustDummyImpl.I
+  atomicAdjustGccImpl.h atomicAdjustGccImpl.I
+  atomicAdjustI386Impl.h atomicAdjustI386Impl.I
+  atomicAdjustPosixImpl.h atomicAdjustPosixImpl.I
+  atomicAdjustWin32Impl.h atomicAdjustWin32Impl.I
+  cmath.I cmath.h
+  deletedBufferChain.h deletedBufferChain.I
+  deletedChain.h deletedChain.T
+  dtoolbase.h dtoolbase_cc.h dtoolsymbols.h
+  dtool_platform.h
+  fakestringstream.h
+  indent.I indent.h
+  memoryBase.h
+  memoryHook.h memoryHook.I
+  mutexImpl.h
+  mutexDummyImpl.h mutexDummyImpl.I
+  mutexPosixImpl.h mutexPosixImpl.I
+  mutexWin32Impl.h mutexWin32Impl.I
+  mutexSpinlockImpl.h mutexSpinlockImpl.I
+  nearly_zero.h
+  neverFreeMemory.h neverFreeMemory.I
+  numeric_types.h
+  pdtoa.h
+  pstrtod.h
+  register_type.I register_type.h
+  selectThreadImpl.h
+  stl_compares.I stl_compares.h
+  typeHandle.I typeHandle.h
+  typeRegistry.I typeRegistry.h
+  typeRegistryNode.I typeRegistryNode.h
+  typedObject.I typedObject.h
+  pallocator.T pallocator.h
+  pdeque.h plist.h pmap.h pset.h
+  pvector.h epvector.h
+  lookup3.h
+  version.h
 )
 
 set(P3DTOOLBASE_SOURCES
-    ${CMAKE_CURRENT_BINARY_DIR}/checkPandaVersion.cxx
-    addHash.cxx
-    atomicAdjustDummyImpl.cxx
-    atomicAdjustI386Impl.cxx
-    atomicAdjustPosixImpl.cxx
-    atomicAdjustWin32Impl.cxx
-    deletedBufferChain.cxx
-    dtoolbase.cxx
-    indent.cxx
-    lookup3.c
-    memoryBase.cxx
-    memoryHook.cxx
-    mutexDummyImpl.cxx
-    mutexPosixImpl.cxx
-    mutexWin32Impl.cxx
-    mutexSpinlockImpl.cxx
-    neverFreeMemory.cxx
-    pdtoa.cxx
-    pstrtod.cxx
-    register_type.cxx
-    typeHandle.cxx
-    typeRegistry.cxx typeRegistryNode.cxx
-    typedObject.cxx
+  ${CMAKE_CURRENT_BINARY_DIR}/checkPandaVersion.cxx
+  addHash.cxx
+  atomicAdjustDummyImpl.cxx
+  atomicAdjustI386Impl.cxx
+  atomicAdjustPosixImpl.cxx
+  atomicAdjustWin32Impl.cxx
+  deletedBufferChain.cxx
+  dtoolbase.cxx
+  indent.cxx
+  lookup3.c
+  memoryBase.cxx
+  memoryHook.cxx
+  mutexDummyImpl.cxx
+  mutexPosixImpl.cxx
+  mutexWin32Impl.cxx
+  mutexSpinlockImpl.cxx
+  neverFreeMemory.cxx
+  pdtoa.cxx
+  pstrtod.cxx
+  register_type.cxx
+  typeHandle.cxx
+  typeRegistry.cxx typeRegistryNode.cxx
+  typedObject.cxx
 )
 
 set(P3DTOOLBASE_IGATEEXT
-    typeHandle_ext.cxx
-    typeHandle_ext.h
+  typeHandle_ext.cxx
+  typeHandle_ext.h
 )
 
 set_source_files_properties(indent.cxx PROPERTIES SKIP_COMPOSITING YES)
 
 composite_sources(p3dtoolbase P3DTOOLBASE_SOURCES)
-
 add_component_library(p3dtoolbase NOINIT SYMBOL BUILDING_DTOOL_DTOOLBASE
   ${P3DTOOLBASE_HEADERS} ${P3DTOOLBASE_SOURCES})
 # Help other libraries find the autogenerated headers

+ 1 - 1
dtool/src/dtoolutil/CMakeLists.txt

@@ -30,6 +30,7 @@ set(P3DTOOLUTIL_HEADERS
 if(APPLE)
   set(P3DTOOLUTIL_HEADERS ${P3DTOOLUTIL_HEADERS}
     filename_assist.mm filename_assist.h)
+
   set_source_files_properties(
     filename_assist.mm filename_assist.h PROPERTIES
     WRAP_EXCLUDE YES
@@ -70,7 +71,6 @@ set(P3DTOOLUTIL_IGATEEXT
 )
 
 composite_sources(p3dtoolutil P3DTOOLUTIL_SOURCES)
-
 add_component_library(p3dtoolutil SYMBOL BUILDING_DTOOL_DTOOLUTIL
   ${P3DTOOLUTIL_HEADERS} ${P3DTOOLUTIL_SOURCES})
 target_link_libraries(p3dtoolutil p3dtoolbase ${CMAKE_DL_LIBS})

+ 2 - 1
dtool/src/interrogate/CMakeLists.txt

@@ -59,7 +59,6 @@ set(INTERROGATE_PREAMBLE_PYTHON_NATIVE
 )
 
 composite_sources(interrogate INTERROGATE_SOURCES)
-
 add_executable(interrogate ${INTERROGATE_HEADERS} ${INTERROGATE_SOURCES})
 target_link_libraries(interrogate p3cppParser p3dtoolconfig p3pystub
   PKG::OPENSSL)
@@ -93,7 +92,9 @@ endif()
 if(WANT_INTERROGATE)
   install(TARGETS interrogate interrogate_module EXPORT Core COMPONENT CoreDevel DESTINATION bin)
   install(FILES ${INTERROGATE_HEADERS} COMPONENT CoreDevel DESTINATION include/panda3d)
+
 else()
   set_target_properties(interrogate interrogate_module
     PROPERTIES EXCLUDE_FROM_ALL ON)
+
 endif()

+ 2 - 3
dtool/src/interrogatedb/CMakeLists.txt

@@ -34,7 +34,6 @@ set(P3IGATERUNTIME_HEADERS
 )
 
 composite_sources(p3interrogatedb P3INTERROGATEDB_SOURCES)
-
 add_component_library(p3interrogatedb NOINIT SYMBOL BUILDING_INTERROGATEDB
   ${P3INTERROGATEDB_HEADERS} ${P3INTERROGATEDB_SOURCES})
 target_link_libraries(p3interrogatedb p3prc p3dconfig p3dtool)
@@ -68,9 +67,9 @@ add_custom_command(
     -srcdir "${CMAKE_CURRENT_SOURCE_DIR}"
     -oc "${CMAKE_CURRENT_BINARY_DIR}/interrogatedb_module.cxx"
     ${P3INTERROGATEDB_IGATE}
+
   DEPENDS host_interrogate ${P3INTERROGATEDB_IGATE}
-  COMMENT "Interrogating interrogatedb"
-)
+  COMMENT "Interrogating interrogatedb")
 
 add_python_target(panda3d.interrogatedb
   "${CMAKE_CURRENT_BINARY_DIR}/interrogatedb_module.cxx")

+ 8 - 6
dtool/src/prc/CMakeLists.txt

@@ -1,5 +1,3 @@
-configure_file(prc_parameters.h.in prc_parameters.h)
-
 set(P3PRC_HEADERS
   androidLogStream.h
   bigEndian.h
@@ -33,7 +31,8 @@ set(P3PRC_HEADERS
   streamReader.I streamReader.h
   streamWrapper.I streamWrapper.h
   streamWriter.I streamWriter.h
-  ${CMAKE_CURRENT_BINARY_DIR}/prc_parameters.h)
+  ${CMAKE_CURRENT_BINARY_DIR}/prc_parameters.h
+)
 
 set(P3PRC_SOURCES
   config_prc.cxx
@@ -61,7 +60,10 @@ set(P3PRC_SOURCES
   notifySeverity.cxx
   prcKeyRegistry.cxx
   reversedNumericData.cxx
-  streamReader.cxx streamWrapper.cxx streamWriter.cxx)
+  streamReader.cxx streamWrapper.cxx streamWriter.cxx
+)
+
+configure_file(prc_parameters.h.in prc_parameters.h)
 
 if(ANDROID)
   set(P3PRC_SOURCES ${P3PRC_SOURCES}
@@ -72,10 +74,10 @@ set(P3PRC_IGATEEXT
   streamReader_ext.cxx
   streamReader_ext.h
   streamWriter_ext.cxx
-  streamWriter_ext.h)
+  streamWriter_ext.h
+)
 
 composite_sources(p3prc P3PRC_SOURCES)
-
 add_component_library(p3prc NOINIT SYMBOL BUILDING_DTOOL_PRC
   ${P3PRC_HEADERS} ${P3PRC_SOURCES})
 target_include_directories(p3prc PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}>)

+ 8 - 5
panda/CMakeLists.txt

@@ -81,11 +81,12 @@ add_subdirectory(metalibs/pandaphysics)
 
 # Now add the Python modules:
 set(CORE_MODULE_COMPONENTS
-    p3chan p3char p3collide p3cull p3device p3dgraph p3display p3distort
-    p3downloader p3dxml p3event p3express p3gobj p3grutil p3gsgbase p3linmath
-    p3mathutil p3movies p3parametrics p3pgraph p3pgraphnodes p3pgui
-    p3pipeline p3pnmimage p3pstatclient p3putil p3recorder p3text p3tform
-    p3prc p3dtoolutil p3dtoolbase)
+  p3chan p3char p3collide p3cull p3device p3dgraph p3display p3distort
+  p3downloader p3dxml p3event p3express p3gobj p3grutil p3gsgbase p3linmath
+  p3mathutil p3movies p3parametrics p3pgraph p3pgraphnodes p3pgui
+  p3pipeline p3pnmimage p3pstatclient p3putil p3recorder p3text p3tform
+  p3prc p3dtoolutil p3dtoolbase
+)
 
 if(WANT_NATIVE_NET)
   list(APPEND CORE_MODULE_COMPONENTS p3nativenet)
@@ -93,9 +94,11 @@ if(WANT_NATIVE_NET)
     list(APPEND CORE_MODULE_COMPONENTS p3net)
   endif()
 endif()
+
 if(HAVE_AUDIO)
   list(APPEND CORE_MODULE_COMPONENTS p3audio)
 endif()
+
 if(HAVE_FREETYPE)
   list(APPEND CORE_MODULE_COMPONENTS p3pnmtext)
 endif()

+ 7 - 4
panda/metalibs/panda/CMakeLists.txt

@@ -1,8 +1,9 @@
 set(PANDA_LINK_TARGETS
-    p3chan p3char p3collide p3cull p3device p3dgraph p3display p3distort p3dxml
-    p3event p3gobj p3grutil p3gsgbase p3linmath p3mathutil
-    p3movies p3parametrics p3pgraph p3pgraphnodes p3pgui p3pipeline
-    p3pnmimage p3pnmimagetypes p3pstatclient p3putil p3recorder p3text p3tform)
+  p3chan p3char p3collide p3cull p3device p3dgraph p3display p3distort p3dxml
+  p3event p3gobj p3grutil p3gsgbase p3linmath p3mathutil
+  p3movies p3parametrics p3pgraph p3pgraphnodes p3pgui p3pipeline
+  p3pnmimage p3pnmimagetypes p3pstatclient p3putil p3recorder p3text p3tform
+)
 
 if(WANT_NATIVE_NET)
   list(APPEND PANDA_LINK_TARGETS p3nativenet)
@@ -10,9 +11,11 @@ if(WANT_NATIVE_NET)
     list(APPEND PANDA_LINK_TARGETS p3net)
   endif()
 endif()
+
 if(HAVE_AUDIO)
   list(APPEND PANDA_LINK_TARGETS p3audio)
 endif()
+
 if(HAVE_FREETYPE)
   list(APPEND PANDA_LINK_TARGETS p3pnmtext)
 endif()

+ 5 - 0
panda/metalibs/pandagl/CMakeLists.txt

@@ -7,21 +7,26 @@ set(PANDAGL_LINK_TARGETS p3glgsg p3glstuff)
 if(HAVE_GLX)
   list(APPEND PANDAGL_LINK_TARGETS p3glxdisplay p3x11display)
   set(PANDAGL_PIPE_TYPE "glxGraphicsPipe")
+
 elseif(HAVE_WGL)
   list(APPEND PANDAGL_LINK_TARGETS p3wgldisplay p3windisplay)
   set(PANDAGL_PIPE_TYPE "wglGraphicsPipe")
+
 elseif(HAVE_COCOA)
   list(APPEND PANDAGL_LINK_TARGETS p3cocoadisplay)
   set(PANDAGL_PIPE_TYPE "CocoaGraphicsPipe")
   set(PANDAGL_PIPE_INCLUDE "cocoaGraphicsPipe.h")
+
 elseif(HAVE_CARBON)
   list(APPEND PANDAGL_LINK_TARGETS p3osxdisplay)
   set(PANDAGL_PIPE_TYPE "osxGraphicsPipe")
+
 else()
   message("") # Add extra line before error
   message(SEND_ERROR
     "When compiling with OpenGL (HAVE_GL), at least one of:
   HAVE_WGL, HAVE_COCOA, HAVE_CARBON, or HAVE_GLX must be defined.")
+
 endif()
 
 if(NOT PANDAGL_PIPE_INCLUDE)

+ 2 - 0
panda/metalibs/pandagles/CMakeLists.txt

@@ -5,9 +5,11 @@ endif()
 if(ANDROID)
   set(GLES1_PIPE_TYPE "AndroidGraphicsPipe")
   set(GLES1_PIPE_INCLUDE "androidGraphicsPipe.h")
+
 else()
   set(GLES1_PIPE_TYPE "eglGraphicsPipe")
   set(GLES1_PIPE_INCLUDE "eglGraphicsPipe.h")
+
 endif()
 
 set(CMAKE_INSTALL_DEFAULT_COMPONENT_NAME "GLESDevel")

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

@@ -3,22 +3,24 @@ if(NOT HAVE_AUDIO)
 endif()
 
 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)
+  config_audio.h
+  filterProperties.h filterProperties.I
+  audioLoadRequest.h audioLoadRequest.I
+  audioManager.h audioManager.I
+  audioSound.h audioSound.I
+  nullAudioManager.h
+  nullAudioSound.h
+)
 
 set(P3AUDIO_SOURCES
-    config_audio.cxx
-    filterProperties.cxx
-    audioLoadRequest.cxx
-    audioManager.cxx
-    audioSound.cxx
-    nullAudioManager.cxx
-    nullAudioSound.cxx)
+  config_audio.cxx
+  filterProperties.cxx
+  audioLoadRequest.cxx
+  audioManager.cxx
+  audioSound.cxx
+  nullAudioManager.cxx
+  nullAudioSound.cxx
+)
 
 composite_sources(p3audio P3AUDIO_SOURCES)
 add_component_library(p3audio NOINIT SYMBOL BUILDING_PANDA_AUDIO

+ 24 - 18
panda/src/audiotraits/CMakeLists.txt

@@ -7,18 +7,20 @@ endif()
 
 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)
+    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)
+    config_milesAudio.cxx milesAudioManager.cxx milesAudioSound.cxx
+    milesAudioStream.cxx globalMilesManager.cxx milesAudioSample.cxx
+    milesAudioSequence.cxx
+  )
 
   composite_sources(p3miles_audio P3MILES_SOURCES)
   add_library(p3miles_audio ${P3MILES_HEADERS} ${P3MILES_SOURCES})
@@ -37,12 +39,14 @@ endif()
 
 if(HAVE_FMODEX)
   set(P3FMOD_HEADERS
-      config_fmodAudio.h
-      fmodAudioManager.h
-      fmodAudioSound.I fmodAudioSound.h)
+    config_fmodAudio.h
+    fmodAudioManager.h
+    fmodAudioSound.I fmodAudioSound.h
+  )
 
   set(P3FMOD_SOURCES
-      config_fmodAudio.cxx fmodAudioManager.cxx fmodAudioSound.cxx)
+    config_fmodAudio.cxx fmodAudioManager.cxx fmodAudioSound.cxx
+  )
 
   composite_sources(p3fmod_audio P3FMOD_SOURCES)
   add_library(p3fmod_audio ${P3FMOD_HEADERS} ${P3FMOD_SOURCES})
@@ -61,12 +65,14 @@ endif()
 
 if(HAVE_OPENAL)
   set(P3OPENAL_HEADERS
-      config_openalAudio.h
-      openalAudioManager.h
-      openalAudioSound.I openalAudioSound.h)
+    config_openalAudio.h
+    openalAudioManager.h
+    openalAudioSound.I openalAudioSound.h
+  )
 
   set(P3OPENAL_SOURCES
-      config_openalAudio.cxx openalAudioManager.cxx openalAudioSound.cxx)
+    config_openalAudio.cxx openalAudioManager.cxx openalAudioSound.cxx
+  )
 
 
   composite_sources(p3openal_audio P3OPENAL_SOURCES)

+ 4 - 2
panda/src/bullet/CMakeLists.txt

@@ -53,7 +53,8 @@ set(P3BULLET_HEADERS
   bulletTriangleMeshShape.I bulletTriangleMeshShape.h
   bulletVehicle.I bulletVehicle.h
   bulletWheel.I bulletWheel.h
-  bulletWorld.I bulletWorld.h)
+  bulletWorld.I bulletWorld.h
+)
 
 set(P3BULLET_SOURCES
   config_bullet.cxx
@@ -104,7 +105,8 @@ set(P3BULLET_SOURCES
   bulletTriangleMeshShape.cxx
   bulletVehicle.cxx
   bulletWheel.cxx
-  bulletWorld.cxx)
+  bulletWorld.cxx
+)
 
 composite_sources(p3bullet P3BULLET_SOURCES)
 add_library(p3bullet ${P3BULLET_SOURCES} ${P3BULLET_HEADERS})

+ 1 - 0
panda/src/char/CMakeLists.txt

@@ -8,6 +8,7 @@ set(P3CHAR_HEADERS
   config_char.h
   jointVertexTransform.I jointVertexTransform.h
 )
+
 set(P3CHAR_SOURCES
   character.cxx
   characterJoint.cxx characterJointBundle.cxx

+ 22 - 20
panda/src/cocoadisplay/CMakeLists.txt

@@ -3,28 +3,30 @@ if(NOT APPLE OR NOT HAVE_GL OR NOT HAVE_COCOA)
 endif()
 
 set(P3COCOADISPLAY_HEADERS
-    config_cocoadisplay.h
-    cocoaGraphicsBuffer.h cocoaGraphicsBuffer.I
-    cocoaGraphicsPipe.h cocoaGraphicsPipe.I
-    cocoaGraphicsWindow.h cocoaGraphicsWindow.I
-    cocoaGraphicsStateGuardian.h cocoaGraphicsStateGuardian.I
-    cocoaPandaApp.h
-    cocoaPandaView.h
-    cocoaPandaWindow.h
-    cocoaPandaWindowDelegate.h
-    cocoaPandaAppDelegate.h)
+  config_cocoadisplay.h
+  cocoaGraphicsBuffer.h cocoaGraphicsBuffer.I
+  cocoaGraphicsPipe.h cocoaGraphicsPipe.I
+  cocoaGraphicsWindow.h cocoaGraphicsWindow.I
+  cocoaGraphicsStateGuardian.h cocoaGraphicsStateGuardian.I
+  cocoaPandaApp.h
+  cocoaPandaView.h
+  cocoaPandaWindow.h
+  cocoaPandaWindowDelegate.h
+  cocoaPandaAppDelegate.h
+)
 
 set(P3COCOADISPLAY_SOURCES
-    config_cocoadisplay.mm
-    cocoaGraphicsBuffer.mm
-    cocoaGraphicsPipe.mm
-    cocoaGraphicsStateGuardian.mm
-    cocoaGraphicsWindow.mm
-    cocoaPandaApp.mm
-    cocoaPandaView.mm
-    cocoaPandaWindow.mm
-    cocoaPandaWindowDelegate.mm
-    cocoaPandaAppDelegate.mm)
+  config_cocoadisplay.mm
+  cocoaGraphicsBuffer.mm
+  cocoaGraphicsPipe.mm
+  cocoaGraphicsStateGuardian.mm
+  cocoaGraphicsWindow.mm
+  cocoaPandaApp.mm
+  cocoaPandaView.mm
+  cocoaPandaWindow.mm
+  cocoaPandaWindowDelegate.mm
+  cocoaPandaAppDelegate.mm
+)
 
 composite_sources(p3cocoadisplay P3COCOADISPLAY_SOURCES)
 add_component_library(p3cocoadisplay SYMBOL BUILDING_PANDA_COCOADISPLAY

+ 1 - 11
panda/src/collide/CMakeLists.txt

@@ -31,6 +31,7 @@ set(P3COLLIDE_HEADERS
   collisionVisualizer.I collisionVisualizer.h
   config_collide.h
 )
+
 set(P3COLLIDE_SOURCES
   collisionBox.cxx
   collisionCapsule.cxx
@@ -78,14 +79,3 @@ if(NOT BUILD_METALIBS)
     ARCHIVE COMPONENT CoreDevel)
 endif()
 install(FILES ${P3COLLIDE_HEADERS} COMPONENT CoreDevel DESTINATION include/panda3d)
-
-#begin test_bin_target
-  #define TARGET test_collide
-  #define LOCAL_LIBS
-#    p3collide
-  #define OTHER_LIBS $[OTHER_LIBS] p3pystub
-
-  #define SOURCES
-#    test_collide.cxx
-
-#end test_bin_target

+ 3 - 6
panda/src/configfiles/CMakeLists.txt

@@ -2,18 +2,15 @@
 set(AUX_DISPLAYS)
 
 if(HAVE_GL)
-  set(AUX_DISPLAYS "${AUX_DISPLAYS}
-aux-display pandagl")
+  set(AUX_DISPLAYS "${AUX_DISPLAYS}\naux-display pandagl")
 endif()
 
 if(HAVE_DX9)
-  set(AUX_DISPLAYS "${AUX_DISPLAYS}
-aux-display pandadx9")
+  set(AUX_DISPLAYS "${AUX_DISPLAYS}\naux-display pandadx9")
 endif()
 
 if(HAVE_TINYDISPLAY)
-  set(AUX_DISPLAYS "${AUX_DISPLAYS}
-aux-display p3tinydisplay")
+  set(AUX_DISPLAYS "${AUX_DISPLAYS}\naux-display p3tinydisplay")
 endif()
 
 if(HAVE_RAD_MSS)

+ 2 - 0
panda/src/device/CMakeLists.txt

@@ -62,9 +62,11 @@ target_interrogate(p3device ALL)
 
 if(WIN32)
   target_link_libraries(p3device Cfgmgr32.lib)
+
 elseif(APPLE)
   find_library(IOKIT_LIBRARY IOKit)
   target_link_libraries(p3device ${IOKIT_LIBRARY})
+
 endif()
 
 if(NOT BUILD_METALIBS)

+ 1 - 0
panda/src/dgraph/CMakeLists.txt

@@ -4,6 +4,7 @@ set(P3DGRAPH_HEADERS
   dataNode.I dataNode.h
   dataNodeTransmit.I dataNodeTransmit.h
 )
+
 set(P3DGRAPH_SOURCES
   config_dgraph.cxx
   dataGraphTraverser.cxx

+ 1 - 12
panda/src/display/CMakeLists.txt

@@ -116,16 +116,5 @@ if(OSX_PLATFORM AND HAVE_P3D_PLUGIN)
   add_library(p3subprocbuffer
     subprocessWindowBuffer.h
     subprocessWindowBuffer.I
-    subprocessWindowBuffer.cxx
-  )
+    subprocessWindowBuffer.cxx)
 endif()
-
-#begin test_bin_target
-  #define TARGET test_display
-  #define LOCAL_LIBS \
-#    p3display p3putil
-
-  #define SOURCES \
-#    test_display.cxx
-
-#end test_bin_target

+ 12 - 4
panda/src/downloadertools/CMakeLists.txt

@@ -7,35 +7,43 @@ endif()
 if(HAVE_OPENSSL)
   add_executable(apply_patch apply_patch.cxx)
   target_link_libraries(apply_patch panda)
+
   add_executable(build_patch build_patch.cxx)
   target_link_libraries(build_patch panda)
+
   add_executable(show_ddb show_ddb.cxx)
   target_link_libraries(show_ddb panda)
+
   add_executable(check_md5 check_md5.cxx)
   target_link_libraries(check_md5 panda)
+
   add_executable(pencrypt pencrypt.cxx)
   target_link_libraries(pencrypt panda)
+
   add_executable(pdecrypt pdecrypt.cxx)
   target_link_libraries(pdecrypt panda)
 
   install(TARGETS apply_patch build_patch show_ddb check_md5 pencrypt pdecrypt
-          EXPORT Tools COMPONENT Tools
-          DESTINATION bin)
+    EXPORT Tools COMPONENT Tools
+    DESTINATION bin)
 endif()
 
 if(HAVE_ZLIB)
   add_executable(check_adler check_adler.cxx)
   target_link_libraries(check_adler panda)
+
   add_executable(check_crc check_crc.cxx)
   target_link_libraries(check_crc panda)
+
   add_executable(pzip pzip.cxx)
   target_link_libraries(pzip panda)
+
   add_executable(punzip punzip.cxx)
   target_link_libraries(punzip panda)
 
   install(TARGETS check_adler check_crc pzip punzip
-          EXPORT Tools COMPONENT Tools
-          DESTINATION bin)
+    EXPORT Tools COMPONENT Tools
+    DESTINATION bin)
 endif()
 
 add_executable(multify multify.cxx)

+ 3 - 6
panda/src/egg/CMakeLists.txt

@@ -2,9 +2,6 @@ if(NOT HAVE_EGG)
   return()
 endif()
 
-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_HEADERS
   config_egg.h eggAnimData.I eggAnimData.h
   eggAnimPreload.I eggAnimPreload.h
@@ -97,9 +94,9 @@ set(P3EGG_IGATEEXT
 )
 
 # These cannot be interrogated, and are excluded from the composites.
-set(P3EGG_PARSER_SOURCES
-  parser.cxx
-  lexer.cxx)
+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_PARSER_SOURCES parser.cxx lexer.cxx)
 
 composite_sources(p3egg P3EGG_SOURCES)
 add_component_library(p3egg SYMBOL BUILDING_PANDA_EGG

+ 32 - 44
panda/src/event/CMakeLists.txt

@@ -1,39 +1,39 @@
 set(P3EVENT_HEADERS
-    asyncFuture.h asyncFuture.I
-    asyncTask.h asyncTask.I
-    asyncTaskChain.h asyncTaskChain.I
-    asyncTaskCollection.h asyncTaskCollection.I
-    asyncTaskManager.h asyncTaskManager.I
-    asyncTaskPause.h asyncTaskPause.I
-    asyncTaskSequence.h asyncTaskSequence.I
-    config_event.h
-    buttonEvent.I buttonEvent.h
-    buttonEventList.I buttonEventList.h
-    genericAsyncTask.h genericAsyncTask.I
-    pointerEvent.I pointerEvent.h
-    pointerEventList.I pointerEventList.h
-    event.I event.h eventHandler.h eventHandler.I
-    eventParameter.I eventParameter.h
-    eventQueue.I eventQueue.h eventReceiver.h
-    pt_Event.h throw_event.I throw_event.h
+  asyncFuture.h asyncFuture.I
+  asyncTask.h asyncTask.I
+  asyncTaskChain.h asyncTaskChain.I
+  asyncTaskCollection.h asyncTaskCollection.I
+  asyncTaskManager.h asyncTaskManager.I
+  asyncTaskPause.h asyncTaskPause.I
+  asyncTaskSequence.h asyncTaskSequence.I
+  config_event.h
+  buttonEvent.I buttonEvent.h
+  buttonEventList.I buttonEventList.h
+  genericAsyncTask.h genericAsyncTask.I
+  pointerEvent.I pointerEvent.h
+  pointerEventList.I pointerEventList.h
+  event.I event.h eventHandler.h eventHandler.I
+  eventParameter.I eventParameter.h
+  eventQueue.I eventQueue.h eventReceiver.h
+  pt_Event.h throw_event.I throw_event.h
 )
 
 set(P3EVENT_SOURCES
-    asyncFuture.cxx
-    asyncTask.cxx
-    asyncTaskChain.cxx
-    asyncTaskCollection.cxx
-    asyncTaskManager.cxx
-    asyncTaskPause.cxx
-    asyncTaskSequence.cxx
-    buttonEvent.cxx
-    buttonEventList.cxx
-    genericAsyncTask.cxx
-    pointerEvent.cxx
-    pointerEventList.cxx
-    config_event.cxx event.cxx eventHandler.cxx
-    eventParameter.cxx eventQueue.cxx eventReceiver.cxx
-    pt_Event.cxx
+  asyncFuture.cxx
+  asyncTask.cxx
+  asyncTaskChain.cxx
+  asyncTaskCollection.cxx
+  asyncTaskManager.cxx
+  asyncTaskPause.cxx
+  asyncTaskSequence.cxx
+  buttonEvent.cxx
+  buttonEventList.cxx
+  genericAsyncTask.cxx
+  pointerEvent.cxx
+  pointerEventList.cxx
+  config_event.cxx event.cxx eventHandler.cxx
+  eventParameter.cxx eventQueue.cxx eventReceiver.cxx
+  pt_Event.cxx
 )
 
 set(P3EVENT_IGATEEXT
@@ -58,15 +58,3 @@ if(NOT BUILD_METALIBS)
     ARCHIVE COMPONENT CoreDevel)
 endif()
 install(FILES ${P3EVENT_HEADERS} COMPONENT CoreDevel DESTINATION include/panda3d)
-
-#begin test_bin_target
-  #define TARGET test_task
-  #define LOCAL_LIBS $[LOCAL_LIBS] p3mathutil
-  #define OTHER_LIBS \
-#   p3interrogatedb:c p3dconfig:c p3dtoolbase:c p3prc:c \
-#   p3dtoolutil:c p3dtool:m p3dtoolconfig:m p3pystub
-
-  #define SOURCES \
-#    test_task.cxx
-
-#end test_bin_target

+ 7 - 21
panda/src/express/CMakeLists.txt

@@ -62,7 +62,8 @@ set(P3EXPRESS_HEADERS
   weakPointerToVoid.I weakPointerToVoid.h
   weakReferenceList.I weakReferenceList.h
   windowsRegistry.h
-  zStream.I zStream.h zStreamBuf.h)
+  zStream.I zStream.h zStreamBuf.h
+)
 
 set(P3EXPRESS_SOURCES
   buffer.cxx checksumHashGenerator.cxx
@@ -112,11 +113,11 @@ set(P3EXPRESS_SOURCES
   weakPointerToVoid.cxx
   weakReferenceList.cxx
   windowsRegistry.cxx
-  zStream.cxx zStreamBuf.cxx)
+  zStream.cxx zStreamBuf.cxx
+)
 
 if(ANDROID)
-  set(P3EXPRESS_SOURCES ${P3EXPRESS_SOURCES}
-    virtualFileMountAndroidAsset.cxx)
+  list(APPEND P3EXPRESS_SOURCES virtualFileMountAndroidAsset.cxx)
 endif()
 
 set(P3EXPRESS_IGATEEXT
@@ -129,13 +130,12 @@ set(P3EXPRESS_IGATEEXT
   virtualFileSystem_ext.cxx
   virtualFileSystem_ext.h
   virtualFile_ext.cxx
-  virtualFile_ext.h)
+  virtualFile_ext.h
+)
 
 composite_sources(p3express P3EXPRESS_SOURCES)
-
 add_component_library(p3express SYMBOL BUILDING_PANDA_EXPRESS
   ${P3EXPRESS_SOURCES} ${P3EXPRESS_HEADERS})
-
 target_link_libraries(p3express p3pandabase p3dtoolconfig p3dtool
   PKG::TAR PKG::ZLIB PKG::OPENSSL)
 target_interrogate(p3express ALL EXTENSIONS ${P3EXPRESS_IGATEEXT})
@@ -156,17 +156,3 @@ if(NOT BUILD_METALIBS)
     ARCHIVE COMPONENT CoreDevel)
 endif()
 install(FILES ${P3EXPRESS_HEADERS} COMPONENT CoreDevel DESTINATION include/panda3d)
-
-#add_executable(p3expressTestTypes test_types.cxx)
-#target_link_libraries(p3expressTestTypes p3express p3dtoolutil p3dtool p3prc p3dtoolconfig p3pystub)
-#add_test(p3express_test_types p3expressTestTypes)
-
-#add_executable(p3expressTestOrderedVector test_ordered_vector.cxx)
-#target_link_libraries(p3expressTestOrderedVector p3putil p3dtoolutil p3dtool p3prc p3dtoolconfig p3pystub)
-#add_test(p3express_test_ordered_vector p3expressTestOrderedVector)
-
-if(HAVE_ZLIB)
-  #add_executable(p3expressTestZstream test_zstream.cxx)
-  #target_link_libraries(p3expressTestZstream p3express p3dtoolutil p3dtool p3prc p3dtoolconfig p3pystub)
-  #add_test(p3express_test_zstream p3expressTestZstream)
-endif()

+ 14 - 13
panda/src/ffmpeg/CMakeLists.txt

@@ -3,21 +3,22 @@ if(NOT HAVE_FFMPEG)
 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)
-
+  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)
+  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})

+ 6 - 19
panda/src/framework/CMakeLists.txt

@@ -16,33 +16,20 @@ if(NOT BUILD_SHARED_LIBS)
   # If we're statically linking, we need to explicitly link with
   # at least one of the available renderers.
   if(HAVE_GL)
-    set(P3FRAMEWORK_LINK_TARGETS
-      ${P3FRAMEWORK_LINK_TARGETS}
-      pandagl
-    )
+    list(APPEND P3FRAMEWORK_LINK_TARGETS pandagl)
   elseif(HAVE_DX9)
-    set(P3FRAMEWORK_LINK_TARGETS
-      ${P3FRAMEWORK_LINK_TARGETS}
-      pandadx9
-    )
+    list(APPEND P3FRAMEWORK_LINK_TARGETS pandadx9)
   elseif(HAVE_TINYDISPLAY)
-    set(P3FRAMEWORK_LINK_TARGETS
-      ${P3FRAMEWORK_LINK_TARGETS}
-      p3tinydisplay
-    )
+    list(APPEND P3FRAMEWORK_LINK_TARGETS p3tinydisplay)
   else()
-    message(WARNING
-      "No renderer library available to link to p3framework."
-    )
+    message(WARNING "No renderer library available to link to p3framework.")
   endif()
 
   # And we might like to have the p3egg loader available.
   if(HAVE_EGG)
-    set(P3FRAMEWORK_LINK_TARGETS
-      ${P3FRAMEWORK_LINK_TARGETS}
-      pandaegg
-    )
+    list(APPEND P3FRAMEWORK_LINK_TARGETS pandaegg)
   endif()
+
 endif()
 
 composite_sources(p3framework P3FRAMEWORK_SOURCES)

+ 4 - 2
panda/src/gles2gsg/CMakeLists.txt

@@ -4,11 +4,13 @@ endif()
 
 set(P3GLES2GSG_HEADERS
   config_gles2gsg.h
-  gles2gsg.h)
+  gles2gsg.h
+)
 
 set(P3GLES2GSG_SOURCES
   config_gles2gsg.cxx
-  gles2gsg.cxx)
+  gles2gsg.cxx
+)
 
 composite_sources(p3gles2gsg P3GLES2GSG_SOURCES)
 add_component_library(p3gles2gsg SYMBOL BUILDING_PANDAGLES2

+ 4 - 2
panda/src/glesgsg/CMakeLists.txt

@@ -4,11 +4,13 @@ endif()
 
 set(P3GLESGSG_HEADERS
   config_glesgsg.h
-  glesgsg.h)
+  glesgsg.h
+)
 
 set(P3GLESGSG_SOURCES
   config_glesgsg.cxx
-  glesgsg.cxx)
+  glesgsg.cxx
+)
 
 composite_sources(p3glesgsg P3GLESGSG_SOURCES)
 add_component_library(p3glesgsg SYMBOL BUILDING_PANDAGLES

+ 24 - 24
panda/src/glstuff/CMakeLists.txt

@@ -3,30 +3,30 @@ if(NOT HAVE_GL)
 endif()
 
 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
+  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
 )
 
 set(P3GLSTUFF_SOURCES

+ 0 - 10
panda/src/gobj/CMakeLists.txt

@@ -184,13 +184,3 @@ if(NOT BUILD_METALIBS)
     ARCHIVE COMPONENT CoreDevel)
 endif()
 install(FILES ${P3GOBJ_HEADERS} COMPONENT CoreDevel DESTINATION include/panda3d)
-
-#begin test_bin_target
-  #define TARGET test_gobj
-  #define LOCAL_LIBS \
-#    p3gobj p3putil
-
-  #define SOURCES \
-#    test_gobj.cxx
-
-#end test_bin_target

+ 1 - 0
panda/src/grutil/CMakeLists.txt

@@ -17,6 +17,7 @@ set(P3GRUTIL_HEADERS
   pfmVizzer.I pfmVizzer.h
   rigidBodyCombiner.I rigidBodyCombiner.h
 )
+
 set(P3GRUTIL_SOURCES
   cardMaker.cxx
   movieTexture.cxx

+ 0 - 10
panda/src/gsgbase/CMakeLists.txt

@@ -24,13 +24,3 @@ if(NOT BUILD_METALIBS)
     ARCHIVE COMPONENT CoreDevel)
 endif()
 install(FILES ${P3GSGBASE_HEADERS} COMPONENT CoreDevel DESTINATION include/panda3d)
-
-#begin test_bin_target
-  #define TARGET test_gsgbase
-  #define LOCAL_LIBS
-#    p3gsgbase
-
-  #define SOURCES
-#    test_gsgbase.cxx
-
-#end test_bin_target

+ 0 - 11
panda/src/linmath/CMakeLists.txt

@@ -60,14 +60,3 @@ if(NOT BUILD_METALIBS)
     ARCHIVE COMPONENT CoreDevel)
 endif()
 install(FILES ${P3LINMATH_HEADERS} COMPONENT CoreDevel DESTINATION include/panda3d)
-
-#begin test_bin_target
-  #define TARGET test_math
-  #define LOCAL_LIBS \
-#    p3linmath
-  #define OTHER_LIBS $[OTHER_LIBS] p3pystub
-
-  #define SOURCES \
-#    test_math.cxx
-
-#end test_bin_target

+ 0 - 23
panda/src/mathutil/CMakeLists.txt

@@ -74,26 +74,3 @@ if(NOT BUILD_METALIBS)
     ARCHIVE COMPONENT CoreDevel)
 endif()
 install(FILES ${P3MATHUTIL_HEADERS} COMPONENT CoreDevel DESTINATION include/panda3d)
-
-#begin test_bin_target
-  #define TARGET test_mathutil
-  #define LOCAL_LIBS \
-#    p3mathutil p3pipeline
-  #define OTHER_LIBS $[OTHER_LIBS] p3pystub
-
-  #define SOURCES \
-#    test_mathutil.cxx
-
-#end test_bin_target
-
-
-#begin test_bin_target
-  #define TARGET test_tri
-  #define LOCAL_LIBS \
-#    p3mathutil p3pipeline
-  #define OTHER_LIBS $[OTHER_LIBS] p3pystub
-
-  #define SOURCES \
-#    test_tri.cxx
-
-#end test_bin_target

+ 42 - 40
panda/src/movies/CMakeLists.txt

@@ -1,46 +1,48 @@
 set(P3MOVIES_HEADERS
-    dr_flac.h
-    config_movies.h
-    flacAudio.h flacAudio.I
-    flacAudioCursor.h flacAudioCursor.I
-    inkblotVideo.h inkblotVideo.I
-    inkblotVideoCursor.h inkblotVideoCursor.I
-    microphoneAudio.h microphoneAudio.I
-    movieAudio.h movieAudio.I
-    movieAudioCursor.h movieAudioCursor.I
-    movieTypeRegistry.h movieTypeRegistry.I
-    movieVideo.h movieVideo.I
-    movieVideoCursor.h movieVideoCursor.I
-    opusAudio.h opusAudio.I
-    opusAudioCursor.h opusAudioCursor.I
-    userDataAudio.h userDataAudio.I
-    userDataAudioCursor.h userDataAudioCursor.I
-    vorbisAudio.h vorbisAudio.I
-    vorbisAudioCursor.h vorbisAudioCursor.I
-    wavAudio.h wavAudio.I
-    wavAudioCursor.h wavAudioCursor.I)
+  dr_flac.h
+  config_movies.h
+  flacAudio.h flacAudio.I
+  flacAudioCursor.h flacAudioCursor.I
+  inkblotVideo.h inkblotVideo.I
+  inkblotVideoCursor.h inkblotVideoCursor.I
+  microphoneAudio.h microphoneAudio.I
+  movieAudio.h movieAudio.I
+  movieAudioCursor.h movieAudioCursor.I
+  movieTypeRegistry.h movieTypeRegistry.I
+  movieVideo.h movieVideo.I
+  movieVideoCursor.h movieVideoCursor.I
+  opusAudio.h opusAudio.I
+  opusAudioCursor.h opusAudioCursor.I
+  userDataAudio.h userDataAudio.I
+  userDataAudioCursor.h userDataAudioCursor.I
+  vorbisAudio.h vorbisAudio.I
+  vorbisAudioCursor.h vorbisAudioCursor.I
+  wavAudio.h wavAudio.I
+  wavAudioCursor.h wavAudioCursor.I
+)
 
 set(P3MOVIES_SOURCES
-    config_movies.cxx
-    flacAudio.cxx
-    flacAudioCursor.cxx
-    inkblotVideo.cxx
-    inkblotVideoCursor.cxx
-    microphoneAudio.cxx
-    microphoneAudioDS.cxx
-    movieAudio.cxx
-    movieAudioCursor.cxx
-    movieTypeRegistry.cxx
-    movieVideo.cxx
-    movieVideoCursor.cxx
-    opusAudio.cxx
-    opusAudioCursor.cxx
-    userDataAudio.cxx
-    userDataAudioCursor.cxx
-    vorbisAudio.cxx
-    vorbisAudioCursor.cxx
-    wavAudio.cxx
-    wavAudioCursor.cxx)
+  config_movies.cxx
+  flacAudio.cxx
+  flacAudioCursor.cxx
+  inkblotVideo.cxx
+  inkblotVideoCursor.cxx
+  microphoneAudio.cxx
+  microphoneAudioDS.cxx
+  movieAudio.cxx
+  movieAudioCursor.cxx
+  movieTypeRegistry.cxx
+  movieVideo.cxx
+  movieVideoCursor.cxx
+  opusAudio.cxx
+  opusAudioCursor.cxx
+  userDataAudio.cxx
+  userDataAudioCursor.cxx
+  vorbisAudio.cxx
+  vorbisAudioCursor.cxx
+  wavAudio.cxx
+  wavAudioCursor.cxx
+)
 
 composite_sources(p3movies P3MOVIES_SOURCES)
 add_component_library(p3movies SYMBOL BUILDING_PANDA_MOVIES

+ 25 - 23
panda/src/nativenet/CMakeLists.txt

@@ -3,31 +3,33 @@ if(NOT WANT_NATIVE_NET)
 endif()
 
 set(P3NATIVENET_HEADERS
-    config_nativenet.h
-    buffered_datagramconnection.h
-    buffered_datagramreader.h buffered_datagramreader.I
-    ringbuffer.h ringbuffer.I socket_ip.h
-    socket_tcp.h socket_tcp_listen.h socket_tcp_ssl.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_udp_outgoing.h time_general.h)
+  config_nativenet.h
+  buffered_datagramconnection.h
+  buffered_datagramreader.h buffered_datagramreader.I
+  ringbuffer.h ringbuffer.I socket_ip.h
+  socket_tcp.h socket_tcp_listen.h socket_tcp_ssl.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_udp_outgoing.h time_general.h
+)
 
 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)
+  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
+)
 
 composite_sources(p3nativenet P3NATIVENET_SOURCES)
 add_component_library(p3nativenet SYMBOL BUILDING_PANDA_NATIVENET

+ 24 - 22
panda/src/net/CMakeLists.txt

@@ -3,30 +3,32 @@ if(NOT HAVE_NET OR NOT WANT_NATIVE_NET)
 endif()
 
 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)
+  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
+)
 
 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)
+  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
+)
 
 composite_sources(p3net P3NET_SOURCES)
 add_component_library(p3net SYMBOL BUILDING_PANDA_NET

+ 1 - 10
panda/src/parametrics/CMakeLists.txt

@@ -16,6 +16,7 @@ set(P3PARAMETRICS_HEADERS
   ropeNode.I ropeNode.h
   sheetNode.I sheetNode.h
 )
+
 set(P3PARAMETRICS_SOURCES
   config_parametrics.cxx cubicCurveseg.cxx
   curveFitter.cxx hermiteCurve.cxx
@@ -47,13 +48,3 @@ if(NOT BUILD_METALIBS)
     ARCHIVE COMPONENT CoreDevel)
 endif()
 install(FILES ${P3PARAMETRICS_HEADERS} COMPONENT CoreDevel DESTINATION include/panda3d)
-
-#begin test_bin_target
-  #define TARGET test_parametrics
-  #define LOCAL_LIBS
-#    p3parametrics
-
-  #define SOURCES
-#    test_parametrics.cxx
-
-#end test_bin_target

+ 41 - 38
panda/src/particlesystem/CMakeLists.txt

@@ -1,45 +1,48 @@
 set(P3PARTICLESYSTEM_HEADERS
-    baseParticle.I baseParticle.h baseParticleEmitter.I
-    baseParticleEmitter.h baseParticleFactory.I
-    baseParticleFactory.h baseParticleRenderer.I
-    baseParticleRenderer.h arcEmitter.I arcEmitter.h
-    boxEmitter.I boxEmitter.h
-    config_particlesystem.h discEmitter.I discEmitter.h
-    emitters.h
-    geomParticleRenderer.I geomParticleRenderer.h lineEmitter.I
-    lineEmitter.h lineParticleRenderer.I lineParticleRenderer.h
-    particlefactories.h
-    particles.h
-    particleSystem.I particleSystem.h particleSystemManager.I
-    particleSystemManager.h pointEmitter.I pointEmitter.h
-    pointParticle.h pointParticleFactory.h
-    pointParticleRenderer.I pointParticleRenderer.h
-    rectangleEmitter.I rectangleEmitter.h ringEmitter.I
-    ringEmitter.h sparkleParticleRenderer.I
-    sparkleParticleRenderer.h sphereSurfaceEmitter.I
-    sphereSurfaceEmitter.h sphereVolumeEmitter.I
-    sphereVolumeEmitter.h spriteParticleRenderer.I
-    spriteParticleRenderer.h tangentRingEmitter.I
-    tangentRingEmitter.h zSpinParticle.I zSpinParticle.h
-    zSpinParticleFactory.I zSpinParticleFactory.h
-    particleCommonFuncs.h colorInterpolationManager.I
-    colorInterpolationManager.h)
+  baseParticle.I baseParticle.h baseParticleEmitter.I
+  baseParticleEmitter.h baseParticleFactory.I
+  baseParticleFactory.h baseParticleRenderer.I
+  baseParticleRenderer.h arcEmitter.I arcEmitter.h
+  boxEmitter.I boxEmitter.h
+  config_particlesystem.h discEmitter.I discEmitter.h
+  emitters.h
+  geomParticleRenderer.I geomParticleRenderer.h lineEmitter.I
+  lineEmitter.h lineParticleRenderer.I lineParticleRenderer.h
+  particlefactories.h
+  particles.h
+  particleSystem.I particleSystem.h particleSystemManager.I
+  particleSystemManager.h pointEmitter.I pointEmitter.h
+  pointParticle.h pointParticleFactory.h
+  pointParticleRenderer.I pointParticleRenderer.h
+  rectangleEmitter.I rectangleEmitter.h ringEmitter.I
+  ringEmitter.h sparkleParticleRenderer.I
+  sparkleParticleRenderer.h sphereSurfaceEmitter.I
+  sphereSurfaceEmitter.h sphereVolumeEmitter.I
+  sphereVolumeEmitter.h spriteParticleRenderer.I
+  spriteParticleRenderer.h tangentRingEmitter.I
+  tangentRingEmitter.h zSpinParticle.I zSpinParticle.h
+  zSpinParticleFactory.I zSpinParticleFactory.h
+  particleCommonFuncs.h colorInterpolationManager.I
+  colorInterpolationManager.h
+)
 
 set(P3PARTICLESYSTEM_SOURCES
-    baseParticle.cxx baseParticleEmitter.cxx baseParticleFactory.cxx
-    baseParticleRenderer.cxx boxEmitter.cxx arcEmitter.cxx
-    config_particlesystem.cxx discEmitter.cxx
-    geomParticleRenderer.cxx lineEmitter.cxx
-    lineParticleRenderer.cxx particleSystem.cxx
-    particleSystemManager.cxx pointEmitter.cxx pointParticle.cxx
-    pointParticleFactory.cxx pointParticleRenderer.cxx
-    rectangleEmitter.cxx ringEmitter.cxx
-    sparkleParticleRenderer.cxx sphereSurfaceEmitter.cxx
-    sphereVolumeEmitter.cxx spriteParticleRenderer.cxx
-    tangentRingEmitter.cxx zSpinParticle.cxx
-    zSpinParticleFactory.cxx colorInterpolationManager.cxx)
+  baseParticle.cxx baseParticleEmitter.cxx baseParticleFactory.cxx
+  baseParticleRenderer.cxx boxEmitter.cxx arcEmitter.cxx
+  config_particlesystem.cxx discEmitter.cxx
+  geomParticleRenderer.cxx lineEmitter.cxx
+  lineParticleRenderer.cxx particleSystem.cxx
+  particleSystemManager.cxx pointEmitter.cxx pointParticle.cxx
+  pointParticleFactory.cxx pointParticleRenderer.cxx
+  rectangleEmitter.cxx ringEmitter.cxx
+  sparkleParticleRenderer.cxx sphereSurfaceEmitter.cxx
+  sphereVolumeEmitter.cxx spriteParticleRenderer.cxx
+  tangentRingEmitter.cxx zSpinParticle.cxx
+  zSpinParticleFactory.cxx colorInterpolationManager.cxx
+)
 
-set(P3PARTICLESYSTEM_IGATE_SOURCES "${P3PARTICLESYSTEM_HEADERS};${P3PARTICLESYSTEM_SOURCES}")
+set(P3PARTICLESYSTEM_IGATE_SOURCES
+  ${P3PARTICLESYSTEM_HEADERS} ${P3PARTICLESYSTEM_SOURCES})
 list(REMOVE_ITEM P3PARTICLESYSTEM_IGATE_SOURCES "emitters.h")
 list(REMOVE_ITEM P3PARTICLESYSTEM_IGATE_SOURCES "particlefactories.h")
 list(REMOVE_ITEM P3PARTICLESYSTEM_IGATE_SOURCES "particles.h")

+ 0 - 12
panda/src/pgraph/CMakeLists.txt

@@ -234,15 +234,3 @@ if(NOT BUILD_METALIBS)
     ARCHIVE COMPONENT CoreDevel)
 endif()
 install(FILES ${P3PGRAPH_HEADERS} COMPONENT CoreDevel DESTINATION include/panda3d)
-
-
-#begin test_bin_target
-  #define TARGET test_pgraph
-
-  #define SOURCES
-   # test_pgraph.cxx
-
-  #define LOCAL_LIBS $[LOCAL_LIBS] p3pgraph
-  #define OTHER_LIBS $[OTHER_LIBS] p3pystub
-
-#end test_bin_target

+ 40 - 40
panda/src/pgraphnodes/CMakeLists.txt

@@ -1,47 +1,47 @@
 set(P3PGRAPHNODES_HEADERS
-    ambientLight.h ambientLight.I
-    callbackNode.h callbackNode.I
-    computeNode.h computeNode.I
-    config_pgraphnodes.h
-    directionalLight.h directionalLight.I
-    fadeLodNode.I fadeLodNode.h fadeLodNodeData.h
-    lightLensNode.h lightLensNode.I
-    lightNode.h lightNode.I
-    lodNode.I lodNode.h lodNodeType.h
-    nodeCullCallbackData.h nodeCullCallbackData.I
-    pointLight.h pointLight.I
-    rectangleLight.h rectangleLight.I
-    sceneGraphAnalyzer.h sceneGraphAnalyzer.I
-    selectiveChildNode.h selectiveChildNode.I
-    sequenceNode.h sequenceNode.I
-    shaderGenerator.h shaderGenerator.I
-    sphereLight.h sphereLight.I
-    spotlight.h spotlight.I
-    switchNode.h switchNode.I
-    uvScrollNode.I uvScrollNode.h
+  ambientLight.h ambientLight.I
+  callbackNode.h callbackNode.I
+  computeNode.h computeNode.I
+  config_pgraphnodes.h
+  directionalLight.h directionalLight.I
+  fadeLodNode.I fadeLodNode.h fadeLodNodeData.h
+  lightLensNode.h lightLensNode.I
+  lightNode.h lightNode.I
+  lodNode.I lodNode.h lodNodeType.h
+  nodeCullCallbackData.h nodeCullCallbackData.I
+  pointLight.h pointLight.I
+  rectangleLight.h rectangleLight.I
+  sceneGraphAnalyzer.h sceneGraphAnalyzer.I
+  selectiveChildNode.h selectiveChildNode.I
+  sequenceNode.h sequenceNode.I
+  shaderGenerator.h shaderGenerator.I
+  sphereLight.h sphereLight.I
+  spotlight.h spotlight.I
+  switchNode.h switchNode.I
+  uvScrollNode.I uvScrollNode.h
 )
 
 set(P3PGRAPHNODES_SOURCES
-    ambientLight.cxx
-    callbackNode.cxx
-    computeNode.cxx
-    config_pgraphnodes.cxx
-    directionalLight.cxx
-    fadeLodNode.cxx fadeLodNodeData.cxx
-    lightLensNode.cxx
-    lightNode.cxx
-    lodNode.cxx lodNodeType.cxx
-    nodeCullCallbackData.cxx
-    pointLight.cxx
-    rectangleLight.cxx
-    sceneGraphAnalyzer.cxx
-    selectiveChildNode.cxx
-    sequenceNode.cxx
-    shaderGenerator.cxx
-    sphereLight.cxx
-    spotlight.cxx
-    switchNode.cxx
-    uvScrollNode.cxx
+  ambientLight.cxx
+  callbackNode.cxx
+  computeNode.cxx
+  config_pgraphnodes.cxx
+  directionalLight.cxx
+  fadeLodNode.cxx fadeLodNodeData.cxx
+  lightLensNode.cxx
+  lightNode.cxx
+  lodNode.cxx lodNodeType.cxx
+  nodeCullCallbackData.cxx
+  pointLight.cxx
+  rectangleLight.cxx
+  sceneGraphAnalyzer.cxx
+  selectiveChildNode.cxx
+  sequenceNode.cxx
+  shaderGenerator.cxx
+  sphereLight.cxx
+  spotlight.cxx
+  switchNode.cxx
+  uvScrollNode.cxx
 )
 
 composite_sources(p3pgraphnodes P3PGRAPHNODES_SOURCES)

+ 1 - 18
panda/src/pgui/CMakeLists.txt

@@ -18,6 +18,7 @@ set(P3PGUI_HEADERS
   pgVirtualFrame.I pgVirtualFrame.h
   pgWaitBar.I pgWaitBar.h
 )
+
 set(P3PGUI_SOURCES
   config_pgui.cxx
   pgButton.cxx
@@ -53,21 +54,3 @@ if(NOT BUILD_METALIBS)
     ARCHIVE COMPONENT CoreDevel)
 endif()
 install(FILES ${P3PGUI_HEADERS} COMPONENT CoreDevel DESTINATION include/panda3d)
-
-#begin test_bin_target
-  #define TARGET test_pgentry
-
-  #define OTHER_LIBS $[OTHER_LIBS] p3pystub
-
-  #define LOCAL_LIBS \
-#    p3framework p3putil p3collide p3pgraph p3chan p3text \
-#    p3pnmimage p3pnmimagetypes p3event p3gobj p3display \
-#    p3mathutil p3putil p3express p3dgraph p3device p3tform \
-#    p3linmath p3pstatclient panda
-
-  #define UNIX_SYS_LIBS m
-
-  #define SOURCES \
-#    test_pgentry.cxx
-
-#end test_bin_target

+ 36 - 34
panda/src/physics/CMakeLists.txt

@@ -1,40 +1,42 @@
 set(P3PHYSICS_HEADERS
-    actorNode.I actorNode.h angularEulerIntegrator.h angularForce.h
-    angularIntegrator.h angularVectorForce.I
-    angularVectorForce.h baseForce.I baseForce.h
-    baseIntegrator.I baseIntegrator.h config_physics.h
-    forces.h
-    forceNode.I forceNode.h
-    linearControlForce.I linearControlForce.h
-    linearCylinderVortexForce.I linearCylinderVortexForce.h
-    linearDistanceForce.I
-    linearDistanceForce.h linearEulerIntegrator.h linearForce.I
-    linearForce.h linearFrictionForce.I linearFrictionForce.h
-    linearIntegrator.h linearJitterForce.h linearNoiseForce.I
-    linearNoiseForce.h linearRandomForce.I linearRandomForce.h
-    linearSinkForce.h linearSourceForce.h
-    linearUserDefinedForce.I linearUserDefinedForce.h
-    linearVectorForce.I linearVectorForce.h physical.I
-    physical.h physicalNode.I physicalNode.h
-    physicsCollisionHandler.I physicsCollisionHandler.h
-    physicsManager.I physicsManager.h
-    physicsObject.I physicsObject.h
-    physicsObjectCollection.I physicsObjectCollection.h)
+  actorNode.I actorNode.h angularEulerIntegrator.h angularForce.h
+  angularIntegrator.h angularVectorForce.I
+  angularVectorForce.h baseForce.I baseForce.h
+  baseIntegrator.I baseIntegrator.h config_physics.h
+  forces.h
+  forceNode.I forceNode.h
+  linearControlForce.I linearControlForce.h
+  linearCylinderVortexForce.I linearCylinderVortexForce.h
+  linearDistanceForce.I
+  linearDistanceForce.h linearEulerIntegrator.h linearForce.I
+  linearForce.h linearFrictionForce.I linearFrictionForce.h
+  linearIntegrator.h linearJitterForce.h linearNoiseForce.I
+  linearNoiseForce.h linearRandomForce.I linearRandomForce.h
+  linearSinkForce.h linearSourceForce.h
+  linearUserDefinedForce.I linearUserDefinedForce.h
+  linearVectorForce.I linearVectorForce.h physical.I
+  physical.h physicalNode.I physicalNode.h
+  physicsCollisionHandler.I physicsCollisionHandler.h
+  physicsManager.I physicsManager.h
+  physicsObject.I physicsObject.h
+  physicsObjectCollection.I physicsObjectCollection.h
+)
 
 set(P3PHYSICS_SOURCES
-    actorNode.cxx angularEulerIntegrator.cxx angularForce.cxx
-    angularIntegrator.cxx angularVectorForce.cxx baseForce.cxx
-    baseIntegrator.cxx config_physics.cxx forceNode.cxx
-    linearControlForce.cxx
-    linearCylinderVortexForce.cxx linearDistanceForce.cxx
-    linearEulerIntegrator.cxx linearForce.cxx
-    linearFrictionForce.cxx linearIntegrator.cxx
-    linearJitterForce.cxx linearNoiseForce.cxx
-    linearRandomForce.cxx linearSinkForce.cxx
-    linearSourceForce.cxx linearUserDefinedForce.cxx
-    linearVectorForce.cxx physical.cxx physicalNode.cxx
-    physicsCollisionHandler.cxx physicsManager.cxx physicsObject.cxx
-    physicsObjectCollection.cxx)
+  actorNode.cxx angularEulerIntegrator.cxx angularForce.cxx
+  angularIntegrator.cxx angularVectorForce.cxx baseForce.cxx
+  baseIntegrator.cxx config_physics.cxx forceNode.cxx
+  linearControlForce.cxx
+  linearCylinderVortexForce.cxx linearDistanceForce.cxx
+  linearEulerIntegrator.cxx linearForce.cxx
+  linearFrictionForce.cxx linearIntegrator.cxx
+  linearJitterForce.cxx linearNoiseForce.cxx
+  linearRandomForce.cxx linearSinkForce.cxx
+  linearSourceForce.cxx linearUserDefinedForce.cxx
+  linearVectorForce.cxx physical.cxx physicalNode.cxx
+  physicsCollisionHandler.cxx physicsManager.cxx physicsObject.cxx
+  physicsObjectCollection.cxx
+)
 
 composite_sources(p3physics P3PHYSICS_SOURCES)
 add_component_library(p3physics SYMBOL BUILDING_PANDA_PHYSICS

+ 8 - 7
panda/src/pipeline/CMakeLists.txt

@@ -51,7 +51,8 @@ set(P3PIPELINE_HEADERS
   threadSimpleImpl.h threadSimpleImpl.I
   threadPosixImpl.h threadPosixImpl.I
   threadSimpleManager.h threadSimpleManager.I
-  threadPriority.h)
+  threadPriority.h
+)
 
 set(P3PIPELINE_SOURCES
   contextSwitch.c
@@ -100,22 +101,22 @@ set(P3PIPELINE_SOURCES
   threadPosixImpl.cxx
   threadSimpleImpl.cxx
   threadSimpleManager.cxx
-  threadPriority.cxx)
+  threadPriority.cxx
+)
 
 if(WIN32)
-  set(P3PIPELINE_HEADERS
-    ${P3PIPELINE_HEADERS}
+  list(APPEND P3PIPELINE_HEADERS
     conditionVarWin32Impl.h conditionVarWin32Impl.I
     threadWin32Impl.h threadWin32Impl.I)
-  set(P3PIPELINE_SOURCES
-    ${P3PIPELINE_SOURCES}
+  list(APPEND P3PIPELINE_SOURCES
     conditionVarWin32Impl.cxx
     threadWin32Impl.cxx)
 endif()
 
 set(P3PIPELINE_IGATEEXT
   pythonThread.cxx
-  pythonThread.h)
+  pythonThread.h
+)
 
 composite_sources(p3pipeline P3PIPELINE_SOURCES)
 add_component_library(p3pipeline SYMBOL BUILDING_PANDA_PIPELINE

+ 1 - 0
panda/src/pnmtext/CMakeLists.txt

@@ -9,6 +9,7 @@ set(P3PNMTEXT_HEADERS
   pnmTextGlyph.h pnmTextGlyph.I
   pnmTextMaker.h pnmTextMaker.I
 )
+
 set(P3PNMTEXT_SOURCES
   config_pnmtext.cxx
   freetypeFace.cxx

+ 20 - 18
panda/src/pstatclient/CMakeLists.txt

@@ -1,24 +1,26 @@
 set(P3PSTATCLIENT_HEADERS
-    config_pstatclient.h pStatClient.I pStatClient.h
-    pStatClientImpl.I pStatClientImpl.h
-    pStatClientVersion.I
-    pStatClientVersion.h pStatClientControlMessage.h
-    pStatCollector.I pStatCollector.h pStatCollectorDef.h
-    pStatCollectorForward.I pStatCollectorForward.h
-    pStatFrameData.I pStatFrameData.h pStatProperties.h
-    pStatServerControlMessage.h pStatThread.I pStatThread.h
-    pStatTimer.I pStatTimer.h)
+  config_pstatclient.h pStatClient.I pStatClient.h
+  pStatClientImpl.I pStatClientImpl.h
+  pStatClientVersion.I
+  pStatClientVersion.h pStatClientControlMessage.h
+  pStatCollector.I pStatCollector.h pStatCollectorDef.h
+  pStatCollectorForward.I pStatCollectorForward.h
+  pStatFrameData.I pStatFrameData.h pStatProperties.h
+  pStatServerControlMessage.h pStatThread.I pStatThread.h
+  pStatTimer.I pStatTimer.h
+)
 
 set(P3PSTATCLIENT_SOURCES
-    config_pstatclient.cxx pStatClient.cxx pStatClientImpl.cxx
-    pStatClientVersion.cxx
-    pStatClientControlMessage.cxx
-    pStatCollector.cxx
-    pStatCollectorDef.cxx
-    pStatCollectorForward.cxx
-    pStatFrameData.cxx pStatProperties.cxx
-    pStatServerControlMessage.cxx
-    pStatThread.cxx)
+  config_pstatclient.cxx pStatClient.cxx pStatClientImpl.cxx
+  pStatClientVersion.cxx
+  pStatClientControlMessage.cxx
+  pStatCollector.cxx
+  pStatCollectorDef.cxx
+  pStatCollectorForward.cxx
+  pStatFrameData.cxx pStatProperties.cxx
+  pStatServerControlMessage.cxx
+  pStatThread.cxx
+)
 
 composite_sources(p3pstatclient P3PSTATCLIENT_SOURCES)
 add_component_library(p3pstatclient SYMBOL BUILDING_PANDA_PSTATCLIENT

+ 0 - 58
panda/src/putil/CMakeLists.txt

@@ -147,61 +147,3 @@ if(NOT BUILD_METALIBS)
 endif()
 install(FILES ${P3PUTIL_HEADERS} COMPONENT CoreDevel DESTINATION include/panda3d)
 install(FILES config_util.h COMPONENT CoreDevel DESTINATION include/panda3d)
-
-#begin test_bin_target
-  #define TARGET test_bamRead
-  #define LOCAL_LIBS
-    #p3putil p3pgraph
-
-  #define SOURCES
-    #test_bam.cxx test_bam.h test_bamRead.cxx
-
-#end test_bin_target
-
-#begin test_bin_target
-  #define TARGET test_bamWrite
-  #define LOCAL_LIBS
-    #p3putil p3pgraph
-
-  #define SOURCES
-    #test_bam.cxx test_bam.h test_bamWrite.cxx
-
-#end test_bin_target
-
-#begin test_bin_target
-  #define TARGET test_filename
-
-  #define SOURCES
-    #test_filename.cxx
-
-#end test_bin_target
-
-#begin test_bin_target
-  #define TARGET test_uniqueIdAllocator
-
-  #define SOURCES
-    #uniqueIdAllocator.cxx test_uniqueIdAllocator.cxx
-
-#end test_bin_target
-
-#begin test_bin_target
-  #define TARGET test_glob
-
-  #define SOURCES
-    #test_glob.cxx
-
-  #define LOCAL_LIBS $[LOCAL_LIBS] p3putil
-  #define OTHER_LIBS $[OTHER_LIBS] p3pystub
-
-#end test_bin_target
-
-#begin test_bin_target
-  #define TARGET test_linestream
-
-  #define SOURCES
-    #test_linestream.cxx
-
-  #define LOCAL_LIBS $[LOCAL_LIBS] p3putil
-  #define OTHER_LIBS $[OTHER_LIBS] p3pystub
-
-#end test_bin_target

+ 1 - 0
panda/src/recorder/CMakeLists.txt

@@ -8,6 +8,7 @@ set(P3RECORDER_HEADERS
   recorderTable.h recorderTable.I
   socketStreamRecorder.h socketStreamRecorder.I
 )
+
 set(P3RECORDER_SOURCES
   config_recorder.cxx
   mouseRecorder.cxx

+ 1 - 0
panda/src/tform/CMakeLists.txt

@@ -12,6 +12,7 @@ set(P3TFORM_HEADERS
   trackball.h
   transform2sg.h
 )
+
 set(P3TFORM_SOURCES
   buttonThrower.cxx
   config_tform.cxx

+ 13 - 12
panda/src/wgldisplay/CMakeLists.txt

@@ -3,20 +3,21 @@ if(NOT HAVE_WGL)
 endif()
 
 set(P3WGLDISPLAY_HEADERS
-    config_wgldisplay.h
-    wglGraphicsBuffer.I wglGraphicsBuffer.h
-    wglGraphicsPipe.I wglGraphicsPipe.h
-    wglGraphicsStateGuardian.I wglGraphicsStateGuardian.h
-    wglGraphicsWindow.I wglGraphicsWindow.h
-    wglext.h)
+  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)
-
+  config_wgldisplay.cxx
+  wglGraphicsBuffer.cxx
+  wglGraphicsPipe.cxx
+  wglGraphicsStateGuardian.cxx
+  wglGraphicsWindow.cxx
+)
 
 composite_sources(p3wgldisplay P3WGLDISPLAY_SOURCES)
 add_component_library(p3wgldisplay SYMBOL BUILDING_PANDA_WGLDISPLAY

+ 9 - 7
panda/src/windisplay/CMakeLists.txt

@@ -3,15 +3,17 @@ if(NOT WIN32)
 endif()
 
 set(P3WINDISPLAY_HEADERS
-    config_windisplay.h
-    winGraphicsPipe.I winGraphicsPipe.h
-    winGraphicsWindow.I winGraphicsWindow.h
-    winDetectDx.h)
+  config_windisplay.h
+  winGraphicsPipe.I winGraphicsPipe.h
+  winGraphicsWindow.I winGraphicsWindow.h
+  winDetectDx.h
+)
 
 set(P3WINDISPLAY_SOURCES
-    config_windisplay.cxx winGraphicsPipe.cxx
-    winGraphicsWindow.cxx
-    winDetectDx9.cxx)
+  config_windisplay.cxx winGraphicsPipe.cxx
+  winGraphicsWindow.cxx
+  winDetectDx9.cxx
+)
 
 composite_sources(p3windisplay P3WINDISPLAY_SOURCES)
 add_component_library(p3windisplay SYMBOL BUILDING_PANDAWIN

+ 3 - 3
pandatool/src/vrml/CMakeLists.txt

@@ -1,6 +1,3 @@
-add_bison_target(vrmlParser.cxx vrmlParser.yxx DEFINES vrmlParser.h PREFIX vrmlyy)
-add_flex_target(vrmlLexer.cxx vrmlLexer.lxx CASE_INSENSITIVE PREFIX vrmlyy)
-
 set(P3VRML_HEADERS
   parse_vrml.h
   standard_nodes.h
@@ -22,6 +19,9 @@ set(P3VRML_PARSER_SOURCES
   vrmlLexer.cxx
 )
 
+add_bison_target(vrmlParser.cxx vrmlParser.yxx DEFINES vrmlParser.h PREFIX vrmlyy)
+add_flex_target(vrmlLexer.cxx vrmlLexer.lxx CASE_INSENSITIVE PREFIX vrmlyy)
+
 composite_sources(p3vrml P3VRML_SOURCES)
 add_library(p3vrml STATIC ${P3VRML_HEADERS} ${P3VRML_SOURCES} ${P3VRML_PARSER_SOURCES})
 target_link_libraries(p3vrml p3pandatoolbase)

+ 3 - 3
pandatool/src/xfile/CMakeLists.txt

@@ -1,6 +1,3 @@
-add_bison_target(xParser.cxx xParser.yxx DEFINES xParser.h PREFIX xyy)
-add_flex_target(xLexer.cxx xLexer.lxx CASE_INSENSITIVE PREFIX xyy)
-
 set(P3XFILE_HEADERS
   config_xfile.h
   standard_templates.h
@@ -48,6 +45,9 @@ set(P3XFILE_PARSER_SOURCES
   xLexer.cxx
 )
 
+add_bison_target(xParser.cxx xParser.yxx DEFINES xParser.h PREFIX xyy)
+add_flex_target(xLexer.cxx xLexer.lxx CASE_INSENSITIVE PREFIX xyy)
+
 composite_sources(p3xfile P3XFILE_SOURCES)
 add_library(p3xfile STATIC ${P3XFILE_HEADERS} ${P3XFILE_SOURCES} ${P3XFILE_PARSER_SOURCES})
 target_link_libraries(p3xfile p3pandatoolbase)