Skip to content

Commit

Permalink
ci: fix Swift package build regression
Browse files Browse the repository at this point in the history
  • Loading branch information
axxel committed Dec 31, 2024
1 parent 0bb732b commit 5a7ae44
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ let package = Package(
.target(
name: "ZXingCppCore",
path: "core/src",
exclude: ["libzint"],
exclude: ["libzint", "ZXingC.cpp", "ZXingCpp.cpp"],
publicHeadersPath: ".",
cxxSettings: [
.define("ZXING_READERS")
Expand Down
5 changes: 5 additions & 0 deletions core/src/ZXingC.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,12 @@
#include "ZXingC.h"

#include "ZXingCpp.h"

#if __has_include("Version.h")
#include "Version.h"
#else // this is mainly a workaround for a missing autogenerated Version.h in the XCode/CocoaPods corner
#define ZXING_VERSION_STR "undefined"
#endif

#include <cstdlib>
#include <exception>
Expand Down
4 changes: 4 additions & 0 deletions core/src/ZXingCpp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@

#include "ZXingCpp.h"

#if __has_include("Version.h")
#include "Version.h"
#else // this is mainly a workaround for a missing autogenerated Version.h in the XCode/CocoaPods corner
#define ZXING_VERSION_STR "undefined"
#endif

namespace ZXing {

Expand Down

0 comments on commit 5a7ae44

Please sign in to comment.