|
|
|
https://github.com/RadeonOpenCompute/ROCR-Runtime/pull/51/
|
|
|
|
|
|
|
|
commit 2d51a6133f32b72f60fba0e95234aee2b63aa682 (HEAD -> patch-6)
|
|
|
|
Author: Craig Andrews <candrews@integralblue.com>
|
|
|
|
Date: Mon Jan 7 21:06:14 2019 -0500
|
|
|
|
|
|
|
|
Correctly install the library into the system
|
|
|
|
|
|
|
|
Install to standard locations in /usr/{lib,include}/lib (as opposed to /usr/hsa/{lib,include}/hsa)
|
|
|
|
Use CMAKE_INSTALL_LIBDIR and CMAKE_INSTALL_INCLUDEDIR from GNUInstallDirs instead of using "lib" and "include"
|
|
|
|
|
|
|
|
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
|
|
|
index 37a9b09..545f183 100644
|
|
|
|
--- a/CMakeLists.txt
|
|
|
|
+++ b/CMakeLists.txt
|
|
|
|
@@ -53,6 +53,7 @@ project( ${CORE_RUNTIME_TARGET} )
|
|
|
|
|
|
|
|
list ( APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake_modules" )
|
|
|
|
include ( utils )
|
|
|
|
+include ( GNUInstallDirs )
|
|
|
|
include ( hsa_common )
|
|
|
|
|
|
|
|
## Find LibElf
|
|
|
|
@@ -176,15 +177,9 @@ if ( "${CMAKE_BUILD_TYPE}" STREQUAL Release )
|
|
|
|
add_custom_command ( TARGET ${CORE_RUNTIME_TARGET} POST_BUILD COMMAND ${CMAKE_STRIP} *.so )
|
|
|
|
endif ()
|
|
|
|
|
|
|
|
-## Create symlinks for packaging and install
|
|
|
|
-add_custom_target ( hsa-link ALL WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND ${CMAKE_COMMAND} -E create_symlink ../hsa/include/hsa hsa-link )
|
|
|
|
-add_custom_target ( ${CORE_RUNTIME_TARGET}.so-link ALL WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND ${CMAKE_COMMAND} -E create_symlink ../hsa/lib/${CORE_RUNTIME_LIBRARY}.so ${CORE_RUNTIME_LIBRARY}.so-link )
|
|
|
|
-
|
|
|
|
## Set install information
|
|
|
|
-install ( TARGETS ${CORE_RUNTIME_TARGET} LIBRARY DESTINATION hsa/lib )
|
|
|
|
-install ( DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/inc/ DESTINATION hsa/include/hsa )
|
|
|
|
-install ( FILES ${CMAKE_CURRENT_BINARY_DIR}/hsa-link DESTINATION include PERMISSIONS OWNER_WRITE OWNER_READ RENAME hsa )
|
|
|
|
-install ( FILES ${CMAKE_CURRENT_BINARY_DIR}/${CORE_RUNTIME_LIBRARY}.so-link DESTINATION lib PERMISSIONS OWNER_WRITE OWNER_READ RENAME ${CORE_RUNTIME_LIBRARY}.so )
|
|
|
|
+install ( TARGETS ${CORE_RUNTIME_TARGET} LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} )
|
|
|
|
+install ( DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/inc/ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/hsa )
|
|
|
|
|
|
|
|
## Packaging directives
|
|
|
|
set ( CPACK_PACKAGE_NAME "hsa-rocr-dev" )
|
|
|
|
|