Added CLI11 library via gitmodule

This commit is contained in:
2026-06-14 12:19:24 -04:00
parent b74b9127bc
commit a2ac669803
4 changed files with 25 additions and 4 deletions

3
.gitmodules vendored Normal file
View File

@@ -0,0 +1,3 @@
[submodule "external/CLI11"]
path = external/CLI11
url = https://github.com/CLIUtils/CLI11.git

View File

@@ -5,7 +5,12 @@ project(SpotifyDownloader LANGUAGES CXX)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
add_executable(spotify-downloader
src/main.cpp
)
add_subdirectory(external/CLI11)
target_link_libraries(spotify-downloader PRIVATE CLI11::CLI11)

1
external/CLI11 vendored Submodule

Submodule external/CLI11 added at e187715ca9

View File

@@ -1,7 +1,19 @@
#include <iostream>
#include <ostream>
int main(int argc, char *argv[]) {
std::cout << "Hello, World" << std::endl;
#include <CLI/CLI.hpp>
#include <iostream>
#include <string>
int main(int argc, char **argv) {
CLI::App app{"Spotify Downloader"};
std::string url;
app.add_option("-u,--url", url, "Spotify item URL");
CLI11_PARSE(app, argc, argv);
if (!url.empty()) {
std::cout << "Target URL: " << url << "\n";
}
return 0;
}