[opencv3] Enable c++17 when building feature halide (#31097)

* [opencv3] Enable c++17 when building feature halide

* version

* add port-version

* version

* portfile.cmake

* version

* rv

* version

* portfile.cmake

* version

* portfile.cmake

* version
This commit is contained in:
Frank 2023-04-28 03:14:55 +08:00 committed by GitHub
parent eebcbc7ca3
commit 71adb53d50
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 10 additions and 3 deletions

View File

@ -2,6 +2,7 @@ file(READ "${CMAKE_CURRENT_LIST_DIR}/vcpkg.json" _contents)
string(JSON OPENCV_VERSION GET "${_contents}" version) string(JSON OPENCV_VERSION GET "${_contents}" version)
set(USE_QT_VERSION "5") set(USE_QT_VERSION "5")
set(ENABLE_CXX11 ON)
vcpkg_from_github( vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH OUT_SOURCE_PATH SOURCE_PATH
@ -282,6 +283,7 @@ if("ffmpeg" IN_LIST FEATURES)
endif() endif()
if("halide" IN_LIST FEATURES) if("halide" IN_LIST FEATURES)
set(ENABLE_CXX11 OFF)
list(APPEND ADDITIONAL_BUILD_FLAGS list(APPEND ADDITIONAL_BUILD_FLAGS
# Halide 13 requires C++17 # Halide 13 requires C++17
"-DCMAKE_CXX_STANDARD=17" "-DCMAKE_CXX_STANDARD=17"
@ -369,7 +371,7 @@ vcpkg_cmake_configure(
-DCMAKE_DISABLE_FIND_PACKAGE_Git=ON -DCMAKE_DISABLE_FIND_PACKAGE_Git=ON
-DCMAKE_DISABLE_FIND_PACKAGE_JNI=ON -DCMAKE_DISABLE_FIND_PACKAGE_JNI=ON
# ENABLE # ENABLE
-DENABLE_CXX11=ON -DENABLE_CXX11=${ENABLE_CXX11}
###### OPENCV vars ###### OPENCV vars
"-DOPENCV_DOWNLOAD_PATH=${DOWNLOADS}/opencv-cache" "-DOPENCV_DOWNLOAD_PATH=${DOWNLOADS}/opencv-cache"
${BUILD_WITH_CONTRIB_FLAG} ${BUILD_WITH_CONTRIB_FLAG}

View File

@ -1,7 +1,7 @@
{ {
"name": "opencv3", "name": "opencv3",
"version": "3.4.18", "version": "3.4.18",
"port-version": 9, "port-version": 10,
"description": "Open Source Computer Vision Library", "description": "Open Source Computer Vision Library",
"homepage": "https://github.com/opencv/opencv", "homepage": "https://github.com/opencv/opencv",
"license": "BSD-3-Clause", "license": "BSD-3-Clause",

View File

@ -5806,7 +5806,7 @@
}, },
"opencv3": { "opencv3": {
"baseline": "3.4.18", "baseline": "3.4.18",
"port-version": 9 "port-version": 10
}, },
"opencv4": { "opencv4": {
"baseline": "4.7.0", "baseline": "4.7.0",

View File

@ -1,5 +1,10 @@
{ {
"versions": [ "versions": [
{
"git-tree": "b66d5bf3d61ae3bd5e71952b7642658d8562ae5d",
"version": "3.4.18",
"port-version": 10
},
{ {
"git-tree": "402e9aac0f32db08e2d69f70ba6384f8c7bf4733", "git-tree": "402e9aac0f32db08e2d69f70ba6384f8c7bf4733",
"version": "3.4.18", "version": "3.4.18",