Files
tongtong eb3df9aa3d Add FTP and magnet backends, tracker and proxy settings, and organize client modules
Integrate pinned libcurl, libtorrent and static OpenSSL dependencies with license notices. Enable verified HTTPS trackers and authenticated HTTP/SOCKS5 proxies, add tracker TXT import without arbitrary list caps, and allow resizing the main window.

Organize client sources by responsibility and update Visual Studio projects, filters and tests. Debug and Release builds passed, along with UI, HTTP, tracker import and browser bridge regressions. Full protocol tests have an unresolved intermittent HTTPS tracker wait timeout; Windows 7 runtime validation remains outstanding.
2026-11-27 11:28:30 +08:00

41 lines
2.0 KiB
CMake

cmake_minimum_required(VERSION 3.20)
project(TTDownloaderDependencies LANGUAGES C CXX)
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
add_compile_definitions(_WIN32_WINNT=0x0601 WINVER=0x0601 NOMINMAX)
set(BUILD_SHARED_LIBS OFF CACHE BOOL "" FORCE)
set(static_runtime ON CACHE BOOL "" FORCE)
set(BOOST_ROOT "${CMAKE_CURRENT_SOURCE_DIR}/boost_1_86_0")
set(Boost_NO_BOOST_CMAKE ON)
set(CMAKE_DISABLE_FIND_PACKAGE_OpenSSL FALSE)
set(OPENSSL_USE_STATIC_LIBS TRUE)
set(OPENSSL_MSVC_STATIC_RT TRUE)
set(OPENSSL_ROOT_DIR "${CMAKE_CURRENT_SOURCE_DIR}/openssl/Release")
set(OPENSSL_INCLUDE_DIR "${OPENSSL_ROOT_DIR}/include")
set(OPENSSL_SSL_LIBRARY "${OPENSSL_ROOT_DIR}/lib/libssl.lib")
set(OPENSSL_CRYPTO_LIBRARY "${OPENSSL_ROOT_DIR}/lib/libcrypto.lib")
set(build_tests OFF CACHE BOOL "" FORCE)
set(build_examples OFF CACHE BOOL "" FORCE)
add_subdirectory(libtorrent-rasterbar-2.0.11)
target_compile_options(torrent-rasterbar PRIVATE /MP4)
get_directory_property(lt_definitions DIRECTORY libtorrent-rasterbar-2.0.11 COMPILE_DEFINITIONS)
list(REMOVE_ITEM lt_definitions "_WIN32_WINNT=0x0A00")
set_property(DIRECTORY libtorrent-rasterbar-2.0.11 PROPERTY COMPILE_DEFINITIONS "${lt_definitions}")
set(BUILD_CURL_EXE OFF CACHE BOOL "" FORCE)
set(BUILD_TESTING OFF CACHE BOOL "" FORCE)
set(BUILD_EXAMPLES OFF CACHE BOOL "" FORCE)
set(CURL_STATIC_CRT ON CACHE BOOL "" FORCE)
set(CURL_TARGET_WINDOWS_VERSION 0x0601 CACHE STRING "" FORCE)
set(CURL_USE_SCHANNEL ON CACHE BOOL "" FORCE)
set(CURL_USE_OPENSSL OFF CACHE BOOL "" FORCE)
set(CURL_USE_LIBPSL OFF CACHE BOOL "" FORCE)
set(CURL_ZLIB OFF CACHE BOOL "" FORCE)
set(CURL_BROTLI OFF CACHE BOOL "" FORCE)
set(CURL_ZSTD OFF CACHE BOOL "" FORCE)
set(CURL_DISABLE_LDAP ON CACHE BOOL "" FORCE)
set(CURL_DISABLE_LDAPS ON CACHE BOOL "" FORCE)
set(HTTP_ONLY OFF CACHE BOOL "" FORCE)
add_subdirectory(curl-8.23.0)
set_target_properties(torrent-rasterbar libcurl_static PROPERTIES ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib")