mirror of
https://github.com/YACReader/yacreader
synced 2026-03-01 18:33:09 -05:00
Migrate the build system to cmake
This commit is contained in:
304
YACReaderLibrary/CMakeLists.txt
Normal file
304
YACReaderLibrary/CMakeLists.txt
Normal file
@ -0,0 +1,304 @@
|
||||
# YACReaderLibrary - Comic Library Manager
|
||||
|
||||
# --- library_common (shared with YACReaderLibraryServer) ---
|
||||
add_library(library_common STATIC
|
||||
library_creator.h
|
||||
library_creator.cpp
|
||||
package_manager.h
|
||||
package_manager.cpp
|
||||
bundle_creator.h
|
||||
bundle_creator.cpp
|
||||
initial_comic_info_extractor.h
|
||||
initial_comic_info_extractor.cpp
|
||||
xml_info_parser.h
|
||||
xml_info_parser.cpp
|
||||
xml_info_library_scanner.h
|
||||
xml_info_library_scanner.cpp
|
||||
yacreader_local_server.h
|
||||
yacreader_local_server.cpp
|
||||
comics_remover.h
|
||||
comics_remover.cpp
|
||||
yacreader_libraries.h
|
||||
yacreader_libraries.cpp
|
||||
comic_files_manager.h
|
||||
comic_files_manager.cpp
|
||||
ip_config_helper.h
|
||||
ip_config_helper.cpp
|
||||
libraries_update_coordinator.h
|
||||
libraries_update_coordinator.cpp
|
||||
)
|
||||
target_include_directories(library_common PUBLIC
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/db
|
||||
)
|
||||
target_link_libraries(library_common PUBLIC
|
||||
Qt::Core
|
||||
Qt::Core5Compat
|
||||
Qt::Network
|
||||
Qt::Sql
|
||||
common_all
|
||||
comic_backend
|
||||
cbx_backend
|
||||
db_helper
|
||||
QsLog
|
||||
)
|
||||
|
||||
# --- db_helper (database layer, shared with YACReaderLibraryServer) ---
|
||||
add_library(db_helper STATIC
|
||||
db_helper.h
|
||||
db_helper.cpp
|
||||
db/data_base_management.h
|
||||
db/data_base_management.cpp
|
||||
db/reading_list.h
|
||||
db/reading_list.cpp
|
||||
db/query_lexer.h
|
||||
db/query_lexer.cpp
|
||||
db/query_parser.h
|
||||
db/query_parser.cpp
|
||||
db/search_query.h
|
||||
db/search_query.cpp
|
||||
)
|
||||
target_include_directories(db_helper PUBLIC
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/db
|
||||
)
|
||||
target_link_libraries(db_helper PUBLIC
|
||||
Qt::Core
|
||||
Qt::Sql
|
||||
common_all
|
||||
QsLog
|
||||
)
|
||||
|
||||
# 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.
|
||||
if(NOT BUILD_SERVER_STANDALONE)
|
||||
|
||||
# --- YACReaderLibrary executable ---
|
||||
qt_add_executable(YACReaderLibrary WIN32
|
||||
main.cpp
|
||||
library_window.h
|
||||
library_window.cpp
|
||||
library_window_actions.h
|
||||
library_window_actions.cpp
|
||||
create_library_dialog.h
|
||||
create_library_dialog.cpp
|
||||
add_library_dialog.h
|
||||
add_library_dialog.cpp
|
||||
rename_library_dialog.h
|
||||
rename_library_dialog.cpp
|
||||
properties_dialog.h
|
||||
properties_dialog.cpp
|
||||
options_dialog.h
|
||||
options_dialog.cpp
|
||||
export_library_dialog.h
|
||||
export_library_dialog.cpp
|
||||
import_library_dialog.h
|
||||
import_library_dialog.cpp
|
||||
export_comics_info_dialog.h
|
||||
export_comics_info_dialog.cpp
|
||||
import_comics_info_dialog.h
|
||||
import_comics_info_dialog.cpp
|
||||
server_config_dialog.h
|
||||
server_config_dialog.cpp
|
||||
comic_flow_widget.h
|
||||
comic_flow_widget.cpp
|
||||
no_libraries_widget.h
|
||||
no_libraries_widget.cpp
|
||||
import_widget.h
|
||||
import_widget.cpp
|
||||
trayicon_controller.h
|
||||
trayicon_controller.cpp
|
||||
yacreader_content_views_manager.h
|
||||
yacreader_content_views_manager.cpp
|
||||
yacreader_main_toolbar.h
|
||||
yacreader_main_toolbar.cpp
|
||||
comics_view.h
|
||||
comics_view.cpp
|
||||
comics_view_transition.h
|
||||
comics_view_transition.cpp
|
||||
classic_comics_view.h
|
||||
classic_comics_view.cpp
|
||||
grid_comics_view.h
|
||||
grid_comics_view.cpp
|
||||
no_search_results_widget.h
|
||||
no_search_results_widget.cpp
|
||||
folder_content_view.h
|
||||
folder_content_view.cpp
|
||||
recent_visibility_coordinator.h
|
||||
recent_visibility_coordinator.cpp
|
||||
library_comic_opener.h
|
||||
library_comic_opener.cpp
|
||||
db/comic_query_result_processor.h
|
||||
db/comic_query_result_processor.cpp
|
||||
db/folder_query_result_processor.h
|
||||
db/folder_query_result_processor.cpp
|
||||
db/folder_item.h
|
||||
db/folder_item.cpp
|
||||
db/folder_model.h
|
||||
db/folder_model.cpp
|
||||
db/comic_model.h
|
||||
db/comic_model.cpp
|
||||
db/comic_item.h
|
||||
db/comic_item.cpp
|
||||
db/reading_list_model.h
|
||||
db/reading_list_model.cpp
|
||||
db/reading_list_item.h
|
||||
db/reading_list_item.cpp
|
||||
yacreader_folders_view.h
|
||||
yacreader_folders_view.cpp
|
||||
yacreader_reading_lists_view.h
|
||||
yacreader_reading_lists_view.cpp
|
||||
add_label_dialog.h
|
||||
add_label_dialog.cpp
|
||||
yacreader_history_controller.h
|
||||
yacreader_history_controller.cpp
|
||||
yacreader_navigation_controller.h
|
||||
yacreader_navigation_controller.cpp
|
||||
empty_label_widget.h
|
||||
empty_label_widget.cpp
|
||||
empty_folder_widget.h
|
||||
empty_folder_widget.cpp
|
||||
empty_container_info.h
|
||||
empty_container_info.cpp
|
||||
empty_special_list.h
|
||||
empty_special_list.cpp
|
||||
empty_reading_list_widget.h
|
||||
empty_reading_list_widget.cpp
|
||||
info_comics_view.h
|
||||
info_comics_view.cpp
|
||||
yacreader_comics_selection_helper.h
|
||||
yacreader_comics_selection_helper.cpp
|
||||
yacreader_comic_info_helper.h
|
||||
yacreader_comic_info_helper.cpp
|
||||
current_comic_view_helper.h
|
||||
current_comic_view_helper.cpp
|
||||
# App-specific themes + shared theme_manager (depends on app theme.h)
|
||||
themes/theme.h
|
||||
themes/theme_factory.h
|
||||
themes/theme_factory.cpp
|
||||
${CMAKE_SOURCE_DIR}/common/themes/theme_manager.h
|
||||
${CMAKE_SOURCE_DIR}/common/themes/theme_manager.cpp
|
||||
)
|
||||
|
||||
# macOS-specific sources
|
||||
if(APPLE)
|
||||
target_sources(YACReaderLibrary PRIVATE
|
||||
trayhandler.h
|
||||
trayhandler.mm
|
||||
)
|
||||
endif()
|
||||
|
||||
target_include_directories(YACReaderLibrary PRIVATE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/db
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/themes
|
||||
)
|
||||
|
||||
target_compile_definitions(YACReaderLibrary PRIVATE
|
||||
SERVER_RELEASE
|
||||
YACREADER_LIBRARY
|
||||
)
|
||||
|
||||
# Resources
|
||||
qt_add_resources(yacreaderlibrary_images_rcc "${CMAKE_CURRENT_SOURCE_DIR}/images.qrc")
|
||||
qt_add_resources(yacreaderlibrary_files_rcc "${CMAKE_CURRENT_SOURCE_DIR}/files.qrc")
|
||||
qt_add_resources(yacreaderlibrary_qml_rcc "${CMAKE_CURRENT_SOURCE_DIR}/qml.qrc")
|
||||
target_sources(YACReaderLibrary PRIVATE
|
||||
${yacreaderlibrary_images_rcc}
|
||||
${yacreaderlibrary_files_rcc}
|
||||
${yacreaderlibrary_qml_rcc}
|
||||
)
|
||||
if(WIN32 OR (UNIX AND NOT APPLE))
|
||||
qt_add_resources(yacreaderlibrary_images_win_rcc "${CMAKE_CURRENT_SOURCE_DIR}/images_win.qrc")
|
||||
target_sources(YACReaderLibrary PRIVATE ${yacreaderlibrary_images_win_rcc})
|
||||
endif()
|
||||
if(APPLE)
|
||||
qt_add_resources(yacreaderlibrary_images_osx_rcc "${CMAKE_CURRENT_SOURCE_DIR}/images_osx.qrc")
|
||||
target_sources(YACReaderLibrary PRIVATE ${yacreaderlibrary_images_osx_rcc})
|
||||
endif()
|
||||
|
||||
# Translations
|
||||
qt_add_translations(YACReaderLibrary
|
||||
TS_FILES
|
||||
yacreaderlibrary_es.ts
|
||||
yacreaderlibrary_ru.ts
|
||||
yacreaderlibrary_pt.ts
|
||||
yacreaderlibrary_fr.ts
|
||||
yacreaderlibrary_nl.ts
|
||||
yacreaderlibrary_tr.ts
|
||||
yacreaderlibrary_de.ts
|
||||
yacreaderlibrary_zh_CN.ts
|
||||
yacreaderlibrary_zh_TW.ts
|
||||
yacreaderlibrary_zh_HK.ts
|
||||
yacreaderlibrary_it.ts
|
||||
yacreaderlibrary_en.ts
|
||||
)
|
||||
|
||||
target_link_libraries(YACReaderLibrary PRIVATE
|
||||
Qt::Core
|
||||
Qt::Gui
|
||||
Qt::GuiPrivate
|
||||
Qt::Network
|
||||
Qt::Widgets
|
||||
Qt::Sql
|
||||
Qt::Svg
|
||||
Qt::Quick
|
||||
Qt::Qml
|
||||
Qt::QuickWidgets
|
||||
Qt::QuickControls2
|
||||
Qt::Core5Compat
|
||||
library_common
|
||||
db_helper
|
||||
comic_backend
|
||||
common_gui
|
||||
rhi_flow_library
|
||||
custom_widgets_library
|
||||
shortcuts_library
|
||||
server
|
||||
comic_vine
|
||||
cbx_backend
|
||||
concurrent_queue
|
||||
worker
|
||||
QsLog
|
||||
QrCode
|
||||
KDSignalThrottler
|
||||
)
|
||||
|
||||
# Platform-specific
|
||||
if(WIN32)
|
||||
target_sources(YACReaderLibrary PRIVATE icon.rc)
|
||||
target_link_libraries(YACReaderLibrary PRIVATE oleaut32 ole32 shell32 user32)
|
||||
endif()
|
||||
|
||||
if(APPLE)
|
||||
target_sources(YACReaderLibrary PRIVATE YACReaderLibrary.icns)
|
||||
set_source_files_properties(YACReaderLibrary.icns PROPERTIES MACOSX_PACKAGE_LOCATION Resources)
|
||||
set_target_properties(YACReaderLibrary PROPERTIES
|
||||
MACOSX_BUNDLE TRUE
|
||||
MACOSX_BUNDLE_INFO_PLIST "${CMAKE_CURRENT_SOURCE_DIR}/Info.plist"
|
||||
MACOSX_BUNDLE_GUI_IDENTIFIER "com.yacreader.YACReaderLibrary"
|
||||
MACOSX_BUNDLE_BUNDLE_NAME "YACReaderLibrary"
|
||||
)
|
||||
target_link_libraries(YACReaderLibrary PRIVATE
|
||||
"-framework Foundation"
|
||||
"-framework ApplicationServices"
|
||||
"-framework AppKit"
|
||||
)
|
||||
endif()
|
||||
|
||||
# Linux install
|
||||
if(UNIX AND NOT APPLE)
|
||||
target_compile_definitions(YACReaderLibrary PRIVATE
|
||||
"LIBDIR=\"${CMAKE_INSTALL_FULL_LIBDIR}\""
|
||||
"DATADIR=\"${CMAKE_INSTALL_FULL_DATADIR}\""
|
||||
"BINDIR=\"${CMAKE_INSTALL_FULL_BINDIR}\"")
|
||||
install(TARGETS YACReaderLibrary RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
|
||||
|
||||
# Server web files (for bundled server mode)
|
||||
if(NOT BUILD_SERVER_STANDALONE)
|
||||
install(DIRECTORY ${CMAKE_SOURCE_DIR}/release/server
|
||||
DESTINATION ${CMAKE_INSTALL_DATADIR}/yacreader)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
endif() # NOT BUILD_SERVER_STANDALONE (YACReaderLibrary executable)
|
||||
@ -1,343 +0,0 @@
|
||||
TEMPLATE = app
|
||||
TARGET = YACReaderLibrary
|
||||
|
||||
QMAKE_TARGET_BUNDLE_PREFIX = "com.yacreader"
|
||||
|
||||
DEPENDPATH += .
|
||||
INCLUDEPATH += . \
|
||||
../common \
|
||||
./server \
|
||||
./db \
|
||||
../custom_widgets \
|
||||
./comic_vine \
|
||||
./comic_vine/model
|
||||
|
||||
DEFINES += SERVER_RELEASE YACREADER_LIBRARY
|
||||
|
||||
# load default build flags
|
||||
include (../config.pri)
|
||||
include (../dependencies/pdf_backend.pri)
|
||||
|
||||
INCLUDEPATH += ../common/rhi
|
||||
|
||||
win32 {
|
||||
LIBS += -loleaut32 -lole32 -lshell32 -luser32
|
||||
msvc {
|
||||
QMAKE_CXXFLAGS_RELEASE += /MP /Ob2 /Oi /Ot /GT /GL
|
||||
QMAKE_LFLAGS_RELEASE += /LTCG
|
||||
}
|
||||
CONFIG -= embed_manifest_exe
|
||||
}
|
||||
|
||||
contains(QMAKE_TARGET.arch, x86_64) {
|
||||
Release:DESTDIR = ../release64
|
||||
Debug:DESTDIR = ../debug64
|
||||
} else {
|
||||
Release:DESTDIR = ../release
|
||||
Debug:DESTDIR = ../debug
|
||||
}
|
||||
|
||||
macx {
|
||||
LIBS += -framework Foundation -framework ApplicationServices -framework AppKit
|
||||
CONFIG += objective_c
|
||||
QT += gui-private
|
||||
}
|
||||
|
||||
#CONFIG += release
|
||||
CONFIG -= flat
|
||||
QT += sql network widgets svg quickcontrols2
|
||||
|
||||
QT += core5compat
|
||||
|
||||
greaterThan(QT_MINOR_VERSION, 6): QT += gui-private
|
||||
|
||||
# Input
|
||||
HEADERS += \
|
||||
../common/concurrent_queue.h \
|
||||
../common/cover_utils.h \
|
||||
create_library_dialog.h \
|
||||
db/comic_query_result_processor.h \
|
||||
db/folder_query_result_processor.h \
|
||||
db/query_lexer.h \
|
||||
db/search_query.h \
|
||||
folder_content_view.h \
|
||||
initial_comic_info_extractor.h \
|
||||
libraries_update_coordinator.h \
|
||||
library_comic_opener.h \
|
||||
library_creator.h \
|
||||
library_window.h \
|
||||
add_library_dialog.h \
|
||||
library_window_actions.h \
|
||||
recent_visibility_coordinator.h \
|
||||
rename_library_dialog.h \
|
||||
properties_dialog.h \
|
||||
options_dialog.h \
|
||||
export_library_dialog.h \
|
||||
import_library_dialog.h \
|
||||
package_manager.h \
|
||||
bundle_creator.h \
|
||||
export_comics_info_dialog.h \
|
||||
import_comics_info_dialog.h \
|
||||
server_config_dialog.h \
|
||||
comic_flow_widget.h \
|
||||
db_helper.h \
|
||||
./db/data_base_management.h \
|
||||
./db/folder_item.h \
|
||||
./db/folder_model.h \
|
||||
./db/comic_model.h \
|
||||
./db/comic_item.h \
|
||||
../common/comic_db.h \
|
||||
../common/folder.h \
|
||||
../common/library_item.h \
|
||||
../common/comic.h \
|
||||
../common/bookmarks.h \
|
||||
../common/release_acquire_atomic.h \
|
||||
../common/worker_thread.h \
|
||||
../common/custom_widgets.h \
|
||||
../common/qnaturalsorting.h \
|
||||
../common/yacreader_global.h \
|
||||
../common/yacreader_global_gui.h \
|
||||
../common/pdf_comic.h \
|
||||
no_libraries_widget.h \
|
||||
import_widget.h \
|
||||
trayicon_controller.h \
|
||||
xml_info_library_scanner.h \
|
||||
xml_info_parser.h \
|
||||
yacreader_content_views_manager.h \
|
||||
yacreader_local_server.h \
|
||||
yacreader_main_toolbar.h \
|
||||
comics_remover.h \
|
||||
../common/http_worker.h \
|
||||
yacreader_libraries.h \
|
||||
../common/exit_check.h \
|
||||
comics_view.h \
|
||||
classic_comics_view.h \
|
||||
no_search_results_widget.h \
|
||||
comic_files_manager.h \
|
||||
db/reading_list_model.h \
|
||||
db/reading_list_item.h \
|
||||
yacreader_folders_view.h \
|
||||
yacreader_reading_lists_view.h \
|
||||
add_label_dialog.h \
|
||||
yacreader_history_controller.h \
|
||||
yacreader_navigation_controller.h \
|
||||
empty_label_widget.h \
|
||||
empty_folder_widget.h \
|
||||
empty_container_info.h \
|
||||
empty_special_list.h \
|
||||
empty_reading_list_widget.h \
|
||||
../common/scroll_management.h \
|
||||
info_comics_view.h \
|
||||
yacreader_comics_selection_helper.h \
|
||||
yacreader_comic_info_helper.h \
|
||||
db/reading_list.h \
|
||||
db/query_parser.h \
|
||||
current_comic_view_helper.h \
|
||||
ip_config_helper.h \
|
||||
../common/global_info_provider.h \
|
||||
../common/rhi/flow_types.h \
|
||||
../common/rhi/yacreader_flow_rhi.h \
|
||||
../common/rhi/yacreader_comic_flow_rhi.h \
|
||||
../common/rhi/yacreader_page_flow_rhi.h
|
||||
|
||||
SOURCES += \
|
||||
../common/concurrent_queue.cpp \
|
||||
../common/cover_utils.cpp \
|
||||
create_library_dialog.cpp \
|
||||
db/comic_query_result_processor.cpp \
|
||||
db/folder_query_result_processor.cpp \
|
||||
db/query_lexer.cpp \
|
||||
db/search_query.cpp \
|
||||
folder_content_view.cpp \
|
||||
initial_comic_info_extractor.cpp \
|
||||
libraries_update_coordinator.cpp \
|
||||
library_comic_opener.cpp \
|
||||
library_creator.cpp \
|
||||
library_window.cpp \
|
||||
library_window_actions.cpp \
|
||||
main.cpp \
|
||||
add_library_dialog.cpp \
|
||||
recent_visibility_coordinator.cpp \
|
||||
rename_library_dialog.cpp \
|
||||
properties_dialog.cpp \
|
||||
options_dialog.cpp \
|
||||
export_library_dialog.cpp \
|
||||
import_library_dialog.cpp \
|
||||
package_manager.cpp \
|
||||
bundle_creator.cpp \
|
||||
export_comics_info_dialog.cpp \
|
||||
import_comics_info_dialog.cpp \
|
||||
server_config_dialog.cpp \
|
||||
comic_flow_widget.cpp \
|
||||
db_helper.cpp \
|
||||
./db/data_base_management.cpp \
|
||||
./db/folder_item.cpp \
|
||||
./db/folder_model.cpp \
|
||||
./db/comic_model.cpp \
|
||||
./db/comic_item.cpp \
|
||||
../common/comic_db.cpp \
|
||||
../common/folder.cpp \
|
||||
../common/library_item.cpp \
|
||||
../common/comic.cpp \
|
||||
../common/bookmarks.cpp \
|
||||
../common/custom_widgets.cpp \
|
||||
../common/qnaturalsorting.cpp \
|
||||
no_libraries_widget.cpp \
|
||||
import_widget.cpp \
|
||||
trayicon_controller.cpp \
|
||||
xml_info_library_scanner.cpp \
|
||||
xml_info_parser.cpp \
|
||||
yacreader_content_views_manager.cpp \
|
||||
yacreader_local_server.cpp \
|
||||
yacreader_main_toolbar.cpp \
|
||||
comics_remover.cpp \
|
||||
../common/http_worker.cpp \
|
||||
../common/yacreader_global.cpp \
|
||||
../common/yacreader_global_gui.cpp \
|
||||
yacreader_libraries.cpp \
|
||||
../common/exit_check.cpp \
|
||||
comics_view.cpp \
|
||||
classic_comics_view.cpp \
|
||||
no_search_results_widget.cpp \
|
||||
comic_files_manager.cpp \
|
||||
db/reading_list_model.cpp \
|
||||
db/reading_list_item.cpp \
|
||||
yacreader_folders_view.cpp \
|
||||
yacreader_reading_lists_view.cpp \
|
||||
add_label_dialog.cpp \
|
||||
yacreader_history_controller.cpp \
|
||||
yacreader_navigation_controller.cpp \
|
||||
empty_label_widget.cpp \
|
||||
empty_folder_widget.cpp \
|
||||
empty_container_info.cpp \
|
||||
empty_special_list.cpp \
|
||||
empty_reading_list_widget.cpp \
|
||||
../common/scroll_management.cpp \
|
||||
info_comics_view.cpp \
|
||||
yacreader_comics_selection_helper.cpp \
|
||||
yacreader_comic_info_helper.cpp\
|
||||
db/reading_list.cpp \
|
||||
current_comic_view_helper.cpp \
|
||||
db/query_parser.cpp \
|
||||
ip_config_helper.cpp \
|
||||
../common/global_info_provider.cpp \
|
||||
../common/rhi/flow_types.cpp \
|
||||
../common/rhi/yacreader_flow_rhi.cpp \
|
||||
../common/rhi/yacreader_comic_flow_rhi.cpp \
|
||||
../common/rhi/yacreader_page_flow_rhi.cpp
|
||||
|
||||
RESOURCES += ../common/rhi/shaders/shaders.qrc
|
||||
# Make raw GLSL shader sources editable in Qt Creator
|
||||
OTHER_FILES += ../common/rhi/shaders/flow.vert \
|
||||
../common/rhi/shaders/flow.frag
|
||||
|
||||
macx {
|
||||
HEADERS += trayhandler.h
|
||||
OBJECTIVE_SOURCES += trayhandler.mm
|
||||
}
|
||||
|
||||
include(./server/server.pri)
|
||||
include(../custom_widgets/custom_widgets_yacreaderlibrary.pri)
|
||||
|
||||
CONFIG(7zip){
|
||||
include(../compressed_archive/wrapper.pri)
|
||||
} else:CONFIG(unarr) {
|
||||
include(../compressed_archive/unarr/unarr-wrapper.pri)
|
||||
} else:CONFIG(libarchive) {
|
||||
include(../compressed_archive/libarchive/libarchive-wrapper.pri)
|
||||
} else {
|
||||
error(No compression backend specified. Did you mess with the build system?)
|
||||
}
|
||||
|
||||
include(./comic_vine/comic_vine.pri)
|
||||
include(../third_party/QsLog/QsLog.pri)
|
||||
include(../shortcuts_management/shortcuts_management.pri)
|
||||
include(../third_party/QrCode/QrCode.pri)
|
||||
include(../third_party/KDToolBox/KDToolBox.pri)
|
||||
include(./themes/themes.pri)
|
||||
include(../common/themes/themes_common.pri)
|
||||
|
||||
RESOURCES += images.qrc files.qrc
|
||||
win32:RESOURCES += images_win.qrc
|
||||
unix:!macx:RESOURCES += images_win.qrc
|
||||
macx:RESOURCES += images_osx.qrc
|
||||
|
||||
RC_FILE = icon.rc
|
||||
|
||||
macx {
|
||||
ICON = YACReaderLibrary.icns
|
||||
QMAKE_INFO_PLIST = Info.plist
|
||||
}
|
||||
|
||||
TRANSLATIONS = yacreaderlibrary_es.ts \
|
||||
yacreaderlibrary_ru.ts \
|
||||
yacreaderlibrary_pt.ts \
|
||||
yacreaderlibrary_fr.ts \
|
||||
yacreaderlibrary_nl.ts \
|
||||
yacreaderlibrary_tr.ts \
|
||||
yacreaderlibrary_de.ts \
|
||||
yacreaderlibrary_zh_CN.ts \
|
||||
yacreaderlibrary_zh_TW.ts \
|
||||
yacreaderlibrary_zh_HK.ts \
|
||||
yacreaderlibrary_it.ts \
|
||||
yacreaderlibrary_en.ts
|
||||
|
||||
CONFIG += lrelease
|
||||
|
||||
win32 {
|
||||
CONFIG(release, debug|release) {
|
||||
SOURCE_QM_DIR = $$OUT_PWD/release/*.qm
|
||||
}
|
||||
CONFIG(debug, debug|release) {
|
||||
SOURCE_QM_DIR = $$OUT_PWD/debug/*.qm
|
||||
}
|
||||
|
||||
DEPLOYMENT_OUT_QM_DIR = ../release/languages/
|
||||
OUT_QM_DIR = $${DESTDIR}/languages/
|
||||
|
||||
QMAKE_POST_LINK += $(MKDIR) $$shell_path($${OUT_QM_DIR}) 2> NULL & \
|
||||
$(COPY) $$shell_path($${SOURCE_QM_DIR}) $$shell_path($${OUT_QM_DIR}) & \
|
||||
$(MKDIR) $$shell_path($${DEPLOYMENT_OUT_QM_DIR}) 2> NULL & \
|
||||
$(COPY) $$shell_path($${SOURCE_QM_DIR}) $$shell_path($${DEPLOYMENT_OUT_QM_DIR})
|
||||
} else {
|
||||
LRELEASE_DIR = ../release/languages/
|
||||
QM_FILES_INSTALL_PATH = $$DATADIR/yacreader/languages
|
||||
}
|
||||
|
||||
#QML/GridView
|
||||
QT += quick qml quickwidgets
|
||||
|
||||
HEADERS += grid_comics_view.h \
|
||||
comics_view_transition.h
|
||||
|
||||
SOURCES += grid_comics_view.cpp \
|
||||
comics_view_transition.cpp
|
||||
|
||||
RESOURCES += qml.qrc
|
||||
|
||||
unix:!macx {
|
||||
|
||||
DEFINES += "LIBDIR=\\\"$$LIBDIR\\\"" "DATADIR=\\\"$$DATADIR\\\"" "BINDIR=\\\"$$BINDIR\\\""
|
||||
|
||||
#MAKE INSTALL
|
||||
INSTALLS += bin icon desktop server manpage
|
||||
|
||||
bin.path = $$BINDIR
|
||||
isEmpty(DESTDIR) {
|
||||
bin.files = YACReaderLibrary
|
||||
} else {
|
||||
bin.files = $$DESTDIR/YACReaderLibrary
|
||||
}
|
||||
|
||||
server.path = $$DATADIR/yacreader
|
||||
server.files = ../release/server
|
||||
|
||||
icon.path = $$DATADIR/icons/hicolor/scalable/apps
|
||||
icon.files = ../YACReaderLibrary.svg
|
||||
|
||||
desktop.path = $$DATADIR/applications
|
||||
desktop.files = ../YACReaderLibrary.desktop
|
||||
|
||||
manpage.path = $$DATADIR/man/man1
|
||||
manpage.files = ../YACReaderLibrary.1
|
||||
}
|
||||
71
YACReaderLibrary/comic_vine/CMakeLists.txt
Normal file
71
YACReaderLibrary/comic_vine/CMakeLists.txt
Normal file
@ -0,0 +1,71 @@
|
||||
# Comic Vine scraper for YACReaderLibrary
|
||||
|
||||
add_library(comic_vine STATIC
|
||||
comic_vine_json_parser.h
|
||||
comic_vine_json_parser.cpp
|
||||
comic_vine_all_volume_comics_retriever.h
|
||||
comic_vine_all_volume_comics_retriever.cpp
|
||||
scraper_checkbox.h
|
||||
scraper_checkbox.cpp
|
||||
comic_vine_dialog.h
|
||||
comic_vine_dialog.cpp
|
||||
comic_vine_client.h
|
||||
comic_vine_client.cpp
|
||||
scraper_lineedit.h
|
||||
scraper_lineedit.cpp
|
||||
title_header.h
|
||||
title_header.cpp
|
||||
series_question.h
|
||||
series_question.cpp
|
||||
search_single_comic.h
|
||||
search_single_comic.cpp
|
||||
search_volume.h
|
||||
search_volume.cpp
|
||||
select_comic.h
|
||||
select_comic.cpp
|
||||
select_volume.h
|
||||
select_volume.cpp
|
||||
scraper_tableview.h
|
||||
scraper_tableview.cpp
|
||||
sort_volume_comics.h
|
||||
sort_volume_comics.cpp
|
||||
scraper_scroll_label.h
|
||||
scraper_scroll_label.cpp
|
||||
scraper_results_paginator.h
|
||||
scraper_results_paginator.cpp
|
||||
api_key_dialog.h
|
||||
api_key_dialog.cpp
|
||||
model/volumes_model.h
|
||||
model/volumes_model.cpp
|
||||
model/comics_model.h
|
||||
model/comics_model.cpp
|
||||
model/json_model.h
|
||||
model/json_model.cpp
|
||||
model/response_parser.h
|
||||
model/response_parser.cpp
|
||||
model/local_comic_list_model.h
|
||||
model/local_comic_list_model.cpp
|
||||
model/volume_comics_model.h
|
||||
model/volume_comics_model.cpp
|
||||
model/selected_volume_info.h
|
||||
model/volume_search_query.h
|
||||
)
|
||||
target_include_directories(comic_vine PUBLIC
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/model
|
||||
)
|
||||
# App-specific theme.h needed for themable.h → theme_manager.h → theme.h chain
|
||||
target_include_directories(comic_vine PRIVATE
|
||||
${CMAKE_SOURCE_DIR}/YACReaderLibrary/themes
|
||||
${CMAKE_SOURCE_DIR}/YACReaderLibrary/db
|
||||
)
|
||||
target_link_libraries(comic_vine PUBLIC
|
||||
Qt::Core
|
||||
Qt::Widgets
|
||||
Qt::Network
|
||||
common_all
|
||||
common_gui
|
||||
custom_widgets_library
|
||||
db_helper
|
||||
QsLog
|
||||
)
|
||||
@ -1,52 +0,0 @@
|
||||
|
||||
HEADERS += \
|
||||
$$PWD/comic_vine_json_parser.h \
|
||||
$$PWD/model/selected_volume_info.h \
|
||||
$$PWD/model/volume_search_query.h \
|
||||
$$PWD/scraper_checkbox.h \
|
||||
comic_vine/comic_vine_dialog.h \
|
||||
comic_vine/comic_vine_client.h \
|
||||
comic_vine/scraper_lineedit.h \
|
||||
comic_vine/title_header.h \
|
||||
comic_vine/series_question.h \
|
||||
comic_vine/search_single_comic.h \
|
||||
comic_vine/search_volume.h \
|
||||
comic_vine/select_comic.h \
|
||||
comic_vine/select_volume.h \
|
||||
comic_vine/model/volumes_model.h \
|
||||
comic_vine/model/comics_model.h \
|
||||
comic_vine/model/json_model.h \
|
||||
comic_vine/model/response_parser.h \
|
||||
comic_vine/scraper_tableview.h \
|
||||
comic_vine/sort_volume_comics.h \
|
||||
comic_vine/model/local_comic_list_model.h \
|
||||
comic_vine/model/volume_comics_model.h \
|
||||
comic_vine/scraper_scroll_label.h \
|
||||
comic_vine/scraper_results_paginator.h \
|
||||
comic_vine/api_key_dialog.h \
|
||||
$$PWD/comic_vine_all_volume_comics_retriever.h
|
||||
|
||||
SOURCES += \
|
||||
$$PWD/comic_vine_json_parser.cpp \
|
||||
$$PWD/scraper_checkbox.cpp \
|
||||
comic_vine/comic_vine_dialog.cpp \
|
||||
comic_vine/comic_vine_client.cpp \
|
||||
comic_vine/scraper_lineedit.cpp \
|
||||
comic_vine/title_header.cpp \
|
||||
comic_vine/series_question.cpp \
|
||||
comic_vine/search_single_comic.cpp \
|
||||
comic_vine/search_volume.cpp \
|
||||
comic_vine/select_comic.cpp \
|
||||
comic_vine/select_volume.cpp \
|
||||
comic_vine/model/volumes_model.cpp \
|
||||
comic_vine/model/comics_model.cpp \
|
||||
comic_vine/model/json_model.cpp \
|
||||
comic_vine/model/response_parser.cpp \
|
||||
comic_vine/scraper_tableview.cpp \
|
||||
comic_vine/sort_volume_comics.cpp \
|
||||
comic_vine/model/local_comic_list_model.cpp \
|
||||
comic_vine/model/volume_comics_model.cpp \
|
||||
comic_vine/scraper_scroll_label.cpp \
|
||||
comic_vine/scraper_results_paginator.cpp \
|
||||
comic_vine/api_key_dialog.cpp \
|
||||
$$PWD/comic_vine_all_volume_comics_retriever.cpp
|
||||
85
YACReaderLibrary/server/CMakeLists.txt
Normal file
85
YACReaderLibrary/server/CMakeLists.txt
Normal file
@ -0,0 +1,85 @@
|
||||
# YACReaderLibrary server (REST API + HTTP server)
|
||||
|
||||
add_library(server STATIC
|
||||
static.h
|
||||
static.cpp
|
||||
requestmapper.h
|
||||
requestmapper.cpp
|
||||
yacreader_http_server.h
|
||||
yacreader_http_server.cpp
|
||||
yacreader_http_session.h
|
||||
yacreader_http_session.cpp
|
||||
yacreader_http_session_store.h
|
||||
yacreader_http_session_store.cpp
|
||||
yacreader_server_data_helper.h
|
||||
yacreader_server_data_helper.cpp
|
||||
controllers/versioncontroller.h
|
||||
controllers/versioncontroller.cpp
|
||||
controllers/v2/comiccontroller_v2.h
|
||||
controllers/v2/comiccontroller_v2.cpp
|
||||
controllers/v2/errorcontroller_v2.h
|
||||
controllers/v2/errorcontroller_v2.cpp
|
||||
controllers/v2/folderinfocontroller_v2.h
|
||||
controllers/v2/folderinfocontroller_v2.cpp
|
||||
controllers/v2/librariescontroller_v2.h
|
||||
controllers/v2/librariescontroller_v2.cpp
|
||||
controllers/v2/pagecontroller_v2.h
|
||||
controllers/v2/pagecontroller_v2.cpp
|
||||
controllers/v2/covercontroller_v2.h
|
||||
controllers/v2/covercontroller_v2.cpp
|
||||
controllers/v2/updatecomiccontroller_v2.h
|
||||
controllers/v2/updatecomiccontroller_v2.cpp
|
||||
controllers/v2/comicdownloadinfocontroller_v2.h
|
||||
controllers/v2/comicdownloadinfocontroller_v2.cpp
|
||||
controllers/v2/synccontroller_v2.h
|
||||
controllers/v2/synccontroller_v2.cpp
|
||||
controllers/v2/foldercontentcontroller_v2.h
|
||||
controllers/v2/foldercontentcontroller_v2.cpp
|
||||
controllers/v2/tagscontroller_v2.h
|
||||
controllers/v2/tagscontroller_v2.cpp
|
||||
controllers/v2/tagcontentcontroller_v2.h
|
||||
controllers/v2/tagcontentcontroller_v2.cpp
|
||||
controllers/v2/favoritescontroller_v2.h
|
||||
controllers/v2/favoritescontroller_v2.cpp
|
||||
controllers/v2/readingcomicscontroller_v2.h
|
||||
controllers/v2/readingcomicscontroller_v2.cpp
|
||||
controllers/v2/readinglistscontroller_v2.h
|
||||
controllers/v2/readinglistscontroller_v2.cpp
|
||||
controllers/v2/readinglistcontentcontroller_v2.h
|
||||
controllers/v2/readinglistcontentcontroller_v2.cpp
|
||||
controllers/v2/comicfullinfocontroller_v2.h
|
||||
controllers/v2/comicfullinfocontroller_v2.cpp
|
||||
controllers/v2/readinglistinfocontroller_v2.h
|
||||
controllers/v2/readinglistinfocontroller_v2.cpp
|
||||
controllers/v2/taginfocontroller_v2.h
|
||||
controllers/v2/taginfocontroller_v2.cpp
|
||||
controllers/v2/comiccontrollerinreadinglist_v2.h
|
||||
controllers/v2/comiccontrollerinreadinglist_v2.cpp
|
||||
controllers/v2/foldermetadatacontroller_v2.h
|
||||
controllers/v2/foldermetadatacontroller_v2.cpp
|
||||
controllers/v2/searchcontroller_v2.h
|
||||
controllers/v2/searchcontroller_v2.cpp
|
||||
controllers/webui/statuspagecontroller.h
|
||||
controllers/webui/statuspagecontroller.cpp
|
||||
)
|
||||
target_include_directories(server PUBLIC
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/controllers
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/controllers/v2
|
||||
)
|
||||
target_compile_definitions(server PUBLIC SERVER_VERSION_NUMBER="2.1")
|
||||
if(UNIX AND NOT APPLE)
|
||||
target_compile_definitions(server PRIVATE
|
||||
"DATADIR=\"${CMAKE_INSTALL_FULL_DATADIR}\"")
|
||||
endif()
|
||||
target_link_libraries(server PUBLIC
|
||||
Qt::Core
|
||||
Qt::Network
|
||||
Qt::Sql
|
||||
QtWebApp_httpserver
|
||||
QtWebApp_templateengine
|
||||
QsLog
|
||||
common_all
|
||||
comic_backend
|
||||
db_helper
|
||||
)
|
||||
@ -1,81 +0,0 @@
|
||||
INCLUDEPATH += $$PWD
|
||||
INCLUDEPATH += $$PWD/controllers
|
||||
INCLUDEPATH += $$PWD/controllers/v2
|
||||
DEPENDPATH += $$PWD
|
||||
DEPENDPATH += $$PWD/controllers
|
||||
DEPENDPATH += $$PWD/controllers/v2
|
||||
|
||||
|
||||
HEADERS += \
|
||||
$$PWD/controllers/v2/foldermetadatacontroller_v2.h \
|
||||
$$PWD/controllers/v2/searchcontroller_v2.h \
|
||||
$$PWD/static.h \
|
||||
$$PWD/requestmapper.h \
|
||||
$$PWD/yacreader_http_server.h \
|
||||
$$PWD/yacreader_http_session.h \
|
||||
$$PWD/yacreader_http_session_store.h \
|
||||
$$PWD/yacreader_server_data_helper.h \
|
||||
$$PWD/controllers/versioncontroller.h \
|
||||
#v2
|
||||
$$PWD/controllers/v2/comiccontroller_v2.h \
|
||||
$$PWD/controllers/v2/errorcontroller_v2.h \
|
||||
$$PWD/controllers/v2/folderinfocontroller_v2.h \
|
||||
$$PWD/controllers/v2/librariescontroller_v2.h \
|
||||
$$PWD/controllers/v2/pagecontroller_v2.h \
|
||||
$$PWD/controllers/v2/covercontroller_v2.h \
|
||||
$$PWD/controllers/v2/updatecomiccontroller_v2.h \
|
||||
$$PWD/controllers/v2/comicdownloadinfocontroller_v2.h \
|
||||
$$PWD/controllers/v2/synccontroller_v2.h \
|
||||
$$PWD/controllers/v2/foldercontentcontroller_v2.h \
|
||||
$$PWD/controllers/v2/tagscontroller_v2.h \
|
||||
$$PWD/controllers/v2/tagcontentcontroller_v2.h \
|
||||
$$PWD/controllers/v2/favoritescontroller_v2.h \
|
||||
$$PWD/controllers/v2/readingcomicscontroller_v2.h \
|
||||
$$PWD/controllers/v2/readinglistscontroller_v2.h \
|
||||
$$PWD/controllers/v2/readinglistcontentcontroller_v2.h \
|
||||
$$PWD/controllers/v2/comicfullinfocontroller_v2.h \
|
||||
$$PWD/controllers/v2/readinglistinfocontroller_v2.h \
|
||||
$$PWD/controllers/v2/taginfocontroller_v2.h \
|
||||
$$PWD/controllers/v2/comiccontrollerinreadinglist_v2.h\
|
||||
#Browser
|
||||
$$PWD/controllers/webui/statuspagecontroller.h
|
||||
|
||||
|
||||
SOURCES += \
|
||||
$$PWD/controllers/v2/foldermetadatacontroller_v2.cpp \
|
||||
$$PWD/controllers/v2/searchcontroller_v2.cpp \
|
||||
$$PWD/static.cpp \
|
||||
$$PWD/requestmapper.cpp \
|
||||
$$PWD/yacreader_http_server.cpp \
|
||||
$$PWD/yacreader_http_session.cpp \
|
||||
$$PWD/yacreader_http_session_store.cpp \
|
||||
$$PWD/yacreader_server_data_helper.cpp \
|
||||
$$PWD/controllers/versioncontroller.cpp \
|
||||
#v2
|
||||
$$PWD/controllers/v2/comiccontroller_v2.cpp \
|
||||
$$PWD/controllers/v2/errorcontroller_v2.cpp \
|
||||
$$PWD/controllers/v2/folderinfocontroller_v2.cpp \
|
||||
$$PWD/controllers/v2/librariescontroller_v2.cpp \
|
||||
$$PWD/controllers/v2/pagecontroller_v2.cpp \
|
||||
$$PWD/controllers/v2/covercontroller_v2.cpp \
|
||||
$$PWD/controllers/v2/updatecomiccontroller_v2.cpp \
|
||||
$$PWD/controllers/v2/comicdownloadinfocontroller_v2.cpp \
|
||||
$$PWD/controllers/v2/synccontroller_v2.cpp \
|
||||
$$PWD/controllers/v2/foldercontentcontroller_v2.cpp \
|
||||
$$PWD/controllers/v2/tagscontroller_v2.cpp \
|
||||
$$PWD/controllers/v2/tagcontentcontroller_v2.cpp \
|
||||
$$PWD/controllers/v2/favoritescontroller_v2.cpp \
|
||||
$$PWD/controllers/v2/readingcomicscontroller_v2.cpp \
|
||||
$$PWD/controllers/v2/readinglistscontroller_v2.cpp \
|
||||
$$PWD/controllers/v2/readinglistcontentcontroller_v2.cpp \
|
||||
$$PWD/controllers/v2/comicfullinfocontroller_v2.cpp \
|
||||
$$PWD/controllers/v2/readinglistinfocontroller_v2.cpp \
|
||||
$$PWD/controllers/v2/taginfocontroller_v2.cpp \
|
||||
$$PWD/controllers/v2/comiccontrollerinreadinglist_v2.cpp \
|
||||
#WebUI
|
||||
$$PWD/controllers/webui/statuspagecontroller.cpp
|
||||
|
||||
include(../../third_party/QtWebApp/httpserver/httpserver.pri)
|
||||
include(../../third_party/QtWebApp/templateengine/templateengine.pri)
|
||||
|
||||
DEFINES += SERVER_VERSION_NUMBER=\\\"2.1\\\"
|
||||
@ -1,7 +0,0 @@
|
||||
INCLUDEPATH += $$PWD
|
||||
|
||||
HEADERS += \
|
||||
$$PWD/theme.h \
|
||||
$$PWD/theme_factory.h
|
||||
SOURCES += \
|
||||
$$PWD/theme_factory.cpp
|
||||
Reference in New Issue
Block a user