Revert "SWDEV-289854 - Revert to using hardcoded library destination"

This reverts commit ed9e4ee7df.

Reason for revert: Reverting this change to enable split project flow working. Once that is enabled this change will be submitted in hipamd project.

Change-Id: Iad2e044a173787a57a80c5a3d04795e7c2dc5ad5
This commit is contained in:
Rahul Garg
2021-06-09 16:31:10 -04:00
parent ed9e4ee7df
commit 93b53dc6fa
+2 -7
View File
@@ -247,15 +247,10 @@ 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 lib
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
INSTALL(EXPORT hip-targets DESTINATION ${CONFIG_PACKAGE_INSTALL_DIR} NAMESPACE hip::)
@@ -263,7 +258,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 lib
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
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::)