diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -10,11 +10,12 @@ ecm_qt_declare_logging_category(kauthdebug_SRCS HEADER kauthdebug.h IDENTIFIER KAUTH CATEGORY_NAME kf5.kauth) if(TARGET Qt5::Widgets) - set(libkauth_SRCS + # TODO KF6 Rename KAuth to KAuthWidgets + # TODO KAuthCore should be installed also when no widgets available, in the header installation etc, so ignoring for now + set(libkauth_core_SRCS kauthaction.cpp kauthactionreply.cpp kauthexecutejob.cpp - kauthobjectdecorator.cpp AuthBackend.cpp BackendsManager.cpp HelperProxy.cpp @@ -25,14 +26,28 @@ ${KAuth_QM_LOADER} ) + add_library(KF5AuthCore ${libkauth_core_SRCS}) + target_link_libraries(KF5AuthCore PUBLIC Qt5::Core KF5::CoreAddons) # for KJob + target_link_libraries(KF5AuthCore PRIVATE Qt5::DBus) + target_include_directories(KF5AuthCore INTERFACE "$") + install(TARGETS KF5AuthCore EXPORT KF5AuthTargets ${KF5_INSTALL_TARGETS_DEFAULT_ARGS}) + set_target_properties(KF5AuthCore PROPERTIES VERSION ${KAUTH_VERSION_STRING} + SOVERSION ${KAUTH_SOVERSION} + EXPORT_NAME AuthCore) + + set(libkauth_SRCS + ${kauthdebug_SRCS} + kauthobjectdecorator.cpp + ) + add_library(KF5Auth ${libkauth_SRCS}) generate_export_header(KF5Auth BASE_NAME KAuth) add_library(KF5::Auth ALIAS KF5Auth) target_include_directories(KF5Auth INTERFACE "$") - target_link_libraries(KF5Auth PUBLIC Qt5::Core KF5::CoreAddons) # for KJob - target_link_libraries(KF5Auth PRIVATE Qt5::Widgets Qt5::DBus) + target_link_libraries(KF5Auth PUBLIC KF5AuthCore) + target_link_libraries(KF5Auth PRIVATE Qt5::Widgets) set_target_properties(KF5Auth PROPERTIES VERSION ${KAUTH_VERSION_STRING} SOVERSION ${KAUTH_SOVERSION} EXPORT_NAME Auth