Merge pull request #17468 from liqi-c:sharedlib_build_problem

TEngine installation rules fix for static build

* Modify cmake config error for -DBUILD_SHARED_LIBS=OFF

* Modify for not install tengine include directory

* Update compile error.

* move install command to tengine/CMakeLists.txt

* rm include dir when make install,only build static lib will install libtengine.a
pull/17574/head
NesQl 4 years ago committed by GitHub
parent 619462b029
commit b10ab79743
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 8
      3rdparty/libtengine/tengine.cmake

@ -22,7 +22,7 @@
# sqfu@openailab.com
#
SET(TENGINE_COMMIT_VERSION "2f3cd86217f3530c8e4a82f3ed5af14c7a4e3943")
SET(TENGINE_COMMIT_VERSION "8a4c58e0e05cd850f4bb0936a330edc86dc0e28c")
SET(OCV_TENGINE_DIR "${OpenCV_BINARY_DIR}/3rdparty/libtengine")
SET(OCV_TENGINE_SOURCE_PATH "${OCV_TENGINE_DIR}/Tengine-${TENGINE_COMMIT_VERSION}")
@ -34,7 +34,7 @@ IF(EXISTS "${OCV_TENGINE_SOURCE_PATH}")
ELSE()
SET(OCV_TENGINE_FILENAME "${TENGINE_COMMIT_VERSION}.zip")#name2
SET(OCV_TENGINE_URL "https://github.com/OAID/Tengine/archive/") #url2
SET(tengine_md5sum 9124324b6e2b350012e46ae1db4bad7d) #md5sum2
SET(tengine_md5sum f51ca8f3963faeeff3f019a6f6edc206) #md5sum2
#MESSAGE(STATUS "**** TENGINE DOWNLOAD BEGIN ****")
ocv_download(FILENAME ${OCV_TENGINE_FILENAME}
@ -69,7 +69,6 @@ if(BUILD_TENGINE)
elseif(${ANDROID_ABI} STREQUAL "arm64-v8a")
SET(CONFIG_ARCH_ARM64 ON)
endif()
SET(Tengine_LIB "tengine" CACHE INTERNAL "")
else()
# linux system
if(CMAKE_SYSTEM_PROCESSOR STREQUAL arm)
@ -77,7 +76,6 @@ if(BUILD_TENGINE)
elseif(CMAKE_SYSTEM_PROCESSOR STREQUAL aarch64) ## AARCH64
SET(CONFIG_ARCH_ARM64 ON)
endif()
SET(Tengine_LIB "tengine" CACHE INTERNAL "")
endif()
SET(BUILT_IN_OPENCV ON) ## set for tengine compile discern .
@ -86,6 +84,6 @@ if(BUILD_TENGINE)
add_subdirectory("${OCV_TENGINE_SOURCE_PATH}" "${OCV_TENGINE_DIR}/build")
else()
message(WARNING "TENGINE: Missing 'CMakeLists.txt' in source code package: ${OCV_TENGINE_SOURCE_PATH}")
SET(HAVE_TENGINE 1)
endif()
SET(Tengine_LIB "tengine" CACHE INTERNAL "")
endif()

Loading…
Cancel
Save