CMake: Neatly format everything for readability and consistency

This commit is contained in:
Sam Edwards 2019-04-14 22:37:18 -06:00
parent ed67f98a05
commit 6097d34ead
74 changed files with 862 additions and 831 deletions

View File

@ -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()

View File

@ -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)

View File

@ -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)

View File

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

View File

@ -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)

View File

@ -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})

View File

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

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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
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
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
dcParameter.h
dcClassParameter.h
dcArrayParameter.h
dcSimpleParameter.h
dcSwitchParameter.h
dcNumericRange.h dcNumericRange.I
dcSwitch.h
dcTypedef.h
dcPython.h
dcbase.h dcindent.h
dcbase.h
dcindent.h
dcmsgtypes.h
hashGenerator.h
primeNumberGenerator.h)
primeNumberGenerator.h
)
set(P3DCPARSER_SOURCES
dcAtomicField.cxx dcClass.cxx
dcAtomicField.cxx
dcClass.cxx
dcDeclaration.cxx
dcField.cxx dcFile.cxx
dcKeyword.cxx dcKeywordList.cxx
dcMolecularField.cxx dcSubatomicType.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
dcParameter.cxx
dcClassParameter.cxx
dcArrayParameter.cxx
dcSimpleParameter.cxx
dcSwitchParameter.cxx
dcSwitch.cxx
dcTypedef.cxx
dcindent.cxx
hashGenerator.cxx primeNumberGenerator.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

View File

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

View File

@ -7,12 +7,14 @@ set(P3DISTRIBUTED_HEADERS
cConnectionRepository.I
cConnectionRepository.h
cDistributedSmoothNodeBase.I
cDistributedSmoothNodeBase.h)
cDistributedSmoothNodeBase.h
)
set(P3DISTRIBUTED_SOURCES
config_distributed.cxx
cConnectionRepository.cxx
cDistributedSmoothNodeBase.cxx)
cDistributedSmoothNodeBase.cxx
)
add_component_library(p3distributed SYMBOL BUILDING_DIRECT_DISTRIBUTED
${P3DISTRIBUTED_HEADERS} ${P3DISTRIBUTED_SOURCES})

View File

@ -15,7 +15,8 @@ set(P3INTERVAL_HEADERS
lerpblend.h
showInterval.I showInterval.h
waitInterval.I waitInterval.h
lerp_helpers.h)
lerp_helpers.h
)
set(P3INTERVAL_SOURCES
config_interval.cxx
@ -33,7 +34,8 @@ set(P3INTERVAL_SOURCES
hideInterval.cxx
lerpblend.cxx
showInterval.cxx
waitInterval.cxx)
waitInterval.cxx
)
composite_sources(p3interval P3INTERVAL_SOURCES)
add_component_library(p3interval SYMBOL BUILDING_DIRECT_INTERVAL

View File

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

View File

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

View File

@ -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("")

View File

@ -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

View File

@ -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}")

View File

@ -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)

View File

@ -86,7 +86,6 @@ set(P3DTOOLBASE_IGATEEXT
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

View File

@ -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})

View File

@ -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()

View File

@ -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")

View File

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

View File

@ -85,7 +85,8 @@ set(CORE_MODULE_COMPONENTS
p3downloader p3dxml p3event p3express p3gobj p3grutil p3gsgbase p3linmath
p3mathutil p3movies p3parametrics p3pgraph p3pgraphnodes p3pgui
p3pipeline p3pnmimage p3pstatclient p3putil p3recorder p3text p3tform
p3prc p3dtoolutil p3dtoolbase)
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()

View File

@ -2,7 +2,8 @@ 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)
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()

View File

@ -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)

View File

@ -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")

View File

@ -9,7 +9,8 @@ set(P3AUDIO_HEADERS
audioManager.h audioManager.I
audioSound.h audioSound.I
nullAudioManager.h
nullAudioSound.h)
nullAudioSound.h
)
set(P3AUDIO_SOURCES
config_audio.cxx
@ -18,7 +19,8 @@ set(P3AUDIO_SOURCES
audioManager.cxx
audioSound.cxx
nullAudioManager.cxx
nullAudioSound.cxx)
nullAudioSound.cxx
)
composite_sources(p3audio P3AUDIO_SOURCES)
add_component_library(p3audio NOINIT SYMBOL BUILDING_PANDA_AUDIO

View File

@ -13,12 +13,14 @@ if(HAVE_RAD_MSS)
milesAudioSample.I milesAudioSample.h
milesAudioSequence.I milesAudioSequence.h
milesAudioStream.I milesAudioStream.h
globalMilesManager.I globalMilesManager.h)
globalMilesManager.I globalMilesManager.h
)
set(P3MILES_SOURCES
config_milesAudio.cxx milesAudioManager.cxx milesAudioSound.cxx
milesAudioStream.cxx globalMilesManager.cxx milesAudioSample.cxx
milesAudioSequence.cxx)
milesAudioSequence.cxx
)
composite_sources(p3miles_audio P3MILES_SOURCES)
add_library(p3miles_audio ${P3MILES_HEADERS} ${P3MILES_SOURCES})
@ -39,10 +41,12 @@ if(HAVE_FMODEX)
set(P3FMOD_HEADERS
config_fmodAudio.h
fmodAudioManager.h
fmodAudioSound.I fmodAudioSound.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})
@ -63,10 +67,12 @@ if(HAVE_OPENAL)
set(P3OPENAL_HEADERS
config_openalAudio.h
openalAudioManager.h
openalAudioSound.I openalAudioSound.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)

