2022-09-11 00:19:41 +00:00
|
|
|
cmake_minimum_required(VERSION 3.23)
|
2022-09-11 17:21:24 +00:00
|
|
|
project(dropout-dl)
|
2022-09-11 00:19:41 +00:00
|
|
|
|
|
|
|
set(CMAKE_CXX_STANDARD 17)
|
|
|
|
|
2022-10-01 19:07:40 +00:00
|
|
|
|
|
|
|
IF(DROPOUT_DL_BUILD_ALL)
|
2023-02-05 19:33:25 +00:00
|
|
|
add_executable(dropout-dl-minimal
|
|
|
|
src/login.cpp
|
|
|
|
src/episode.cpp
|
|
|
|
src/season.cpp
|
|
|
|
src/series.cpp
|
|
|
|
src/util.cpp
|
|
|
|
src/main.cpp)
|
2022-10-01 19:07:40 +00:00
|
|
|
|
|
|
|
target_link_libraries(dropout-dl-minimal curl)
|
|
|
|
|
|
|
|
|
2023-02-05 19:33:25 +00:00
|
|
|
add_executable(dropout-dl-sqlite
|
|
|
|
src/cookie.cpp
|
|
|
|
src/login.cpp
|
|
|
|
src/episode.cpp
|
|
|
|
src/season.cpp
|
|
|
|
src/series.cpp
|
|
|
|
src/util.cpp
|
|
|
|
src/main.cpp)
|
2022-10-01 19:07:40 +00:00
|
|
|
|
|
|
|
target_link_libraries(dropout-dl-sqlite curl sqlite3)
|
|
|
|
|
|
|
|
target_compile_definitions(dropout-dl-sqlite PUBLIC DROPOUT_DL_SQLITE)
|
|
|
|
|
|
|
|
|
2023-02-05 19:33:25 +00:00
|
|
|
add_executable(dropout-dl-full
|
|
|
|
src/cookie.cpp
|
|
|
|
src/login.cpp
|
|
|
|
src/episode.cpp
|
|
|
|
src/season.cpp
|
|
|
|
src/series.cpp
|
|
|
|
src/util.cpp
|
|
|
|
src/main.cpp)
|
2022-10-01 19:07:40 +00:00
|
|
|
|
|
|
|
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()
|
|
|
|
|
2023-02-05 19:33:25 +00:00
|
|
|
add_executable(dropout-dl
|
|
|
|
src/cookie.cpp
|
|
|
|
src/login.cpp
|
|
|
|
src/episode.cpp
|
|
|
|
src/season.cpp
|
|
|
|
src/series.cpp
|
|
|
|
src/util.cpp
|
|
|
|
src/main.cpp)
|
2022-09-11 00:19:41 +00:00
|
|
|
|
2022-09-29 21:14:32 +00:00
|
|
|
target_link_libraries(dropout-dl curl)
|
|
|
|
|
|
|
|
find_library(SQLITE3_FOUND sqlite3)
|
|
|
|
find_library(GCRYPT_FOUND gcrypt)
|
|
|
|
IF (SQLITE3_FOUND)
|
|
|
|
message(STATUS "sqlite3 found")
|
2022-10-01 18:30:08 +00:00
|
|
|
target_link_libraries(dropout-dl sqlite3)
|
2022-09-29 00:02:10 +00:00
|
|
|
add_compile_definitions(DROPOUT_DL_SQLITE)
|
2022-09-29 21:14:32 +00:00
|
|
|
ENDIF()
|
|
|
|
IF(GCRYPT_FOUND)
|
|
|
|
message(STATUS "libgcrypt found")
|
|
|
|
target_link_libraries(dropout-dl gcrypt)
|
|
|
|
add_compile_definitions(DROPOUT_DL_GCRYPT)
|
2022-09-29 00:02:10 +00:00
|
|
|
ENDIF()
|
2022-10-01 18:30:08 +00:00
|
|
|
IF(DROPOUT_DL_TESTS)
|
2022-09-30 21:31:22 +00:00
|
|
|
add_subdirectory(tests)
|
2022-10-01 18:30:08 +00:00
|
|
|
ENDIF()
|
2022-10-01 19:07:40 +00:00
|
|
|
|
2023-02-05 19:33:25 +00:00
|
|
|
ENDIF()
|