install icu
sudo apt-get install libicu-dev
add_subdirectory(tokenizers) # target: tokenizers::tokenizers
cmake -B build
# cmake -B build -DBUILD_TESTING=ON -DTOKENIZERS_BUILD_TESTING=ON # enable testing
cmake --build build -j $(nproc)
install_path=/opt/tokenizers
sudo cmake --install build --prefix $install_path
find_package(tokenizers REQUIRED) # target: tokenizers::tokenizers
please go to wiki for detailed guide.