set(target CnoidPythonPlugin)

set(sources
  PythonPlugin.cpp
  PythonExecutor.cpp
  PythonScriptItem.cpp
  PythonScriptItemImpl.cpp
  PythonConsoleView.cpp
  )

set(headers
  PythonPlugin.h
  PythonExecutor.h
  PythonScriptItem.h
  PythonScriptItemImpl.h
  PythonConsoleView.h
  )

choreonoid_make_gettext_mo_files(${target} mofiles)
choreonoid_add_plugin(${target} ${sources} ${mofiles} HEADERS ${headers})
target_link_libraries(${target} PUBLIC CnoidPyUtil)

configure_file(rbimporter.py ${PROJECT_BINARY_DIR}/${CHOREONOID_PYTHON_SUBDIR}/cnoid/ COPYONLY)
install(FILES rbimporter.py DESTINATION ${CHOREONOID_PYTHON_SUBDIR}/cnoid)

set(target PyPythonPlugin)
choreonoid_add_python_module(${target} PyPythonPlugin.cpp)
target_link_libraries(${target} CnoidPythonPlugin CnoidPyBase)
