The latest released version of µReact can be obtained from here: https://raw.githubusercontent.com/YarikTH/ureact/main/include/ureact/ureact.hpp
You can substitute main
with dev
or a tag like 0.1.0
for a specific version in the URL above.
You need to add
#include <ureact/ureact.hpp>
to the files you want to process use µReact and set the necessary switches to enable C++17 (e.g., -std=c++17
for GCC and Clang).
See code example used for integration tests here.
There are plenty of ways to integrate µReact into the CMake project:
- Using add_subdirectory - if you copy the whole repo of µReact or add it as a git submodule
- Using find_package - if you have installed version of µReact find_package is a proper way to do
- Using ExternalProject - good old way to acquire µReact from GitHub repo
- Using FetchContent - modern way to acquire µReact from GitHub repo (CMake 3.14 is required)
All described CMake integration ways are accompanied by working examples that
are continuously tested on the CI server. You can run the test locally, using
the integration_check
target of the root Makefile.
make integration_check
📝 The CMakeLists.txt
file of the µReact repository has install()
commands, so you could use µReact as a package.
find_package example also
contains instructions for it.
😅 Unfortunately, there are no package managers supported at this moment.