Minimal project to show an openFrameworks integration. The code inside src/ofApp.cpp is one of the openFrameworks example.
We use vcpkg to manage dependencies
This project depends on:
- cxxopts: Command line argument parsing
- fmt: A modern formatting library
- spdlog: Very fast, header-only/compiled, C++ logging library
./vcpkg install cxxopts spdlog fmt
- openFrameworks: openFrameworks is a community-developed cross platform toolkit for creative coding in C++
We use vcpkg to manage openFrameworks dependencies. Unfortunatly it's not a method maintained by openFrameworks. There is a fork of openFrameworks just to support dependencies from vcpkg avaiblable here. We just add a cmake that import all dependencies and add submodule for the missing dependencies from vcpkg.
openFrameworks has lots of dependencies they can be seen in the following file cmake/FindOpenFrameworks.cmake
./vcpkg install (all openFrameworks dependencies)
To install openFrameworks we will use my fork available here
git clone git@github.com:edmBernard/openFrameworks.git
cd openFrameworks
mkdir build
cd build
# configure cmake with vcpkg toolchain
cmake .. -DCMAKE_TOOLCHAIN_FILE=${VCPKG_DIR}/scripts/buildsystems/vcpkg.cmake -DCMAKE_PREFIX_PATH=/user/local
# on Windows : cmake .. -DCMAKE_TOOLCHAIN_FILE=${env:VCPKG_DIR}/scripts/buildsystems/vcpkg.cmake -DCMAKE_PREFIX_PATH=C:/cmake
cmake --build . --config Releasemkdir build
cd build
# configure make with vcpkg toolchain
cmake .. -DCMAKE_TOOLCHAIN_FILE=${VCPKG_DIR}/scripts/buildsystems/vcpkg.cmake -DCMAKE_PREFIX_PATH=/user/local
# on Windows : cmake .. -DCMAKE_TOOLCHAIN_FILE="$Env:VCPKG_DIR/scripts/buildsystems/vcpkg.cmake" -DCMAKE_PREFIX_PATH=C:/cmake
cmake --build . --config ReleaseThe executable is named openFrameworks-template
It's a toy project. So if you spot error, improvement comments are welcome.