CMake: C++ code in direct.distributed should be an extension

This code is so heavily dependent on Python (and makepanda
doesn't even build it into libp3direct) that we shouldn't
even try to put it in the libp3direct library ourselves.
This commit is contained in:
Sam Edwards 2019-07-07 16:08:44 -06:00
parent 3160c77bc3
commit e3cd658642
2 changed files with 7 additions and 4 deletions

View File

@ -20,6 +20,9 @@ set(P3DIRECT_COMPONENTS
)
if(HAVE_PYTHON)
list(APPEND P3DIRECT_COMPONENTS p3distributed)
get_target_property(_p3distributed_exts p3distributed IGATE_EXTENSIONS)
set_source_files_properties(${_p3distributed_exts}
PROPERTIES COMPILE_DEFINITIONS BUILDING_DIRECT_DISTRIBUTED)
endif()
set(CMAKE_INSTALL_DEFAULT_COMPONENT_NAME "DirectDevel")

View File

@ -16,10 +16,10 @@ set(P3DISTRIBUTED_SOURCES
cDistributedSmoothNodeBase.cxx
)
add_component_library(p3distributed SYMBOL BUILDING_DIRECT_DISTRIBUTED
${P3DISTRIBUTED_HEADERS} ${P3DISTRIBUTED_SOURCES})
target_link_libraries(p3distributed p3directbase p3dcparser panda PKG::PYTHON)
target_interrogate(p3distributed ALL)
add_component_library(p3distributed NOINIT SYMBOL BUILDING_DIRECT_DISTRIBUTED
${P3DISTRIBUTED_HEADERS})
target_link_libraries(p3distributed p3directbase p3dcparser panda)
target_interrogate(p3distributed ALL EXTENSIONS ${P3DISTRIBUTED_SOURCES})
if(NOT BUILD_METALIBS)
install(TARGETS p3distributed