Skip to content

Commit

Permalink
[opencv3] Enable c++17 when building feature halide (#31097)
Browse files Browse the repository at this point in the history
* [opencv3] Enable c++17 when building feature halide

* version

* add port-version

* version

* portfile.cmake

* version

* rv

* version

* portfile.cmake

* version

* portfile.cmake

* version
  • Loading branch information
FrankXie05 committed Apr 27, 2023
1 parent eebcbc7 commit 71adb53
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 3 deletions.
4 changes: 3 additions & 1 deletion ports/opencv3/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ file(READ "${CMAKE_CURRENT_LIST_DIR}/vcpkg.json" _contents)
string(JSON OPENCV_VERSION GET "${_contents}" version)

set(USE_QT_VERSION "5")
set(ENABLE_CXX11 ON)

vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
Expand Down Expand Up @@ -282,6 +283,7 @@ if("ffmpeg" IN_LIST FEATURES)
endif()

if("halide" IN_LIST FEATURES)
set(ENABLE_CXX11 OFF)
list(APPEND ADDITIONAL_BUILD_FLAGS
# Halide 13 requires C++17
"-DCMAKE_CXX_STANDARD=17"
Expand Down Expand Up @@ -369,7 +371,7 @@ vcpkg_cmake_configure(
-DCMAKE_DISABLE_FIND_PACKAGE_Git=ON
-DCMAKE_DISABLE_FIND_PACKAGE_JNI=ON
# ENABLE
-DENABLE_CXX11=ON
-DENABLE_CXX11=${ENABLE_CXX11}
###### OPENCV vars
"-DOPENCV_DOWNLOAD_PATH=${DOWNLOADS}/opencv-cache"
${BUILD_WITH_CONTRIB_FLAG}
Expand Down
2 changes: 1 addition & 1 deletion ports/opencv3/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "opencv3",
"version": "3.4.18",
"port-version": 9,
"port-version": 10,
"description": "Open Source Computer Vision Library",
"homepage": "https://github.com/opencv/opencv",
"license": "BSD-3-Clause",
Expand Down
2 changes: 1 addition & 1 deletion versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -5806,7 +5806,7 @@
},
"opencv3": {
"baseline": "3.4.18",
"port-version": 9
"port-version": 10
},
"opencv4": {
"baseline": "4.7.0",
Expand Down
5 changes: 5 additions & 0 deletions versions/o-/opencv3.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "b66d5bf3d61ae3bd5e71952b7642658d8562ae5d",
"version": "3.4.18",
"port-version": 10
},
{
"git-tree": "402e9aac0f32db08e2d69f70ba6384f8c7bf4733",
"version": "3.4.18",
Expand Down

0 comments on commit 71adb53

Please sign in to comment.