Skip to content

Commit ba84f58

Browse files
committed
Plugins::FtpServer: use FetchContent_Declare download source code
1 parent 1fc28d1 commit ba84f58

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

Plugins/FtpServer/CMakeLists.txt

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,19 @@ project(FtpServer
66

77
find_package(QFtpServerLib)
88
if(NOT QFtpServerLib_FOUND)
9-
return()
9+
# Fetch QFtpServer from GitHub
10+
include(FetchContent)
11+
FetchContent_Declare(
12+
QFtpServerLib
13+
GIT_REPOSITORY https://github.com/KangLin/QFtpServer.git
14+
GIT_TAG master # or specify a specific version/tag
15+
)
16+
17+
# Configure QFtpServer build options before making it available
18+
set(WITH_APP OFF CACHE BOOL "" FORCE)
19+
set(WITH_TEST OFF CACHE BOOL "" FORCE)
20+
21+
FetchContent_MakeAvailable(QFtpServerLib)
1022
endif()
1123

1224
option(INSTALL_QFtpServer "Install QFtpServer libraries" OFF)

0 commit comments

Comments
 (0)