View File

@ -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})

View File

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

View File

@ -12,7 +12,8 @@ set(P3COCOADISPLAY_HEADERS
cocoaPandaView.h
cocoaPandaWindow.h
cocoaPandaWindowDelegate.h
cocoaPandaAppDelegate.h)
cocoaPandaAppDelegate.h
)
set(P3COCOADISPLAY_SOURCES
config_cocoadisplay.mm
@ -24,7 +25,8 @@ set(P3COCOADISPLAY_SOURCES
cocoaPandaView.mm
cocoaPandaWindow.mm
cocoaPandaWindowDelegate.mm
cocoaPandaAppDelegate.mm)
cocoaPandaAppDelegate.mm
)
composite_sources(p3cocoadisplay P3COCOADISPLAY_SOURCES)
add_component_library(p3cocoadisplay SYMBOL BUILDING_PANDA_COCOADISPLAY

View File

@ -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

View File

@ -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)

View File

@ -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)

View File

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

View File

@ -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

View File

@ -7,14 +7,19 @@ 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)
@ -26,10 +31,13 @@ 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)

View File

@ -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

View File

@ -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

View File

@ -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()

View File

@ -8,8 +8,8 @@ set(P3FFMPEG_HEADERS
ffmpegVideoCursor.h ffmpegVideoCursor.I
ffmpegAudio.h ffmpegAudio.I
ffmpegAudioCursor.h ffmpegAudioCursor.I
ffmpegVirtualFile.h ffmpegVirtualFile.I)
ffmpegVirtualFile.h ffmpegVirtualFile.I
)
set(P3FFMPEG_SOURCES
config_ffmpeg.cxx
@ -17,7 +17,8 @@ set(P3FFMPEG_SOURCES
ffmpegVideoCursor.cxx
ffmpegAudio.cxx
ffmpegAudioCursor.cxx
ffmpegVirtualFile.cxx)
ffmpegVirtualFile.cxx
)
composite_sources(p3ffmpeg P3FFMPEG_SOURCES)
add_library(p3ffmpeg ${P3FFMPEG_HEADERS} ${P3FFMPEG_SOURCES})

View File

@ -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)

View File

@ -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

View File

@ -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

View File

@ -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

