Reusable C++ code for dealing with MIDI messages
This is a library supposed to be used within a larger C++ application project. Assuming your project uses CMake and this
library is already available to CMake, all you need to do is to adjust your CMakeLists.txt
:
target_link_libraries(your-target PRIVATE helgoboss-midi::helgoboss-midi)
Here are some solutions to make the library available to CMake.
This assumes you have your application-wide vcpkg instance at lib/vcpkg
.
- Add https://github.com/helgoboss/helgoboss-vcpkg-overlays as Git submodule at
lib/helgoboss-vcpkg-overlays
- Integrate this into your application-wide vcpkg response file (e.g.
vcpkg.txt
) and use vcpkg to install the added package:helgoboss-midi --overlay-ports=../helgoboss-vcpkg-overlays/ports
- Add the following to your
CMakeLists.txt
beforetarget_link_libraries
find_package(helgoboss-midi 0.1.0 CONFIG REQUIRED)
- Install the dependencies of this library mentioned in vcpkg.txt using whatever packagement management approach you prefer
- Copy this library to
lib/helgoboss-midi
(e.g. as Git submodule) - Add the following to your
CMakeLists.txt
beforetarget_link_libraries
add_subdirectory(lib/helgoboss-midi)
The following commands are tailored to Linux but need only minimal adjustments to be executed on OS X or Windows.
cd lib/vcpkg
./bootstrap-vcpkg.sh
./vcpkg install @../../vcpkg.txt
CMake >= 3.13
cmake -B build/linux
cmake --build build/linux --config Release
CMake < 3.13
mkdir -p build/linux
cd build/linux
cmake ../..
cmake --build . --config Release
cd build/linux
ctest
CMake >= 3.15
cmake --install build/linux --prefix build/linux/test-install