https://github.com/manuelmeraz/pixy2_example
How to link to Pixy2 using CMake and C++
https://github.com/manuelmeraz/pixy2_example
cmake cpp link pixy2
Last synced: about 1 month ago
JSON representation
How to link to Pixy2 using CMake and C++
- Host: GitHub
- URL: https://github.com/manuelmeraz/pixy2_example
- Owner: ManuelMeraz
- License: mit
- Created: 2020-04-07T19:36:49.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2020-04-07T19:50:16.000Z (about 6 years ago)
- Last Synced: 2025-10-09T13:12:48.552Z (8 months ago)
- Topics: cmake, cpp, link, pixy2
- Language: Shell
- Size: 11.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# pixy2_example
How to link to Pixy2 using CMake and C++
I bought a pixy2 to play with some computer vision, but it turned out now to be what I expected. Linking to the library and installing it was a bit of a pain, so I thought I'd create a repo in case you're interested in writing some C/C++ code for it.
The following steps are taken straight out of: https://docs.pixycam.com/wiki/doku.php?id=wiki:v2:building_the_libpixyusb_example_on_linux
```
sudo apt install git libusb-1.0-0-dev g++ build-essential
git clone https://github.com/charmedlabs/pixy2
cd pixy2/scripts && ./build_libpixyusb2.sh
```
Once libpixy2.a is built, they don't have an obvious way of installing the library to link to it. Inside this repo there's
an `install_libpixyusb2.sh` script.
```
cp pixy2_example/scripts/install_libpixyusb2.sh pixy2/scripts/
cd pixy2/scripts/
sudo ./install_libpixyusb2.sh
```
This will install the headers and library file to `/usr/local/`
Now we can link to the library. Take a look at the `cmake` and `examples` directory.
```
mkdir build
cmake -DCMAKE_BUILD_TYPE=Release ..
make -j6
```