Repository navigation
Installation Guide
Warning
This page is Work-in-Progress.
Go to the top level of your repository, where include/ is, and run this command:
curl -fsSL https://raw.githubusercontent.com/Mher-DeLight/cpersist/main/install.sh | shThen add the lines that the output tells you to add to your CMakeLists.txt, which are:
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)before you define your target, and:
find_package(OpenSSL REQUIRED)
target_link_libraries(your_cmake_target PRIVATE ${CMAKE_SOURCE_DIR}/include/cpersist/src/cpersist.a OpenSSL::SSL OpenSSL::Crypto)
target_include_directories(your_cmake_target PRIVATE ${CMAKE_SOURCE_DIR}/include/cpersist/include)after you define your target.
Note
This method currently only supports x86-64 Linux only.
Download the .tar.gz that was attached to the release. In your CMake directory, make sure you have a folder called include/. Inside that folder, create another folder called cpersist/ and export the .tar.gz there. Then, add the following in your CMakeLists.txt:
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
find_package(OpenSSL REQUIRED)
target_link_libraries(your_cmake_target PRIVATE ${CMAKE_SOURCE_DIR}/include/cpersist/src/cpersist.a OpenSSL::SSL OpenSSL::Crypto)
target_include_directories(your_cmake_target PRIVATE ${CMAKE_SOURCE_DIR}/include/cpersist/include)Installing from Head will get you the latest updates, but it might have unstable changes that might be unsupported in future releases or commits.
To install from Head, go to your project directory, and make sure you have include/. Then inside that folder, run:
git clone https://www.github.com/Mher-DeLight/cpersistThen go to your project's CMakeLists.txt, which is on the same level as the top-level include/ and add:
add_subdirectory(include/cpersist)
target_link_libraries(your_cmake_target PRIVATE cpersistIn your C++ file, you can do:
#include <cpersist.h>Then you can use cpersist.
← Home · Files and Buffers →