diff options
| author | 张杨 <[email protected]> | 2024-11-12 07:03:25 +0000 |
|---|---|---|
| committer | 卢文朋 <[email protected]> | 2024-11-12 07:03:25 +0000 |
| commit | 54d3e89e000ad52e8207dbf457df1beb3e3b9ec2 (patch) | |
| tree | 999584eea05eab1c1c26770ca82eaa792bf860d9 /platform/CMakeLists.txt | |
| parent | 66db85d2431ea1aabe1a44d7445bfe2596ac0b14 (diff) | |
Hasp-tool 支持 aarch64 架构, CI 增加 rocky9 aarch64 rpm 打包, 移除 centos7 打包HEADv1.0.14-20241112develop-1.0
Diffstat (limited to 'platform/CMakeLists.txt')
| -rw-r--r-- | platform/CMakeLists.txt | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/platform/CMakeLists.txt b/platform/CMakeLists.txt index 851e073..e8b6579 100644 --- a/platform/CMakeLists.txt +++ b/platform/CMakeLists.txt @@ -2,14 +2,22 @@ add_executable(hasp_update src/hasp_update.c) target_include_directories(hasp_update PUBLIC ${CMAKE_CURRENT_LIST_DIR}/include/) target_link_libraries(hasp_update pthread) -target_link_libraries(hasp_update ${CMAKE_SOURCE_DIR}/lib/libhasp_linux_x86_64_25743.a) + +# aarch64 or x86_64 +if(${CMAKE_SYSTEM_PROCESSOR} MATCHES "aarch64") + set(HASP_LIB "libhasp_linux_arm64_25743.a") +else() + set(HASP_LIB "libhasp_linux_x86_64_25743.a") +endif() + +target_link_libraries(hasp_update ${CMAKE_SOURCE_DIR}/lib/${HASP_LIB}) install(TARGETS hasp_update RUNTIME DESTINATION bin COMPONENT Program) # compile lib hasp-tools add_library(hasp-tools SHARED src/hasp_verify.c) target_include_directories(hasp-tools PUBLIC ${CMAKE_CURRENT_LIST_DIR}/include) target_link_libraries(hasp-tools pthread rt) -target_link_libraries(hasp-tools ${CMAKE_SOURCE_DIR}/lib/libhasp_linux_x86_64_25743.a) +target_link_libraries(hasp-tools ${CMAKE_SOURCE_DIR}/lib/${HASP_LIB}) install(TARGETS hasp-tools LIBRARY DESTINATION ${CMAKE_INSTALL_PREFIX}/lib/ COMPONENT LIBRARIES) install(FILES include/hasp_verify.h DESTINATION ${CMAKE_INSTALL_PREFIX}/include/ COMPONENT LIBRARIES) |
