Skip to content

Commit f361029

Browse files
committed
Plugins::FtpServer: use FetchContent_Declare download source code
1 parent d748c81 commit f361029

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

Plugins/FtpServer/CMakeLists.txt

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,18 @@ 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+
FetchContent_MakeAvailable(QFtpServerLib)
1021
endif()
1122

1223
option(INSTALL_QFtpServer "Install QFtpServer libraries" OFF)

0 commit comments

Comments
 (0)