change install directory to /opt

This commit is contained in:
张壹 2021-07-31 16:10:58 +08:00
parent c607a6ab3a
commit cc04c53630
2 changed files with 4 additions and 4 deletions

View File

@ -7,7 +7,7 @@ if(${CMAKE_HOST_SYSTEM_NAME} STREQUAL "Linux")
set(CMAKE_INSTALL_PREFIX /usr/local)
elseif (${CMAKE_HOST_SYSTEM_NAME} STREQUAL "Darwin")
message(STATUS "Platform: " ${CMAKE_HOST_SYSTEM_NAME})
set(CMAKE_INSTALL_PREFIX /usr/local)
set(CMAKE_INSTALL_PREFIX /opt)
elseif (${CMAKE_HOST_SYSTEM_NAME} STREQUAL "Windows")
message(STATUS "Platform: " ${CMAKE_HOST_SYSTEM_NAME})
# 使MinGW GCC

View File

@ -26,7 +26,7 @@ macro(add_tools name)
#
target_link_libraries(${name} PUBLIC magtess)
# /usr/local/sbin
install(TARGETS ${name} RUNTIME DESTINATION sbin/magtess)
install(TARGETS ${name} RUNTIME DESTINATION bin/magtess)
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)
# /usr/local/sbin
install(TARGETS tessutil_magnetize_model RUNTIME DESTINATION sbin/magtess)
# /opt/bin
install(TARGETS tessutil_magnetize_model RUNTIME DESTINATION bin/magtess)