complete tools

This commit is contained in:
2021-10-31 22:50:11 +08:00
parent 1d1f6cd59e
commit d2dd62e5fb
4 changed files with 856 additions and 51 deletions

View File

@@ -49,7 +49,7 @@ else()
DESTINATION ${CONFIG_FILE_PATH})
endif()
# 头文件安装命令
install(FILES lib/tin.h DESTINATION include/tin)
install(FILES lib/tin.h DESTINATION include)
# 以下部分为例子程序的编译
# 设置可执行文件的输出地址
@@ -60,7 +60,7 @@ macro(add_demo name)
# 添加可执行文件 命令行
add_executable(${name} demo/${name}.cpp)
# 为安装文件添加动态库的搜索地址 在Windows下并没有什么用 直接忽略
set_target_properties(${name} PROPERTIES INSTALL_RPATH ${CMAKE_INSTALL_PREFIX}/lib)
set_target_properties(${name} PROPERTIES INSTALL_RPATH /usr/local/lib)
# 链接动态库
target_link_libraries(${name} PUBLIC tin)
endmacro()