Installation
There are different ways of installing the library. Choose whatever you think is the best for you.
Using conan package manager
Starting from release v0.1.0 it is possible to use conan in order to install the library from the artifactory remote
For these steps to work you will need both conan and CMake. Check their respective installation guides for further information on how to get those tools.
-
Create a simple conanfile.txt in the root of your project containing the requirements
[requires] argparse-cpp/0.1.0@dead/stable [generators] cmake
-
Move into the build folder
$ cd <build-folder>
-
Add the artifactory remote to your conan client
$ conan remote add argparse-cpp https://argparsecpp.jfrog.io/artifactory/api/conan/argparse-cpp-conan-local
-
Run
conan install
$ conan install .. -r argparse-cpp
-
Configure cmake to use the installed library from conan
include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) conan_basic_setup(NO_OUTPUT_DIRS TARGETS) ... target_link_libraries(your_exe PUBLIC CONAN_PKG::argparse-cpp)
Download source code from latest release
Click on the releases header on the right side of the GitHub repo or navigate here
Scroll down to the assets section and download the source code (zip or tar.gz).
Downloading the header file
Get the header file through wget.
$ wget https://raw.githubusercontent.com/dead-tech/argparse-cpp/main/include/argparse/argparse.hpp
Cloning the repo
-
Clone the repo
$ git clone https://github.com/dead-tech/argparse-cpp.git
-
Change current directory to the cloned folder
$ cd argparse-cpp
-
Move the header file
$ mv include/argparse.hpp <your-project-include-path>