From 8684114ad125df05bc2ec45c405216265cd5a834 Mon Sep 17 00:00:00 2001 From: ado Date: Sun, 7 Feb 2021 15:41:00 +0100 Subject: [PATCH] update README --- README.md | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 97142a0..7d3a273 100644 --- a/README.md +++ b/README.md @@ -67,7 +67,8 @@ $ cmake --configure . $ sudo make install *Note, this will also install the fast_float library* -``` +The library supports [CMake](#Cmake) and [meson](#Meson) build systems + # Usage ## Conversions @@ -384,3 +385,27 @@ std::string s; std::cin >> s; int num = c.convert(s.c_str()); ``` + +# CMake + +If you have the repository cloned in your CMake project, simply add it: +``` +add_subdirectory(ssp) +``` +Othervise, you can fetch it from the repository: +``` +include(FetchContent) +FetchContent_Declare( + ssp + GIT_REPOSITORY https://github.com/red0124/ssp.git + GIT_TAG origin/master + GIT_SHALLOW TRUE) + +FetchContent_MakeAvailable(ssp) +``` +Either way, after you prepare the target, you just have to invoke it in your project: +``` +target_link_libraries(project PUBLIC ssp) +``` +# Meson +