Vcpkg #13
@@ -0,0 +1,3 @@
|
|||||||
|
[submodule "3rdparty/vcpkg"]
|
||||||
|
path = 3rdparty/vcpkg
|
||||||
|
url = https://github.com/microsoft/vcpkg
|
||||||
|
|||||||
+1
Submodule 3rdparty/vcpkg added at f93ba152d5
+24
-12
@@ -1,7 +1,22 @@
|
|||||||
cmake_minimum_required(VERSION 3.23.3)
|
cmake_minimum_required(VERSION 3.23.3)
|
||||||
|
|
||||||
|
set(VCPKG_ROOT_PATH ${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/vcpkg)
|
||||||
|
|
||||||
|
message("The vcpkg root path ${VCPKG_ROOT_PATH}")
|
||||||
|
|
||||||
|
if(NOT DEFINED CMAKE_TOOLCHAIN_FILE)
|
||||||
|
set(TOOLCHAIN_PATH ${VCPKG_ROOT_PATH}/scripts/buildsystems/vcpkg.cmake)
|
||||||
|
|
||||||
|
set(CMAKE_TOOLCHAIN_FILE
|
||||||
|
"${TOOLCHAIN_PATH}"
|
||||||
|
CACHE STRING "Vcpkg toolchain file")
|
||||||
|
|
||||||
|
message("Using default toolchain file")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
|
||||||
set(SOFTWARE_DESCRIPTION
|
set(SOFTWARE_DESCRIPTION
|
||||||
"A music streaming Web API that provides a way for users to stream their personal music collection")
|
"A tool to interact with the Icarus Music streaming API")
|
||||||
set(SOFTWARE_VERSION
|
set(SOFTWARE_VERSION
|
||||||
"0.3.0")
|
"0.3.0")
|
||||||
|
|
||||||
@@ -9,8 +24,8 @@ set(SOFTWARE_VERSION
|
|||||||
project(IcarusDownloadManager VERSION ${SOFTWARE_VERSION} DESCRIPTION ${SOFTWARE_DESCRIPTION} LANGUAGES CXX)
|
project(IcarusDownloadManager VERSION ${SOFTWARE_VERSION} DESCRIPTION ${SOFTWARE_DESCRIPTION} LANGUAGES CXX)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
message(STATUS "Checking compiler flags for C++20 support.")
|
message(STATUS "Checking compiler flags for C++20 support.")
|
||||||
|
|
||||||
# Set C++20 support flags for various compilers
|
# Set C++20 support flags for various compilers
|
||||||
include(CheckCXXCompilerFlag)
|
include(CheckCXXCompilerFlag)
|
||||||
|
|
||||||
@@ -76,19 +91,16 @@ set(SOURCES
|
|||||||
set(IDM_INCLUDE_DIR
|
set(IDM_INCLUDE_DIR
|
||||||
"${CMAKE_CURRENT_SOURCE_DIR}/include")
|
"${CMAKE_CURRENT_SOURCE_DIR}/include")
|
||||||
|
|
||||||
# conan
|
include_directories(${IDM_INCLUDE_DIR})
|
||||||
set(CONAN_BUILDINFO
|
|
||||||
${CMAKE_BINARY_DIR}/conanbuildinfo.cmake)
|
|
||||||
|
|
||||||
message("conan build info ${CONAN_BUILDINFO}")
|
|
||||||
include(${CONAN_BUILDINFO})
|
|
||||||
conan_basic_setup()
|
|
||||||
|
|
||||||
include_directories(${CPR_INCLUDE_DIRS} ${IDM_INCLUDE_DIR})
|
|
||||||
|
|
||||||
set(USE_SYSTEM_CURL OFF)
|
set(USE_SYSTEM_CURL OFF)
|
||||||
set(BUILD_CPR_TESTS OFF)
|
set(BUILD_CPR_TESTS OFF)
|
||||||
|
|
||||||
|
find_package(nlohmann_json CONFIG REQUIRED)
|
||||||
|
find_package(OpenSSL REQUIRED)
|
||||||
|
find_package(CURL REQUIRED)
|
||||||
|
find_package(cpr CONFIG REQUIRED)
|
||||||
|
|
||||||
|
|
||||||
add_executable(icd ${SOURCES})
|
add_executable(icd ${SOURCES})
|
||||||
target_link_libraries(icd PUBLIC ${CONAN_LIBS})
|
target_link_libraries(icd PRIVATE nlohmann_json::nlohmann_json OpenSSL::SSL OpenSSL::Crypto CURL::libcurl cpr::cpr)
|
||||||
|
|||||||
@@ -5,10 +5,10 @@ IcarusDownloadManager is a Linux CLI software client application that has the fe
|
|||||||
|
|
||||||
## Built With
|
## Built With
|
||||||
|
|
||||||
* C++ with C++17 features
|
* C++ with C++20 features
|
||||||
* CMake
|
* CMake
|
||||||
* GCC >= 9 or Visual Studio >= 16 [2019]
|
* GCC >= 10 or Visual Studio >= 17 [2022]
|
||||||
* [conan](https://github.com/conan-io/conan)
|
* [vcpkg](https://github.com/microsoft/vcpkg)
|
||||||
* [json](https://github.com/nlohmann/json)
|
* [json](https://github.com/nlohmann/json)
|
||||||
* [openssl](https://github.com/openssl/openssl)
|
* [openssl](https://github.com/openssl/openssl)
|
||||||
* [curl](https://github.com/curl/curl)
|
* [curl](https://github.com/curl/curl)
|
||||||
@@ -17,17 +17,29 @@ IcarusDownloadManager is a Linux CLI software client application that has the fe
|
|||||||
|
|
||||||
### Getting Started
|
### Getting Started
|
||||||
|
|
||||||
Build the project:
|
Clone the repo
|
||||||
|
|
||||||
```
|
```
|
||||||
git clone --recursive https://github.com/kdeng00/IcarusDownloadManager
|
git clone --recursive https://github.com/kdeng00/IcarusDownloadManager
|
||||||
|
```
|
||||||
|
|
||||||
|
Install packages
|
||||||
|
|
||||||
|
```
|
||||||
|
vcpkg install nlohman-json
|
||||||
|
vcpkg install openssl
|
||||||
|
vcpkg install curl
|
||||||
|
vcpkg install cpr
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
Build the project:
|
||||||
|
|
||||||
|
```
|
||||||
|
cd IcarusDownloadManager
|
||||||
mkdir build
|
mkdir build
|
||||||
cd build
|
cd build
|
||||||
|
|
||||||
conan install .. --build
|
|
||||||
|
|
||||||
cmake ..
|
cmake ..
|
||||||
cmake --build . --config release -j
|
cmake --build . --config release -j
|
||||||
```
|
```
|
||||||
|
|||||||
@@ -24,6 +24,7 @@ void printHelp()
|
|||||||
cout<<"Actions\n";
|
cout<<"Actions\n";
|
||||||
cout<<"download\n";
|
cout<<"download\n";
|
||||||
cout<<"upload\n";
|
cout<<"upload\n";
|
||||||
|
cout<<"upload-meta\n";
|
||||||
cout<<"retrieve\n";
|
cout<<"retrieve\n";
|
||||||
cout<<"delete\n\n";
|
cout<<"delete\n\n";
|
||||||
|
|
||||||
@@ -39,6 +40,13 @@ void printHelp()
|
|||||||
cout<<"-sr directory where to recursively search for songs to upload (Optional)\n";
|
cout<<"-sr directory where to recursively search for songs to upload (Optional)\n";
|
||||||
cout<<"-nc will not prompt the user when uploading from a directory\n\n";
|
cout<<"-nc will not prompt the user when uploading from a directory\n\n";
|
||||||
|
|
||||||
|
cout<<"Required for upload\n";
|
||||||
|
cout<<"-s path of song\n";
|
||||||
|
cout<<"-t track number\n";
|
||||||
|
cout<<"-m metadata filepath\n";
|
||||||
|
cout<<"-ca coverart filepath\n";
|
||||||
|
cout<<"-scma directory where songs, metadata, and cover art exists and will be uploaded (Optional)\n\n";
|
||||||
|
|
||||||
cout<<"Required for download\n";
|
cout<<"Required for download\n";
|
||||||
cout<<"-b song id\n";
|
cout<<"-b song id\n";
|
||||||
cout<<"-d path to download song (Optional)\n\n";
|
cout<<"-d path to download song (Optional)\n\n";
|
||||||
|
|||||||
Reference in New Issue
Block a user