/cmake

Command line C++ barcode reader for Windows, Linux, and macOS.

Primary LanguageCMIT LicenseMIT

Building C/C++ Barcode Reader with CMake

release Travis CI status

What You Should Know

Supported Platforms

  • Windows x86/x64
  • Linux x64/ARM64
  • macOS x64
  • Raspberry Pi ARMv7

Setting License

Set the license key in BarcodeReader.cxx:

reader.InitLicense("LICENSE-KEY");

Contact Us

Windows

  1. Create a build folder:
    mkdir build
    cd build
    
  2. Configure and build the project:
    // x86
    cmake -DCMAKE_GENERATOR_PLATFORM=x86 ..
    
    // x64
    cmake -DCMAKE_GENERATOR_PLATFORM=x64 ..
    
    cmake --build . --config release
  3. Run the app:
    Release\BarcodeReader [image-file] [optional: license-file] [optional: template-file]
    

Linux and Raspberry Pi OS

  1. Install CMake:
    sudo apt-get install cmake
  2. Create a build folder:
    mkdir build
    cd build
    
  3. Configure and build the project:
    cmake ..
    # cmake -DARM32_BUILD=TRUE ..
    cmake --build . --config release 
  4. Run the app:
    ./BarcodeReader [image-file] [optional: license-file] [optional: template-file]
    

macOS

  1. Install CMake:

    brew install cmake
  2. Create a build folder:

    mkdir build
    cd build
    
  3. Configure and build the project:

    cmake ..
    cmake --build . --config release 
  4. Run the app:

    ./BarcodeReader [image-file] [optional: license-file] [optional: template-file]
    

Screenshot

Raspberry Pi Barcode Reader

Reference

Blog