Skip to content

Commit

Permalink
build: integrate args library using FetchContent and update include path
Browse files Browse the repository at this point in the history
  • Loading branch information
BayernMuller committed Oct 29, 2024
1 parent 46713c5 commit 0a7c938
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
12 changes: 12 additions & 0 deletions cli/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,21 @@
# Fetch the args header-only library
include(FetchContent)
FetchContent_Declare(
args
GIT_REPOSITORY https://github.com/Taywee/args.git
GIT_TAG master
)
FetchContent_Populate(args)

# Add the executable for the CLI
add_executable(vibra
main.cpp
cli.cpp
)

# Add the args include directory to the target
target_include_directories(vibra PRIVATE ${args_SOURCE_DIR})

# Find libcurl
find_library(CURL_LIBRARY NAMES curl)

Expand Down
2 changes: 1 addition & 1 deletion cli/cli.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#include <fstream>
#include <iostream>
#include <vector>
#include "args/args.hxx"
#include <args.hxx>

std::size_t writeCallback(void *contents, size_t size, size_t nmemb, void *userp)
{
Expand Down

0 comments on commit 0a7c938

Please sign in to comment.