SWDEV-289854 - Revert to using hardcoded library destination

Current packaging assumes that HIP runtime will always be installed in
/opt/rocm/lib. This is false to assume, because some distros like CentOS
will use the lib64 directory instead of lib. Relying on CMake to choose
the library directory for us will default in that case to lib64. Hence
there will be a mismatch between where HIP is installed and where CMake
thinks it is.

Change-Id: I46e405b25bda987e74b095fcb41319f8a504ae41


[ROCm/clr commit: 52ff66f4fc]
このコミットが含まれているのは:
Vladislav Sytchenko authored and Maneesh Gupta committed 2021-06-14 04:20:31 -04:00
1 親 08611a1fe4
コミット 8c35b3ec56
1ファイル変更
+7 -2
+7 -2
ファイルの表示
@@ -246,10 +246,15 @@ target_link_libraries(host INTERFACE amdhip64)
add_library(device INTERFACE)
target_link_libraries(device INTERFACE host)
# Current packaging assumes that HIP runtime will always be installed in /opt/rocm/lib
# This is false to assume, because some distros like CentOS will use the lib64 directory instead of lib
# Relying on CMake to choose the library directory for us will default in that case to lib64
# Hence there will be a mismatch between where HIP is installed and where CMake thinks it is
INSTALL(TARGETS amdhip64 host device
EXPORT hip-targets
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
LIBRARY DESTINATION lib
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
INSTALL(EXPORT hip-targets DESTINATION ${CONFIG_PACKAGE_INSTALL_DIR} NAMESPACE hip::)
@@ -257,7 +262,7 @@ INSTALL(EXPORT hip-targets DESTINATION ${CONFIG_PACKAGE_INSTALL_DIR} NAMESPACE h
INSTALL(TARGETS amdhip64 host device
EXPORT hip-lang-targets
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
LIBRARY DESTINATION lib
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
INSTALL(EXPORT hip-lang-targets DESTINATION ${CONFIG_LANG_PACKAGE_INSTALL_DIR} NAMESPACE hip-lang::)