CMake: Updated CMake to Check for sqlite and libgcrypt

This commit is contained in:
Moss 2022-09-29 17:14:32 -04:00
parent cd72083b69
commit 1926485b1a
2 changed files with 12 additions and 7 deletions

View File

@ -5,13 +5,18 @@ set(CMAKE_CXX_STANDARD 17)
add_executable(dropout-dl src/episode.cpp src/season.cpp src/series.cpp src/main.cpp) add_executable(dropout-dl src/episode.cpp src/season.cpp src/series.cpp src/main.cpp)
IF (EXISTS "firefox_profile") target_link_libraries(dropout-dl curl)
find_library(SQLITE3_FOUND sqlite3)
find_library(GCRYPT_FOUND gcrypt)
IF (SQLITE3_FOUND)
message(STATUS "sqlite3 found")
target_link_libraries(dropout-dl curl sqlite3) target_link_libraries(dropout-dl curl sqlite3)
add_compile_definitions(DROPOUT_DL_SQLITE) add_compile_definitions(DROPOUT_DL_SQLITE)
ELSEIF(EXISTS "chrome_profile") ENDIF()
target_link_libraries(dropout-dl curl sqlite3 gcrypt) IF(GCRYPT_FOUND)
add_compile_definitions(DROPOUT_DL_SQLITE DROPOUT_DL_GCRYPT) message(STATUS "libgcrypt found")
ELSE() target_link_libraries(dropout-dl gcrypt)
target_link_libraries(dropout-dl curl) add_compile_definitions(DROPOUT_DL_GCRYPT)
ENDIF() ENDIF()

View File

@ -19,7 +19,7 @@ sudo xbps-install -S libcurl sqlite-devel
#### Debian #### Debian
``` ```
sudo apt install libcurl sqlite-devel sudo apt install libcurl4-gnutls-dev sqlite-devel
``` ```
## cookies ## cookies