diff --git a/CMakeLists.txt b/CMakeLists.txt index 6284c6c6df..7293d84d14 100644 --- a/CMakeLists.txt +++ b/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() diff --git a/cmake/install/Panda3DConfig.cmake b/cmake/install/Panda3DConfig.cmake index 2a7c192926..2514ac9ecb 100644 --- a/cmake/install/Panda3DConfig.cmake +++ b/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) diff --git a/cmake/macros/AddBisonTarget.cmake b/cmake/macros/AddBisonTarget.cmake index 820f78ab56..0feb2616ee 100644 --- a/cmake/macros/AddBisonTarget.cmake +++ b/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) diff --git a/cmake/macros/AddFlexTarget.cmake b/cmake/macros/AddFlexTarget.cmake index 9dfd640671..b24aeb95fc 100644 --- a/cmake/macros/AddFlexTarget.cmake +++ b/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) diff --git a/cmake/macros/BuildMetalib.cmake b/cmake/macros/BuildMetalib.cmake index 4fc483c0ef..7b4c1d8173 100644 --- a/cmake/macros/BuildMetalib.cmake +++ b/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 "$") @@ -60,17 +61,20 @@ if(CMAKE_VERSION VERSION_LESS "3.12") set(name_of_component "$<${is_component}:$>") set(name_of_non_component "$<$:$>") + 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 "$<$>:${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 "$") + # 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 "$") + 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 "$") - 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() diff --git a/cmake/macros/CompositeSources.cmake b/cmake/macros/CompositeSources.cmake index 3b4c3d9654..1a0b8bbd0d 100644 --- a/cmake/macros/CompositeSources.cmake +++ b/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) diff --git a/cmake/macros/Interrogate.cmake b/cmake/macros/Interrogate.cmake index 25e53e9cfb..fd94b68e69 100644 --- a/cmake/macros/Interrogate.cmake +++ b/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}) diff --git a/cmake/macros/PackageConfig.cmake b/cmake/macros/PackageConfig.cmake index 3c200438b1..f3032fc832 100644 --- a/cmake/macros/PackageConfig.cmake +++ b/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 "$") string(APPEND exports "$<$: ${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}:${imported_location}>") + else() list(APPEND libraries ${imported_location}) + endif() endif() endforeach(config) @@ -377,8 +394,10 @@ function(export_packages filename) elseif("${head}" MATCHES "\\$]+\)>") string(REGEX REPLACE ".*\\$]+\)>.*" "\\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) diff --git a/cmake/macros/Python.cmake b/cmake/macros/Python.cmake index 1492a49e83..ac30965400 100644 --- a/cmake/macros/Python.cmake +++ b/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) diff --git a/cmake/macros/RunPzip.cmake b/cmake/macros/RunPzip.cmake index 13225d0fb4..3a4d2e4d0f 100644 --- a/cmake/macros/RunPzip.cmake +++ b/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) diff --git a/cmake/macros/Versioning.cmake b/cmake/macros/Versioning.cmake index 056667c958..33dbeb87d2 100644 --- a/cmake/macros/Versioning.cmake +++ b/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) diff --git a/direct/CMakeLists.txt b/direct/CMakeLists.txt index 6b549ddbf5..8d1c92329e 100644 --- a/direct/CMakeLists.txt +++ b/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) diff --git a/direct/src/dcparser/CMakeLists.txt b/direct/src/dcparser/CMakeLists.txt index 416f337d60..0ca5910f2f 100644 --- a/direct/src/dcparser/CMakeLists.txt +++ b/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 diff --git a/direct/src/deadrec/CMakeLists.txt b/direct/src/deadrec/CMakeLists.txt index 7558db9569..4a9f4ce512 100644 --- a/direct/src/deadrec/CMakeLists.txt +++ b/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}) diff --git a/direct/src/distributed/CMakeLists.txt b/direct/src/distributed/CMakeLists.txt index 275514cf8c..a5486d56c7 100644 --- a/direct/src/distributed/CMakeLists.txt +++ b/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}) diff --git a/direct/src/interval/CMakeLists.txt b/direct/src/interval/CMakeLists.txt index f8e7187455..bbc9e8bee5 100644 --- a/direct/src/interval/CMakeLists.txt +++ b/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 diff --git a/direct/src/motiontrail/CMakeLists.txt b/direct/src/motiontrail/CMakeLists.txt index 21d0e04583..dd06fad2af 100644 --- a/direct/src/motiontrail/CMakeLists.txt +++ b/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}) diff --git a/dtool/CompilerFlags.cmake b/dtool/CompilerFlags.cmake index 114c824a0b..2ee0ed02eb 100644 --- a/dtool/CompilerFlags.cmake +++ b/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 "$>") add_compile_options( "$<${cxx_exceptions_property}:${cxx_exceptions_on}>" diff --git a/dtool/LocalSetup.cmake b/dtool/LocalSetup.cmake index e6d9446015..6f526d98c2 100644 --- a/dtool/LocalSetup.cmake +++ b/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("") diff --git a/dtool/Package.cmake b/dtool/Package.cmake index cf1975b202..4c1966c218 100644 --- a/dtool/Package.cmake +++ b/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 diff --git a/dtool/PandaVersion.cmake b/dtool/PandaVersion.cmake index a503f150e0..2ca0a3e6e5 100644 --- a/dtool/PandaVersion.cmake +++ b/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}") diff --git a/dtool/src/cppparser/CMakeLists.txt b/dtool/src/cppparser/CMakeLists.txt index 1b8fe9f1f7..2f865933f1 100644 --- a/dtool/src/cppparser/CMakeLists.txt +++ b/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) diff --git a/dtool/src/dtoolbase/CMakeLists.txt b/dtool/src/dtoolbase/CMakeLists.txt index b11869e6e9..4e3c4b94f6 100644 --- a/dtool/src/dtoolbase/CMakeLists.txt +++ b/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 diff --git a/dtool/src/dtoolutil/CMakeLists.txt b/dtool/src/dtoolutil/CMakeLists.txt index 4d0d27b9ac..94d8a9c059 100644 --- a/dtool/src/dtoolutil/CMakeLists.txt +++ b/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}) diff --git a/dtool/src/interrogate/CMakeLists.txt b/dtool/src/interrogate/CMakeLists.txt index 4a1fda9e5d..639344d6d4 100644 --- a/dtool/src/interrogate/CMakeLists.txt +++ b/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() diff --git a/dtool/src/interrogatedb/CMakeLists.txt b/dtool/src/interrogatedb/CMakeLists.txt index 1ff55b73b3..e809111b90 100644 --- a/dtool/src/interrogatedb/CMakeLists.txt +++ b/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") diff --git a/dtool/src/prc/CMakeLists.txt b/dtool/src/prc/CMakeLists.txt index 18ead907d7..0fb97b1e95 100644 --- a/dtool/src/prc/CMakeLists.txt +++ b/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 $) diff --git a/panda/CMakeLists.txt b/panda/CMakeLists.txt index 962101b8e2..f440327827 100644 --- a/panda/CMakeLists.txt +++ b/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() diff --git a/panda/metalibs/panda/CMakeLists.txt b/panda/metalibs/panda/CMakeLists.txt index bb1e96d374..260dc5294c 100644 --- a/panda/metalibs/panda/CMakeLists.txt +++ b/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() diff --git a/panda/metalibs/pandagl/CMakeLists.txt b/panda/metalibs/pandagl/CMakeLists.txt index 176b176ccb..cb627a2e91 100644 --- a/panda/metalibs/pandagl/CMakeLists.txt +++ b/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) diff --git a/panda/metalibs/pandagles/CMakeLists.txt b/panda/metalibs/pandagles/CMakeLists.txt index d5155e415b..cdcb6525fd 100644 --- a/panda/metalibs/pandagles/CMakeLists.txt +++ b/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") diff --git a/panda/src/audio/CMakeLists.txt b/panda/src/audio/CMakeLists.txt index e6de607fc1..d53df64d53 100644 --- a/panda/src/audio/CMakeLists.txt +++ b/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 diff --git a/panda/src/audiotraits/CMakeLists.txt b/panda/src/audiotraits/CMakeLists.txt index e9539ec511..0990390469 100644 --- a/panda/src/audiotraits/CMakeLists.txt +++ b/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) diff --git a/panda/src/bullet/CMakeLists.txt b/panda/src/bullet/CMakeLists.txt index 8dbf70954d..8d24bd2353 100644 --- a/panda/src/bullet/CMakeLists.txt +++ b/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}) diff --git a/panda/src/char/CMakeLists.txt b/panda/src/char/CMakeLists.txt index c0cce9d6d3..3f8a0cee33 100644 --- a/panda/src/char/CMakeLists.txt +++ b/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 diff --git a/panda/src/cocoadisplay/CMakeLists.txt b/panda/src/cocoadisplay/CMakeLists.txt index 775b273c23..6c5058d8a0 100644 --- a/panda/src/cocoadisplay/CMakeLists.txt +++ b/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 diff --git a/panda/src/collide/CMakeLists.txt b/panda/src/collide/CMakeLists.txt index 9306e805c6..ec5c30a42a 100644 --- a/panda/src/collide/CMakeLists.txt +++ b/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 diff --git a/panda/src/configfiles/CMakeLists.txt b/panda/src/configfiles/CMakeLists.txt index 84369c32fc..e8b5607ee2 100644 --- a/panda/src/configfiles/CMakeLists.txt +++ b/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) diff --git a/panda/src/device/CMakeLists.txt b/panda/src/device/CMakeLists.txt index 0839ac57df..6cd11e69eb 100644 --- a/panda/src/device/CMakeLists.txt +++ b/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) diff --git a/panda/src/dgraph/CMakeLists.txt b/panda/src/dgraph/CMakeLists.txt index 3231ddf005..d5121948cd 100644 --- a/panda/src/dgraph/CMakeLists.txt +++ b/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 diff --git a/panda/src/display/CMakeLists.txt b/panda/src/display/CMakeLists.txt index 02d3c657dd..1ae0226d53 100644 --- a/panda/src/display/CMakeLists.txt +++ b/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 diff --git a/panda/src/downloadertools/CMakeLists.txt b/panda/src/downloadertools/CMakeLists.txt index bd3d3124ed..a306fe7ebb 100644 --- a/panda/src/downloadertools/CMakeLists.txt +++ b/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) diff --git a/panda/src/egg/CMakeLists.txt b/panda/src/egg/CMakeLists.txt index 3636e6100f..29061bb0ba 100644 --- a/panda/src/egg/CMakeLists.txt +++ b/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 diff --git a/panda/src/event/CMakeLists.txt b/panda/src/event/CMakeLists.txt index ee1982e464..fe58cb9347 100644 --- a/panda/src/event/CMakeLists.txt +++ b/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 diff --git a/panda/src/express/CMakeLists.txt b/panda/src/express/CMakeLists.txt index 301baf6f56..592ad9abe9 100644 --- a/panda/src/express/CMakeLists.txt +++ b/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() diff --git a/panda/src/ffmpeg/CMakeLists.txt b/panda/src/ffmpeg/CMakeLists.txt index f832602996..9053f2fe45 100644 --- a/panda/src/ffmpeg/CMakeLists.txt +++ b/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}) diff --git a/panda/src/framework/CMakeLists.txt b/panda/src/framework/CMakeLists.txt index 68bf38152c..06d28fdbc4 100644 --- a/panda/src/framework/CMakeLists.txt +++ b/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) diff --git a/panda/src/gles2gsg/CMakeLists.txt b/panda/src/gles2gsg/CMakeLists.txt index f12dd7be0c..eb9c69df93 100644 --- a/panda/src/gles2gsg/CMakeLists.txt +++ b/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 diff --git a/panda/src/glesgsg/CMakeLists.txt b/panda/src/glesgsg/CMakeLists.txt index 455da8a0c7..25688084eb 100644 --- a/panda/src/glesgsg/CMakeLists.txt +++ b/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 diff --git a/panda/src/glstuff/CMakeLists.txt b/panda/src/glstuff/CMakeLists.txt index de52d21b07..0700ecb5fa 100644 --- a/panda/src/glstuff/CMakeLists.txt +++ b/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 diff --git a/panda/src/gobj/CMakeLists.txt b/panda/src/gobj/CMakeLists.txt index ef56c5d6f2..e50b8a3d6c 100644 --- a/panda/src/gobj/CMakeLists.txt +++ b/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 diff --git a/panda/src/grutil/CMakeLists.txt b/panda/src/grutil/CMakeLists.txt index ad8ce53e0f..d6c41ce415 100644 --- a/panda/src/grutil/CMakeLists.txt +++ b/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 diff --git a/panda/src/gsgbase/CMakeLists.txt b/panda/src/gsgbase/CMakeLists.txt index 9b3d31aee0..1bb116196d 100644 --- a/panda/src/gsgbase/CMakeLists.txt +++ b/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 diff --git a/panda/src/linmath/CMakeLists.txt b/panda/src/linmath/CMakeLists.txt index e737f95138..84b4479856 100644 --- a/panda/src/linmath/CMakeLists.txt +++ b/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 diff --git a/panda/src/mathutil/CMakeLists.txt b/panda/src/mathutil/CMakeLists.txt index 2fa0e439f3..bacddece22 100644 --- a/panda/src/mathutil/CMakeLists.txt +++ b/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 diff --git a/panda/src/movies/CMakeLists.txt b/panda/src/movies/CMakeLists.txt index 62af1e46d3..36fce6a74b 100644 --- a/panda/src/movies/CMakeLists.txt +++ b/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 diff --git a/panda/src/nativenet/CMakeLists.txt b/panda/src/nativenet/CMakeLists.txt index 39d10ca686..b79f453e87 100644 --- a/panda/src/nativenet/CMakeLists.txt +++ b/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 diff --git a/panda/src/net/CMakeLists.txt b/panda/src/net/CMakeLists.txt index 98c15c95cb..b8bd67cc36 100644 --- a/panda/src/net/CMakeLists.txt +++ b/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 diff --git a/panda/src/parametrics/CMakeLists.txt b/panda/src/parametrics/CMakeLists.txt index ab548eed21..5703a7696c 100644 --- a/panda/src/parametrics/CMakeLists.txt +++ b/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 diff --git a/panda/src/particlesystem/CMakeLists.txt b/panda/src/particlesystem/CMakeLists.txt index a38c7f85b2..5ce2896a5d 100644 --- a/panda/src/particlesystem/CMakeLists.txt +++ b/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") diff --git a/panda/src/pgraph/CMakeLists.txt b/panda/src/pgraph/CMakeLists.txt index 0b6087cb57..013ac69adf 100644 --- a/panda/src/pgraph/CMakeLists.txt +++ b/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 diff --git a/panda/src/pgraphnodes/CMakeLists.txt b/panda/src/pgraphnodes/CMakeLists.txt index ffdab9ec02..6228fcbe5b 100644 --- a/panda/src/pgraphnodes/CMakeLists.txt +++ b/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) diff --git a/panda/src/pgui/CMakeLists.txt b/panda/src/pgui/CMakeLists.txt index 1906ac0124..5bace60210 100644 --- a/panda/src/pgui/CMakeLists.txt +++ b/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 diff --git a/panda/src/physics/CMakeLists.txt b/panda/src/physics/CMakeLists.txt index 836b4ece01..89cd33cc1e 100644 --- a/panda/src/physics/CMakeLists.txt +++ b/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 diff --git a/panda/src/pipeline/CMakeLists.txt b/panda/src/pipeline/CMakeLists.txt index fad48fa244..4f2b7425f1 100644 --- a/panda/src/pipeline/CMakeLists.txt +++ b/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 diff --git a/panda/src/pnmtext/CMakeLists.txt b/panda/src/pnmtext/CMakeLists.txt index 37aa70931d..2171b54efc 100644 --- a/panda/src/pnmtext/CMakeLists.txt +++ b/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 diff --git a/panda/src/pstatclient/CMakeLists.txt b/panda/src/pstatclient/CMakeLists.txt index 83a9b7e968..f43cc0cde1 100644 --- a/panda/src/pstatclient/CMakeLists.txt +++ b/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 diff --git a/panda/src/putil/CMakeLists.txt b/panda/src/putil/CMakeLists.txt index 6547cac759..3ceb58b7be 100644 --- a/panda/src/putil/CMakeLists.txt +++ b/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 diff --git a/panda/src/recorder/CMakeLists.txt b/panda/src/recorder/CMakeLists.txt index 5df5b9a5c2..6ee0ca8e4f 100644 --- a/panda/src/recorder/CMakeLists.txt +++ b/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 diff --git a/panda/src/tform/CMakeLists.txt b/panda/src/tform/CMakeLists.txt index b223a0a1f5..580c7847f1 100644 --- a/panda/src/tform/CMakeLists.txt +++ b/panda/src/tform/CMakeLists.txt @@ -12,6 +12,7 @@ set(P3TFORM_HEADERS trackball.h transform2sg.h ) + set(P3TFORM_SOURCES buttonThrower.cxx config_tform.cxx diff --git a/panda/src/wgldisplay/CMakeLists.txt b/panda/src/wgldisplay/CMakeLists.txt index 8d8b37f8ff..0b08f00a7d 100644 --- a/panda/src/wgldisplay/CMakeLists.txt +++ b/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 diff --git a/panda/src/windisplay/CMakeLists.txt b/panda/src/windisplay/CMakeLists.txt index c351b9ee5e..d9025819ff 100644 --- a/panda/src/windisplay/CMakeLists.txt +++ b/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 diff --git a/pandatool/src/vrml/CMakeLists.txt b/pandatool/src/vrml/CMakeLists.txt index 0e0b410659..235ccbff4e 100644 --- a/pandatool/src/vrml/CMakeLists.txt +++ b/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) diff --git a/pandatool/src/xfile/CMakeLists.txt b/pandatool/src/xfile/CMakeLists.txt index 597cb1eb58..1768ef35ed 100644 --- a/pandatool/src/xfile/CMakeLists.txt +++ b/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)