mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-30 19:40:18 -07:00
Install required plugins into bundle
Install platform and svg plugins into bundle. Update dependencies in Travis.
This commit is contained in:
parent
b3004ac28b
commit
c614c66535
8 changed files with 404 additions and 28 deletions
|
@ -13,7 +13,7 @@ find_package(LibtorrentRasterbar REQUIRED)
|
|||
# Qt
|
||||
list(APPEND QBT_QT_COMPONENTS Core Network Xml)
|
||||
if (GUI)
|
||||
list (APPEND QBT_QT_COMPONENTS Concurrent Gui Widgets)
|
||||
list (APPEND QBT_QT_COMPONENTS Concurrent Gui Svg Widgets)
|
||||
if (WIN32)
|
||||
list (APPEND QBT_QT_COMPONENTS WinExtras)
|
||||
endif(WIN32)
|
||||
|
@ -75,13 +75,6 @@ set(QBT_USE_WEBUI ${WEBUI})
|
|||
|
||||
configure_file(config.h.cmakein ${CMAKE_CURRENT_BINARY_DIR}/config.h)
|
||||
|
||||
if (GUI)
|
||||
set(QBT_TARGET_NAME qbittorrent)
|
||||
else (GUI)
|
||||
set(QBT_TARGET_NAME qbittorrent-nox)
|
||||
endif (GUI)
|
||||
|
||||
|
||||
if (SYSTEM_QTSINGLEAPPLICATION)
|
||||
find_package(QtSingleApplication REQUIRED)
|
||||
else (SYSTEM_QTSINGLEAPPLICATION)
|
||||
|
|
|
@ -142,39 +142,50 @@ if (APPLE)
|
|||
PROPERTIES MACOSX_PACKAGE_LOCATION translations)
|
||||
endif (APPLE)
|
||||
|
||||
add_executable(${QBT_TARGET_NAME} ${QBT_APP_HEADERS} ${QBT_APP_SOURCES} ${QBT_QM_FILES} ${QBT_APP_RESOURCE_SOURCE})
|
||||
set_target_properties(${QBT_TARGET_NAME}
|
||||
add_executable(qBittorrent ${QBT_APP_HEADERS} ${QBT_APP_SOURCES} ${QBT_QM_FILES} ${QBT_APP_RESOURCE_SOURCE})
|
||||
if (GUI)
|
||||
set_target_properties(qBittorrent
|
||||
PROPERTIES
|
||||
OUTPUT_NAME qbittorrent
|
||||
WIN32_EXECUTABLE True
|
||||
)
|
||||
else (GUI)
|
||||
set_target_properties(qBittorrent
|
||||
PROPERTIES
|
||||
OUTPUT_NAME qbittorrent-nox
|
||||
)
|
||||
endif (GUI)
|
||||
|
||||
set_target_properties(qBittorrent
|
||||
PROPERTIES
|
||||
AUTOUIC True
|
||||
AUTORCC True
|
||||
MACOSX_BUNDLE True
|
||||
)
|
||||
|
||||
if (GUI AND WIN32)
|
||||
set_target_properties(${QBT_TARGET_NAME} PROPERTIES WIN32_EXECUTABLE True)
|
||||
endif (GUI AND WIN32)
|
||||
get_target_property(QBT_EXECUTABLE_NAME qBittorrent OUTPUT_NAME)
|
||||
|
||||
target_link_libraries(${QBT_TARGET_NAME} ${QBT_TARGET_LIBRARIES} QtSingleApplication::QtSingleApplication)
|
||||
target_link_libraries(qBittorrent ${QBT_TARGET_LIBRARIES} QtSingleApplication::QtSingleApplication)
|
||||
|
||||
if (APPLE)
|
||||
set(qbt_BUNDLE_NAME "${QBT_TARGET_NAME}")
|
||||
set(qbt_BUNDLE_NAME ${QBT_EXECUTABLE_NAME})
|
||||
|
||||
# substitute @EXECUTABLE@ in dist/mac/Info.plist
|
||||
set(EXECUTABLE ${qbt_BUNDLE_NAME})
|
||||
configure_file(${qBittorrent_SOURCE_DIR}/dist/mac/Info.plist ${qBittorrent_BINARY_DIR}/dist/mac/Info.plist @ONLY)
|
||||
|
||||
set_target_properties(${QBT_TARGET_NAME} PROPERTIES
|
||||
set_target_properties(qBittorrent PROPERTIES
|
||||
MACOSX_BUNDLE_BUNDLE_NAME "${qbt_BUNDLE_NAME}"
|
||||
MACOSX_BUNDLE_INFO_PLIST ${qBittorrent_BINARY_DIR}/dist/mac/Info.plist
|
||||
)
|
||||
endif (APPLE)
|
||||
|
||||
# installation
|
||||
install(TARGETS ${QBT_TARGET_NAME}
|
||||
install(TARGETS qBittorrent
|
||||
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||
BUNDLE DESTINATION .
|
||||
COMPONENT runtime)
|
||||
|
||||
if (APPLE AND GUI)
|
||||
install(SCRIPT ${OSX_RES_SRC_DIR}/bundle.cmake)
|
||||
endif (APPLE AND GUI)
|
||||
if (GUI AND APPLE)
|
||||
include(bundle)
|
||||
endif (GUI AND APPLE)
|
||||
|
|
|
@ -23,7 +23,7 @@ nogui {
|
|||
DEFINES += DISABLE_GUI
|
||||
TARGET = qbittorrent-nox
|
||||
} else {
|
||||
QT += xml concurrent widgets
|
||||
QT += xml concurrent svg widgets
|
||||
CONFIG(static) {
|
||||
DEFINES += QBT_STATIC_QT
|
||||
QTPLUGIN += qico
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue