diff --git a/direct/CMakeLists.txt b/direct/CMakeLists.txt index 18847d4b9b..48d563eb06 100644 --- a/direct/CMakeLists.txt +++ b/direct/CMakeLists.txt @@ -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") diff --git a/direct/src/distributed/CMakeLists.txt b/direct/src/distributed/CMakeLists.txt index a5486d56c7..26f8f2414b 100644 --- a/direct/src/distributed/CMakeLists.txt +++ b/direct/src/distributed/CMakeLists.txt @@ -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