mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-21 07:57:22 -06:00
add basic cmake support
This commit is contained in:
committed by
Eugene Shalygin
parent
654c8edc6b
commit
64daecb266
128
src/gui/CMakeLists.txt
Normal file
128
src/gui/CMakeLists.txt
Normal file
@@ -0,0 +1,128 @@
|
||||
set(CMAKE_AUTORCC True)
|
||||
set(CMAKE_AUTOUIC True)
|
||||
|
||||
include_directories(${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
|
||||
add_subdirectory(lineedit)
|
||||
add_subdirectory(properties)
|
||||
add_subdirectory(powermanagement)
|
||||
add_subdirectory(rss)
|
||||
add_subdirectory(search)
|
||||
if (UNIX AND NOT APPLE AND DBUS)
|
||||
add_subdirectory(qtnotify)
|
||||
include_directories(qtnotify)
|
||||
list(APPEND QBT_GUI_OPTIONAL_LINK_LIBRARIES qbt_qtnotify)
|
||||
endif (UNIX AND NOT APPLE AND DBUS)
|
||||
|
||||
include_directories(
|
||||
${CMAKE_CURRENT_BINARY_DIR}/properties
|
||||
${CMAKE_CURRENT_BINARY_DIR}/rss
|
||||
${CMAKE_CURRENT_BINARY_DIR}/search
|
||||
lineedit/src
|
||||
powermanagement
|
||||
properties
|
||||
rss
|
||||
../app
|
||||
)
|
||||
|
||||
set(QBT_GUI_HEADERS
|
||||
about_imp.h
|
||||
addnewtorrentdialog.h
|
||||
advancedsettings.h
|
||||
advancedsettings.h
|
||||
autoexpandabledialog.h
|
||||
deletionconfirmationdlg.h
|
||||
downloadfromurldlg.h
|
||||
executionlog.h
|
||||
guiiconprovider.h
|
||||
hidabletabwidget.h
|
||||
ico.h
|
||||
loglistwidget.h
|
||||
mainwindow.h
|
||||
messageboxraised.h
|
||||
options_imp.h
|
||||
previewlistdelegate.h
|
||||
previewselect.h
|
||||
scanfoldersdelegate.h
|
||||
shutdownconfirm.h
|
||||
speedlimitdlg.h
|
||||
statsdialog.h
|
||||
statusbar.h
|
||||
torrentcontentfiltermodel.h
|
||||
torrentcontentmodel.h
|
||||
torrentcontentmodelfile.h
|
||||
torrentcontentmodelfolder.h
|
||||
torrentcontentmodelitem.h
|
||||
torrentcontenttreeview.h
|
||||
torrentcreatordlg.h
|
||||
torrentimportdlg.h
|
||||
torrentmodel.h
|
||||
trackerlogin.h
|
||||
transferlistdelegate.h
|
||||
transferlistfilterswidget.h
|
||||
transferlistsortmodel.h
|
||||
transferlistwidget.h
|
||||
updownratiodlg.h
|
||||
)
|
||||
|
||||
set(QBT_GUI_SOURCES
|
||||
addnewtorrentdialog.cpp
|
||||
advancedsettings.cpp
|
||||
autoexpandabledialog.cpp
|
||||
executionlog.cpp
|
||||
guiiconprovider.cpp
|
||||
ico.cpp
|
||||
loglistwidget.cpp
|
||||
mainwindow.cpp
|
||||
messageboxraised.cpp
|
||||
options_imp.cpp
|
||||
previewselect.cpp
|
||||
scanfoldersdelegate.cpp
|
||||
shutdownconfirm.cpp
|
||||
speedlimitdlg.cpp
|
||||
statsdialog.cpp
|
||||
statusbar.cpp
|
||||
torrentcontentfiltermodel.cpp
|
||||
torrentcontentmodel.cpp
|
||||
torrentcontentmodelfile.cpp
|
||||
torrentcontentmodelfolder.cpp
|
||||
torrentcontentmodelitem.cpp
|
||||
torrentcontenttreeview.cpp
|
||||
torrentcreatordlg.cpp
|
||||
torrentimportdlg.cpp
|
||||
torrentmodel.cpp
|
||||
trackerlogin.cpp
|
||||
transferlistdelegate.cpp
|
||||
transferlistfilterswidget.cpp
|
||||
transferlistsortmodel.cpp
|
||||
transferlistwidget.cpp
|
||||
updownratiodlg.cpp
|
||||
)
|
||||
|
||||
if (WIN32 OR APPLE)
|
||||
list(APPEND QBT_GUI_HEADERS programupdater.h)
|
||||
list(APPEND QBT_GUI_SOURCES programupdater.cpp)
|
||||
endif (WIN32 OR APPLE)
|
||||
|
||||
set(QBT_GUI_FORMS
|
||||
mainwindow.ui
|
||||
about.ui
|
||||
preview.ui
|
||||
login.ui
|
||||
downloadfromurldlg.ui
|
||||
bandwidth_limit.ui
|
||||
updownratiodlg.ui
|
||||
confirmdeletiondlg.ui
|
||||
torrentimportdlg.ui
|
||||
executionlog.ui
|
||||
addnewtorrentdialog.ui
|
||||
autoexpandabledialog.ui
|
||||
statsdialog.ui
|
||||
options.ui
|
||||
torrentcreatordlg.ui
|
||||
)
|
||||
|
||||
set(QBT_GUI_RESOURCES about.qrc)
|
||||
|
||||
add_library(qbt_gui STATIC ${QBT_GUI_HEADERS} ${QBT_GUI_SOURCES} ${QBT_GUI_RESOURCES})
|
||||
target_link_libraries(qbt_gui qbt_lineedit qbt_powermanagement qbt_rss qbt_properties qbt_searchengine ${QBT_GUI_OPTIONAL_LINK_LIBRARIES} qbt_base)
|
||||
18
src/gui/lineedit/CMakeLists.txt
Normal file
18
src/gui/lineedit/CMakeLists.txt
Normal file
@@ -0,0 +1,18 @@
|
||||
set(QBT_LINEEDIT_SOURCES
|
||||
src/lineedit.cpp
|
||||
)
|
||||
|
||||
set(QBT_LINEEDIT_HEADERS
|
||||
src/lineedit.h
|
||||
)
|
||||
|
||||
set(QBT_LINEEDIT_RESOURCES
|
||||
resources/lineeditimages.qrc
|
||||
)
|
||||
|
||||
add_library(qbt_lineedit STATIC ${QBT_LINEEDIT_SOURCES} ${QBT_LINEEDIT_HEADERS} ${QBT_LINEEDIT_RESOURCES})
|
||||
if (QT4_FOUND)
|
||||
target_link_libraries(qbt_lineedit Qt4::QtGui)
|
||||
else (QT4_FOUND)
|
||||
target_link_libraries(qbt_lineedit Qt5::Widgets)
|
||||
endif (QT4_FOUND)
|
||||
25
src/gui/powermanagement/CMakeLists.txt
Normal file
25
src/gui/powermanagement/CMakeLists.txt
Normal file
@@ -0,0 +1,25 @@
|
||||
set(QBT_POWERMANAGEMENT_HEADERS
|
||||
powermanagement.h
|
||||
)
|
||||
|
||||
set(QBT_POWERMANAGEMENT_SOURCES
|
||||
powermanagement.cpp
|
||||
)
|
||||
|
||||
if (UNIX AND DBUS)
|
||||
find_package(X11)
|
||||
if (X11_FOUND)
|
||||
list(APPEND QBT_POWERMANAGEMENT_HEADERS powermanagement_x11.h)
|
||||
list(APPEND QBT_POWERMANAGEMENT_SOURCES powermanagement_x11.cpp)
|
||||
endif (X11_FOUND)
|
||||
endif (UNIX AND DBUS)
|
||||
|
||||
add_library(qbt_powermanagement STATIC ${QBT_POWERMANAGEMENT_SOURCES} ${QBT_POWERMANAGEMENT_HEADERS})
|
||||
set_target_properties(qbt_powermanagement PROPERTIES AUTOUIC False AUTORCC False)
|
||||
target_link_qt_components(qbt_powermanagement Core)
|
||||
if (X11_FOUND)
|
||||
target_link_qt_components(qbt_powermanagement DBus)
|
||||
endif (X11_FOUND)
|
||||
if (WIN32)
|
||||
target_link_libraries(qbt_powermanagement PowrProf)
|
||||
endif (WIN32)
|
||||
47
src/gui/properties/CMakeLists.txt
Normal file
47
src/gui/properties/CMakeLists.txt
Normal file
@@ -0,0 +1,47 @@
|
||||
include_directories(
|
||||
${CMAKE_CURRENT_BINARY_DIR}
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
../lineedit/src/
|
||||
)
|
||||
|
||||
set(QBT_PROPERTIES_FORMS
|
||||
propertieswidget.ui
|
||||
trackersadditiondlg.ui
|
||||
peersadditiondlg.ui
|
||||
)
|
||||
|
||||
set(QBT_PROPERTIES_HEADERS
|
||||
propertieswidget.h
|
||||
peerlistwidget.h
|
||||
proplistdelegate.h
|
||||
trackerlist.h
|
||||
downloadedpiecesbar.h
|
||||
peerlistdelegate.h
|
||||
peerlistsortmodel.h
|
||||
peersadditiondlg.h
|
||||
trackersadditiondlg.h
|
||||
pieceavailabilitybar.h
|
||||
proptabbar.h
|
||||
speedwidget.h
|
||||
speedplotview.h
|
||||
)
|
||||
|
||||
set(QBT_PROPERTIES_SOURCES
|
||||
propertieswidget.cpp
|
||||
proplistdelegate.cpp
|
||||
peerlistwidget.cpp
|
||||
trackerlist.cpp
|
||||
peersadditiondlg.cpp
|
||||
downloadedpiecesbar.cpp
|
||||
trackersadditiondlg.cpp
|
||||
pieceavailabilitybar.cpp
|
||||
proptabbar.cpp
|
||||
speedwidget.cpp
|
||||
speedplotview.cpp
|
||||
)
|
||||
|
||||
add_library(qbt_properties STATIC ${QBT_PROPERTIES_HEADERS} ${QBT_PROPERTIES_SOURCES})
|
||||
target_link_libraries(qbt_properties qbt_base)
|
||||
if (NOT QT4_FOUND)
|
||||
target_link_libraries(qbt_properties Qt5::Widgets Qt5::Concurrent)
|
||||
endif (NOT QT4_FOUND)
|
||||
11
src/gui/qtnotify/CMakeLists.txt
Normal file
11
src/gui/qtnotify/CMakeLists.txt
Normal file
@@ -0,0 +1,11 @@
|
||||
set(QBT_QTNOTIFY_SOURCES
|
||||
notifications.cpp
|
||||
)
|
||||
|
||||
set(QBT_QTNOTIFY_HEADERS
|
||||
notifications.h
|
||||
)
|
||||
|
||||
add_library(qbt_qtnotify STATIC ${QBT_QTNOTIFY_SOURCES} ${QBT_QTNOTIFY_HEADERS})
|
||||
set_target_properties(qbt_qtnotify PROPERTIES AUTOUIC False AUTORCC False)
|
||||
target_link_qt_components(qbt_qtnotify DBus)
|
||||
33
src/gui/rss/CMakeLists.txt
Normal file
33
src/gui/rss/CMakeLists.txt
Normal file
@@ -0,0 +1,33 @@
|
||||
include_directories(${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
|
||||
set(QBT_RSS_HEADERS
|
||||
automatedrssdownloader.h
|
||||
cookiesdlg.h
|
||||
feedlistwidget.h
|
||||
htmlbrowser.h
|
||||
rss_imp.h
|
||||
rsssettingsdlg.h
|
||||
)
|
||||
|
||||
set(QBT_RSS_SOURCE
|
||||
automatedrssdownloader.cpp
|
||||
cookiesdlg.cpp
|
||||
feedlistwidget.cpp
|
||||
htmlbrowser.cpp
|
||||
rss_imp.cpp
|
||||
rsssettingsdlg.cpp
|
||||
)
|
||||
|
||||
set(QBT_RSS_FORMS
|
||||
automatedrssdownloader.ui
|
||||
cookiesdlg.ui
|
||||
rss.ui
|
||||
rsssettingsdlg.ui
|
||||
)
|
||||
|
||||
add_library(qbt_rss STATIC ${QBT_RSS_HEADERS} ${QBT_RSS_SOURCE} ${QBT_RSS_FORMS})
|
||||
if (QT4_FOUND)
|
||||
target_link_libraries(qbt_rss Qt4::QtGui Qt4::QtNetwork)
|
||||
else (QT4_FOUND)
|
||||
target_link_libraries(qbt_rss Qt5::Gui Qt5::Widgets Qt5::Network)
|
||||
endif (QT4_FOUND)
|
||||
38
src/gui/search/CMakeLists.txt
Normal file
38
src/gui/search/CMakeLists.txt
Normal file
@@ -0,0 +1,38 @@
|
||||
include_directories(
|
||||
${CMAKE_CURRENT_BINARY_DIR}
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/..
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../lineedit/src
|
||||
)
|
||||
|
||||
set(QBT_SEARCHENGINE_FORMS
|
||||
pluginselectdlg.ui
|
||||
pluginsourcedlg.ui
|
||||
searchwidget.ui
|
||||
)
|
||||
|
||||
set(QBT_SEARCHENGINE_HEADERS
|
||||
pluginselectdlg.h
|
||||
pluginsourcedlg.h
|
||||
searchlistdelegate.h
|
||||
searchsortmodel.h
|
||||
searchtab.h
|
||||
searchwidget.h
|
||||
)
|
||||
|
||||
set(QBT_SEARCHENGINE_SOURCES
|
||||
pluginselectdlg.cpp
|
||||
pluginsourcedlg.cpp
|
||||
searchlistdelegate.cpp
|
||||
searchsortmodel.cpp
|
||||
searchtab.cpp
|
||||
searchwidget.cpp
|
||||
../ico.cpp
|
||||
)
|
||||
|
||||
set(QBT_SEARCHENGINE_RESOURCES
|
||||
# search.qrc
|
||||
)
|
||||
|
||||
add_library(qbt_searchengine STATIC ${QBT_SEARCHENGINE_HEADERS} ${QBT_SEARCHENGINE_SOURCES} ${QBT_SEARCHENGINE_RESOURCES} ${QBT_SEARCHENGINE_FORMS})
|
||||
target_link_libraries(qbt_searchengine qbt_base)
|
||||
|
||||
Reference in New Issue
Block a user