windows-amd64-prebuilt-libr.../vcpkg/ports/zxing-cpp/0001-opencv4-compat.patch
2020-10-10 14:36:42 +02:00

44 lines
1.3 KiB
Diff

diff --git a/CMakeLists.txt b/CMakeLists.txt
index ccb2ba9..5ade734 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,7 +1,7 @@
cmake_minimum_required(VERSION 3.0)
project(zxing)
-
+set(CMAKE_CXX_STANDARD 11)
option(BUILD_TESTING "Enable generation of test targets" OFF)
set(CMAKE_LIBRARY_PATH /opt/local/lib ${CMAKE_LIBRARY_PATH})
diff --git a/opencv-cli/src/main.cpp b/opencv-cli/src/main.cpp
index 63b6fd3..5900c4f 100644
--- a/opencv-cli/src/main.cpp
+++ b/opencv-cli/src/main.cpp
@@ -135,14 +135,14 @@ int main(int argc, char** argv) {
}
- if (!videoCapture.set(CV_CAP_PROP_FRAME_WIDTH, captureWidth)) {
+ if (!videoCapture.set(cv::CAP_PROP_FRAME_WIDTH, captureWidth)) {
// Log
cerr << "Failed to set frame width: " << captureWidth << " (ignoring)" << endl;
}
- if (!videoCapture.set(CV_CAP_PROP_FRAME_HEIGHT, captureHeight)) {
+ if (!videoCapture.set(cv::CAP_PROP_FRAME_HEIGHT, captureHeight)) {
// Log
cerr << "Failed to set frame height: " << captureHeight << " (ignoring)" << endl;
@@ -166,7 +166,7 @@ int main(int argc, char** argv) {
if (result) {
// Convert to grayscale
- cvtColor(image, grey, CV_BGR2GRAY);
+ cvtColor(image, grey, cv::COLOR_BGR2GRAY);
try {