add_library(shifter_native_deployment STATIC deployment.cpp topology.cpp)
set_target_properties(shifter_native_deployment PROPERTIES POSITION_INDEPENDENT_CODE ON)
shifter_native_internal_includes(shifter_native_deployment)

if(SHIFTER_NATIVE_ENABLE_DISTRIBUTED)
  add_library(shifter_native_distributed_wire STATIC wire.cpp)
  shifter_native_internal_includes(shifter_native_distributed_wire)
  target_link_libraries(shifter_native_distributed_wire PUBLIC shifter_native_deployment)
  add_library(shifter_native_distributed_control STATIC transport.cpp launch.cpp startup.cpp bootstrap.cpp)
  shifter_native_internal_includes(shifter_native_distributed_control)
  target_link_libraries(shifter_native_distributed_control PUBLIC
    shifter_native_distributed_wire shifter_native_cpu shifter_native_distributed_cuda)
  add_library(shifter_native_distributed_cuda SHARED communication.cpp)
  shifter_native_internal_includes(shifter_native_distributed_cuda)
  target_link_libraries(shifter_native_distributed_cuda PUBLIC shifter_native_core shifter_native_deployment PRIVATE shifter_native::nccl)
endif()
