sec21 is a collection of useful functions and classes and also the boilerplate for a lot of my projects.
See the Wiki for the full documentation, examples, operational details and other information.
Building with CMake is pretty easy, just invoke the following shell commands:
git clone https://github.com/MichaelMiller-/sec21
cd sec21
mkdir _build && cd _build/
cmake ..
sudo make install
If you have installed sec21 system-wide you can use the CMake-package-system.
find_package(sec21 CONFIG REQUIRED)
## ...
target_link_libraries(target_name PRIVATE sec21::sec21)
There a are several methods to get the library.
One of them is the setup-free CMake CPM dependency manager:
CPMAddPackage("gh:MichaelMiller-/[email protected]")
## ...
target_link_libraries(target_name PRIVATE sec21::sec21)
You also can download and install sec21 using the vcpkg dependency manager:
$ vcpkg install michaelmiller-sec21
Alternatively, the project can also be used only in a private context. Simply add the following to your CMakeLists.txt:
include(FetchContent)
FetchContent_Declare(sec21
GIT_REPOSITORY https://github.com/MichaelMiller-/sec21
# GIT_TAG ... # optional tag
)
FetchContent_MakeAvailable(sec21)
## If BUILD_TESTING for sec21 is enabled make sure that Catch2 is available.
## find_package(Catch2 CONFIG REQUIRED)
set_target_properties(sec21 PROPERTIES BUILD_TESTING FALSE)
## Link against sec21::sec21
target_link_libraries(main PRIVATE sec21::sec21)
Please see LICENSE.