Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
43da2c7ac1 |
+3
-7
@@ -20,6 +20,9 @@ target_include_directories(YTMusicDL26 PUBLIC
|
|||||||
include(cmake/CPM.cmake)
|
include(cmake/CPM.cmake)
|
||||||
|
|
||||||
set(CURL_USE_LIBPSL OFF CACHE BOOL "" FORCE)
|
set(CURL_USE_LIBPSL OFF CACHE BOOL "" FORCE)
|
||||||
|
set(CURL_USE_SCHANNEL ON)
|
||||||
|
|
||||||
|
set(BUILD_SHARED_LIBS OFF CACHE BOOL "" FORCE)
|
||||||
|
|
||||||
CPMAddPackage("gh:nlohmann/json#v3.12.0")
|
CPMAddPackage("gh:nlohmann/json#v3.12.0")
|
||||||
CPMAddPackage("gh:curl/curl#curl-8_21_0")
|
CPMAddPackage("gh:curl/curl#curl-8_21_0")
|
||||||
@@ -38,13 +41,6 @@ if (WIN32)
|
|||||||
-static-libstdc++
|
-static-libstdc++
|
||||||
-static
|
-static
|
||||||
)
|
)
|
||||||
|
|
||||||
add_custom_command(TARGET YTMusicDL26 POST_BUILD
|
|
||||||
COMMAND ${CMAKE_COMMAND} -E copy_if_different
|
|
||||||
$<TARGET_RUNTIME_DLLS:YTMusicDL26>
|
|
||||||
$<TARGET_FILE_DIR:YTMusicDL26>
|
|
||||||
COMMAND_EXPAND_LISTS
|
|
||||||
)
|
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,11 @@
|
|||||||
|
set(CMAKE_SYSTEM_NAME Windows)
|
||||||
|
set(CMAKE_SYSTEM_PROCESSOR x86_64)
|
||||||
|
|
||||||
|
set(CMAKE_C_COMPILER x86_64-w64-mingw32-gcc)
|
||||||
|
set(CMAKE_CXX_COMPILER x86_64-w64-mingw32-g++)
|
||||||
|
|
||||||
|
set(CMAKE_FIND_ROOT_PATH /usr/x86_64-w64-mingw32)
|
||||||
|
|
||||||
|
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
|
||||||
|
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
|
||||||
|
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
|
||||||
+2
-2
@@ -57,13 +57,13 @@ auto main(int argc, char* argv[]) -> int {
|
|||||||
|
|
||||||
if (!content->rip(musicDir, [&content, &urls](int percent) {
|
if (!content->rip(musicDir, [&content, &urls](int percent) {
|
||||||
if (percent == 0) {
|
if (percent == 0) {
|
||||||
printf("\rGathering info... (this may take awhile)");
|
printf("\r\033[KGathering info... (this may take a while)");
|
||||||
fflush(stdout);
|
fflush(stdout);
|
||||||
} else {
|
} else {
|
||||||
std::string artist;
|
std::string artist;
|
||||||
std::string album;
|
std::string album;
|
||||||
content->info(artist, album);
|
content->info(artist, album);
|
||||||
printf("\r%s by %s at %d%%", album.c_str(), artist.c_str(), percent);
|
printf("\r\033[K%s by %s at %d%%", album.c_str(), artist.c_str(), percent);
|
||||||
fflush(stdout);
|
fflush(stdout);
|
||||||
}
|
}
|
||||||
})) {
|
})) {
|
||||||
|
|||||||
Reference in New Issue
Block a user