diff --git a/autotests/BackendsManager.h b/autotests/BackendsManager.h --- a/autotests/BackendsManager.h +++ b/autotests/BackendsManager.h @@ -22,12 +22,11 @@ #include "AuthBackend.h" #include "HelperProxy.h" -#include namespace KAuth { -class KAUTH_EXPORT BackendsManager +class BackendsManager { static AuthBackend *auth; static HelperProxy *helper; diff --git a/autotests/CMakeLists.txt b/autotests/CMakeLists.txt --- a/autotests/CMakeLists.txt +++ b/autotests/CMakeLists.txt @@ -34,7 +34,10 @@ add_library(kauth_tests_static STATIC ${libkauth_tests_static_SRCS}) # make sure all executables using this library have the define set to make sure it builds on MSVC -target_compile_definitions(kauth_tests_static PUBLIC KAUTH_STATIC_DEFINE=1) +target_compile_definitions(kauth_tests_static + PUBLIC KAUTHCORE_STATIC_DEFINE=1 + PUBLIC KAUTH_STATIC_DEFINE=1 +) ecm_mark_as_test(kauth_tests_static) target_include_directories(kauth_tests_static diff --git a/src/BackendsManager.h b/src/BackendsManager.h --- a/src/BackendsManager.h +++ b/src/BackendsManager.h @@ -23,12 +23,12 @@ #include "AuthBackend.h" #include "HelperProxy.h" -#include +#include namespace KAuth { -class KAUTH_EXPORT BackendsManager +class KAUTHCORE_EXPORT BackendsManager { static AuthBackend *auth; static HelperProxy *helper; diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -27,6 +27,7 @@ ) add_library(KF5AuthCore ${libkauth_core_SRCS}) + generate_export_header(KF5AuthCore BASE_NAME KAuthCore) target_link_libraries(KF5AuthCore PUBLIC Qt5::Core KF5::CoreAddons) # for KJob target_link_libraries(KF5AuthCore PRIVATE Qt5::DBus) target_include_directories(KF5AuthCore INTERFACE "$") @@ -68,6 +69,7 @@ install(TARGETS KF5Auth EXPORT KF5AuthTargets ${KF5_INSTALL_TARGETS_DEFAULT_ARGS}) install(FILES ${CMAKE_CURRENT_BINARY_DIR}/kauth_export.h + ${CMAKE_CURRENT_BINARY_DIR}/kauthcore_export.h ${KAuth_HEADERS} DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF5}/KAuth COMPONENT Devel ) @@ -158,6 +160,7 @@ Qt5Core_QCH KF5CoreAddons_QCH BLANK_MACROS + KAUTHCORE_EXPORT KAUTH_EXPORT KAUTH_DEPRECATED KAUTH_DEPRECATED_EXPORT diff --git a/src/kauthaction.h b/src/kauthaction.h --- a/src/kauthaction.h +++ b/src/kauthaction.h @@ -26,7 +26,7 @@ #include #include -#include +#include namespace KAuth { @@ -79,7 +79,7 @@ * * @since 4.4 */ -class KAUTH_EXPORT Action +class KAUTHCORE_EXPORT Action { Q_GADGET public: diff --git a/src/kauthactionreply.h b/src/kauthactionreply.h --- a/src/kauthactionreply.h +++ b/src/kauthactionreply.h @@ -27,7 +27,7 @@ #include #include -#include +#include /** @namespace KAuth @@ -340,7 +340,7 @@ * * @since 4.4 */ -class KAUTH_EXPORT ActionReply +class KAUTHCORE_EXPORT ActionReply { public: /** diff --git a/src/kauthexecutejob.h b/src/kauthexecutejob.h --- a/src/kauthexecutejob.h +++ b/src/kauthexecutejob.h @@ -22,7 +22,7 @@ #include -#include +#include #include "kauthaction.h" #include "kauthactionreply.h" @@ -46,7 +46,7 @@ * * @since 5.0 */ -class KAUTH_EXPORT ExecuteJob : public KJob +class KAUTHCORE_EXPORT ExecuteJob : public KJob { Q_OBJECT diff --git a/src/kauthhelpersupport.h b/src/kauthhelpersupport.h --- a/src/kauthhelpersupport.h +++ b/src/kauthhelpersupport.h @@ -23,19 +23,19 @@ #include #include -#include +#include #define KAUTH_HELPER_MAIN(ID, HelperClass) \ int main(int argc, char **argv) { return KAuth::HelperSupport::helperMain(argc, argv, ID, new HelperClass()); } namespace KAuth { /** - * @brief Support class with some KAUTH_EXPORT methods useful to the helper's code + * @brief Support class with some KAUTHCORE_EXPORT methods useful to the helper's code * * This class provides the API to write the helper tool that executes your actions. - * You don't create instances of HelperSupport. Instead, you use its KAUTH_EXPORT methods. + * You don't create instances of HelperSupport. Instead, you use its KAUTHCORE_EXPORT methods. * * This them you can notify the application of progress in your action's execution * and you can check if the application asked you to terminate it. @@ -56,7 +56,7 @@ * * @param step The progress indicator */ -KAUTH_EXPORT void progressStep(int step); +KAUTHCORE_EXPORT void progressStep(int step); /** * @brief Send a progressStep signal to the caller application @@ -70,7 +70,7 @@ * * @param data The progress data */ -KAUTH_EXPORT void progressStep(const QVariantMap &data); +KAUTHCORE_EXPORT void progressStep(const QVariantMap &data); /** * @brief Check if the caller asked the helper to stop the execution @@ -85,7 +85,7 @@ * @see ExecuteJob::kill * @return true if the helper has been asked to stop, false otherwise */ -KAUTH_EXPORT bool isStopped(); +KAUTHCORE_EXPORT bool isStopped(); /** * @brief Method that implements the main function of the helper tool. Do not call directly @@ -100,7 +100,7 @@ * @param responder The responder object for the helper. The macro passes a default-constructed, * heap-allocated object of the class specified as the last macro parameter */ -KAUTH_EXPORT int helperMain(int argc, char **argv, const char *id, QObject *responder); +KAUTHCORE_EXPORT int helperMain(int argc, char **argv, const char *id, QObject *responder); } // namespace HelperSupport } // namespace Auth