Migrate the build system to cmake

This commit is contained in:
Luis Ángel San Martín Rodríguez
2026-02-25 09:19:39 +01:00
parent 5f8951ac09
commit 865020fe11
63 changed files with 1859 additions and 2060 deletions

View File

@ -0,0 +1,34 @@
# Shortcuts management for YACReader
# Two targets: reader-specific, library-specific (compiled with different defines)
set(SHORTCUTS_SOURCES
edit_shortcuts_dialog.h
edit_shortcuts_dialog.cpp
actions_groups_model.h
actions_groups_model.cpp
actions_shortcuts_model.h
actions_shortcuts_model.cpp
edit_shortcut_item_delegate.h
edit_shortcut_item_delegate.cpp
shortcuts_manager.h
shortcuts_manager.cpp
)
# --- shortcuts_reader (YACREADER define) ---
add_library(shortcuts_reader STATIC ${SHORTCUTS_SOURCES})
target_include_directories(shortcuts_reader PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
# App-specific theme.h needed because themable.h → theme_manager.h → theme.h
target_include_directories(shortcuts_reader PRIVATE
${CMAKE_SOURCE_DIR}/YACReader/themes
)
target_compile_definitions(shortcuts_reader PRIVATE YACREADER)
target_link_libraries(shortcuts_reader PUBLIC Qt::Core Qt::Widgets yr_global common_gui)
# --- shortcuts_library (YACREADER_LIBRARY define) ---
add_library(shortcuts_library STATIC ${SHORTCUTS_SOURCES})
target_include_directories(shortcuts_library PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
target_include_directories(shortcuts_library PRIVATE
${CMAKE_SOURCE_DIR}/YACReaderLibrary/themes
)
target_compile_definitions(shortcuts_library PRIVATE YACREADER_LIBRARY)
target_link_libraries(shortcuts_library PUBLIC Qt::Core Qt::Widgets yr_global common_gui)

View File

@ -1,16 +0,0 @@
INCLUDEPATH += $$PWD
DEPENDPATH += $$PWD
HEADERS += \
$$PWD/edit_shortcuts_dialog.h \
$$PWD/actions_groups_model.h \
$$PWD/actions_shortcuts_model.h \
$$PWD/edit_shortcut_item_delegate.h \
$$PWD/shortcuts_manager.h
SOURCES += \
$$PWD/edit_shortcuts_dialog.cpp \
$$PWD/actions_groups_model.cpp \
$$PWD/actions_shortcuts_model.cpp \
$$PWD/edit_shortcut_item_delegate.cpp \
$$PWD/shortcuts_manager.cpp