unify exported targets prefix

This commit is contained in:
Martin Rotter 2022-02-01 11:30:47 +01:00
parent 8f854b3e77
commit 8fa0a3a723
3 changed files with 19 additions and 21 deletions

View File

@ -143,9 +143,11 @@ if(UNIX AND NOT APPLE AND NOT ANDROID)
endif() endif()
if(BUILD_WITH_QT6) if(BUILD_WITH_QT6)
set(QTTAR Qt)
find_package(QT NAMES Qt6) find_package(QT NAMES Qt6)
find_package(Qt6 COMPONENTS ${QT_COMPONENTS} Core5Compat REQUIRED) find_package(Qt6 COMPONENTS ${QT_COMPONENTS} Core5Compat REQUIRED)
else() else()
set(QTTAR Qt5)
find_package(QT NAMES Qt5) find_package(QT NAMES Qt5)
find_package(Qt5 COMPONENTS ${QT_COMPONENTS} REQUIRED) find_package(Qt5 COMPONENTS ${QT_COMPONENTS} REQUIRED)
@ -173,12 +175,6 @@ else()
endif() endif()
endif() endif()
#if(NOT OS2)
# macro(qt_add_resources)
# qt_add_big_resources(${ARGN})
# endmacro()
#endif()
# Process oauth service secrets. # Process oauth service secrets.
if(NOT FEEDLY_CLIENT_ID STREQUAL "" AND NOT FEEDLY_CLIENT_SECRET STREQUAL "") if(NOT FEEDLY_CLIENT_ID STREQUAL "" AND NOT FEEDLY_CLIENT_SECRET STREQUAL "")
add_compile_definitions( add_compile_definitions(
@ -276,6 +272,7 @@ elseif(APPLE)
) )
endif() endif()
# Generate localizations, build library and application.
add_subdirectory(localization) add_subdirectory(localization)
add_subdirectory(src/librssguard) add_subdirectory(src/librssguard)
add_subdirectory(src/rssguard) add_subdirectory(src/rssguard)

View File

@ -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/sql.qrc)
qt_add_resources(SOURCES ${CMAKE_SOURCE_DIR}/resources/rssguard.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) if(APPLE OR WIN32 OR OS2)
qt_add_resources(SOURCES ${CMAKE_SOURCE_DIR}/resources/icons.qrc) qt_add_resources(SOURCES ${CMAKE_SOURCE_DIR}/resources/icons.qrc)
endif() endif()
@ -529,36 +530,36 @@ target_include_directories(rssguard
) )
target_link_libraries(rssguard PUBLIC target_link_libraries(rssguard PUBLIC
Qt::Core ${QTTAR}::Core
Qt::Gui ${QTTAR}::Gui
Qt::Network ${QTTAR}::Network
Qt::Qml ${QTTAR}::Qml
Qt::Sql ${QTTAR}::Sql
Qt::Widgets ${QTTAR}::Widgets
Qt::Xml ${QTTAR}::Xml
) )
if(QT_VERSION_MAJOR EQUAL 6) if(QT_VERSION_MAJOR EQUAL 6)
target_link_libraries(rssguard PUBLIC target_link_libraries(rssguard PUBLIC
Qt::Core5Compat ${QTTAR}::Core5Compat
) )
endif() endif()
if(USE_WEBENGINE) if(USE_WEBENGINE)
target_link_libraries(rssguard PUBLIC target_link_libraries(rssguard PUBLIC
Qt::WebEngineWidgets ${QTTAR}::WebEngineWidgets
) )
endif() endif()
if(NOT OS2) if(NOT OS2)
target_link_libraries(rssguard PUBLIC target_link_libraries(rssguard PUBLIC
Qt::Multimedia ${QTTAR}::Multimedia
) )
endif() endif()
if(UNIX AND NOT APPLE AND NOT ANDROID) if(UNIX AND NOT APPLE AND NOT ANDROID)
target_link_libraries(rssguard PUBLIC target_link_libraries(rssguard PUBLIC
Qt::DBus ${QTTAR}::DBus
) )
endif() endif()

View File

@ -14,15 +14,15 @@ target_include_directories(app PUBLIC
) )
target_link_libraries(app PUBLIC target_link_libraries(app PUBLIC
Qt::Core ${QTTAR}::Core
Qt::Gui ${QTTAR}::Gui
Qt::Widgets ${QTTAR}::Widgets
rssguard rssguard
) )
if(QT_VERSION_MAJOR EQUAL 6) if(QT_VERSION_MAJOR EQUAL 6)
target_link_libraries(app PUBLIC target_link_libraries(app PUBLIC
Qt::Core5Compat ${QTTAR}::Core5Compat
) )
endif() endif()