From 8fa0a3a72330d3ac9ec799cb71c093e4d4a55844 Mon Sep 17 00:00:00 2001 From: Martin Rotter Date: Tue, 1 Feb 2022 11:30:47 +0100 Subject: [PATCH] unify exported targets prefix --- CMakeLists.txt | 9 +++------ src/librssguard/CMakeLists.txt | 23 ++++++++++++----------- src/rssguard/CMakeLists.txt | 8 ++++---- 3 files changed, 19 insertions(+), 21 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index cb78bc5da..0a7e2fd86 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -143,9 +143,11 @@ if(UNIX AND NOT APPLE AND NOT ANDROID) endif() if(BUILD_WITH_QT6) + set(QTTAR Qt) find_package(QT NAMES Qt6) find_package(Qt6 COMPONENTS ${QT_COMPONENTS} Core5Compat REQUIRED) else() + set(QTTAR Qt5) find_package(QT NAMES Qt5) find_package(Qt5 COMPONENTS ${QT_COMPONENTS} REQUIRED) @@ -173,12 +175,6 @@ else() endif() endif() -#if(NOT OS2) -# macro(qt_add_resources) -# qt_add_big_resources(${ARGN}) -# endmacro() -#endif() - # Process oauth service secrets. if(NOT FEEDLY_CLIENT_ID STREQUAL "" AND NOT FEEDLY_CLIENT_SECRET STREQUAL "") add_compile_definitions( @@ -276,6 +272,7 @@ elseif(APPLE) ) endif() +# Generate localizations, build library and application. add_subdirectory(localization) add_subdirectory(src/librssguard) add_subdirectory(src/rssguard) diff --git a/src/librssguard/CMakeLists.txt b/src/librssguard/CMakeLists.txt index 4aeee8b86..8d73a4368 100644 --- a/src/librssguard/CMakeLists.txt +++ b/src/librssguard/CMakeLists.txt @@ -502,6 +502,7 @@ qt_wrap_ui(SOURCES ${UI_FILES}) qt_add_resources(SOURCES ${CMAKE_SOURCE_DIR}/resources/sql.qrc) qt_add_resources(SOURCES ${CMAKE_SOURCE_DIR}/resources/rssguard.qrc) +# Bundle icons on some platforms which do not provide system-wide icon themes. if(APPLE OR WIN32 OR OS2) qt_add_resources(SOURCES ${CMAKE_SOURCE_DIR}/resources/icons.qrc) endif() @@ -529,36 +530,36 @@ target_include_directories(rssguard ) target_link_libraries(rssguard PUBLIC - Qt::Core - Qt::Gui - Qt::Network - Qt::Qml - Qt::Sql - Qt::Widgets - Qt::Xml + ${QTTAR}::Core + ${QTTAR}::Gui + ${QTTAR}::Network + ${QTTAR}::Qml + ${QTTAR}::Sql + ${QTTAR}::Widgets + ${QTTAR}::Xml ) if(QT_VERSION_MAJOR EQUAL 6) target_link_libraries(rssguard PUBLIC - Qt::Core5Compat + ${QTTAR}::Core5Compat ) endif() if(USE_WEBENGINE) target_link_libraries(rssguard PUBLIC - Qt::WebEngineWidgets + ${QTTAR}::WebEngineWidgets ) endif() if(NOT OS2) target_link_libraries(rssguard PUBLIC - Qt::Multimedia + ${QTTAR}::Multimedia ) endif() if(UNIX AND NOT APPLE AND NOT ANDROID) target_link_libraries(rssguard PUBLIC - Qt::DBus + ${QTTAR}::DBus ) endif() diff --git a/src/rssguard/CMakeLists.txt b/src/rssguard/CMakeLists.txt index 169e7e067..a85c300e7 100644 --- a/src/rssguard/CMakeLists.txt +++ b/src/rssguard/CMakeLists.txt @@ -14,15 +14,15 @@ target_include_directories(app PUBLIC ) target_link_libraries(app PUBLIC - Qt::Core - Qt::Gui - Qt::Widgets + ${QTTAR}::Core + ${QTTAR}::Gui + ${QTTAR}::Widgets rssguard ) if(QT_VERSION_MAJOR EQUAL 6) target_link_libraries(app PUBLIC - Qt::Core5Compat + ${QTTAR}::Core5Compat ) endif()