CMake: Build direct.motiontrail

This covers pretty much all of direct, except for directd.
This commit is contained in:
Sam Edwards 2018-05-29 22:37:38 -06:00
parent 4b70cb162e
commit d0ced03ffd
2 changed files with 21 additions and 6 deletions

View File

@ -10,16 +10,14 @@ add_subdirectory(src/deadrec)
#add_subdirectory(src/directdServer) #add_subdirectory(src/directdServer)
#add_subdirectory(src/directd) #add_subdirectory(src/directd)
add_subdirectory(src/distributed) add_subdirectory(src/distributed)
#add_subdirectory(src/heapq)
#add_subdirectory(src/http)
add_subdirectory(src/interval) add_subdirectory(src/interval)
#add_subdirectory(src/motiontrail) add_subdirectory(src/motiontrail)
add_subdirectory(src/showbase) add_subdirectory(src/showbase)
# TODO: p3direct needs a source file! # TODO: p3direct needs a source file!
set(P3DIRECT_COMPONENTS set(P3DIRECT_COMPONENTS
p3dcparser p3deadrec p3dcparser p3deadrec p3interval
p3interval p3showbase) p3motiontrail p3showbase)
if(HAVE_PYTHON) if(HAVE_PYTHON)
list(APPEND P3DIRECT_COMPONENTS p3distributed) list(APPEND P3DIRECT_COMPONENTS p3distributed)
endif() endif()
@ -27,7 +25,9 @@ add_metalib(p3direct COMPONENTS ${P3DIRECT_COMPONENTS})
set_property(TARGET p3direct PROPERTY LINKER_LANGUAGE "CXX") set_property(TARGET p3direct PROPERTY LINKER_LANGUAGE "CXX")
if(HAVE_PYTHON) if(HAVE_PYTHON)
add_python_module(direct p3dcparser p3deadrec p3distributed p3interval p3showbase LINK p3direct IMPORT panda3d.core) add_python_module(direct
p3dcparser p3deadrec p3distributed p3interval
p3motiontrail p3showbase LINK p3direct IMPORT panda3d.core)
# Make an __init__.py pointing at the source directory so users can run # Make an __init__.py pointing at the source directory so users can run
# Panda3D code straight from their build path: # Panda3D code straight from their build path:

View File

@ -0,0 +1,15 @@
set(P3MOTIONTRAIL_HEADERS
config_motiontrail.h
cMotionTrail.h)
set(P3MOTIONTRAIL_SOURCES
config_motiontrail.cxx
cMotionTrail.cxx)
add_component_library(p3motiontrail SYMBOL BUILDING_DIRECT_MOTIONTRAIL
${P3MOTIONTRAIL_HEADERS} ${P3MOTIONTRAIL_SOURCES})
target_link_libraries(p3motiontrail p3directbase panda)
target_interrogate(p3motiontrail ALL)
install(TARGETS p3motiontrail DESTINATION lib)
install(FILES ${P3MOTIONTRAIL_HEADERS} DESTINATION include/panda3d)