Skip to content

Why is the v2 writer wasm binary so much larger? #190

Closed Answered by Sec-ant
mfulton26 asked this question in Q&A
Discussion options

You must be logged in to vote

@axxel I just realized I defined both the ZXING_READERS and ZXING_WRITERS options in the CMakeLists.txt file, for no matter which target I'm to build 🤦. Therefore, when building the writer target, the CreatBarcode will still use the reader code if ZXING_READERS is defined. It seems won't use the readBarcode function if ZXING_READERS is not defined, am I correct?

So if that's the case, I need to set different options for different targets, and those options should be passed down to zxing-cpp:

  • reader target: ZXING_READERS=ON and ZXING_WRITERS=OFF
  • writer target: ZXING_READERS=OFF and ZXING_WRITERS=NEW
  • full target: ZXING_READERS=ON and ZXING_WRITERS=NEW

Do you happen to know how to do that …

Replies: 2 comments 6 replies

Comment options

You must be logged in to vote
6 replies
@Sec-ant
Comment options

@axxel
Comment options

@Sec-ant
Comment options

@Sec-ant
Comment options

Answer selected by mfulton26
@axxel
Comment options

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants