mirror of
https://github.com/YACReader/yacreader
synced 2026-04-12 15:49:53 -04:00
Use Qt6:: syntax for Qt modules
This commit is contained in:
@ -232,15 +232,15 @@ qt_add_translations(YACReader
|
|||||||
)
|
)
|
||||||
|
|
||||||
target_link_libraries(YACReader PRIVATE
|
target_link_libraries(YACReader PRIVATE
|
||||||
Qt::Core
|
Qt6::Core
|
||||||
Qt::Gui
|
Qt6::Gui
|
||||||
Qt::GuiPrivate
|
Qt6::GuiPrivate
|
||||||
Qt::Network
|
Qt6::Network
|
||||||
Qt::Widgets
|
Qt6::Widgets
|
||||||
Qt::Multimedia
|
Qt6::Multimedia
|
||||||
Qt::TextToSpeech
|
Qt6::TextToSpeech
|
||||||
Qt::Svg
|
Qt6::Svg
|
||||||
Qt::Core5Compat
|
Qt6::Core5Compat
|
||||||
comic_backend
|
comic_backend
|
||||||
common_gui
|
common_gui
|
||||||
rhi_flow_reader
|
rhi_flow_reader
|
||||||
|
|||||||
@ -32,10 +32,10 @@ target_include_directories(library_common PUBLIC
|
|||||||
${CMAKE_CURRENT_SOURCE_DIR}/db
|
${CMAKE_CURRENT_SOURCE_DIR}/db
|
||||||
)
|
)
|
||||||
target_link_libraries(library_common PUBLIC
|
target_link_libraries(library_common PUBLIC
|
||||||
Qt::Core
|
Qt6::Core
|
||||||
Qt::Core5Compat
|
Qt6::Core5Compat
|
||||||
Qt::Network
|
Qt6::Network
|
||||||
Qt::Sql
|
Qt6::Sql
|
||||||
common_all
|
common_all
|
||||||
comic_backend
|
comic_backend
|
||||||
cbx_backend
|
cbx_backend
|
||||||
@ -63,14 +63,14 @@ target_include_directories(db_helper PUBLIC
|
|||||||
${CMAKE_CURRENT_SOURCE_DIR}/db
|
${CMAKE_CURRENT_SOURCE_DIR}/db
|
||||||
)
|
)
|
||||||
target_link_libraries(db_helper PUBLIC
|
target_link_libraries(db_helper PUBLIC
|
||||||
Qt::Core
|
Qt6::Core
|
||||||
Qt::Sql
|
Qt6::Sql
|
||||||
common_all
|
common_all
|
||||||
QsLog
|
QsLog
|
||||||
)
|
)
|
||||||
|
|
||||||
# When BUILD_SERVER_STANDALONE=ON, only library_common and db_helper are built.
|
# When BUILD_SERVER_STANDALONE=ON, only library_common and db_helper are built.
|
||||||
# The full YACReaderLibrary GUI app requires Qt::Widgets and other full-build components.
|
# The full YACReaderLibrary GUI app requires Qt6::Widgets and other full-build components.
|
||||||
if(NOT BUILD_SERVER_STANDALONE)
|
if(NOT BUILD_SERVER_STANDALONE)
|
||||||
|
|
||||||
# --- YACReaderLibrary executable ---
|
# --- YACReaderLibrary executable ---
|
||||||
@ -476,18 +476,18 @@ qt_add_translations(YACReaderLibrary
|
|||||||
)
|
)
|
||||||
|
|
||||||
target_link_libraries(YACReaderLibrary PRIVATE
|
target_link_libraries(YACReaderLibrary PRIVATE
|
||||||
Qt::Core
|
Qt6::Core
|
||||||
Qt::Gui
|
Qt6::Gui
|
||||||
Qt::GuiPrivate
|
Qt6::GuiPrivate
|
||||||
Qt::Network
|
Qt6::Network
|
||||||
Qt::Widgets
|
Qt6::Widgets
|
||||||
Qt::Sql
|
Qt6::Sql
|
||||||
Qt::Svg
|
Qt6::Svg
|
||||||
Qt::Quick
|
Qt6::Quick
|
||||||
Qt::Qml
|
Qt6::Qml
|
||||||
Qt::QuickWidgets
|
Qt6::QuickWidgets
|
||||||
Qt::QuickControls2
|
Qt6::QuickControls2
|
||||||
Qt::Core5Compat
|
Qt6::Core5Compat
|
||||||
library_common
|
library_common
|
||||||
db_helper
|
db_helper
|
||||||
comic_backend
|
comic_backend
|
||||||
|
|||||||
@ -60,9 +60,9 @@ target_include_directories(comic_vine PRIVATE
|
|||||||
${PROJECT_SOURCE_DIR}/YACReaderLibrary/db
|
${PROJECT_SOURCE_DIR}/YACReaderLibrary/db
|
||||||
)
|
)
|
||||||
target_link_libraries(comic_vine PUBLIC
|
target_link_libraries(comic_vine PUBLIC
|
||||||
Qt::Core
|
Qt6::Core
|
||||||
Qt::Widgets
|
Qt6::Widgets
|
||||||
Qt::Network
|
Qt6::Network
|
||||||
common_all
|
common_all
|
||||||
common_gui
|
common_gui
|
||||||
custom_widgets_library
|
custom_widgets_library
|
||||||
|
|||||||
@ -73,9 +73,9 @@ if(UNIX AND NOT APPLE)
|
|||||||
"DATADIR=\"${CMAKE_INSTALL_FULL_DATADIR}\"")
|
"DATADIR=\"${CMAKE_INSTALL_FULL_DATADIR}\"")
|
||||||
endif()
|
endif()
|
||||||
target_link_libraries(server PUBLIC
|
target_link_libraries(server PUBLIC
|
||||||
Qt::Core
|
Qt6::Core
|
||||||
Qt::Network
|
Qt6::Network
|
||||||
Qt::Sql
|
Qt6::Sql
|
||||||
QtWebApp_httpserver
|
QtWebApp_httpserver
|
||||||
QtWebApp_templateengine
|
QtWebApp_templateengine
|
||||||
QsLog
|
QsLog
|
||||||
|
|||||||
@ -36,10 +36,10 @@ qt_add_translations(YACReaderLibraryServer
|
|||||||
)
|
)
|
||||||
|
|
||||||
target_link_libraries(YACReaderLibraryServer PRIVATE
|
target_link_libraries(YACReaderLibraryServer PRIVATE
|
||||||
Qt::Core
|
Qt6::Core
|
||||||
Qt::Network
|
Qt6::Network
|
||||||
Qt::Sql
|
Qt6::Sql
|
||||||
Qt::Core5Compat
|
Qt6::Core5Compat
|
||||||
library_common
|
library_common
|
||||||
db_helper
|
db_helper
|
||||||
comic_backend
|
comic_backend
|
||||||
|
|||||||
@ -18,7 +18,7 @@ target_include_directories(yr_global PUBLIC
|
|||||||
${CMAKE_CURRENT_SOURCE_DIR}
|
${CMAKE_CURRENT_SOURCE_DIR}
|
||||||
${CMAKE_CURRENT_BINARY_DIR}
|
${CMAKE_CURRENT_BINARY_DIR}
|
||||||
)
|
)
|
||||||
target_link_libraries(yr_global PUBLIC Qt::Core)
|
target_link_libraries(yr_global PUBLIC Qt6::Core)
|
||||||
if(UNIX AND NOT APPLE)
|
if(UNIX AND NOT APPLE)
|
||||||
target_compile_definitions(yr_global PRIVATE
|
target_compile_definitions(yr_global PRIVATE
|
||||||
"LIBDIR=\"${CMAKE_INSTALL_FULL_LIBDIR}\"")
|
"LIBDIR=\"${CMAKE_INSTALL_FULL_LIBDIR}\"")
|
||||||
@ -30,7 +30,7 @@ add_library(naturalsort STATIC
|
|||||||
qnaturalsorting.cpp
|
qnaturalsorting.cpp
|
||||||
)
|
)
|
||||||
target_include_directories(naturalsort PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
|
target_include_directories(naturalsort PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
|
||||||
target_link_libraries(naturalsort PUBLIC Qt::Core)
|
target_link_libraries(naturalsort PUBLIC Qt6::Core)
|
||||||
|
|
||||||
# --- concurrent_queue ---
|
# --- concurrent_queue ---
|
||||||
add_library(concurrent_queue STATIC
|
add_library(concurrent_queue STATIC
|
||||||
@ -38,7 +38,7 @@ add_library(concurrent_queue STATIC
|
|||||||
concurrent_queue.cpp
|
concurrent_queue.cpp
|
||||||
)
|
)
|
||||||
target_include_directories(concurrent_queue PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
|
target_include_directories(concurrent_queue PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
|
||||||
target_link_libraries(concurrent_queue PUBLIC Qt::Core)
|
target_link_libraries(concurrent_queue PUBLIC Qt6::Core)
|
||||||
|
|
||||||
# --- worker (header-only thread helpers) ---
|
# --- worker (header-only thread helpers) ---
|
||||||
add_library(worker INTERFACE)
|
add_library(worker INTERFACE)
|
||||||
@ -67,10 +67,10 @@ add_library(common_all STATIC
|
|||||||
)
|
)
|
||||||
target_include_directories(common_all PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
|
target_include_directories(common_all PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
|
||||||
target_link_libraries(common_all PUBLIC
|
target_link_libraries(common_all PUBLIC
|
||||||
Qt::Core
|
Qt6::Core
|
||||||
Qt::Gui
|
Qt6::Gui
|
||||||
Qt::Sql
|
Qt6::Sql
|
||||||
Qt::Network
|
Qt6::Network
|
||||||
yr_global
|
yr_global
|
||||||
naturalsort
|
naturalsort
|
||||||
pdf_backend_iface
|
pdf_backend_iface
|
||||||
@ -92,8 +92,8 @@ endif()
|
|||||||
|
|
||||||
target_include_directories(comic_backend PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
|
target_include_directories(comic_backend PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
|
||||||
target_link_libraries(comic_backend PUBLIC
|
target_link_libraries(comic_backend PUBLIC
|
||||||
Qt::Core
|
Qt6::Core
|
||||||
Qt::Gui
|
Qt6::Gui
|
||||||
common_all
|
common_all
|
||||||
pdf_backend_iface
|
pdf_backend_iface
|
||||||
cbx_backend
|
cbx_backend
|
||||||
@ -101,7 +101,7 @@ target_link_libraries(comic_backend PUBLIC
|
|||||||
)
|
)
|
||||||
|
|
||||||
# GUI-only targets: not needed for server-standalone builds (Qt 6.4+) which
|
# GUI-only targets: not needed for server-standalone builds (Qt 6.4+) which
|
||||||
# lack Qt::Widgets, Qt::ShaderTools, Qt::GuiPrivate, etc.
|
# lack Qt6::Widgets, Qt6::ShaderTools, Qt6::GuiPrivate, etc.
|
||||||
if(NOT BUILD_SERVER_STANDALONE)
|
if(NOT BUILD_SERVER_STANDALONE)
|
||||||
|
|
||||||
# --- common_gui (GUI-only code: widgets, version check, themes infrastructure) ---
|
# --- common_gui (GUI-only code: widgets, version check, themes infrastructure) ---
|
||||||
@ -146,11 +146,11 @@ target_include_directories(common_gui PUBLIC
|
|||||||
)
|
)
|
||||||
|
|
||||||
target_link_libraries(common_gui PUBLIC
|
target_link_libraries(common_gui PUBLIC
|
||||||
Qt::Core
|
Qt6::Core
|
||||||
Qt::Core5Compat
|
Qt6::Core5Compat
|
||||||
Qt::Widgets
|
Qt6::Widgets
|
||||||
Qt::Network
|
Qt6::Network
|
||||||
Qt::Svg
|
Qt6::Svg
|
||||||
common_all
|
common_all
|
||||||
yr_global
|
yr_global
|
||||||
QsLog
|
QsLog
|
||||||
@ -178,10 +178,10 @@ target_include_directories(rhi_flow_reader PUBLIC
|
|||||||
)
|
)
|
||||||
target_compile_definitions(rhi_flow_reader PRIVATE YACREADER)
|
target_compile_definitions(rhi_flow_reader PRIVATE YACREADER)
|
||||||
target_link_libraries(rhi_flow_reader PUBLIC
|
target_link_libraries(rhi_flow_reader PUBLIC
|
||||||
Qt::Core
|
Qt6::Core
|
||||||
Qt::Gui
|
Qt6::Gui
|
||||||
Qt::GuiPrivate
|
Qt6::GuiPrivate
|
||||||
Qt::Widgets
|
Qt6::Widgets
|
||||||
yr_global
|
yr_global
|
||||||
)
|
)
|
||||||
qt_add_shaders(rhi_flow_reader "flow_shaders_reader"
|
qt_add_shaders(rhi_flow_reader "flow_shaders_reader"
|
||||||
@ -202,10 +202,10 @@ target_include_directories(rhi_flow_library PUBLIC
|
|||||||
)
|
)
|
||||||
target_compile_definitions(rhi_flow_library PRIVATE YACREADER_LIBRARY)
|
target_compile_definitions(rhi_flow_library PRIVATE YACREADER_LIBRARY)
|
||||||
target_link_libraries(rhi_flow_library PUBLIC
|
target_link_libraries(rhi_flow_library PUBLIC
|
||||||
Qt::Core
|
Qt6::Core
|
||||||
Qt::Gui
|
Qt6::Gui
|
||||||
Qt::GuiPrivate
|
Qt6::GuiPrivate
|
||||||
Qt::Widgets
|
Qt6::Widgets
|
||||||
yr_global
|
yr_global
|
||||||
)
|
)
|
||||||
qt_add_shaders(rhi_flow_library "flow_shaders_library"
|
qt_add_shaders(rhi_flow_library "flow_shaders_library"
|
||||||
|
|||||||
@ -125,4 +125,4 @@ else()
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Qt, yr_global, and QsLog are needed by all backends
|
# Qt, yr_global, and QsLog are needed by all backends
|
||||||
target_link_libraries(cbx_backend PRIVATE Qt::Core yr_global QsLog)
|
target_link_libraries(cbx_backend PRIVATE Qt6::Core yr_global QsLog)
|
||||||
|
|||||||
@ -44,9 +44,9 @@ target_include_directories(custom_widgets_reader PRIVATE
|
|||||||
)
|
)
|
||||||
target_compile_definitions(custom_widgets_reader PRIVATE YACREADER)
|
target_compile_definitions(custom_widgets_reader PRIVATE YACREADER)
|
||||||
target_link_libraries(custom_widgets_reader PUBLIC
|
target_link_libraries(custom_widgets_reader PUBLIC
|
||||||
Qt::Core
|
Qt6::Core
|
||||||
Qt::Widgets
|
Qt6::Widgets
|
||||||
Qt::Network
|
Qt6::Network
|
||||||
common_gui
|
common_gui
|
||||||
rhi_flow_reader
|
rhi_flow_reader
|
||||||
QsLog
|
QsLog
|
||||||
@ -91,9 +91,9 @@ target_include_directories(custom_widgets_library PRIVATE
|
|||||||
)
|
)
|
||||||
target_compile_definitions(custom_widgets_library PRIVATE YACREADER_LIBRARY)
|
target_compile_definitions(custom_widgets_library PRIVATE YACREADER_LIBRARY)
|
||||||
target_link_libraries(custom_widgets_library PUBLIC
|
target_link_libraries(custom_widgets_library PUBLIC
|
||||||
Qt::Core
|
Qt6::Core
|
||||||
Qt::Widgets
|
Qt6::Widgets
|
||||||
Qt::Network
|
Qt6::Network
|
||||||
common_gui
|
common_gui
|
||||||
rhi_flow_library
|
rhi_flow_library
|
||||||
QsLog
|
QsLog
|
||||||
|
|||||||
@ -22,7 +22,7 @@ target_include_directories(shortcuts_reader PRIVATE
|
|||||||
${PROJECT_SOURCE_DIR}/YACReader/themes
|
${PROJECT_SOURCE_DIR}/YACReader/themes
|
||||||
)
|
)
|
||||||
target_compile_definitions(shortcuts_reader PRIVATE YACREADER)
|
target_compile_definitions(shortcuts_reader PRIVATE YACREADER)
|
||||||
target_link_libraries(shortcuts_reader PUBLIC Qt::Core Qt::Widgets yr_global common_gui)
|
target_link_libraries(shortcuts_reader PUBLIC Qt6::Core Qt6::Widgets yr_global common_gui)
|
||||||
|
|
||||||
# --- shortcuts_library (YACREADER_LIBRARY define) ---
|
# --- shortcuts_library (YACREADER_LIBRARY define) ---
|
||||||
add_library(shortcuts_library STATIC ${SHORTCUTS_SOURCES})
|
add_library(shortcuts_library STATIC ${SHORTCUTS_SOURCES})
|
||||||
@ -31,4 +31,4 @@ target_include_directories(shortcuts_library PRIVATE
|
|||||||
${PROJECT_SOURCE_DIR}/YACReaderLibrary/themes
|
${PROJECT_SOURCE_DIR}/YACReaderLibrary/themes
|
||||||
)
|
)
|
||||||
target_compile_definitions(shortcuts_library PRIVATE YACREADER_LIBRARY)
|
target_compile_definitions(shortcuts_library PRIVATE YACREADER_LIBRARY)
|
||||||
target_link_libraries(shortcuts_library PUBLIC Qt::Core Qt::Widgets yr_global common_gui)
|
target_link_libraries(shortcuts_library PUBLIC Qt6::Core Qt6::Widgets yr_global common_gui)
|
||||||
|
|||||||
@ -4,7 +4,7 @@ qt_add_executable(compressed_archive_test
|
|||||||
main.cpp
|
main.cpp
|
||||||
)
|
)
|
||||||
target_link_libraries(compressed_archive_test PRIVATE
|
target_link_libraries(compressed_archive_test PRIVATE
|
||||||
Qt::Core
|
Qt6::Core
|
||||||
cbx_backend
|
cbx_backend
|
||||||
)
|
)
|
||||||
if(WIN32)
|
if(WIN32)
|
||||||
|
|||||||
@ -4,8 +4,8 @@ qt_add_executable(concurrent_queue_test
|
|||||||
concurrent_queue_test.cpp
|
concurrent_queue_test.cpp
|
||||||
)
|
)
|
||||||
target_link_libraries(concurrent_queue_test PRIVATE
|
target_link_libraries(concurrent_queue_test PRIVATE
|
||||||
Qt::Core
|
Qt6::Core
|
||||||
Qt::Test
|
Qt6::Test
|
||||||
concurrent_queue
|
concurrent_queue
|
||||||
)
|
)
|
||||||
add_test(NAME concurrent_queue_test
|
add_test(NAME concurrent_queue_test
|
||||||
|
|||||||
8
third_party/CMakeLists.txt
vendored
8
third_party/CMakeLists.txt
vendored
@ -21,7 +21,7 @@ add_library(QsLog STATIC
|
|||||||
)
|
)
|
||||||
target_include_directories(QsLog PUBLIC QsLog)
|
target_include_directories(QsLog PUBLIC QsLog)
|
||||||
target_compile_definitions(QsLog PUBLIC QS_LOG_SEPARATE_THREAD)
|
target_compile_definitions(QsLog PUBLIC QS_LOG_SEPARATE_THREAD)
|
||||||
target_link_libraries(QsLog PUBLIC Qt::Core)
|
target_link_libraries(QsLog PUBLIC Qt6::Core)
|
||||||
|
|
||||||
# --- QrCode (QR code generation, no Qt dependency) ---
|
# --- QrCode (QR code generation, no Qt dependency) ---
|
||||||
add_library(QrCode STATIC
|
add_library(QrCode STATIC
|
||||||
@ -56,7 +56,7 @@ add_library(QtWebApp_httpserver STATIC
|
|||||||
QtWebApp/httpserver/staticfilecontroller.h
|
QtWebApp/httpserver/staticfilecontroller.h
|
||||||
)
|
)
|
||||||
target_include_directories(QtWebApp_httpserver PUBLIC QtWebApp/httpserver)
|
target_include_directories(QtWebApp_httpserver PUBLIC QtWebApp/httpserver)
|
||||||
target_link_libraries(QtWebApp_httpserver PUBLIC Qt::Network)
|
target_link_libraries(QtWebApp_httpserver PUBLIC Qt6::Network)
|
||||||
|
|
||||||
# --- QtWebApp template engine ---
|
# --- QtWebApp template engine ---
|
||||||
add_library(QtWebApp_templateengine STATIC
|
add_library(QtWebApp_templateengine STATIC
|
||||||
@ -69,7 +69,7 @@ add_library(QtWebApp_templateengine STATIC
|
|||||||
QtWebApp/templateengine/templatecache.h
|
QtWebApp/templateengine/templatecache.h
|
||||||
)
|
)
|
||||||
target_include_directories(QtWebApp_templateengine PUBLIC QtWebApp/templateengine)
|
target_include_directories(QtWebApp_templateengine PUBLIC QtWebApp/templateengine)
|
||||||
target_link_libraries(QtWebApp_templateengine PUBLIC Qt::Core5Compat)
|
target_link_libraries(QtWebApp_templateengine PUBLIC Qt6::Core5Compat)
|
||||||
|
|
||||||
# --- KDSignalThrottler (from KDToolBox) ---
|
# --- KDSignalThrottler (from KDToolBox) ---
|
||||||
add_library(KDSignalThrottler STATIC
|
add_library(KDSignalThrottler STATIC
|
||||||
@ -77,4 +77,4 @@ add_library(KDSignalThrottler STATIC
|
|||||||
KDToolBox/KDSignalThrottler.h
|
KDToolBox/KDSignalThrottler.h
|
||||||
)
|
)
|
||||||
target_include_directories(KDSignalThrottler PUBLIC KDToolBox)
|
target_include_directories(KDSignalThrottler PUBLIC KDToolBox)
|
||||||
target_link_libraries(KDSignalThrottler PUBLIC Qt::Core)
|
target_link_libraries(KDSignalThrottler PUBLIC Qt6::Core)
|
||||||
|
|||||||
Reference in New Issue
Block a user