View File

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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -18,7 +18,8 @@ set(P3MOVIES_HEADERS
vorbisAudio.h vorbisAudio.I
vorbisAudioCursor.h vorbisAudioCursor.I
wavAudio.h wavAudio.I
wavAudioCursor.h wavAudioCursor.I)
wavAudioCursor.h wavAudioCursor.I
)
set(P3MOVIES_SOURCES
config_movies.cxx
@ -40,7 +41,8 @@ set(P3MOVIES_SOURCES
vorbisAudio.cxx
vorbisAudioCursor.cxx
wavAudio.cxx
wavAudioCursor.cxx)
wavAudioCursor.cxx
)
composite_sources(p3movies P3MOVIES_SOURCES)
add_component_library(p3movies SYMBOL BUILDING_PANDA_MOVIES

View File

@ -15,7 +15,8 @@ set(P3NATIVENET_HEADERS
socket_udp.h
socket_udp_incoming.h time_clock.h
membuffer.h membuffer.I socket_fdset.h
socket_udp_outgoing.h time_general.h)
socket_udp_outgoing.h time_general.h
)
set(P3NATIVENET_SOURCES
config_nativenet.cxx
@ -27,7 +28,8 @@ set(P3NATIVENET_SOURCES
socket_tcp_ssl.cxx
socket_udp.cxx
socket_udp_incoming.cxx
socket_udp_outgoing.cxx)
socket_udp_outgoing.cxx
)
composite_sources(p3nativenet P3NATIVENET_SOURCES)
add_component_library(p3nativenet SYMBOL BUILDING_PANDA_NATIVENET

View File

@ -15,7 +15,8 @@ set(P3NET_HEADERS
queuedConnectionListener.I
queuedConnectionListener.h queuedConnectionManager.h
queuedConnectionReader.h recentConnectionReader.h
queuedReturn.h queuedReturn.I)
queuedReturn.h queuedReturn.I
)
set(P3NET_SOURCES
config_net.cxx connection.cxx connectionListener.cxx
@ -26,7 +27,8 @@ set(P3NET_SOURCES
datagramSinkNet.cxx
queuedConnectionListener.cxx
queuedConnectionManager.cxx queuedConnectionReader.cxx
recentConnectionReader.cxx)
recentConnectionReader.cxx
)
composite_sources(p3net P3NET_SOURCES)
add_component_library(p3net SYMBOL BUILDING_PANDA_NET

View File

@ -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

View File

@ -23,7 +23,8 @@ set(P3PARTICLESYSTEM_HEADERS
tangentRingEmitter.h zSpinParticle.I zSpinParticle.h
zSpinParticleFactory.I zSpinParticleFactory.h
particleCommonFuncs.h colorInterpolationManager.I
colorInterpolationManager.h)
colorInterpolationManager.h
)
set(P3PARTICLESYSTEM_SOURCES
baseParticle.cxx baseParticleEmitter.cxx baseParticleFactory.cxx
@ -37,9 +38,11 @@ set(P3PARTICLESYSTEM_SOURCES
sparkleParticleRenderer.cxx sphereSurfaceEmitter.cxx
sphereVolumeEmitter.cxx spriteParticleRenderer.cxx
tangentRingEmitter.cxx zSpinParticle.cxx
zSpinParticleFactory.cxx colorInterpolationManager.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")

View File

@ -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

View File

@ -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

View File

@ -19,7 +19,8 @@ set(P3PHYSICS_HEADERS
physicsCollisionHandler.I physicsCollisionHandler.h
physicsManager.I physicsManager.h
physicsObject.I physicsObject.h
physicsObjectCollection.I physicsObjectCollection.h)
physicsObjectCollection.I physicsObjectCollection.h
)
set(P3PHYSICS_SOURCES
actorNode.cxx angularEulerIntegrator.cxx angularForce.cxx
@ -34,7 +35,8 @@ set(P3PHYSICS_SOURCES
linearSourceForce.cxx linearUserDefinedForce.cxx
linearVectorForce.cxx physical.cxx physicalNode.cxx
physicsCollisionHandler.cxx physicsManager.cxx physicsObject.cxx
physicsObjectCollection.cxx)
physicsObjectCollection.cxx
)
composite_sources(p3physics P3PHYSICS_SOURCES)
add_component_library(p3physics SYMBOL BUILDING_PANDA_PHYSICS

View File

@ -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

View File

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

View File

@ -7,7 +7,8 @@ set(P3PSTATCLIENT_HEADERS
pStatCollectorForward.I pStatCollectorForward.h
pStatFrameData.I pStatFrameData.h pStatProperties.h
pStatServerControlMessage.h pStatThread.I pStatThread.h
pStatTimer.I pStatTimer.h)
pStatTimer.I pStatTimer.h
)
set(P3PSTATCLIENT_SOURCES
config_pstatclient.cxx pStatClient.cxx pStatClientImpl.cxx
@ -18,7 +19,8 @@ set(P3PSTATCLIENT_SOURCES
pStatCollectorForward.cxx
pStatFrameData.cxx pStatProperties.cxx
pStatServerControlMessage.cxx
pStatThread.cxx)
pStatThread.cxx
)
composite_sources(p3pstatclient P3PSTATCLIENT_SOURCES)
add_component_library(p3pstatclient SYMBOL BUILDING_PANDA_PSTATCLIENT

View File

@ -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

View File

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

View File

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

View File

@ -8,15 +8,16 @@ set(P3WGLDISPLAY_HEADERS
wglGraphicsPipe.I wglGraphicsPipe.h
wglGraphicsStateGuardian.I wglGraphicsStateGuardian.h
wglGraphicsWindow.I wglGraphicsWindow.h
wglext.h)
wglext.h
)
set(P3WGLDISPLAY_SOURCES
config_wgldisplay.cxx
wglGraphicsBuffer.cxx
wglGraphicsPipe.cxx
wglGraphicsStateGuardian.cxx
wglGraphicsWindow.cxx)
wglGraphicsWindow.cxx
)
composite_sources(p3wgldisplay P3WGLDISPLAY_SOURCES)
add_component_library(p3wgldisplay SYMBOL BUILDING_PANDA_WGLDISPLAY

View File

@ -6,12 +6,14 @@ set(P3WINDISPLAY_HEADERS
config_windisplay.h
winGraphicsPipe.I winGraphicsPipe.h
winGraphicsWindow.I winGraphicsWindow.h
winDetectDx.h)
winDetectDx.h
)
set(P3WINDISPLAY_SOURCES
config_windisplay.cxx winGraphicsPipe.cxx
winGraphicsWindow.cxx
winDetectDx9.cxx)
winDetectDx9.cxx
)
composite_sources(p3windisplay P3WINDISPLAY_SOURCES)
add_component_library(p3windisplay SYMBOL BUILDING_PANDAWIN

View File

@ -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)

View File

@ -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)