diff --git a/CMakeLists.txt b/CMakeLists.txt index 03d1750..14bf089 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -3,6 +3,30 @@ project(dropout-dl) set(CMAKE_CXX_STANDARD 17) + +IF(DROPOUT_DL_BUILD_ALL) + add_executable(dropout-dl-minimal src/episode.cpp src/season.cpp src/series.cpp src/main.cpp) + + target_link_libraries(dropout-dl-minimal curl) + + + add_executable(dropout-dl-sqlite src/episode.cpp src/season.cpp src/series.cpp src/main.cpp) + + target_link_libraries(dropout-dl-sqlite curl sqlite3) + + target_compile_definitions(dropout-dl-sqlite PUBLIC DROPOUT_DL_SQLITE) + + + add_executable(dropout-dl-full src/episode.cpp src/season.cpp src/series.cpp src/main.cpp) + + target_link_libraries(dropout-dl-full curl gcrypt sqlite3) + + target_compile_definitions(dropout-dl-full PUBLIC DROPOUT_DL_SQLITE DROPOUT_DL_GCRYPT) + + + add_subdirectory(tests) +ELSE() + add_executable(dropout-dl src/episode.cpp src/season.cpp src/series.cpp src/main.cpp) target_link_libraries(dropout-dl curl) @@ -22,3 +46,5 @@ ENDIF() IF(DROPOUT_DL_TESTS) add_subdirectory(tests) ENDIF() + +ENDIF() \ No newline at end of file diff --git a/readme.md b/readme.md index d337ae3..fc00ef2 100644 --- a/readme.md +++ b/readme.md @@ -52,7 +52,6 @@ By default, dropout-dl will download the episode in the format `/Svalue = tmp; + #else + std::cerr << "COOKIE ERROR: Attempted to get cookies from sqlite without having sqlite installed\n"; + exit(12); + #endif } void cookie::format_from_chrome() { @@ -617,7 +622,7 @@ namespace dropout_dl { this->value = this->value.substr(0, this->len - 7); this->len -= 7; #else - std::cerr << "CHROME COOKIE ERROR: Attempted to Decrypt Chrome Cookie With libgcrypt\n"; + std::cerr << "CHROME COOKIE ERROR: Attempted to Decrypt Chrome Cookie Without libgcrypt\n"; exit(12); #endif } diff --git a/src/main.cpp b/src/main.cpp index 35441d0..8426a37 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -297,14 +297,14 @@ std::vector get_cookies(bool verbose = false) { #ifdef DROPOUT_DL_SQLITE return get_cookies_from_firefox(firefox_profile, verbose); #else - std::cout << "WARNING: Firefox profile file exists but sqlite3-dev is not installed" << std::endl; + std::cout << "WARNING: Firefox profile file exists but sqlite is not installed" << std::endl; #endif } if (std::filesystem::exists(chrome_profile)) { #if defined(DROPOUT_DL_GCRYPT) & defined(DROPOUT_DL_SQLITE) return get_cookies_from_chrome(chrome_profile, verbose); #else - std::cout << "WARNING: Chrome profile file exists but libgcrypt or sqlite3-dev is not installed" << std::endl; + std::cout << "WARNING: Chrome profile file exists but libgcrypt or sqlite is not installed" << std::endl; #endif }