2022-11-12 20:01:57 +00:00
|
|
|
set_property(GLOBAL PROPERTY AUTOGEN_SOURCE_GROUP "Generated Files")
|
|
|
|
|
2023-11-06 02:49:26 +00:00
|
|
|
# https://doc.qt.io/qt-6/macos.html#supported-versions
|
|
|
|
set(CMAKE_OSX_DEPLOYMENT_TARGET 11)
|
|
|
|
|
2023-01-01 19:49:48 +00:00
|
|
|
add_executable(${TR_NAME}-qt WIN32)
|
2014-12-01 19:55:22 +00:00
|
|
|
|
2023-01-01 19:49:48 +00:00
|
|
|
target_sources(${TR_NAME}-qt
|
|
|
|
PRIVATE
|
|
|
|
AboutDialog.cc
|
|
|
|
AboutDialog.h
|
|
|
|
AddData.cc
|
|
|
|
AddData.h
|
|
|
|
Application.cc
|
|
|
|
Application.h
|
|
|
|
BaseDialog.h
|
|
|
|
ColumnResizer.cc
|
|
|
|
ColumnResizer.h
|
|
|
|
ComInteropHelper.cc
|
|
|
|
ComInteropHelper.h
|
|
|
|
CustomVariantType.h
|
|
|
|
DBusInteropHelper.cc
|
|
|
|
DBusInteropHelper.h
|
|
|
|
DetailsDialog.cc
|
|
|
|
DetailsDialog.h
|
|
|
|
FaviconCache.cc
|
|
|
|
FileTreeDelegate.cc
|
|
|
|
FileTreeDelegate.h
|
|
|
|
FileTreeItem.cc
|
|
|
|
FileTreeItem.h
|
|
|
|
FileTreeModel.cc
|
|
|
|
FileTreeModel.h
|
|
|
|
FileTreeView.cc
|
|
|
|
FileTreeView.h
|
|
|
|
FilterBar.cc
|
|
|
|
FilterBar.h
|
|
|
|
FilterBarComboBox.cc
|
|
|
|
FilterBarComboBox.h
|
|
|
|
FilterBarComboBoxDelegate.cc
|
|
|
|
FilterBarComboBoxDelegate.h
|
|
|
|
Filters.cc
|
|
|
|
Filters.h
|
|
|
|
Formatter.cc
|
|
|
|
Formatter.h
|
|
|
|
FreeSpaceLabel.cc
|
|
|
|
FreeSpaceLabel.h
|
|
|
|
IconCache.cc
|
|
|
|
IconCache.h
|
|
|
|
IconToolButton.cc
|
|
|
|
IconToolButton.h
|
|
|
|
InteropHelper.cc
|
|
|
|
InteropHelper.h
|
|
|
|
InteropObject.cc
|
|
|
|
InteropObject.h
|
|
|
|
LicenseDialog.cc
|
|
|
|
LicenseDialog.h
|
|
|
|
MainWindow.cc
|
|
|
|
MainWindow.h
|
|
|
|
MakeDialog.cc
|
|
|
|
MakeDialog.h
|
|
|
|
OptionsDialog.cc
|
|
|
|
OptionsDialog.h
|
|
|
|
PathButton.cc
|
|
|
|
PathButton.h
|
|
|
|
Prefs.cc
|
|
|
|
Prefs.h
|
|
|
|
PrefsDialog.cc
|
|
|
|
PrefsDialog.h
|
|
|
|
RelocateDialog.cc
|
|
|
|
RelocateDialog.h
|
|
|
|
RpcClient.cc
|
|
|
|
RpcClient.h
|
|
|
|
RpcQueue.cc
|
|
|
|
RpcQueue.h
|
|
|
|
Session.cc
|
|
|
|
Session.h
|
|
|
|
SessionDialog.cc
|
|
|
|
SessionDialog.h
|
|
|
|
Speed.h
|
|
|
|
SqueezeLabel.cc
|
|
|
|
SqueezeLabel.h
|
|
|
|
StatsDialog.cc
|
|
|
|
StatsDialog.h
|
|
|
|
StyleHelper.cc
|
|
|
|
StyleHelper.h
|
|
|
|
Torrent.cc
|
|
|
|
Torrent.h
|
|
|
|
TorrentDelegate.cc
|
|
|
|
TorrentDelegate.h
|
|
|
|
TorrentDelegateMin.cc
|
|
|
|
TorrentDelegateMin.h
|
|
|
|
TorrentFilter.cc
|
|
|
|
TorrentFilter.h
|
|
|
|
TorrentModel.cc
|
|
|
|
TorrentModel.h
|
|
|
|
TorrentView.cc
|
|
|
|
TorrentView.h
|
|
|
|
TrackerDelegate.cc
|
|
|
|
TrackerDelegate.h
|
|
|
|
TrackerModel.cc
|
|
|
|
TrackerModel.h
|
|
|
|
TrackerModelFilter.cc
|
|
|
|
TrackerModelFilter.h
|
|
|
|
Typedefs.h
|
|
|
|
Utils.cc
|
|
|
|
Utils.h
|
|
|
|
VariantHelpers.cc
|
|
|
|
VariantHelpers.h
|
|
|
|
WatchDir.cc
|
|
|
|
WatchDir.h)
|
|
|
|
|
|
|
|
tr_allow_compile_if(
|
|
|
|
[=[[ENABLE_QT_COM_INTEROP]]=]
|
|
|
|
ComInteropHelper.cc
|
|
|
|
[=[[ENABLE_QT_DBUS_INTEROP]]=]
|
|
|
|
DBusInteropHelper.cc)
|
2015-12-16 20:01:03 +00:00
|
|
|
|
2023-01-01 19:49:48 +00:00
|
|
|
target_sources(${TR_NAME}-qt
|
|
|
|
PRIVATE
|
|
|
|
AboutDialog.ui
|
|
|
|
DetailsDialog.ui
|
|
|
|
LicenseDialog.ui
|
|
|
|
MainWindow.ui
|
|
|
|
MakeDialog.ui
|
|
|
|
MakeProgressDialog.ui
|
|
|
|
OptionsDialog.ui
|
|
|
|
PrefsDialog.ui
|
|
|
|
RelocateDialog.ui
|
|
|
|
SessionDialog.ui
|
|
|
|
StatsDialog.ui
|
|
|
|
TrackersDialog.ui)
|
2014-12-01 19:55:22 +00:00
|
|
|
|
2023-01-01 19:49:48 +00:00
|
|
|
source_group(Ui
|
|
|
|
REGULAR_EXPRESSION [[.*\.ui$]])
|
2022-11-12 20:01:57 +00:00
|
|
|
|
2023-01-01 19:49:48 +00:00
|
|
|
target_sources(${TR_NAME}-qt
|
|
|
|
PRIVATE
|
|
|
|
application.qrc)
|
2014-12-01 19:55:22 +00:00
|
|
|
|
2015-01-04 02:14:58 +00:00
|
|
|
if(WIN32 OR APPLE)
|
2023-01-01 19:49:48 +00:00
|
|
|
target_sources(${TR_NAME}-qt
|
|
|
|
PRIVATE
|
|
|
|
icons/Faenza/Faenza.qrc)
|
2015-01-04 02:14:58 +00:00
|
|
|
endif()
|
|
|
|
|
2023-01-01 19:49:48 +00:00
|
|
|
source_group(Resources
|
|
|
|
REGULAR_EXPRESSION [[.*\.qrc$]])
|
2014-12-01 19:55:22 +00:00
|
|
|
|
2023-01-01 19:49:48 +00:00
|
|
|
set(LINGUAS
|
2019-03-13 20:35:16 +00:00
|
|
|
af
|
|
|
|
ca
|
|
|
|
da
|
2015-08-10 20:43:26 +00:00
|
|
|
de
|
2019-03-13 20:35:16 +00:00
|
|
|
el
|
2014-12-01 19:55:22 +00:00
|
|
|
en
|
|
|
|
es
|
|
|
|
eu
|
2020-05-14 16:17:11 +00:00
|
|
|
fi
|
2014-12-01 19:55:22 +00:00
|
|
|
fr
|
2023-12-29 15:16:07 +00:00
|
|
|
he
|
2014-12-01 19:55:22 +00:00
|
|
|
hu
|
2015-08-10 20:43:26 +00:00
|
|
|
id
|
2023-12-29 15:16:07 +00:00
|
|
|
is
|
|
|
|
it
|
2020-05-02 10:26:24 +00:00
|
|
|
ja
|
2017-01-26 20:14:00 +00:00
|
|
|
ka
|
2014-12-01 19:55:22 +00:00
|
|
|
kk
|
2015-12-12 18:14:15 +00:00
|
|
|
ko
|
2014-12-01 19:55:22 +00:00
|
|
|
lt
|
2019-03-13 20:35:16 +00:00
|
|
|
nb
|
2017-01-26 20:14:00 +00:00
|
|
|
nl
|
2017-05-19 20:11:06 +00:00
|
|
|
pl
|
2022-02-21 21:38:32 +00:00
|
|
|
pt
|
2014-12-01 19:55:22 +00:00
|
|
|
pt_BR
|
2017-05-19 21:13:57 +00:00
|
|
|
pt_PT
|
2014-12-01 19:55:22 +00:00
|
|
|
ru
|
2019-03-13 20:35:16 +00:00
|
|
|
sl
|
2017-01-26 20:14:00 +00:00
|
|
|
sv
|
2017-05-19 18:49:04 +00:00
|
|
|
tr
|
2014-12-01 19:55:22 +00:00
|
|
|
uk
|
2023-12-29 15:16:07 +00:00
|
|
|
zh_CN
|
|
|
|
zh_TW)
|
2014-12-01 19:55:22 +00:00
|
|
|
|
|
|
|
if(ENABLE_NLS)
|
2023-01-01 19:49:48 +00:00
|
|
|
set(ENABLED_LINGUAS ${LINGUAS})
|
2014-12-01 19:55:22 +00:00
|
|
|
else()
|
2023-01-01 19:49:48 +00:00
|
|
|
set(ENABLED_LINGUAS)
|
2014-12-01 19:55:22 +00:00
|
|
|
endif()
|
|
|
|
|
2023-01-01 19:49:48 +00:00
|
|
|
set(TS_FILES)
|
|
|
|
foreach(LANG ${ENABLED_LINGUAS})
|
|
|
|
list(APPEND TS_FILES translations/transmission_${LANG}.ts)
|
2014-12-01 19:55:22 +00:00
|
|
|
endforeach()
|
|
|
|
|
2023-01-01 19:49:48 +00:00
|
|
|
if(TS_FILES)
|
|
|
|
tr_qt_add_translation(QM_FILES ${TS_FILES})
|
2014-12-01 19:55:22 +00:00
|
|
|
endif()
|
|
|
|
|
2023-01-01 19:49:48 +00:00
|
|
|
target_sources(${TR_NAME}-qt
|
|
|
|
PRIVATE
|
|
|
|
${QM_FILES})
|
2015-04-14 22:46:40 +00:00
|
|
|
|
2015-12-17 18:10:43 +00:00
|
|
|
if(ENABLE_QT_COM_INTEROP)
|
2023-01-01 19:49:48 +00:00
|
|
|
tr_target_idl_files(${TR_NAME}-qt
|
|
|
|
transmission-qt.idl)
|
2015-12-16 20:01:03 +00:00
|
|
|
endif()
|
|
|
|
|
2023-01-01 19:49:48 +00:00
|
|
|
target_include_directories(${TR_NAME}-qt
|
|
|
|
PRIVATE
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR})
|
|
|
|
|
2014-12-01 19:55:22 +00:00
|
|
|
target_link_libraries(${TR_NAME}-qt
|
2023-01-01 19:49:48 +00:00
|
|
|
PRIVATE
|
|
|
|
${TR_NAME}
|
2023-01-02 16:23:51 +00:00
|
|
|
transmission::qt_impl)
|
2014-12-01 19:55:22 +00:00
|
|
|
|
2023-01-01 19:49:48 +00:00
|
|
|
target_compile_definitions(${TR_NAME}-qt
|
|
|
|
PRIVATE
|
|
|
|
"TRANSLATIONS_DIR=\"${CMAKE_INSTALL_FULL_DATADIR}/${TR_NAME}/translations\""
|
|
|
|
QT_NO_CAST_FROM_ASCII
|
|
|
|
$<$<BOOL:${ENABLE_QT_COM_INTEROP}>:ENABLE_COM_INTEROP>
|
|
|
|
$<$<BOOL:${ENABLE_QT_DBUS_INTEROP}>:ENABLE_DBUS_INTEROP>)
|
2015-12-16 20:01:03 +00:00
|
|
|
|
2015-01-04 10:57:09 +00:00
|
|
|
if(MSVC)
|
|
|
|
tr_append_target_property(${TR_NAME}-qt LINK_FLAGS "/ENTRY:mainCRTStartup")
|
|
|
|
endif()
|
|
|
|
|
2023-01-01 19:49:48 +00:00
|
|
|
set_target_properties(
|
|
|
|
${TR_NAME}-qt
|
|
|
|
PROPERTIES
|
|
|
|
AUTOMOC ON
|
|
|
|
AUTORCC ON
|
|
|
|
AUTOUIC ON)
|
|
|
|
|
|
|
|
tr_win32_app_info(${TR_NAME}-qt
|
|
|
|
"Transmission Qt Client"
|
|
|
|
"transmission-qt"
|
|
|
|
"transmission-qt.exe"
|
|
|
|
"qtr.ico")
|
2014-12-01 19:55:22 +00:00
|
|
|
|
2023-01-01 19:49:48 +00:00
|
|
|
install(
|
|
|
|
TARGETS ${TR_NAME}-qt
|
|
|
|
DESTINATION ${CMAKE_INSTALL_BINDIR})
|
2014-12-01 19:55:22 +00:00
|
|
|
|
|
|
|
if(INSTALL_DOC)
|
2023-01-01 19:49:48 +00:00
|
|
|
install(
|
|
|
|
FILES ${TR_NAME}-qt.1
|
|
|
|
DESTINATION ${CMAKE_INSTALL_MANDIR}/man1)
|
2014-12-01 19:55:22 +00:00
|
|
|
endif()
|
|
|
|
|
2023-01-01 19:49:48 +00:00
|
|
|
install(
|
|
|
|
FILES transmission-qt.desktop
|
|
|
|
DESTINATION ${CMAKE_INSTALL_DATADIR}/applications)
|
2014-12-22 01:08:19 +00:00
|
|
|
|
|
|
|
if(ENABLE_NLS)
|
2023-01-01 19:49:48 +00:00
|
|
|
install(
|
|
|
|
FILES ${QM_FILES}
|
|
|
|
DESTINATION ${CMAKE_INSTALL_DATADIR}/${TR_NAME}/translations)
|
2014-12-22 01:08:19 +00:00
|
|
|
endif()
|
2016-04-02 18:01:01 +00:00
|
|
|
|
|
|
|
if(WIN32)
|
2023-01-01 19:49:48 +00:00
|
|
|
file(GENERATE
|
|
|
|
OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/dist-qt.conf"
|
|
|
|
CONTENT "")
|
|
|
|
install(
|
|
|
|
FILES "${CMAKE_CURRENT_BINARY_DIR}/dist-qt.conf"
|
|
|
|
DESTINATION ${CMAKE_INSTALL_SYSCONFDIR}
|
|
|
|
RENAME qt.conf)
|
2016-04-02 18:01:01 +00:00
|
|
|
endif()
|