Skip to content

Commit 67bc322

Browse files
committed
Plugins::FtpServer: modify install QFtpServerLib in android
1 parent 0149769 commit 67bc322

File tree

2 files changed

+20
-7
lines changed

2 files changed

+20
-7
lines changed

App/Client/CMakeLists.txt

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,3 +180,21 @@ endif()
180180

181181
# Install QIcon theme
182182
INSTALL_ICON_THEME(SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/Resource/icons)
183+
184+
if(ANDROID)
185+
find_package(QFtpServerLib)
186+
if(QFtpServerLib_FOUND)
187+
get_target_property(QFtpServerLib_Location QFtpServerLib IMPORTED_LOCATION)
188+
list(APPEND android_extra_libs ${QFtpServerLib_Location})
189+
endif()
190+
find_package(Qt${QT_VERSION_MAJOR}Keychain)
191+
if(Qt${QT_VERSION_MAJOR}Keychain_FOUND)
192+
get_target_property(QtKeychain_Location Qt${QT_VERSION_MAJOR}Keychain::Qt${QT_VERSION_MAJOR}Keychain IMPORTED_LOCATION)
193+
list(APPEND android_extra_libs ${QtKeychain_Location})
194+
endif()
195+
message("QT_ANDROID_EXTRA_LIBS: ${android_extra_libs}")
196+
if(android_extra_libs)
197+
set_target_properties(${PROJECT_NAME} PROPERTIES
198+
QT_ANDROID_EXTRA_LIBS ${android_extra_libs})
199+
endif()
200+
endif()

Plugins/FtpServer/CMakeLists.txt

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -70,13 +70,8 @@ ADD_PLUGIN_TARGET(NAME PluginService${PROJECT_NAME}
7070
VERSION ${RabbitRemoteControl_VERSION}
7171
)
7272

73-
#add_dependencies(PluginService${PROJECT_NAME} QFtpServerLib)
73+
add_dependencies(PluginService${PROJECT_NAME} QFtpServerLib)
7474
option(INSTALL_QFtpServer "Install QFtpServer libraries" OFF)
7575
if(INSTALL_QFtpServer AND QFtpServerLib_FOUND)
76-
if(ANDROID)
77-
set_target_properties(PluginService${PROJECT_NAME} PROPERTIES
78-
QT_ANDROID_EXTRA_LIBS $<TARGET_SONAME_FILE:QFtpServerLib>)
79-
else()
80-
INSTALL_TARGETS(TARGETS QFtpServerLib)
81-
endif()
76+
INSTALL_TARGETS(NAME PluginService${PROJECT_NAME} TARGETS QFtpServerLib)
8277
endif()

0 commit comments

Comments
 (0)