Skip to content

Commit

Permalink
zxing-cpp: fix MSVC14 build
Browse files Browse the repository at this point in the history
  • Loading branch information
madebr committed Mar 6, 2020
1 parent f143517 commit ea41249
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 1 deletion.
4 changes: 4 additions & 0 deletions recipes/zxing-cpp/all/conandata.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,7 @@ sources:
"1.0.8":
url: "https://github.com/nu-book/zxing-cpp/archive/v1.0.8.tar.gz"
sha256: "9154b5456904e47bd4c38462d57e4b7897bfb20cb2bc2e8c958453e40e73c8b2"
patches:
"1.0.8":
patch_file: "patches/0001-Fix-C2327-for-MSVC-2015.patch"
base_path: "source_subfolder"
2 changes: 1 addition & 1 deletion recipes/zxing-cpp/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class ZXingCppConan(ConanFile):
topics = ("conan", "zxing", "barcode", "scanner", "generator")
url = "https://github.com/conan-io/conan-center-index"
license = "Apache-2.0"
exports_sources = ["CMakeLists.txt"]
exports_sources = ["CMakeLists.txt", "pathces/**"]
settings = "os", "arch", "compiler", "build_type"
options = {
"shared": [True, False],
Expand Down
11 changes: 11 additions & 0 deletions recipes/zxing-cpp/all/patches/0001-Fix-C2327-for-MSVC-2015.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
--- core/src/DecodeHints.h
+++ core/src/DecodeHints.h
@@ -167,7 +167,7 @@
FLAG_COUNT
};

- static_assert(FLAG_COUNT < 8 * sizeof(_flags), "HintFlag overflow");
+ static_assert(FLAG_COUNT < 8 * sizeof(decltype(_flags)), "HintFlag overflow");

bool getFlag(int f) const {
return (_flags & (1 << f)) != 0;

0 comments on commit ea41249

Please sign in to comment.