From 1bad4fc3c06b38f8407b1e7c18af7cc16cf39dd0 Mon Sep 17 00:00:00 2001 From: ado Date: Sun, 7 Feb 2021 15:07:35 +0100 Subject: [PATCH] make cmake install also install fast_float, update README --- CMakeLists.txt | 6 ++++-- README.md | 8 +++++++- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 323c897..b29af69 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -18,6 +18,7 @@ endif() # ---- Dependencies ---- +include(FetchContent) FetchContent_Declare( fast_float GIT_REPOSITORY https://github.com/red0124/fast_float.git @@ -25,6 +26,7 @@ FetchContent_Declare( GIT_SHALLOW TRUE) FetchContent_MakeAvailable(fast_float) +set(fast_float_source_dir "${FETCHCONTENT_BASE_DIR}/fast_float-src") # ---- Declare library ---- @@ -36,7 +38,7 @@ target_include_directories( ${ssp_warning_guard} INTERFACE "$" - fast_float + "$" ) target_compile_features(ssp INTERFACE cxx_std_17) @@ -57,7 +59,7 @@ set(ssp_directory "ssp-${PROJECT_VERSION}") set(ssp_include_directory "${CMAKE_INSTALL_INCLUDEDIR}") install( - DIRECTORY "${PROJECT_SOURCE_DIR}/include/" + DIRECTORY "${PROJECT_SOURCE_DIR}/include/" "${fast_float_source_dir}/include/" DESTINATION "${ssp_include_directory}" COMPONENT ssp_Development ) diff --git a/README.md b/README.md index 96e7cf3..97142a0 100644 --- a/README.md +++ b/README.md @@ -60,8 +60,14 @@ Bill (Heath) Gates 65 3.3 * Fast # Installation -TODO +$ git clone https://github.com/red0124/ssp +$ cd ssp +$ cmake --configure . +$ sudo make install + +*Note, this will also install the fast_float library* +``` # Usage ## Conversions