diff --git a/cmake/macros/Interrogate.cmake b/cmake/macros/Interrogate.cmake index 72b595ec1c..0025cc9161 100644 --- a/cmake/macros/Interrogate.cmake +++ b/cmake/macros/Interrogate.cmake @@ -219,16 +219,34 @@ function(interrogate_sources target output database module) endfunction(interrogate_sources) # -# Function: add_python_module(module [lib1 [lib2 ...]]) -# Uses interrogate to create a Python module. +# Function: add_python_module(module [lib1 [lib2 ...]] [LINK lib1 ...]) +# Uses interrogate to create a Python module. If the LINK keyword is specified, +# the Python module is linked against the specified libraries instead of those +# listed before. # function(add_python_module module) if(HAVE_PYTHON AND HAVE_INTERROGATE) - set(targets ${ARGN}) + set(targets) + set(link_targets) set(infiles) set(sources) set(HACKlinklibs) + set(link_keyword OFF) + foreach(arg ${ARGN}) + if(arg STREQUAL "LINK") + set(link_keyword ON) + elseif(link_keyword) + list(APPEND link_targets "${arg}") + else() + list(APPEND targets "${arg}") + endif() + endforeach(arg) + + if(NOT link_keyword) + set(link_targets ${targets}) + endif() + foreach(target ${targets}) interrogate_sources(${target} "${target}_igate.cxx" "${target}.in" "${module}") list(APPEND infiles "${target}.in") @@ -262,7 +280,7 @@ function(add_python_module module) add_library(${module} MODULE "${module}_module.cxx" ${sources}) target_link_libraries(${module} - ${targets} ${PYTHON_LIBRARIES} p3interrogatedb) + ${link_targets} ${PYTHON_LIBRARIES} p3interrogatedb) target_link_libraries(${module} ${HACKlinklibs}) set_target_properties(${module} PROPERTIES diff --git a/cmake/modules/FindCg.cmake b/cmake/modules/FindCg.cmake index 3fdfe757ca..f7c43884a2 100644 --- a/cmake/modules/FindCg.cmake +++ b/cmake/modules/FindCg.cmake @@ -141,7 +141,7 @@ if(NOT CG_LIBRARY_DIR OR NOT CG_INCLUDE_DIRS) set(CG_LIBRARY_DIR "${CG_LIBRARY_DIR}" CACHE PATH "The path to NvidiaCG's library directory.") # Library path endif() - string(REGEX REPLACE "/Cg$" "" CG_BASE_INCLUDE_DIR ${CG_INCLUDE_DIR}) + string(REGEX REPLACE "/Cg$" "" CG_BASE_INCLUDE_DIR "${CG_INCLUDE_DIR}") set(CG_INCLUDE_DIRS ${CG_BASE_INCLUDE_DIR} ${CG_INCLUDE_DIR}) mark_as_advanced(CG_INCLUDE_DIRS) diff --git a/cmake/modules/FindODE.cmake b/cmake/modules/FindODE.cmake new file mode 100644 index 0000000000..6c70f69de7 --- /dev/null +++ b/cmake/modules/FindODE.cmake @@ -0,0 +1,80 @@ +# Filename: FindODE.cmake +# Author: CFSworks (7 Feb, 2014) +# +# Usage: +# find_package(ODE [REQUIRED] [QUIET]) +# +# Once done this will define: +# ODE_FOUND - system has ode +# ODE_INCLUDE_DIR - the ode include directory +# ODE_LIBRARY_DIR - the ode library directory +# ODE_LIBRARY - the path to the library binary +# +# ODE_RELEASE_LIBRARY - the filepath of the ode release library +# ODE_DEBUG_LIBRARY - the filepath of the ode debug library +# + +if(NOT ODE_INCLUDE_DIR OR NOT ODE_LIBRARY_DIR) + # Find the libode include files + find_path(ODE_INCLUDE_DIR + NAMES "ode.h" + PATHS "/usr/include" + "/usr/local/include" + "/sw/include" + "/opt/include" + "/opt/local/include" + "/opt/csw/include" + PATH_SUFFIXES "" "ode" + ) + + # Find the libode library built for release + find_library(ODE_RELEASE_LIBRARY + NAMES "ode" "libode" + PATHS "/usr" + "/usr/local" + "/usr/freeware" + "/sw" + "/opt" + "/opt/csw" + PATH_SUFFIXES "lib" "lib32" "lib64" + ) + + # Find the libode library built for debug + find_library(ODE_DEBUG_LIBRARY + NAMES "oded" "liboded" + PATHS "/usr" + "/usr/local" + "/usr/freeware" + "/sw" + "/opt" + "/opt/csw" + PATH_SUFFIXES "lib" "lib32" "lib64" + ) + + + mark_as_advanced(ODE_INCLUDE_DIR) + mark_as_advanced(ODE_RELEASE_LIBRARY) + mark_as_advanced(ODE_DEBUG_LIBRARY) +endif() + +# Choose library +if(CMAKE_BUILD_TYPE MATCHES "Debug" AND ODE_DEBUG_LIBRARY) + set(ODE_LIBRARY ${ODE_DEBUG_LIBRARY} CACHE FILEPATH "The filepath to libode's library binary.") +elseif(ODE_RELEASE_LIBRARY) + set(ODE_LIBRARY ${ODE_RELEASE_LIBRARY} CACHE FILEPATH "The filepath to libode's library binary.") +elseif(ODE_DEBUG_LIBRARY) + set(ODE_LIBRARY ${ODE_DEBUG_LIBRARY} CACHE FILEPATH "The filepath to libode's library binary.") +endif() + +# Translate library into library directory +if(ODE_LIBRARY) + unset(ODE_LIBRARY_DIR CACHE) + get_filename_component(ODE_LIBRARY_DIR "${ODE_LIBRARY}" PATH) + set(ODE_LIBRARY_DIR "${ODE_LIBRARY_DIR}" CACHE PATH "The path to libode's library directory.") # Library path +endif() + +mark_as_advanced(ODE_LIBRARY) +mark_as_advanced(ODE_LIBRARY_DIR) + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(ODE DEFAULT_MSG ODE_LIBRARY ODE_INCLUDE_DIR ODE_LIBRARY_DIR) diff --git a/dtool/Config.cmake b/dtool/Config.cmake index e65cc9602e..6ee2e344a9 100644 --- a/dtool/Config.cmake +++ b/dtool/Config.cmake @@ -429,8 +429,8 @@ platforms. Currently experimental." ON) # Is Python installed, and should Python interfaces be generated? -find_package(PythonLibs) -find_package(PythonInterp) +find_package(PythonLibs 2.5) +find_package(PythonInterp 2.5) set(PYTHON_FOUND ${PYTHONLIBS_FOUND}) package_option(PYTHON DEFAULT ON @@ -591,6 +591,11 @@ find_package(ZLIB) package_option(ZLIB DEFAULT ON "Enables support for compression of Panda assets.") +# Is ODE installed, and where? +find_package(ODE) + +package_option(ODE DEFAULT ON + "Enables support for ridid-body physics using the Open Dynamics Engine.") # Is OpenGL installed, and where? find_package(OpenGL QUIET) diff --git a/dtool/src/dtoolutil/CMakeLists.txt b/dtool/src/dtoolutil/CMakeLists.txt index 04a4e0ce6c..f68db48a5b 100644 --- a/dtool/src/dtoolutil/CMakeLists.txt +++ b/dtool/src/dtoolutil/CMakeLists.txt @@ -56,4 +56,10 @@ if(HAVE_PYTHON) target_link_libraries(p3dtoolutil ${PYTHON_LIBRARIES}) endif() +if(APPLE) + find_library(FOUNDATION_LIBRARY Foundation) + find_library(APPKIT_LIBRARY AppKit) + target_link_libraries(p3dtoolutil ${FOUNDATION_LIBRARY} ${APPKIT_LIBRARY}) +endif() + install(TARGETS p3dtoolutil DESTINATION lib) diff --git a/panda/CMakeLists.txt b/panda/CMakeLists.txt index 6cbbfb7f4c..84184d1295 100644 --- a/panda/CMakeLists.txt +++ b/panda/CMakeLists.txt @@ -42,8 +42,11 @@ add_subdirectory(src/x11display) add_subdirectory(src/glxdisplay) add_subdirectory(src/windisplay) add_subdirectory(src/wgldisplay) +add_subdirectory(src/osxdisplay) +add_subdirectory(src/cocoadisplay) add_subdirectory(src/movies) add_subdirectory(src/audio) +add_subdirectory(src/audiotraits) add_subdirectory(src/chan) add_subdirectory(src/char) add_subdirectory(src/dgraph) @@ -63,10 +66,18 @@ add_subdirectory(src/egg2pg) add_subdirectory(src/framework) add_subdirectory(src/testbed) +# For other components +# physics +add_subdirectory(src/physics) +add_subdirectory(src/particlesystem) +# ode +add_subdirectory(src/ode) + # Include panda metalibs add_subdirectory(metalibs/panda) add_subdirectory(metalibs/pandagl) add_subdirectory(metalibs/pandaegg) +add_subdirectory(metalibs/pandaphysics) # Now add the Python modules: set(CORE_MODULE_COMPONENTS @@ -82,8 +93,14 @@ if(HAVE_FREETYPE) list(APPEND CORE_MODULE_COMPONENTS p3pnmtext) endif() -add_python_module(core ${CORE_MODULE_COMPONENTS}) +add_python_module(core ${CORE_MODULE_COMPONENTS} LINK panda) if(HAVE_EGG) add_python_module(egg p3egg p3egg2pg) endif() + +add_python_module(physics p3physics p3particlesystem) + +if(HAVE_ODE) + add_python_module(ode p3ode) +endif() diff --git a/panda/metalibs/panda/CMakeLists.txt b/panda/metalibs/panda/CMakeLists.txt index 3170a4717e..a44ef0cdd0 100644 --- a/panda/metalibs/panda/CMakeLists.txt +++ b/panda/metalibs/panda/CMakeLists.txt @@ -1,5 +1,16 @@ add_definitions(-DBUILDING_PANDA) -set(PANDA_LINK_TARGETS p3pnmimagetypes p3device) +set(PANDA_LINK_TARGETS + p3chan p3char p3collide p3cull p3device p3dgraph p3display p3downloader + p3event p3express p3gobj p3grutil p3gsgbase p3linmath p3mathutil p3nativenet + p3net p3movies p3parametrics p3pgraph p3pgraphnodes p3pgui p3pipeline + p3pnmimage p3pnmimagetypes p3pstatclient p3putil p3recorder p3text p3tform) + +if(HAVE_AUDIO) + list(APPEND PANDA_LINK_TARGETS p3audio) +endif() +if(HAVE_FREETYPE) + list(APPEND PANDA_LINK_TARGETS p3pnmtext) +endif() if(LINK_IN_PHYSX) add_definitions(-DBUILDING_PANDAPHYSX) diff --git a/panda/metalibs/pandagl/CMakeLists.txt b/panda/metalibs/pandagl/CMakeLists.txt index a0e156358f..6af135a09b 100644 --- a/panda/metalibs/pandagl/CMakeLists.txt +++ b/panda/metalibs/pandagl/CMakeLists.txt @@ -17,6 +17,13 @@ if(HAVE_GL) list(APPEND PANDAGL_LINK_TARGETS p3wgldisplay) endif() + if(HAVE_COCOA) + set(PANDAGL_LINK_TARGETS ${PANDAGL_LINK_TARGETS} p3cocoadisplay) + endif() + + if(HAVE_CARBON) + set(PANDAGL_LINK_TARGETS ${PANDAGL_LINK_TARGETS} p3osxdisplay) + endif() add_library(pandagl pandagl.cxx) target_link_libraries(pandagl ${PANDAGL_LINK_TARGETS}) diff --git a/panda/metalibs/pandaphysics/CMakeLists.txt b/panda/metalibs/pandaphysics/CMakeLists.txt new file mode 100644 index 0000000000..f48411820c --- /dev/null +++ b/panda/metalibs/pandaphysics/CMakeLists.txt @@ -0,0 +1,4 @@ +add_library(pandaphysics pandaphysics.cxx) +target_link_libraries(pandaphysics p3physics p3particlesystem) + +install(TARGETS pandaphysics DESTINATION lib) diff --git a/panda/src/audiotraits/CMakeLists.txt b/panda/src/audiotraits/CMakeLists.txt new file mode 100644 index 0000000000..e4a28424fe --- /dev/null +++ b/panda/src/audiotraits/CMakeLists.txt @@ -0,0 +1,64 @@ +if(HAVE_AUDIO) + + if(HAVE_RAD_MSS) + set(P3MILES_HEADERS + config_milesAudio.h + milesAudioManager.h + milesAudioSound.I milesAudioSound.h + milesAudioSample.I milesAudioSample.h + milesAudioSequence.I milesAudioSequence.h + milesAudioStream.I milesAudioStream.h + globalMilesManager.I globalMilesManager.h) + + set(P3MILES_SOURCES + config_milesAudio.cxx milesAudioManager.cxx milesAudioSound.cxx + milesAudioStream.cxx globalMilesManager.cxx milesAudioSample.cxx + milesAudioSequence.cxx) + + composite_sources(p3miles_audio P3MILES_SOURCES) + include_directories(${MILES_INCLUDE_DIR}) + add_library(p3miles_audio ${P3MILES_HEADERS} ${P3MILES_SOURCES}) + target_link_libraries(p3miles_audio p3audio p3event p3pipeline + ${_MILES_LIBRARY}) + + install(TARGETS p3miles_audio DESTINATION lib) + endif() + + if(HAVE_FMODEX) + set(P3FMOD_HEADERS + config_fmodAudio.h + fmodAudioManager.h + fmodAudioSound.I fmodAudioSound.h) + + set(P3FMOD_SOURCES + config_fmodAudio.cxx fmodAudioManager.cxx fmodAudioSound.cxx) + + composite_sources(p3fmod_audio P3FMOD_SOURCES) + include_directories(${FMODEX_INCLUDE_DIR}) + add_library(p3fmod_audio ${P3FMOD_HEADERS} ${P3FMOD_SOURCES}) + target_link_libraries(p3fmod_audio p3audio p3event + ${_FMODEX_LIBRARY}) + + install(TARGETS p3fmod_audio DESTINATION lib) + endif() + + if(HAVE_OPENAL) + set(P3OPENAL_HEADERS + config_openalAudio.h + openalAudioManager.h + openalAudioSound.I openalAudioSound.h) + + set(P3OPENAL_SOURCES + config_openalAudio.cxx openalAudioManager.cxx openalAudioSound.cxx) + + + composite_sources(p3openal_audio P3OPENAL_SOURCES) + include_directories(${OPENAL_INCLUDE_DIR}) + add_library(p3openal_audio ${P3OPENAL_HEADERS} ${P3OPENAL_SOURCES}) + target_link_libraries(p3openal_audio p3audio p3event + ${_OPENAL_LIBRARY}) + + install(TARGETS p3openal_audio DESTINATION lib) + endif() + +endif() diff --git a/panda/src/cocoadisplay/CMakeLists.txt b/panda/src/cocoadisplay/CMakeLists.txt new file mode 100644 index 0000000000..d8fb78d894 --- /dev/null +++ b/panda/src/cocoadisplay/CMakeLists.txt @@ -0,0 +1,29 @@ +if(APPLE AND HAVE_GL AND HAVE_COCOA) + set(P3COCOADISPLAY_HEADERS + config_cocoadisplay.h + cocoaGraphicsPipe.h cocoaGraphicsPipe.I + cocoaGraphicsWindow.h cocoaGraphicsWindow.I + cocoaGraphicsStateGuardian.h cocoaGraphicsStateGuardian.I + cocoaPandaView.h cocoaPandaWindowDelegate.h) + + set(P3COCOADISPLAY_SOURCES + config_cocoadisplay.mm + cocoaGraphicsPipe.mm + cocoaGraphicsStateGuardian.mm + cocoaGraphicsWindow.mm + cocoaPandaView.mm + cocoaPandaWindow.mm + cocoaPandaWindowDelegate.mm) + + #composite_sources(p3cocoadisplay P3COCOADISPLAY_SOURCES) + add_library(p3cocoadisplay ${P3COCOADISPLAY_SOURCES} ${P3COCOADISPLAY_HEADERS}) + target_link_libraries(p3cocoadisplay p3display p3putil p3glgsg) + + # Frameworks: + find_library(APPLICATIONSERVICES_LIBRARY ApplicationServices) + find_library(APPKIT_LIBRARY AppKit) + target_link_libraries(p3cocoadisplay + ${APPLICATIONSERVICES_LIBRARY} ${APPKIT_LIBRARY}) + + install(TARGETS p3cocoadisplay DESTINATION lib) +endif() diff --git a/panda/src/cocoadisplay/cocoaGraphicsWindow.mm b/panda/src/cocoadisplay/cocoaGraphicsWindow.mm index a5c63f3d50..0cec24605d 100644 --- a/panda/src/cocoadisplay/cocoaGraphicsWindow.mm +++ b/panda/src/cocoadisplay/cocoaGraphicsWindow.mm @@ -38,6 +38,7 @@ #import #import #import +#import #import //#import diff --git a/panda/src/cocoadisplay/cocoaPandaView.h b/panda/src/cocoadisplay/cocoaPandaView.h index f892c6a685..05ac92bc81 100644 --- a/panda/src/cocoadisplay/cocoaPandaView.h +++ b/panda/src/cocoadisplay/cocoaPandaView.h @@ -12,7 +12,10 @@ // //////////////////////////////////////////////////////////////////// +#include "graphicsWindow.h" + #import +#import class CocoaGraphicsWindow; diff --git a/panda/src/cocoadisplay/cocoaPandaView.mm b/panda/src/cocoadisplay/cocoaPandaView.mm index 05c73213e5..bb7d03c832 100644 --- a/panda/src/cocoadisplay/cocoaPandaView.mm +++ b/panda/src/cocoadisplay/cocoaPandaView.mm @@ -12,6 +12,7 @@ // //////////////////////////////////////////////////////////////////// +#include "config_cocoadisplay.h" #import "cocoaPandaView.h" #import "cocoaGraphicsWindow.h" diff --git a/panda/src/cocoadisplay/cocoaPandaWindowDelegate.h b/panda/src/cocoadisplay/cocoaPandaWindowDelegate.h index 78c8c2eabe..fd7333bed0 100644 --- a/panda/src/cocoadisplay/cocoaPandaWindowDelegate.h +++ b/panda/src/cocoadisplay/cocoaPandaWindowDelegate.h @@ -14,6 +14,8 @@ #import +#import "cocoaGraphicsWindow.h" + class CocoaGraphicsWindow; #if __MAC_OS_X_VERSION_MAX_ALLOWED >= 1060 diff --git a/panda/src/display/CMakeLists.txt b/panda/src/display/CMakeLists.txt index 38258dce86..2f0004a5ce 100644 --- a/panda/src/display/CMakeLists.txt +++ b/panda/src/display/CMakeLists.txt @@ -73,22 +73,27 @@ set(P3DISPLAY_IGATEEXT ) if(HAVE_PYTHON) - set(P3DISPLAY_HEADERS - ${P3DISPLAY_HEADERS} - pythonGraphicsWindowProc.h - ) - set(P3DISPLAY_SOURCES - ${P3DISPLAY_SOURCES} - pythonGraphicsWindowProc.cxx - ) + set(P3DISPLAY_HEADERS + ${P3DISPLAY_HEADERS} + pythonGraphicsWindowProc.h + ) + set(P3DISPLAY_SOURCES + ${P3DISPLAY_SOURCES} + pythonGraphicsWindowProc.cxx + ) endif() -if(OSX_PLATFORM) - set(P3DISPLAY_HEADER - ${P3DISPLAY_HEADERS} - subprocessWindowBuffer.h - subprocessWindowBuffer.I - ) +if(APPLE) + set(P3DISPLAY_HEADERS + ${P3DISPLAY_HEADERS} + subprocessWindowBuffer.h + subprocessWindowBuffer.I + ) + + set(P3DISPLAY_SOURCES + ${P3DISPLAY_SOURCES} + subprocessWindowBuffer.cxx + ) endif() composite_sources(p3display P3DISPLAY_SOURCES) diff --git a/panda/src/express/CMakeLists.txt b/panda/src/express/CMakeLists.txt index 63aa31baa4..dc6ec21b51 100644 --- a/panda/src/express/CMakeLists.txt +++ b/panda/src/express/CMakeLists.txt @@ -135,7 +135,7 @@ composite_sources(p3express P3EXPRESS_SOURCES) add_library(p3express ${P3EXPRESS_SOURCES} ${P3EXPRESS_HEADERS} ${P3EXPRESS_IGATEEXT}) target_link_libraries(p3express p3pandabase p3dtool p3dtoolconfig - ${_TAR_LIBRARY}) + ${_TAR_LIBRARY} ${_ZLIB_LIBRARY}) target_interrogate(p3express ALL) if(WIN32) diff --git a/panda/src/ode/CMakeLists.txt b/panda/src/ode/CMakeLists.txt new file mode 100755 index 0000000000..9e17af5b24 --- /dev/null +++ b/panda/src/ode/CMakeLists.txt @@ -0,0 +1,76 @@ +if(HAVE_ODE) + set(P3ODE_HEADERS + ode_includes.h config_ode.h + odeWorld.I odeWorld.h + odeMass.I odeMass.h + odeBody.I odeBody.h + odeJointGroup.I odeJointGroup.h + odeJoint.I odeJoint.h + odeUtil.h + odeSpace.I odeSpace.h + odeGeom.I odeGeom.h + odeSurfaceParameters.I odeSurfaceParameters.h + odeContactGeom.I odeContactGeom.h + odeContact.I odeContact.h + odeAMotorJoint.I odeAMotorJoint.h + odeBallJoint.I odeBallJoint.h + odeContactJoint.I odeContactJoint.h + odeFixedJoint.I odeFixedJoint.h + odeHingeJoint.I odeHingeJoint.h + odeHinge2Joint.I odeHinge2Joint.h + odeLMotorJoint.I odeLMotorJoint.h + odeNullJoint.I odeNullJoint.h + odePlane2dJoint.I odePlane2dJoint.h + odeSliderJoint.I odeSliderJoint.h + odeUniversalJoint.I odeUniversalJoint.h + odeJointCollection.I odeJointCollection.h + odeSimpleSpace.I odeSimpleSpace.h + odeHashSpace.I odeHashSpace.h + odeQuadTreeSpace.I odeQuadTreeSpace.h + odeSphereGeom.I odeSphereGeom.h + odeBoxGeom.I odeBoxGeom.h + odePlaneGeom.I odePlaneGeom.h + odeCappedCylinderGeom.I odeCappedCylinderGeom.h + odeCylinderGeom.I odeCylinderGeom.h + odeRayGeom.I odeRayGeom.h + odeTriMeshData.I odeTriMeshData.h + odeTriMeshGeom.I odeTriMeshGeom.h + odeCollisionEntry.I odeCollisionEntry.h + odeHelperStructs.h) + + set(P3ODE_SOURCES + config_ode.cxx + odeWorld.cxx odeMass.cxx odeBody.cxx + odeJointGroup.cxx odeJoint.cxx + odeUtil.cxx + odeSpace.cxx + odeGeom.cxx + odeSurfaceParameters.cxx + odeContactGeom.cxx odeContact.cxx + odeAMotorJoint.cxx odeBallJoint.cxx + odeContactJoint.cxx odeFixedJoint.cxx + odeHingeJoint.cxx odeHinge2Joint.cxx + odeLMotorJoint.cxx odeNullJoint.cxx + odePlane2dJoint.cxx odeSliderJoint.cxx + odeUniversalJoint.cxx odeJointCollection.cxx + odeSimpleSpace.cxx + odeHashSpace.cxx odeQuadTreeSpace.cxx + odeSphereGeom.cxx odeBoxGeom.cxx + odePlaneGeom.cxx odeCappedCylinderGeom.cxx + odeCylinderGeom.cxx odeRayGeom.cxx + odeTriMeshData.cxx odeTriMeshGeom.cxx + odeCollisionEntry.cxx) + + set(P3ODE_IGATE_SOURCES "${P3ODE_HEADERS};${P3ODE_SOURCES}") + list(REMOVE_ITEM P3ODE_IGATE_SOURCES "odeConvexGeom.h") + list(REMOVE_ITEM P3ODE_IGATE_SOURCES "odeHeightFieldGeom.h") + list(REMOVE_ITEM P3ODE_IGATE_SOURCES "odeHelperStructs.h") + + composite_sources(p3ode P3ODE_SOURCES) + add_library(p3ode ${P3ODE_SOURCES} ${P3ODE_HEADERS}) + set_target_properties(p3ode PROPERTIES COMPILE_DEFINITIONS dSINGLE) + target_link_libraries(p3ode p3pgraph p3physics ${ODE_LIBRARY}) + target_interrogate(p3ode ${P3ODE_IGATE_SOURCES}) + + install(TARGETS p3ode DESTINATION lib) +endif() diff --git a/panda/src/osxdisplay/CMakeLists.txt b/panda/src/osxdisplay/CMakeLists.txt new file mode 100644 index 0000000000..2a16f6c3ce --- /dev/null +++ b/panda/src/osxdisplay/CMakeLists.txt @@ -0,0 +1,27 @@ +if(APPLE AND HAVE_GL AND HAVE_CARBON) + set(P3OSXDISPLAY_HEADERS + config_osxdisplay.h + osxGraphicsPipe.h + osxGraphicsWindow.h osxGraphicsWindow.I + osxGraphicsStateGuardian.h) + + set(P3OSXDISPLAY_SOURCES + config_osxdisplay.cxx osxGraphicsPipe.cxx osxGraphicsStateGuardian.cxx + osxGraphicsBuffer.cxx) + + composite_sources(p3osxdisplay P3OSXDISPLAY_SOURCES) + add_library(p3osxdisplay ${P3OSXDISPLAY_SOURCES} ${P3OSXDISPLAY_HEADERS}) + target_link_libraries(p3osxdisplay p3display p3putil p3glgsg) + + # Frameworks: + find_library(APPLICATIONSERVICES_LIBRARY ApplicationServices) + find_library(CARBON_LIBRARY Carbon) + find_library(AGL_LIBRARY AGL) + find_library(CORESERVICES_LIBRARY CoreServices) + find_library(COCOA_LIBRARY Cocoa) + target_link_libraries(p3osxdisplay + ${APPLICATIONSERVICES_LIBRARY} ${CARBON_LIBRARY} ${AGL_LIBRARY} + ${CORESERVICES_LIBRARY} ${COCOA_LIBRARY}) + + install(TARGETS p3osxdisplay DESTINATION lib) +endif() diff --git a/panda/src/particlesystem/CMakeLists.txt b/panda/src/particlesystem/CMakeLists.txt new file mode 100644 index 0000000000..f2e405b41b --- /dev/null +++ b/panda/src/particlesystem/CMakeLists.txt @@ -0,0 +1,45 @@ +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 + geomParticleRenderer.I geomParticleRenderer.h lineEmitter.I + lineEmitter.h lineParticleRenderer.I lineParticleRenderer.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) + + +composite_sources(p3particlesystem P3PARTICLESYSTEM_SOURCES) +add_library(p3particlesystem ${P3PARTICLESYSTEM_HEADERS} ${P3PARTICLESYSTEM_SOURCES}) +target_link_libraries(p3particlesystem p3pgraph p3physics) +target_interrogate(p3particlesystem ALL) + +install(TARGETS p3particlesystem DESTINATION lib) diff --git a/panda/src/physics/CMakeLists.txt b/panda/src/physics/CMakeLists.txt new file mode 100644 index 0000000000..3353864326 --- /dev/null +++ b/panda/src/physics/CMakeLists.txt @@ -0,0 +1,43 @@ +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 + 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) + +composite_sources(p3physics P3PHYSICS_SOURCES) +add_library(p3physics ${P3PHYSICS_HEADERS} ${P3PHYSICS_SOURCES}) +target_link_libraries(p3physics p3pgraph p3linmath p3collide) +target_interrogate(p3physics ALL) + +install(TARGETS p3physics DESTINATION lib)