CMake: Added 'DROPOUT_DL_TESTS' Option

If not set tests will not be build.
This commit is contained in:
Moss 2022-10-01 14:30:08 -04:00
parent 701c98291b
commit 178a803fb6
1 changed files with 3 additions and 4 deletions

View File

@ -11,7 +11,7 @@ find_library(SQLITE3_FOUND sqlite3)
find_library(GCRYPT_FOUND gcrypt) find_library(GCRYPT_FOUND gcrypt)
IF (SQLITE3_FOUND) IF (SQLITE3_FOUND)
message(STATUS "sqlite3 found") message(STATUS "sqlite3 found")
target_link_libraries(dropout-dl curl sqlite3) target_link_libraries(dropout-dl sqlite3)
add_compile_definitions(DROPOUT_DL_SQLITE) add_compile_definitions(DROPOUT_DL_SQLITE)
ENDIF() ENDIF()
IF(GCRYPT_FOUND) IF(GCRYPT_FOUND)
@ -19,7 +19,6 @@ IF(GCRYPT_FOUND)
target_link_libraries(dropout-dl gcrypt) target_link_libraries(dropout-dl gcrypt)
add_compile_definitions(DROPOUT_DL_GCRYPT) add_compile_definitions(DROPOUT_DL_GCRYPT)
ENDIF() ENDIF()
IF(DROPOUT_DL_TESTS)
# IF(DROPOUT_BUILD_TESTS)
add_subdirectory(tests) add_subdirectory(tests)
# ENDIF() ENDIF()