diff --git a/projects/rocm-smi-lib/CMakeLists.txt b/projects/rocm-smi-lib/CMakeLists.txt index efaaca9436..f2ec0ae597 100755 --- a/projects/rocm-smi-lib/CMakeLists.txt +++ b/projects/rocm-smi-lib/CMakeLists.txt @@ -149,11 +149,6 @@ set(CMN_INC_LIST ${CMN_INC_LIST} "${SHR_MUTEX_DIR}/shared_mutex.h") add_subdirectory("rocm_smi") add_subdirectory("oam") -# install(TARGETS ${ROCM_SMI_TARGET} -# LIBRARY DESTINATION ${ROCM_SMI}/lib COMPONENT ${ROCM_SMI_COMPONENT}) -# install(FILES ${COMMON_SRC_ROOT}/include/rocm_smi/rocm_smi.h -# DESTINATION rocm_smi/include/rocm_smi) - ## Add the packaging directives for the runtime library. # TODO set(CPACK_DEBIAN_PACKAGE_HOMEPAGE ) diff --git a/projects/rocm-smi-lib/python_smi_tools/rocm-smi b/projects/rocm-smi-lib/python_smi_tools/rocm-smi new file mode 120000 index 0000000000..81ced37843 --- /dev/null +++ b/projects/rocm-smi-lib/python_smi_tools/rocm-smi @@ -0,0 +1 @@ +rocm_smi.py \ No newline at end of file diff --git a/projects/rocm-smi-lib/python_smi_tools/rocmSmiLib_cli.py b/projects/rocm-smi-lib/python_smi_tools/rocm_smi.py similarity index 100% rename from projects/rocm-smi-lib/python_smi_tools/rocmSmiLib_cli.py rename to projects/rocm-smi-lib/python_smi_tools/rocm_smi.py diff --git a/projects/rocm-smi-lib/rocm_smi/CMakeLists.txt b/projects/rocm-smi-lib/rocm_smi/CMakeLists.txt index d9b087912c..bf83d8bf4b 100755 --- a/projects/rocm-smi-lib/rocm_smi/CMakeLists.txt +++ b/projects/rocm-smi-lib/rocm_smi/CMakeLists.txt @@ -121,6 +121,22 @@ install(FILES ${COMMON_SRC_ROOT}/include/rocm_smi/rocm_smi.h DESTINATION rocm_smi/include/rocm_smi) install(FILES ${COMMON_SRC_ROOT}/include/rocm_smi/kfd_ioctl.h DESTINATION rocm_smi/include/rocm_smi) +install(FILES ${COMMON_SRC_ROOT}/python_smi_tools/rsmiBindings.py + DESTINATION rocm_smi/bindings) +install(FILES ${COMMON_SRC_ROOT}/python_smi_tools/rocm_smi.py + PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ + GROUP_WRITE GROUP_EXECUTE WORLD_READ WORLD_EXECUTE + DESTINATION bin) +install(FILES ${COMMON_SRC_ROOT}/python_smi_tools/rocm-smi + DESTINATION bin) +add_custom_target(bindings_link ALL + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} + COMMAND ${CMAKE_COMMAND} -E create_symlink + ../rocm_smi/bindings/rsmiBindings.py bindings_link) +install(FILES ${CMAKE_CURRENT_BINARY_DIR}/bindings_link + DESTINATION bin RENAME rsmiBindings.py) + + # Generate Doxygen documentation find_package(Doxygen) find_package(LATEX COMPONENTS PDFLATEX)