From b43badaba77101a030e7df40dd789bfc0831ace2 Mon Sep 17 00:00:00 2001 From: anusha GodavarthySurya Date: Mon, 2 Aug 2021 08:30:22 -0700 Subject: [PATCH] SWDEV-297541 - Fix static lib package generation Change-Id: Ie39cbe6d8a2cda659902f878ff69b45b93f41981 --- hipamd/CMakeLists.txt | 4 +++- hipamd/src/CMakeLists.txt | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/hipamd/CMakeLists.txt b/hipamd/CMakeLists.txt index 49f191d884..3cad1f5b01 100755 --- a/hipamd/CMakeLists.txt +++ b/hipamd/CMakeLists.txt @@ -17,7 +17,7 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. -cmake_minimum_required(VERSION 3.10) +cmake_minimum_required(VERSION 3.16.8) project(hip) # sample command for hip-rocclr runtime, you'll need to have rocclr built @@ -413,6 +413,8 @@ endif() # Package: hip_runtime_nvidia set(BUILD_DIR ${CMAKE_CURRENT_BINARY_DIR}/packages/hip-runtime-nvidia) configure_file(packaging/hip-runtime-nvidia.txt ${BUILD_DIR}/CMakeLists.txt @ONLY) +configure_file(packaging/hip-runtime-nvidia.postinst ${BUILD_DIR}/postinst @ONLY) +configure_file(packaging/hip-runtime-nvidia.prerm ${BUILD_DIR}/prerm @ONLY) add_custom_target(pkg_hip_nvcc COMMAND ${CMAKE_COMMAND} . COMMAND rm -rf *.deb *.rpm *.tar.gz COMMAND make package diff --git a/hipamd/src/CMakeLists.txt b/hipamd/src/CMakeLists.txt index 858f430b6b..a98ba547df 100644 --- a/hipamd/src/CMakeLists.txt +++ b/hipamd/src/CMakeLists.txt @@ -64,7 +64,8 @@ set_target_properties(amdhip64 PROPERTIES POSITION_INDEPENDENT_CODE ON # Workaround for many places in the HIP project # having hardcoded references to build/lib/libamdhip64.so - LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib) + LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib + ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib) if(CMAKE_SIZEOF_VOID_P EQUAL 8) set_target_properties(amdhip64 PROPERTIES OUTPUT_NAME "amdhip64")