update build system

This commit is contained in:
2021-08-01 08:36:12 +08:00
parent cc04c53630
commit 8de1ea7075
3 changed files with 23 additions and 7 deletions

View File

@@ -25,8 +25,8 @@ macro(add_tools name)
set_target_properties(${name} PROPERTIES INSTALL_RPATH ${CMAKE_INSTALL_PREFIX}/lib)
# 链接动态库
target_link_libraries(${name} PUBLIC magtess)
# 将可执行程序安装到/usr/local/sbin
install(TARGETS ${name} RUNTIME DESTINATION bin/magtess)
# 将可执行程序安装到bin
install(TARGETS ${name} RUNTIME DESTINATION bin)
endmacro()
# 添加tools
@@ -43,5 +43,5 @@ add_executable(tessutil_magnetize_model tessutil_magnetize_model.c)
set_target_properties(tessutil_magnetize_model PROPERTIES INSTALL_RPATH ${CMAKE_INSTALL_PREFIX}/lib)
# 链接动态库
target_link_libraries(tessutil_magnetize_model PUBLIC magtess)
# 将可执行程序安装到/opt/bin
install(TARGETS tessutil_magnetize_model RUNTIME DESTINATION bin/magtess)
# 将可执行程序安装到bin
install(TARGETS tessutil_magnetize_model RUNTIME DESTINATION bin)