update opencv and sqlite version
This commit is contained in:
parent
2510e9f3d3
commit
02dd82ac3f
|
@ -22,33 +22,17 @@ else()
|
|||
endif()
|
||||
|
||||
if(ENABLE_GITEE)
|
||||
if("${BUILD_LITE}" STREQUAL "on" OR PYTHON_VERSION MATCHES "3.9")
|
||||
set(REQ_URL "https://gitee.com/mirrors/opencv/repository/archive/4.5.1.tar.gz")
|
||||
set(MD5 "2205d3169238ec1f184438a96de68513")
|
||||
elseif((PYTHON_VERSION MATCHES "3.7") OR (PYTHON_VERSION MATCHES "3.8"))
|
||||
set(REQ_URL "https://gitee.com/mirrors/opencv/repository/archive/4.2.0.tar.gz")
|
||||
set(MD5 "e8cb208ce2723481408b604b480183b6")
|
||||
else()
|
||||
message("Could not find 'Python 3.8' or 'Python 3.7' or 'Python 3.9'")
|
||||
return()
|
||||
endif()
|
||||
set(REQ_URL "https://gitee.com/mirrors/opencv/repository/archive/4.5.2.tar.gz")
|
||||
set(MD5 "d3141f649ab2d76595fdd8991ee15c55")
|
||||
else()
|
||||
if("${BUILD_LITE}" STREQUAL "on" OR PYTHON_VERSION MATCHES "3.9")
|
||||
set(REQ_URL "https://github.com/opencv/opencv/archive/4.5.1.tar.gz")
|
||||
set(MD5 "2205d3169238ec1f184438a96de68513")
|
||||
elseif((PYTHON_VERSION MATCHES "3.7") OR (PYTHON_VERSION MATCHES "3.8"))
|
||||
set(REQ_URL "https://github.com/opencv/opencv/archive/4.2.0.tar.gz")
|
||||
set(MD5 "e8cb208ce2723481408b604b480183b6")
|
||||
else()
|
||||
message("Could not find 'Python 3.8' or 'Python 3.7' or 'Python 3.9'")
|
||||
return()
|
||||
endif()
|
||||
set(REQ_URL "https://github.com/opencv/opencv/archive/4.5.2.tar.gz")
|
||||
set(MD5 "d3141f649ab2d76595fdd8991ee15c55")
|
||||
endif()
|
||||
|
||||
if(MSVC)
|
||||
mindspore_add_pkg(opencv
|
||||
VER 4.5.1
|
||||
LIBS opencv_core451.lib opencv_imgcodecs451.lib opencv_imgproc451.lib
|
||||
VER 4.5.2
|
||||
LIBS opencv_core452.lib opencv_imgcodecs452.lib opencv_imgproc452.lib
|
||||
LIB_PATH x64/*/lib
|
||||
URL ${REQ_URL}
|
||||
MD5 ${MD5}
|
||||
|
@ -73,37 +57,9 @@ if(MSVC)
|
|||
-DTIFF_INCLUDE_DIR=${tiff_INC}
|
||||
-DTIFF_LIBRARY=${tiff_LIB})
|
||||
elseif(WIN32)
|
||||
if("${BUILD_LITE}" STREQUAL "on" OR PYTHON_VERSION MATCHES "3.9")
|
||||
mindspore_add_pkg(opencv
|
||||
VER 4.5.1
|
||||
LIBS libopencv_core451.dll.a libopencv_imgcodecs451.dll.a libopencv_imgproc451.dll.a
|
||||
LIB_PATH x64/mingw/lib
|
||||
URL ${REQ_URL}
|
||||
MD5 ${MD5}
|
||||
CMAKE_OPTION -DCMAKE_BUILD_TYPE=Release -DWITH_PROTOBUF=OFF -DWITH_WEBP=OFF -DWITH_IPP=OFF
|
||||
-DWITH_ADE=OFF
|
||||
-DBUILD_ZLIB=ON
|
||||
-DBUILD_JPEG=ON
|
||||
-DBUILD_PNG=ON
|
||||
-DBUILD_OPENEXR=ON
|
||||
-DBUILD_TESTS=OFF
|
||||
-DBUILD_PERF_TESTS=OFF
|
||||
-DBUILD_opencv_apps=OFF
|
||||
-DCMAKE_SKIP_RPATH=TRUE
|
||||
-DBUILD_opencv_python3=OFF
|
||||
-DBUILD_opencv_videoio=OFF
|
||||
-DWITH_FFMPEG=OFF
|
||||
-DWITH_TIFF=ON
|
||||
-DBUILD_TIFF=OFF
|
||||
-DWITH_JASPER=OFF
|
||||
-DBUILD_JASPER=OFF
|
||||
-DCV_TRACE=OFF # cause memory usage increacing
|
||||
-DTIFF_INCLUDE_DIR=${tiff_INC}
|
||||
-DTIFF_LIBRARY=${tiff_LIB})
|
||||
elseif(PYTHON_VERSION MATCHES "3.8" OR PYTHON_VERSION MATCHES "3.7")
|
||||
mindspore_add_pkg(opencv
|
||||
VER 4.2.0
|
||||
LIBS libopencv_core420.dll.a libopencv_imgcodecs420.dll.a libopencv_imgproc420.dll.a
|
||||
mindspore_add_pkg(opencv
|
||||
VER 4.5.2
|
||||
LIBS libopencv_core452.dll.a libopencv_imgcodecs452.dll.a libopencv_imgproc452.dll.a
|
||||
LIB_PATH x64/mingw/lib
|
||||
URL ${REQ_URL}
|
||||
MD5 ${MD5}
|
||||
|
@ -128,36 +84,9 @@ elseif(WIN32)
|
|||
-DWITH_LAPACK=OFF
|
||||
-DTIFF_INCLUDE_DIR=${tiff_INC}
|
||||
-DTIFF_LIBRARY=${tiff_LIB})
|
||||
endif()
|
||||
else()
|
||||
if("${BUILD_LITE}" STREQUAL "on" OR PYTHON_VERSION MATCHES "3.9")
|
||||
mindspore_add_pkg(opencv
|
||||
VER 4.5.1
|
||||
LIBS opencv_core opencv_imgcodecs opencv_imgproc
|
||||
URL ${REQ_URL}
|
||||
MD5 ${MD5}
|
||||
CMAKE_OPTION -DCMAKE_BUILD_TYPE=Release -DWITH_PROTOBUF=OFF -DWITH_WEBP=OFF -DWITH_IPP=OFF
|
||||
-DWITH_ADE=OFF
|
||||
-DBUILD_ZLIB=ON
|
||||
-DBUILD_JPEG=ON
|
||||
-DBUILD_PNG=ON
|
||||
-DBUILD_OPENEXR=ON
|
||||
-DBUILD_TESTS=OFF
|
||||
-DBUILD_PERF_TESTS=OFF
|
||||
-DBUILD_opencv_apps=OFF
|
||||
-DCMAKE_SKIP_RPATH=TRUE
|
||||
-DBUILD_opencv_python3=OFF
|
||||
-DWITH_FFMPEG=OFF
|
||||
-DWITH_TIFF=ON
|
||||
-DBUILD_TIFF=OFF
|
||||
-DWITH_JASPER=OFF
|
||||
-DBUILD_JASPER=OFF
|
||||
-DCV_TRACE=OFF # cause memory usage increacing
|
||||
-DTIFF_INCLUDE_DIR=${tiff_INC}
|
||||
-DTIFF_LIBRARY=${tiff_LIB})
|
||||
elseif(PYTHON_VERSION MATCHES "3.8" OR PYTHON_VERSION MATCHES "3.7")
|
||||
mindspore_add_pkg(opencv
|
||||
VER 4.2.0
|
||||
mindspore_add_pkg(opencv
|
||||
VER 4.5.2
|
||||
LIBS opencv_core opencv_imgcodecs opencv_imgproc
|
||||
URL ${REQ_URL}
|
||||
MD5 ${MD5}
|
||||
|
@ -181,26 +110,18 @@ else()
|
|||
-DWITH_LAPACK=OFF
|
||||
-DTIFF_INCLUDE_DIR=${tiff_INC}
|
||||
-DTIFF_LIBRARY=${tiff_LIB})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(MSVC)
|
||||
include_directories(${opencv_INC})
|
||||
add_library(mindspore::opencv_core ALIAS opencv::opencv_core451.lib)
|
||||
add_library(mindspore::opencv_imgcodecs ALIAS opencv::opencv_imgcodecs451.lib)
|
||||
add_library(mindspore::opencv_imgproc ALIAS opencv::opencv_imgproc451.lib)
|
||||
add_library(mindspore::opencv_core ALIAS opencv::opencv_core452.lib)
|
||||
add_library(mindspore::opencv_imgcodecs ALIAS opencv::opencv_imgcodecs452.lib)
|
||||
add_library(mindspore::opencv_imgproc ALIAS opencv::opencv_imgproc452.lib)
|
||||
elseif(WIN32)
|
||||
if("${BUILD_LITE}" STREQUAL "on" OR PYTHON_VERSION MATCHES "3.9")
|
||||
include_directories(${opencv_INC})
|
||||
add_library(mindspore::opencv_core ALIAS opencv::libopencv_core451.dll.a)
|
||||
add_library(mindspore::opencv_imgcodecs ALIAS opencv::libopencv_imgcodecs451.dll.a)
|
||||
add_library(mindspore::opencv_imgproc ALIAS opencv::libopencv_imgproc451.dll.a)
|
||||
elseif(PYTHON_VERSION MATCHES "3.8" OR PYTHON_VERSION MATCHES "3.7")
|
||||
include_directories(${opencv_INC})
|
||||
add_library(mindspore::opencv_core ALIAS opencv::libopencv_core420.dll.a)
|
||||
add_library(mindspore::opencv_imgcodecs ALIAS opencv::libopencv_imgcodecs420.dll.a)
|
||||
add_library(mindspore::opencv_imgproc ALIAS opencv::libopencv_imgproc420.dll.a)
|
||||
endif()
|
||||
include_directories(${opencv_INC})
|
||||
add_library(mindspore::opencv_core ALIAS opencv::libopencv_core452.dll.a)
|
||||
add_library(mindspore::opencv_imgcodecs ALIAS opencv::libopencv_imgcodecs452.dll.a)
|
||||
add_library(mindspore::opencv_imgproc ALIAS opencv::libopencv_imgproc452.dll.a)
|
||||
else()
|
||||
include_directories(${opencv_INC}/opencv4)
|
||||
add_library(mindspore::opencv_core ALIAS opencv::opencv_core)
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
if(ENABLE_GITEE)
|
||||
set(REQ_URL "https://gitee.com/mirrors/sqlite/repository/archive/version-3.32.2.tar.gz")
|
||||
set(MD5 "ea6d3b3289b4ac216fb06081a01ef101")
|
||||
set(REQ_URL "https://gitee.com/mirrors/sqlite/repository/archive/version-3.36.0.tar.gz")
|
||||
set(MD5 "715df9c2d2ccf6207158d6c087f711cf")
|
||||
else()
|
||||
set(REQ_URL "https://github.com/sqlite/sqlite/archive/version-3.32.2.tar.gz")
|
||||
set(MD5 "ea6d3b3289b4ac216fb06081a01ef101")
|
||||
set(REQ_URL "https://github.com/sqlite/sqlite/archive/version-3.36.0.tar.gz")
|
||||
set(MD5 "715df9c2d2ccf6207158d6c087f711cf")
|
||||
endif()
|
||||
|
||||
|
||||
|
@ -11,9 +11,9 @@ if(WIN32)
|
|||
mindspore_add_pkg(sqlite
|
||||
VER 3.32.2
|
||||
LIBS sqlite3
|
||||
URL https://sqlite.org/2020/sqlite-amalgamation-3320200.zip
|
||||
MD5 1eccea18d248eb34c7378b2b3f63f1db
|
||||
PATCHES ${CMAKE_SOURCE_DIR}/third_party/patch/sqlite/sqlite.windows.patch001
|
||||
URL https://sqlite.org/2021/sqlite-amalgamation-3360000.zip
|
||||
MD5 c5d360c74111bafae1b704721ff18fe6
|
||||
PATCHES ${CMAKE_SOURCE_DIR}/third_party/patch/sqlite/sqlite.windows.patch002
|
||||
CMAKE_OPTION " "
|
||||
)
|
||||
|
||||
|
@ -29,11 +29,10 @@ else()
|
|||
set(sqlite_LDFLAGS "-Wl,-z,relro,-z,now,-z,noexecstack")
|
||||
endif()
|
||||
mindspore_add_pkg(sqlite
|
||||
VER 3.32.2
|
||||
VER 3.36.0
|
||||
LIBS sqlite3
|
||||
URL ${REQ_URL}
|
||||
MD5 ${MD5}
|
||||
PATCHES ${CMAKE_SOURCE_DIR}/third_party/patch/sqlite/sqlite.patch001
|
||||
CONFIGURE_COMMAND ./configure --enable-shared=no --disable-tcl --disable-editline --enable-json1)
|
||||
endif()
|
||||
|
||||
|
|
|
@ -129,21 +129,12 @@ if(ENABLE_MINDDATA)
|
|||
COMPONENT mindspore
|
||||
)
|
||||
endif()
|
||||
if(PYTHON_VERSION MATCHES "3.8" OR PYTHON_VERSION MATCHES "3.7")
|
||||
install(FILES ${opencv_LIBPATH}/libopencv_core.so.4.2.0
|
||||
DESTINATION ${INSTALL_LIB_DIR} RENAME libopencv_core.so.4.2 COMPONENT mindspore)
|
||||
install(FILES ${opencv_LIBPATH}/libopencv_imgcodecs.so.4.2.0
|
||||
DESTINATION ${INSTALL_LIB_DIR} RENAME libopencv_imgcodecs.so.4.2 COMPONENT mindspore)
|
||||
install(FILES ${opencv_LIBPATH}/libopencv_imgproc.so.4.2.0
|
||||
DESTINATION ${INSTALL_LIB_DIR} RENAME libopencv_imgproc.so.4.2 COMPONENT mindspore)
|
||||
elseif(PYTHON_VERSION MATCHES "3.9")
|
||||
install(FILES ${opencv_LIBPATH}/libopencv_core.so.4.5.1
|
||||
DESTINATION ${INSTALL_LIB_DIR} RENAME libopencv_core.so.4.5 COMPONENT mindspore)
|
||||
install(FILES ${opencv_LIBPATH}/libopencv_imgcodecs.so.4.5.1
|
||||
DESTINATION ${INSTALL_LIB_DIR} RENAME libopencv_imgcodecs.so.4.5 COMPONENT mindspore)
|
||||
install(FILES ${opencv_LIBPATH}/libopencv_imgproc.so.4.5.1
|
||||
DESTINATION ${INSTALL_LIB_DIR} RENAME libopencv_imgproc.so.4.5 COMPONENT mindspore)
|
||||
endif()
|
||||
install(FILES ${opencv_LIBPATH}/libopencv_core.so.4.5.2
|
||||
DESTINATION ${INSTALL_LIB_DIR} RENAME libopencv_core.so.4.5 COMPONENT mindspore)
|
||||
install(FILES ${opencv_LIBPATH}/libopencv_imgcodecs.so.4.5.2
|
||||
DESTINATION ${INSTALL_LIB_DIR} RENAME libopencv_imgcodecs.so.4.5 COMPONENT mindspore)
|
||||
install(FILES ${opencv_LIBPATH}/libopencv_imgproc.so.4.5.2
|
||||
DESTINATION ${INSTALL_LIB_DIR} RENAME libopencv_imgproc.so.4.5 COMPONENT mindspore)
|
||||
install(FILES ${tinyxml2_LIBPATH}/libtinyxml2.so.8.0.0
|
||||
DESTINATION ${INSTALL_LIB_DIR} RENAME libtinyxml2.so.8 COMPONENT mindspore)
|
||||
|
||||
|
|
|
@ -476,13 +476,13 @@ else()
|
|||
install(FILES ${glog_LIBPATH}/libglog.so.0.4.0 DESTINATION ${CONVERTER_ROOT_DIR}/lib RENAME libglog.so.0
|
||||
COMPONENT ${RUNTIME_COMPONENT_NAME})
|
||||
|
||||
install(FILES ${opencv_LIBPATH}/libopencv_core.so.4.5.1
|
||||
install(FILES ${opencv_LIBPATH}/libopencv_core.so.4.5.2
|
||||
DESTINATION ${CONVERTER_ROOT_DIR}/lib RENAME libopencv_core.so.4.5
|
||||
COMPONENT ${RUNTIME_COMPONENT_NAME})
|
||||
install(FILES ${opencv_LIBPATH}/libopencv_imgcodecs.so.4.5.1
|
||||
install(FILES ${opencv_LIBPATH}/libopencv_imgcodecs.so.4.5.2
|
||||
DESTINATION ${CONVERTER_ROOT_DIR}/lib RENAME libopencv_imgcodecs.so.4.5
|
||||
COMPONENT ${RUNTIME_COMPONENT_NAME})
|
||||
install(FILES ${opencv_LIBPATH}/libopencv_imgproc.so.4.5.1
|
||||
install(FILES ${opencv_LIBPATH}/libopencv_imgproc.so.4.5.2
|
||||
DESTINATION ${CONVERTER_ROOT_DIR}/lib RENAME libopencv_imgproc.so.4.5
|
||||
COMPONENT ${RUNTIME_COMPONENT_NAME})
|
||||
|
||||
|
@ -502,13 +502,13 @@ else()
|
|||
install(FILES ${TOP_DIR}/mindspore/lite/build/tools/converter/registry/libmslite_converter_plugin.so
|
||||
DESTINATION ${RUNTIME_LIB_DIR} COMPONENT ${RUNTIME_COMPONENT_NAME})
|
||||
|
||||
install(FILES ${opencv_LIBPATH}/libopencv_core.so.4.5.1
|
||||
install(FILES ${opencv_LIBPATH}/libopencv_core.so.4.5.2
|
||||
DESTINATION ${RUNTIME_LIB_DIR} RENAME libopencv_core.so.4.5
|
||||
COMPONENT ${RUNTIME_COMPONENT_NAME})
|
||||
install(FILES ${opencv_LIBPATH}/libopencv_imgcodecs.so.4.5.1
|
||||
install(FILES ${opencv_LIBPATH}/libopencv_imgcodecs.so.4.5.2
|
||||
DESTINATION ${RUNTIME_LIB_DIR} RENAME libopencv_imgcodecs.so.4.5
|
||||
COMPONENT ${RUNTIME_COMPONENT_NAME})
|
||||
install(FILES ${opencv_LIBPATH}/libopencv_imgproc.so.4.5.1
|
||||
install(FILES ${opencv_LIBPATH}/libopencv_imgproc.so.4.5.2
|
||||
DESTINATION ${RUNTIME_LIB_DIR} RENAME libopencv_imgproc.so.4.5
|
||||
COMPONENT ${RUNTIME_COMPONENT_NAME})
|
||||
endif()
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
diff -Npur sqlite-amalgamation-3360000/CMakeLists.txt sqlite-amalgamation-3360000-patch/CMakeLists.txt
|
||||
--- sqlite-amalgamation-3360000/CMakeLists.txt 1970-01-01 08:00:00.000000000 +0800
|
||||
+++ sqlite-amalgamation-3360000-patch/CMakeLists.txt 2021-12-17 16:08:55.519134222 +0800
|
||||
@@ -0,0 +1,6 @@
|
||||
+cmake_minimum_required(VERSION 3.14)
|
||||
+project (Sqlite[C])
|
||||
+add_library(sqlite3 SHARED sqlite3.c)
|
||||
+set_target_properties(sqlite3 PROPERTIES PUBLIC_HEADER "sqlite3.h;sqlite3ext.h")
|
||||
+include(GNUInstallDirs)
|
||||
+install(TARGETS sqlite3 PUBLIC_HEADER)
|
Loading…
Reference in New Issue