2023-2 :Win10+vs2017+Clion+Tengine lite 编译安装

2023-2 :Win10+vs2017+Clion+Tengine lite 编译安装本文详细介绍了如何在 Windows10 环境下 结合 VisualStudio 和 Clion 编译安装 OAID 的 TengineLite

  1. 下载OAID Tengine的源代码

git clone https://github.com/OAID/Tengine.git

  1. 打开:
  1. set PATH=D:/software/cmake/bin;%PATH%
  1. 命令
cd E:/Tengine md build cd build cmake.exe -G "Visual Studio 15 2017 Win64" -DTENGINE_OPENMP=OFF -DTENGINE_BUILD_EXAMPLES=OFF .. ::cmake.exe -G "Visual Studio 16 2019" -A x64 -DTENGINE_OPENMP=OFF .. cmake.exe --build . --parallel %NUMBER_OF_PROCESSORS% cmake.exe --build . --target install

  1. clion调用

CMakefiles如下

cmake_minimum_required(VERSION 3.16) project(firstTengine) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fopenmp") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fopenmp") set(CMAKE_CXX_STANDARD 11) set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/") include_directories(${CMAKE_SOURCE_DIR}/include) include_directories(${CMAKE_SOURCE_DIR}/include/common) #add_library(libtengine-lite-static STATIC IMPORTED) #set_target_properties(libtengine-lite-static PROPERTIES IMPORTED_LOCATION ${PROJECT_SOURCE_DIR}/lib/libtengine/x86_64/tengine-lite-static.lib) add_executable(firstTengine tm_landmark.cpp tengine_operations.c) set(EXTRA_LIBS ${CMAKE_SOURCE_DIR}/lib/libtengine/x86_64/tengine-lite-static.lib) #${CMAKE_SOURCE_DIR}/lib/libtengine/x86_64/opencv_world347.lib) target_link_libraries(firstTengine ${EXTRA_LIBS}) 

完成:

tengine-lite library version: 1.5-dev

Repeat [1] min 29.698 ms, max 29.698 ms, avg 29.698 ms

参考资料:

https://github.com/OAID/Tengine/blob/tengine-lite/doc/docs_zh/source_compile/compile_visual_studio.md

https://github.com/OAID/Tengine

https://github.com/OAID/Tengine/tree/tengine-lite/examples#scrfd-%E4%BA%BA%E8%84%B8%E6%A3%80%E6%B5%8B%E4%BB%BB%E5%8A%A1---tm_scrfdcpp

编程小号
上一篇 2024-12-09 11:53
下一篇 2024-12-09 11:47

相关推荐

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 举报,一经查实,本站将立刻删除。
如需转载请保留出处:https://sigusoft.com/clion/3677.html