From 1f34f5ad730bb9dca6b152dd20dab43887ae72bc Mon Sep 17 00:00:00 2001 From: Ivailo Monev Date: Wed, 27 Apr 2016 18:43:11 +0000 Subject: [PATCH] generic: use CMake export header generator Signed-off-by: Ivailo Monev --- CMakeLists.txt | 6 + cmake/modules/FindKDE4Internal.cmake | 140 ++------------------ dnssd/CMakeLists.txt | 5 +- dnssd/CreateKcfgFiles.cmake | 2 +- dnssd/dnssd_export.h | 36 ----- dnssd/domainmodel.h | 2 +- dnssd/servicebase.h | 2 +- dnssd/servicemodel.h | 2 +- interfaces/kimproxy/CMakeLists.txt | 4 +- interfaces/kimproxy/kimproxy_export.h | 36 ----- interfaces/kspeech/CMakeLists.txt | 8 +- interfaces/kspeech/kspeech_export.h | 36 ----- interfaces/ktexteditor/CMakeLists.txt | 6 +- interfaces/ktexteditor/ktexteditor_export.h | 41 ------ kcddb/kcmcddb/cddbconfigwidget.cpp | 2 - kcddb/libkcddb/CMakeLists.txt | 6 +- kcddb/libkcddb/cache.h | 3 +- kcddb/libkcddb/client.h | 1 - kcddb/libkcddb/kcddb_export.h | 40 ------ kdcraw/libkdcraw/CMakeLists.txt | 4 +- kdcraw/libkdcraw/dcrawinfocontainer.h | 6 +- kdcraw/libkdcraw/dcrawsettingswidget.h | 4 +- kdcraw/libkdcraw/kdcraw.h | 4 +- kdcraw/libkdcraw/libkdcraw_export.h | 47 ------- kdcraw/libkdcraw/rawdecodingsettings.h | 6 +- kdcraw/libkdcraw/rcombobox.h | 4 +- kdcraw/libkdcraw/rexpanderbox.h | 14 +- kdcraw/libkdcraw/rnuminput.h | 6 +- kdcraw/libkdcraw/squeezedcombobox.h | 4 +- kdeclarative/CMakeLists.txt | 4 +- kdeclarative/kdeclarative_export.h | 40 ------ kdecore/CMakeLists.txt | 4 +- kdecore/io/kdebug.h | 2 +- kdecore/kdecore_export.h | 40 ------ kdecore/kernel/kauthorized.h | 12 +- kdecore/localization/klocale.h | 6 +- kdecore/util/kexportplugin.h | 4 +- kdecore/util/ksharedptr.h | 1 - kdecore/util/kshell.h | 1 + kdemacros.h.cmake | 20 +-- kdesu/CMakeLists.txt | 4 +- kdesu/kdesu_export.h | 36 ----- kdeui/CMakeLists.txt | 4 +- kdeui/fonts/kfontutils.h | 1 + kdeui/kdeui_export.h | 40 ------ kdeui/kernel/kapplication.cpp | 10 +- kdeui/kernel/kapplication.h | 9 +- kdeui/sonnet/highlighter.h | 1 - kdeui/util/kcrash.h | 1 + kdeui/util/kkeyserver.h | 1 + kdeui/widgets/kstringvalidator.h | 2 +- kdewebkit/CMakeLists.txt | 14 +- kdewebkit/kdewebkit_export.h | 43 ------ kdewebkit/kwebkitpart/src/sslinfodialog_p.h | 1 - kdewebkit/kwebkitpart/src/websslinfo.h | 2 - kexiv2/libkexiv2/CMakeLists.txt | 4 +- kexiv2/libkexiv2/altlangstredit.h | 2 +- kexiv2/libkexiv2/countryselector.h | 2 +- kexiv2/libkexiv2/kexiv2.h | 1 - kexiv2/libkexiv2/kexiv2data.h | 2 +- kexiv2/libkexiv2/kexiv2previews.h | 2 +- kexiv2/libkexiv2/libkexiv2_export.h | 47 ------- kexiv2/libkexiv2/msgtextedit.h | 2 +- kexiv2/libkexiv2/rotationmatrix.h | 1 - kexiv2/libkexiv2/subjectwidget.h | 2 +- kfile/CMakeLists.txt | 4 +- kfile/kfile_export.h | 40 ------ kimgio/pcx.h | 2 - kinit/CMakeLists.txt | 2 +- kinit/kinit.cpp | 1 - kio/CMakeLists.txt | 4 +- kio/bookmarks/kbookmarkimporter_ie.h | 1 - kio/bookmarks/kbookmarkimporter_ns.h | 1 - kio/kfile/kpropertiesdialog.h | 1 - kio/kio/connection.h | 4 +- kio/kio/kio_export.h | 40 ------ kio/kio/ksambashare.h | 2 +- kio/kio/metainfojob.h | 4 +- kio/kio/paste.h | 2 +- kio/kio/slaveinterface.h | 4 +- kio/kio/thumbcreator.cpp | 2 + kio/kio/thumbsequencecreator.h | 2 + kio/misc/kntlm/CMakeLists.txt | 4 +- kio/misc/kntlm/kntlm_export.h | 40 ------ kioslave/file/CMakeLists.txt | 2 + kioslave/file/file.h | 2 +- kioslave/file/kioslave_file_export.h | 40 ------ knotify/CMakeLists.txt | 4 +- knotify/knotifyconfig_export.h | 36 ----- kparts/CMakeLists.txt | 4 +- kparts/kparts_export.h | 36 ----- kpty/CMakeLists.txt | 4 +- kpty/kpty.h | 2 + kpty/kpty_export.h | 40 ------ kross/core/CMakeLists.txt | 4 +- kross/core/kross_export.h | 64 --------- kross/qts/plugin.h | 5 +- kunitconversion/CMakeLists.txt | 4 +- kunitconversion/kunitconversion_export.h | 40 ------ kutils/CMakeLists.txt | 8 +- kutils/kcmutils_export.h | 36 ----- kutils/kemoticons_export.h | 36 ----- kutils/kidletime_export.h | 36 ----- kutils/kmediaplayer/CMakeLists.txt | 4 +- kutils/kmediaplayer/kmediaplayer_export.h | 35 ----- kutils/kprintutils_export.h | 36 ----- plasma/CMakeLists.txt | 4 +- plasma/plasma_export.h | 40 ------ solid/solid/CMakeLists.txt | 7 +- solid/solid/solid_export.h.cmake | 53 -------- threadweaver/CMakeLists.txt | 4 +- threadweaver/threadweaver_export.h | 36 ----- 112 files changed, 190 insertions(+), 1437 deletions(-) delete mode 100644 dnssd/dnssd_export.h delete mode 100644 interfaces/kimproxy/kimproxy_export.h delete mode 100644 interfaces/kspeech/kspeech_export.h delete mode 100644 interfaces/ktexteditor/ktexteditor_export.h delete mode 100644 kcddb/libkcddb/kcddb_export.h delete mode 100644 kdcraw/libkdcraw/libkdcraw_export.h delete mode 100644 kdeclarative/kdeclarative_export.h delete mode 100644 kdecore/kdecore_export.h delete mode 100644 kdesu/kdesu_export.h delete mode 100644 kdeui/kdeui_export.h delete mode 100644 kdewebkit/kdewebkit_export.h delete mode 100644 kexiv2/libkexiv2/libkexiv2_export.h delete mode 100644 kfile/kfile_export.h delete mode 100644 kio/kio/kio_export.h delete mode 100644 kio/misc/kntlm/kntlm_export.h delete mode 100644 kioslave/file/kioslave_file_export.h delete mode 100644 knotify/knotifyconfig_export.h delete mode 100644 kparts/kparts_export.h delete mode 100644 kpty/kpty_export.h delete mode 100644 kross/core/kross_export.h delete mode 100644 kunitconversion/kunitconversion_export.h delete mode 100644 kutils/kcmutils_export.h delete mode 100644 kutils/kemoticons_export.h delete mode 100644 kutils/kidletime_export.h delete mode 100644 kutils/kmediaplayer/kmediaplayer_export.h delete mode 100644 kutils/kprintutils_export.h delete mode 100644 plasma/plasma_export.h delete mode 100644 solid/solid/solid_export.h.cmake delete mode 100644 threadweaver/threadweaver_export.h diff --git a/CMakeLists.txt b/CMakeLists.txt index 92c56fc2..82ce3be0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -34,6 +34,7 @@ set(KDE_NO_DEPRECATED TRUE CACHE BOOL "Whether deprecated functionality is desir find_package(KDE4Internal REQUIRED) include(KDE4Defaults) include(MacroLibrary) +include(GenerateExportHeader) if(UNIX AND Q_WS_X11) #X11 Session Management (SM) is required @@ -174,6 +175,7 @@ set(KDE4_KDECORE_INCLUDES ${CMAKE_SOURCE_DIR}/kdecore/text ${CMAKE_SOURCE_DIR}/kdecore/util ${CMAKE_SOURCE_DIR}/kdecore/sonnet + ${CMAKE_BINARY_DIR}/kdecore ${QT_INCLUDES} ${_KDE4_PLATFORM_INCLUDE_DIRS} ) @@ -200,6 +202,7 @@ set(KDE4_KDEUI_INCLUDES ${CMAKE_SOURCE_DIR}/kdeui/widgets ${CMAKE_SOURCE_DIR}/kdeui/windowmanagement ${CMAKE_SOURCE_DIR}/kdeui/xmlgui + ${CMAKE_BINARY_DIR}/kdeui ${KDE4_KDECORE_INCLUDES} ) @@ -209,18 +212,21 @@ set(KDE4_KIO_INCLUDES ${CMAKE_SOURCE_DIR}/kio/bookmarks ${CMAKE_SOURCE_DIR}/kio/kio ${CMAKE_SOURCE_DIR}/kio/kfile + ${CMAKE_BINARY_DIR}/kio ${KDE4_KDEUI_INCLUDES} ) # kpty set(KDE4_KPTY_INCLUDES ${CMAKE_SOURCE_DIR}/kpty + ${CMAKE_BINARY_DIR}/kpty ${KDE4_KIO_INCLUDES} ) # kparts depends on kio set(KDE4_KPARTS_INCLUDES ${CMAKE_SOURCE_DIR}/kparts + ${CMAKE_BINARY_DIR}/kparts ${KDE4_KIO_INCLUDES} ) diff --git a/cmake/modules/FindKDE4Internal.cmake b/cmake/modules/FindKDE4Internal.cmake index f8665fda..e2866780 100644 --- a/cmake/modules/FindKDE4Internal.cmake +++ b/cmake/modules/FindKDE4Internal.cmake @@ -141,8 +141,6 @@ # # The following user adjustable options are provided: # -# KDE4_ENABLE_FPIE - enable it to use gcc Position Independent Executables feature -# # KDE4_ADD_KCFG_FILES (SRCS_VAR [GENERATE_MOC] [USE_RELATIVE_PATH] file1.kcfgc ... fileN.kcfgc) # Use this to add KDE config compiler files to your application/library. # Use optional GENERATE_MOC to generate moc if you use signals in your kcfg files. @@ -644,7 +642,7 @@ if(CMAKE_COMPILER_IS_GNUCXX) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-long-long -std=iso9899:1990 -Wundef -Wcast-align -Werror-implicit-function-declaration -Wchar-subscripts -Wall -W -Wpointer-arith -Wwrite-strings -Wformat-security -Wmissing-format-attribute -fno-common") # As of Qt 4.6.x we need to override the new exception macros if we want compile with -fno-exceptions - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wnon-virtual-dtor -Wno-long-long -Wundef -Wcast-align -Wchar-subscripts -Wall -W -Wpointer-arith -Wformat-security -fno-exceptions -DQT_NO_EXCEPTIONS -fno-check-new -fno-common") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wnon-virtual-dtor -Wno-long-long -Wundef -Wcast-align -Wchar-subscripts -Wall -W -Wpointer-arith -Wformat-security -fno-exceptions -DQT_NO_EXCEPTIONS -fno-check-new -fno-common -Werror=return-type -fvisibility-inlines-hidden") if(CMAKE_SYSTEM_NAME MATCHES Linux OR CMAKE_SYSTEM_NAME STREQUAL GNU) # This should not be needed, as it is also part of _KDE4_PLATFORM_DEFINITIONS below. @@ -660,123 +658,22 @@ if(CMAKE_COMPILER_IS_GNUCXX) set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -pthread") endif() - check_cxx_compiler_flag(-fPIE HAVE_FPIE_SUPPORT) - if(KDE4_ENABLE_FPIE) - if(HAVE_FPIE_SUPPORT) - set (KDE4_CXX_FPIE_FLAGS "-fPIE") - set (KDE4_PIE_LDFLAGS "-pie") - else(HAVE_FPIE_SUPPORT) - message(STATUS "Your compiler doesn't support the PIE flag") - endif(HAVE_FPIE_SUPPORT) - endif() - check_cxx_compiler_flag(-Woverloaded-virtual __KDE_HAVE_W_OVERLOADED_VIRTUAL) if(__KDE_HAVE_W_OVERLOADED_VIRTUAL) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Woverloaded-virtual") endif() - # visibility support - check_cxx_compiler_flag(-fvisibility=hidden __KDE_HAVE_GCC_VISIBILITY) - set(__KDE_HAVE_GCC_VISIBILITY ${__KDE_HAVE_GCC_VISIBILITY} CACHE BOOL "GCC support for hidden visibility") - - # get the gcc version - execute_process( - COMMAND ${CMAKE_C_COMPILER} --version - ERROR_QUIET - OUTPUT_VARIABLE _gcc_version_info - ) - - string (REGEX MATCH "[345]\\.[0-9]\\.[0-9]" _gcc_version "${_gcc_version_info}") - # gcc on mac just reports: "gcc (GCC) 3.3 20030304 ..." without the patch level, handle this here: - if (NOT _gcc_version) - string (REGEX MATCH ".*\\(GCC\\).* ([34]\\.[0-9]) .*" "\\1.0" _gcc_version "${gcc_on_macos}") - if (gcc_on_macos) - string (REGEX REPLACE ".*\\(GCC\\).* ([34]\\.[0-9]) .*" "\\1.0" _gcc_version "${_gcc_version_info}") - endif (gcc_on_macos) - endif (NOT _gcc_version) - - if(_gcc_version) - if(NOT "${_gcc_version}" VERSION_LESS "4.1.0") - set(GCC_IS_NEWER_THAN_4_1 TRUE) - if(NOT "${_gcc_version}" VERSION_LESS "4.2.0") - set(GCC_IS_NEWER_THAN_4_2 TRUE) - if(NOT "${_gcc_version}" VERSION_LESS "4.3.0") - set(GCC_IS_NEWER_THAN_4_3 TRUE) - endif() - endif() - endif() - endif() - - # save a little by making local statics not threadsafe - # ### do not enable it for older compilers, see - # ### http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31806 - if (GCC_IS_NEWER_THAN_4_3) - set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-threadsafe-statics") - endif (GCC_IS_NEWER_THAN_4_3) - - set(_GCC_COMPILED_WITH_BAD_ALLOCATOR FALSE) - if (GCC_IS_NEWER_THAN_4_1) - execute_process( - COMMAND ${CMAKE_C_COMPILER} -v - ERROR_QUIET - OUTPUT_VARIABLE _gcc_alloc_info - ) - string(REGEX MATCH "(--enable-libstdcxx-allocator=mt)" _GCC_COMPILED_WITH_BAD_ALLOCATOR "${_gcc_alloc_info}") - endif() - - if (__KDE_HAVE_GCC_VISIBILITY - AND GCC_IS_NEWER_THAN_4_1 - AND NOT _GCC_COMPILED_WITH_BAD_ALLOCATOR - AND NOT WIN32) - set(_include_dirs "-DINCLUDE_DIRECTORIES:STRING=${QT_INCLUDES}") - - # first check if we can compile a Qt application - set(_source "#include \n int main() \n {\n return 0; \n } \n") - set(_source_file ${CMAKE_BINARY_DIR}/CMakeTmp/check_qt_application.cpp) - file(WRITE "${_source_file}" "${_source}") - - try_compile(_basic_compile_result - ${CMAKE_BINARY_DIR} ${_source_file} - CMAKE_FLAGS "${_include_dirs}" - OUTPUT_VARIABLE _compile_output_var - ) - - if(_basic_compile_result) - # now ready to check for visibility=hidden - set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility=hidden") - set (KDE4_C_FLAGS "-fvisibility=hidden") - # check that Qt defines Q_DECL_EXPORT as __attribute__ ((visibility("default"))) - # if it doesn't and KDE compiles with hidden default visibiltiy plugins will break - set(_source "#include \n int main()\n {\n #ifndef QT_VISIBILITY_AVAILABLE \n #error QT_VISIBILITY_AVAILABLE is not available\n #endif \n }\n") - set(_source_file ${CMAKE_BINARY_DIR}/CMakeTmp/check_qt_visibility.cpp) - file(WRITE "${_source_file}" "${_source}") - - try_compile(_compile_result - ${CMAKE_BINARY_DIR} - ${_source_file} - CMAKE_FLAGS "${_include_dirs}" - OUTPUT_VARIABLE _compile_output_var - ) - - if(NOT _compile_result) - message("${_compile_output_var}") - message(FATAL_ERROR "Qt compiled without support for -fvisibility=hidden. This will break plugins and linking of some applications. Please fix your Qt installation (try passing --reduce-exports to configure).") - endif(NOT _compile_result) - else() - message("${_compile_output_var}") - message(FATAL_ERROR "Unable to compile a basic Qt application. Qt has not been found correctly.") - endif() - - if(GCC_IS_NEWER_THAN_4_2) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror=return-type -fvisibility-inlines-hidden") - endif() - else(__KDE_HAVE_GCC_VISIBILITY - AND GCC_IS_NEWER_THAN_4_1 - AND NOT _GCC_COMPILED_WITH_BAD_ALLOCATOR - AND NOT WIN32) - set(__KDE_HAVE_GCC_VISIBILITY 0) - endif() - + # check that Qt defines Q_DECL_EXPORT as __attribute__ ((visibility("default"))) + # if it doesn't and KDE compiles with hidden default visibiltiy plugins will break + set(_source "#include \n int main()\n {\n #ifndef QT_VISIBILITY_AVAILABLE \n #error QT_VISIBILITY_AVAILABLE is not available\n #endif \n }\n") + set(_source_file ${CMAKE_BINARY_DIR}/CMakeTmp/check_qt_visibility.cpp) + file(WRITE "${_source_file}" "${_source}") + set(_include_dirs "-DINCLUDE_DIRECTORIES:STRING=${QT_INCLUDES}") + try_compile(_compile_result ${CMAKE_BINARY_DIR} ${_source_file} CMAKE_FLAGS "${_include_dirs}" OUTPUT_VARIABLE _compile_output_var) + if(NOT _compile_result) + message("${_compile_output_var}") + message(FATAL_ERROR "Qt compiled without support for -fvisibility=hidden. This will break plugins and linking of some applications. Please fix your Qt installation (try passing --reduce-exports to configure).") + endif(NOT _compile_result) endif(CMAKE_COMPILER_IS_GNUCXX) if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang") @@ -802,22 +699,16 @@ if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-long-long -std=iso9899:1990 -Wundef -Wcast-align -Werror-implicit-function-declaration -Wchar-subscripts -Wall -W -Wpointer-arith -Wwrite-strings -Wformat-security -Wmissing-format-attribute -fno-common") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wnon-virtual-dtor -Wno-long-long -Wundef -Wcast-align -Wchar-subscripts -Wall -W -Wpointer-arith -Wformat-security -Woverloaded-virtual -fno-common -fvisibility=hidden -Werror=return-type -fvisibility-inlines-hidden") - set(KDE4_C_FLAGS "-fvisibility=hidden") # At least kdepim exports one function with C linkage that returns a # QString in a plugin, but clang does not like that. set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-return-type-c-linkage") - set(KDE4_CXX_FPIE_FLAGS "-fPIE") - set(KDE4_PIE_LDFLAGS "-pie") - if(CMAKE_SYSTEM_NAME STREQUAL GNU) set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -pthread") set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -pthread") endif (CMAKE_SYSTEM_NAME STREQUAL GNU) - set(__KDE_HAVE_GCC_VISIBILITY TRUE) - # check that Qt defines Q_DECL_EXPORT as __attribute__ ((visibility("default"))) # if it doesn't and KDE compiles with hidden default visibiltiy plugins will break set(_source "#include \n int main()\n {\n #ifndef QT_VISIBILITY_AVAILABLE \n #error QT_VISIBILITY_AVAILABLE is not available\n #endif \n }\n") @@ -844,13 +735,6 @@ if(CMAKE_C_COMPILER MATCHES "icc") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -ansi -Wall -w1 -Wpointer-arith -fno-common") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -ansi -Wall -w1 -Wpointer-arith -fno-exceptions -fno-common") - - # visibility support - set(__KDE_HAVE_ICC_VISIBILITY) - # check_cxx_compiler_flag(-fvisibility=hidden __KDE_HAVE_ICC_VISIBILITY) - # if (__KDE_HAVE_ICC_VISIBILITY) - # set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility=hidden") - # endif (__KDE_HAVE_ICC_VISIBILITY) endif() ########### end of platform specific stuff ########################## diff --git a/dnssd/CMakeLists.txt b/dnssd/CMakeLists.txt index 98cfe17a..2ac90b70 100644 --- a/dnssd/CMakeLists.txt +++ b/dnssd/CMakeLists.txt @@ -116,9 +116,12 @@ install( ) ########### install files ############### + +generate_export_header(kdnssd) + install( FILES - dnssd_export.h + ${CMAKE_CURRENT_BINARY_DIR}/kdnssd_export.h domainbrowser.h remoteservice.h servicetypebrowser.h diff --git a/dnssd/CreateKcfgFiles.cmake b/dnssd/CreateKcfgFiles.cmake index a9c0e098..232d083b 100644 --- a/dnssd/CreateKcfgFiles.cmake +++ b/dnssd/CreateKcfgFiles.cmake @@ -16,7 +16,7 @@ NameSpace=DNSSD SetUserTexts=false Singleton=true Visibility=KDNSSD_EXPORT -IncludeFiles=dnssd/dnssd_export.h +IncludeFiles=dnssd/kdnssd_export.h ") file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/kcm_kdnssd.kcfg diff --git a/dnssd/dnssd_export.h b/dnssd/dnssd_export.h deleted file mode 100644 index 8a1dbe98..00000000 --- a/dnssd/dnssd_export.h +++ /dev/null @@ -1,36 +0,0 @@ -/* This file is part of the KDE project - Copyright (C) 2006 David Faure - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#ifndef DNSSD_EXPORT_H -#define DNSSD_EXPORT_H - -/* needed for KDE_EXPORT and KDE_IMPORT macros */ -#include - -#ifndef KDNSSD_EXPORT -# if defined(MAKE_KDNSSD_LIB) - /* We are building this library */ -# define KDNSSD_EXPORT KDE_EXPORT -# else - /* We are using this library */ -# define KDNSSD_EXPORT KDE_IMPORT -# endif -#endif - -#endif diff --git a/dnssd/domainmodel.h b/dnssd/domainmodel.h index b7cfbe53..e420471a 100644 --- a/dnssd/domainmodel.h +++ b/dnssd/domainmodel.h @@ -22,7 +22,7 @@ #define DNSSDDOMAINMODEL_H #include -#include +#include namespace DNSSD { diff --git a/dnssd/servicebase.h b/dnssd/servicebase.h index 5c1924a3..00fca3cc 100644 --- a/dnssd/servicebase.h +++ b/dnssd/servicebase.h @@ -24,7 +24,7 @@ #include #include #include -#include +#include namespace DNSSD { diff --git a/dnssd/servicemodel.h b/dnssd/servicemodel.h index 48128312..84019756 100644 --- a/dnssd/servicemodel.h +++ b/dnssd/servicemodel.h @@ -22,7 +22,7 @@ #define DNSSDSERVICEMODEL_H #include -#include +#include #include namespace DNSSD diff --git a/interfaces/kimproxy/CMakeLists.txt b/interfaces/kimproxy/CMakeLists.txt index 89ba76ae..677e7655 100644 --- a/interfaces/kimproxy/CMakeLists.txt +++ b/interfaces/kimproxy/CMakeLists.txt @@ -25,6 +25,8 @@ set_target_properties( ########### install files ############### +generate_export_header(kimproxy) + install( TARGETS kimproxy EXPORT kdelibsLibraryTargets @@ -33,7 +35,7 @@ install( install( FILES - kimproxy_export.h + ${CMAKE_CURRENT_BINARY_DIR}/kimproxy_export.h kimproxy.h DESTINATION ${INCLUDE_INSTALL_DIR} COMPONENT Devel diff --git a/interfaces/kimproxy/kimproxy_export.h b/interfaces/kimproxy/kimproxy_export.h deleted file mode 100644 index 2d30bd20..00000000 --- a/interfaces/kimproxy/kimproxy_export.h +++ /dev/null @@ -1,36 +0,0 @@ -/* This file is part of the KDE project - Copyright (C) 2007 David Faure - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#ifndef KIMPROXY_EXPORT_H -#define KIMPROXY_EXPORT_H - -/* needed for KDE_EXPORT and KDE_IMPORT macros */ -#include - -#ifndef KIMPROXY_EXPORT -# if defined(MAKE_KIMPROXY_LIB) - /* We are building this library */ -# define KIMPROXY_EXPORT KDE_EXPORT -# else - /* We are using this library */ -# define KIMPROXY_EXPORT KDE_IMPORT -# endif -#endif - -#endif diff --git a/interfaces/kspeech/CMakeLists.txt b/interfaces/kspeech/CMakeLists.txt index 8502cbe6..ec5109ff 100644 --- a/interfaces/kspeech/CMakeLists.txt +++ b/interfaces/kspeech/CMakeLists.txt @@ -1,3 +1,9 @@ +# dummy library for generate_export_header() +include_directories(${QT_INCLUDES}) +add_library(kspeech kspeech.h) + +generate_export_header(kspeech) + install( FILES dbustexttospeech.desktop @@ -6,7 +12,7 @@ install( install( FILES - kspeech_export.h + ${CMAKE_CURRENT_BINARY_DIR}/kspeech_export.h kspeech.h DESTINATION ${INCLUDE_INSTALL_DIR} ) diff --git a/interfaces/kspeech/kspeech_export.h b/interfaces/kspeech/kspeech_export.h deleted file mode 100644 index 7e2a2a65..00000000 --- a/interfaces/kspeech/kspeech_export.h +++ /dev/null @@ -1,36 +0,0 @@ -/* This file is part of the KDE project - Copyright (C) 2007 David Faure - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#ifndef KSPEECH_EXPORT_H -#define KSPEECH_EXPORT_H - -/* needed for KDE_EXPORT and KDE_IMPORT macros */ -#include - -#ifndef KSPEECH_EXPORT -# if defined(MAKE_KSPEECH_LIB) - /* We are building this library */ -# define KSPEECH_EXPORT KDE_EXPORT -# else - /* We are using this library */ -# define KSPEECH_EXPORT KDE_IMPORT -# endif -#endif - -#endif diff --git a/interfaces/ktexteditor/CMakeLists.txt b/interfaces/ktexteditor/CMakeLists.txt index bcbdcbce..3db56782 100644 --- a/interfaces/ktexteditor/CMakeLists.txt +++ b/interfaces/ktexteditor/CMakeLists.txt @@ -26,7 +26,6 @@ set(ktexteditor_LIB_SRCS movingrange.cpp movingrangefeedback.cpp messageinterface.cpp - editorchooser_ui.ui ) add_library(ktexteditor ${LIBRARY_TYPE} ${ktexteditor_LIB_SRCS}) @@ -48,9 +47,12 @@ install( ) ########### install files ############### + +generate_export_header(ktexteditor) + install( FILES - ktexteditor_export.h + ${CMAKE_CURRENT_BINARY_DIR}/ktexteditor_export.h factory.h editor.h document.h diff --git a/interfaces/ktexteditor/ktexteditor_export.h b/interfaces/ktexteditor/ktexteditor_export.h deleted file mode 100644 index e54fcd93..00000000 --- a/interfaces/ktexteditor/ktexteditor_export.h +++ /dev/null @@ -1,41 +0,0 @@ -/* This file is part of the KDE project - Copyright (C) 2007 David Faure - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#ifndef KTEXTEDITOR_EXPORT_H -#define KTEXTEDITOR_EXPORT_H - -/* needed for KDE_EXPORT and KDE_IMPORT macros */ -#include - -#ifndef KTEXTEDITOR_EXPORT -# if defined(MAKE_KTEXTEDITOR_LIB) - /* We are building this library */ -# define KTEXTEDITOR_EXPORT KDE_EXPORT -# else - /* We are using this library */ -# define KTEXTEDITOR_EXPORT KDE_IMPORT -# endif -#endif - - -# ifndef KTEXTEDITOR_EXPORT_DEPRECATED -# define KTEXTEDITOR_EXPORT_DEPRECATED KDE_DEPRECATED KTEXTEDITOR_EXPORT -# endif - -#endif diff --git a/kcddb/kcmcddb/cddbconfigwidget.cpp b/kcddb/kcmcddb/cddbconfigwidget.cpp index 653bc388..58e6fc0f 100644 --- a/kcddb/kcmcddb/cddbconfigwidget.cpp +++ b/kcddb/kcmcddb/cddbconfigwidget.cpp @@ -22,8 +22,6 @@ #include "config-musicbrainz.h" -#include // KDE_NO_DEPRECATED - #include "libkcddb/sites.h" #include "libkcddb/lookup.h" diff --git a/kcddb/libkcddb/CMakeLists.txt b/kcddb/libkcddb/CMakeLists.txt index 5101f25a..a56389eb 100644 --- a/kcddb/libkcddb/CMakeLists.txt +++ b/kcddb/libkcddb/CMakeLists.txt @@ -26,8 +26,6 @@ set(kcddb_LIB_SRCS ${libmusicbrainz_SRCS} genres.cpp cdinfodialog.cpp cdinfoencodingwidget.cpp - cdinfodialog.ui - cdinfoencodingwidget.ui ) kde4_add_kcfg_files(kcddb_LIB_SRCS configbase.kcfgc) @@ -46,6 +44,8 @@ set_target_properties(kcddb PROPERTIES ########### install files ############### +generate_export_header(kcddb) + install( FILES cdinfo.h @@ -54,7 +54,7 @@ install( genres.h kcddbconfig.h kcddb.h - kcddb_export.h + ${CMAKE_CURRENT_BINARY_DIR}/kcddb_export.h ${CMAKE_CURRENT_BINARY_DIR}/configbase.h DESTINATION ${INCLUDE_INSTALL_DIR}/libkcddb COMPONENT Devel diff --git a/kcddb/libkcddb/cache.h b/kcddb/libkcddb/cache.h index 0f67c10f..69ba1290 100644 --- a/kcddb/libkcddb/cache.h +++ b/kcddb/libkcddb/cache.h @@ -22,12 +22,11 @@ #ifndef KCDDB_CACHE_H #define KCDDB_CACHE_H -#include +#include #include #include "kcddb.h" #include "cdinfo.h" -#include namespace KCDDB { diff --git a/kcddb/libkcddb/client.h b/kcddb/libkcddb/client.h index 136cab7a..9a3692d3 100644 --- a/kcddb/libkcddb/client.h +++ b/kcddb/libkcddb/client.h @@ -25,7 +25,6 @@ #include "cdinfo.h" #include #include "kcddb.h" -#include namespace KCDDB { diff --git a/kcddb/libkcddb/kcddb_export.h b/kcddb/libkcddb/kcddb_export.h deleted file mode 100644 index 6ac6d57d..00000000 --- a/kcddb/libkcddb/kcddb_export.h +++ /dev/null @@ -1,40 +0,0 @@ -/* This file is part of the KDE project - Copyright (C) 2007 David Faure - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#ifndef KCDDB_EXPORT_H -#define KCDDB_EXPORT_H - -/* needed for KDE_EXPORT and KDE_IMPORT macros */ -#include - -#ifndef KCDDB_EXPORT -# if defined(MAKE_KCDDB_LIB) - /* We are building this library */ -# define KCDDB_EXPORT KDE_EXPORT -# else - /* We are using this library */ -# define KCDDB_EXPORT KDE_IMPORT -# endif -#endif - -# ifndef KCDDB_EXPORT_DEPRECATED -# define KCDDB_EXPORT_DEPRECATED KDE_DEPRECATED KCDDB_EXPORT -# endif - -#endif diff --git a/kdcraw/libkdcraw/CMakeLists.txt b/kdcraw/libkdcraw/CMakeLists.txt index ab61eaa2..2df07d0f 100644 --- a/kdcraw/libkdcraw/CMakeLists.txt +++ b/kdcraw/libkdcraw/CMakeLists.txt @@ -66,6 +66,8 @@ install( ${INSTALL_TARGETS_DEFAULT_ARGS} ) +generate_export_header(kdcraw) + install( FILES rawdecodingsettings.h @@ -77,7 +79,7 @@ install( squeezedcombobox.h dcrawinfocontainer.h rawfiles.h - libkdcraw_export.h + ${CMAKE_CURRENT_BINARY_DIR}/libkdcraw_export.h ${CMAKE_CURRENT_BINARY_DIR}/version.h DESTINATION ${INCLUDE_INSTALL_DIR}/libkdcraw COMPONENT Devel diff --git a/kdcraw/libkdcraw/dcrawinfocontainer.h b/kdcraw/libkdcraw/dcrawinfocontainer.h index 5ab6f36f..4629777f 100644 --- a/kdcraw/libkdcraw/dcrawinfocontainer.h +++ b/kdcraw/libkdcraw/dcrawinfocontainer.h @@ -35,12 +35,12 @@ // Local includes -#include "libkdcraw_export.h" +#include "kdcraw_export.h" namespace KDcrawIface { -class LIBKDCRAW_EXPORT DcrawInfoContainer +class KDCRAW_EXPORT DcrawInfoContainer { public: @@ -151,7 +151,7 @@ public: }; //! kDebug() stream operator. Writes container @a c to the debug output in a nicely formatted way. -LIBKDCRAW_EXPORT QDebug operator<<(QDebug dbg, const DcrawInfoContainer& c); +KDCRAW_EXPORT QDebug operator<<(QDebug dbg, const DcrawInfoContainer& c); } // namespace KDcrawIface diff --git a/kdcraw/libkdcraw/dcrawsettingswidget.h b/kdcraw/libkdcraw/dcrawsettingswidget.h index 0e0711c6..6f4745d7 100644 --- a/kdcraw/libkdcraw/dcrawsettingswidget.h +++ b/kdcraw/libkdcraw/dcrawsettingswidget.h @@ -41,14 +41,14 @@ // Local includes -#include "libkdcraw_export.h" +#include "kdcraw_export.h" #include "rawdecodingsettings.h" #include "rexpanderbox.h" namespace KDcrawIface { -class LIBKDCRAW_EXPORT DcrawSettingsWidget : public RExpanderBox +class KDCRAW_EXPORT DcrawSettingsWidget : public RExpanderBox { Q_OBJECT diff --git a/kdcraw/libkdcraw/kdcraw.h b/kdcraw/libkdcraw/kdcraw.h index 281dbe72..2777cde6 100644 --- a/kdcraw/libkdcraw/kdcraw.h +++ b/kdcraw/libkdcraw/kdcraw.h @@ -43,7 +43,7 @@ // Local includes -#include "libkdcraw_export.h" +#include "kdcraw_export.h" #include "rawdecodingsettings.h" #include "dcrawinfocontainer.h" @@ -52,7 +52,7 @@ namespace KDcrawIface { -class LIBKDCRAW_EXPORT KDcraw : public QObject +class KDCRAW_EXPORT KDcraw : public QObject { Q_OBJECT diff --git a/kdcraw/libkdcraw/libkdcraw_export.h b/kdcraw/libkdcraw/libkdcraw_export.h deleted file mode 100644 index adf45cc4..00000000 --- a/kdcraw/libkdcraw/libkdcraw_export.h +++ /dev/null @@ -1,47 +0,0 @@ -/** =========================================================== - * @file - * - * This file is part of the KDE project - * - * @brief Helper for exporting functions/classes from the shared library - * - * @author Copyright (C) 2007 David Faure - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. - - * You should have received a copy of the GNU Library General Public License - * along with this library; see the file COPYING.LIB. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301, USA. - * - * ============================================================ */ - -#ifndef LIBKDCRAW_EXPORT_H -#define LIBKDCRAW_EXPORT_H - -/* needed for KDE_EXPORT and KDE_IMPORT macros */ -#include - -#ifndef LIBKDCRAW_EXPORT -# if defined(MAKE_KDCRAW_LIB) - /* We are building this library */ -# define LIBKDCRAW_EXPORT KDE_EXPORT -# else - /* We are using this library */ -# define LIBKDCRAW_EXPORT KDE_IMPORT -# endif -#endif - -# ifndef LIBKDCRAW_EXPORT_DEPRECATED -# define LIBKDCRAW_EXPORT_DEPRECATED KDE_DEPRECATED LIBKDCRAW_EXPORT -# endif - -#endif diff --git a/kdcraw/libkdcraw/rawdecodingsettings.h b/kdcraw/libkdcraw/rawdecodingsettings.h index db09e463..bdec9d4e 100644 --- a/kdcraw/libkdcraw/rawdecodingsettings.h +++ b/kdcraw/libkdcraw/rawdecodingsettings.h @@ -42,12 +42,12 @@ // Local includes -#include "libkdcraw_export.h" +#include "kdcraw_export.h" namespace KDcrawIface { -class LIBKDCRAW_EXPORT RawDecodingSettings +class KDCRAW_EXPORT RawDecodingSettings { public: @@ -365,7 +365,7 @@ public: }; //! kDebug() stream operator. Writes settings @a s to the debug output in a nicely formatted way. -LIBKDCRAW_EXPORT QDebug operator<<(QDebug dbg, const RawDecodingSettings& s); +KDCRAW_EXPORT QDebug operator<<(QDebug dbg, const RawDecodingSettings& s); } // namespace KDcrawIface diff --git a/kdcraw/libkdcraw/rcombobox.h b/kdcraw/libkdcraw/rcombobox.h index bb475cee..e49c75d6 100644 --- a/kdcraw/libkdcraw/rcombobox.h +++ b/kdcraw/libkdcraw/rcombobox.h @@ -34,12 +34,12 @@ // Local includes -#include "libkdcraw_export.h" +#include "kdcraw_export.h" namespace KDcrawIface { -class LIBKDCRAW_EXPORT RComboBox : public KHBox +class KDCRAW_EXPORT RComboBox : public KHBox { Q_OBJECT diff --git a/kdcraw/libkdcraw/rexpanderbox.h b/kdcraw/libkdcraw/rexpanderbox.h index ccfc19b2..8bb91878 100644 --- a/kdcraw/libkdcraw/rexpanderbox.h +++ b/kdcraw/libkdcraw/rexpanderbox.h @@ -45,12 +45,12 @@ // Local includes -#include "libkdcraw_export.h" +#include "kdcraw_export.h" namespace KDcrawIface { -class LIBKDCRAW_EXPORT RClickLabel : public QLabel +class KDCRAW_EXPORT RClickLabel : public QLabel { Q_OBJECT @@ -76,7 +76,7 @@ protected: // ------------------------------------------------------------------------- -class LIBKDCRAW_EXPORT RSqueezedClickLabel : public KSqueezedTextLabel +class KDCRAW_EXPORT RSqueezedClickLabel : public KSqueezedTextLabel { Q_OBJECT @@ -100,7 +100,7 @@ protected: // ------------------------------------------------------------------------- -class LIBKDCRAW_EXPORT RArrowClickLabel : public QWidget +class KDCRAW_EXPORT RArrowClickLabel : public QWidget { Q_OBJECT @@ -133,7 +133,7 @@ protected: // ------------------------------------------------------------------------- -class LIBKDCRAW_EXPORT RLabelExpander : public QWidget +class KDCRAW_EXPORT RLabelExpander : public QWidget { Q_OBJECT @@ -187,7 +187,7 @@ private: // ------------------------------------------------------------------------- -class LIBKDCRAW_EXPORT RExpanderBox : public QScrollArea +class KDCRAW_EXPORT RExpanderBox : public QScrollArea { Q_OBJECT @@ -272,7 +272,7 @@ private: // ------------------------------------------------------------------------- -class LIBKDCRAW_EXPORT RExpanderBoxExclusive : public RExpanderBox +class KDCRAW_EXPORT RExpanderBoxExclusive : public RExpanderBox { Q_OBJECT diff --git a/kdcraw/libkdcraw/rnuminput.h b/kdcraw/libkdcraw/rnuminput.h index 83ad14fe..296d4321 100644 --- a/kdcraw/libkdcraw/rnuminput.h +++ b/kdcraw/libkdcraw/rnuminput.h @@ -35,12 +35,12 @@ // Local includes -#include "libkdcraw_export.h" +#include "kdcraw_export.h" namespace KDcrawIface { -class LIBKDCRAW_EXPORT RIntNumInput : public KHBox +class KDCRAW_EXPORT RIntNumInput : public KHBox { Q_OBJECT @@ -81,7 +81,7 @@ private: // --------------------------------------------------------- -class LIBKDCRAW_EXPORT RDoubleNumInput : public KHBox +class KDCRAW_EXPORT RDoubleNumInput : public KHBox { Q_OBJECT diff --git a/kdcraw/libkdcraw/squeezedcombobox.h b/kdcraw/libkdcraw/squeezedcombobox.h index fe20204f..7468de15 100644 --- a/kdcraw/libkdcraw/squeezedcombobox.h +++ b/kdcraw/libkdcraw/squeezedcombobox.h @@ -37,7 +37,7 @@ // Local includes -#include "libkdcraw_export.h" +#include "kdcraw_export.h" namespace KDcrawIface { @@ -50,7 +50,7 @@ namespace KDcrawIface * possible to show the complete item, it will be shortened * and "..." will be prepended. */ -class LIBKDCRAW_EXPORT SqueezedComboBox : public QComboBox +class KDCRAW_EXPORT SqueezedComboBox : public QComboBox { Q_OBJECT diff --git a/kdeclarative/CMakeLists.txt b/kdeclarative/CMakeLists.txt index d0affe56..4cb07c80 100644 --- a/kdeclarative/CMakeLists.txt +++ b/kdeclarative/CMakeLists.txt @@ -49,10 +49,12 @@ if(ENABLE_TESTING) add_subdirectory(tests) endif() +generate_export_header(kdeclarative) + install( FILES kdeclarative.h - kdeclarative_export.h + ${CMAKE_CURRENT_BINARY_DIR}/kdeclarative_export.h DESTINATION ${INCLUDE_INSTALL_DIR} COMPONENT Devel ) diff --git a/kdeclarative/kdeclarative_export.h b/kdeclarative/kdeclarative_export.h deleted file mode 100644 index 67ae7583..00000000 --- a/kdeclarative/kdeclarative_export.h +++ /dev/null @@ -1,40 +0,0 @@ -/* This file is part of the KDE project - Copyright 2007 Aaron Seigo - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#ifndef KDECLARATIVE_EXPORT_H -#define KDECLARATIVE_EXPORT_H - -/* needed for KDE_EXPORT and KDE_IMPORT macros */ -#include - -#ifndef KDECLARATIVE_EXPORT -# if defined(MAKE_KDECLARATIVE_LIB) - /* We are building this library */ -# define KDECLARATIVE_EXPORT KDE_EXPORT -# else - /* We are using this library */ -# define KDECLARATIVE_EXPORT KDE_IMPORT -# endif -#endif - -# ifndef KDECLARATIVE_EXPORT_DEPRECATED -# define KDECLARATIVE_EXPORT_DEPRECATED KDE_DEPRECATED KDECLARATIVE_EXPORT -# endif - -#endif diff --git a/kdecore/CMakeLists.txt b/kdecore/CMakeLists.txt index 2ebba428..49dbc3bf 100644 --- a/kdecore/CMakeLists.txt +++ b/kdecore/CMakeLists.txt @@ -368,6 +368,8 @@ install(TARGETS kde4-config ${INSTALL_TARGETS_DEFAULT_ARGS}) ########### install files ############### +generate_export_header(kdecore) + install( FILES localization/entry.desktop @@ -384,7 +386,7 @@ install( install( FILES - kdecore_export.h + ${CMAKE_CURRENT_BINARY_DIR}/kdecore_export.h compression/kfilterbase.h compression/kfilterdev.h config/kconfig.h diff --git a/kdecore/io/kdebug.h b/kdecore/io/kdebug.h index db9c668e..b1b1df44 100644 --- a/kdecore/io/kdebug.h +++ b/kdecore/io/kdebug.h @@ -83,7 +83,7 @@ KDECORE_EXPORT QString kRealBacktrace(int); * \relates KGlobal * Returns a backtrace. * Note: Hidden symbol visibility may negatively affect the information provided - * by kBacktrace - you may want to pass -D__KDE_HAVE_GCC_VISIBILITY=0 to cmake + * by kBacktrace - you may want to pass -DCXX_VISIBILITY_PRESET=FALSE to CMake * to turn hidden symbol visibility off. * @param levels the number of levels of the backtrace * @return a backtrace diff --git a/kdecore/kdecore_export.h b/kdecore/kdecore_export.h deleted file mode 100644 index 0101ba49..00000000 --- a/kdecore/kdecore_export.h +++ /dev/null @@ -1,40 +0,0 @@ -/* This file is part of the KDE project - Copyright (C) 2007 David Faure - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#ifndef KDECORE_EXPORT_H -#define KDECORE_EXPORT_H - -/* needed for KDE_EXPORT and KDE_IMPORT macros */ -#include - -#ifndef KDECORE_EXPORT -# if defined(MAKE_KDECORE_LIB) - /* We are building this library */ -# define KDECORE_EXPORT KDE_EXPORT -# else - /* We are using this library */ -# define KDECORE_EXPORT KDE_IMPORT -# endif -#endif - -# ifndef KDECORE_EXPORT_DEPRECATED -# define KDECORE_EXPORT_DEPRECATED KDE_DEPRECATED KDECORE_EXPORT -# endif - -#endif diff --git a/kdecore/kernel/kauthorized.h b/kdecore/kernel/kauthorized.h index bff66e1d..c58012e6 100644 --- a/kdecore/kernel/kauthorized.h +++ b/kdecore/kernel/kauthorized.h @@ -38,7 +38,7 @@ namespace KAuthorized * @return true if the action is authorized * @todo what are the generic actions? */ - KDE_EXPORT bool authorize(const QString& genericAction); + KDECORE_EXPORT bool authorize(const QString& genericAction); /** * Returns whether a certain KAction is authorized. @@ -47,7 +47,7 @@ namespace KAuthorized * with "action/" before being passed to authorize() * @return true if the KAction is authorized */ - KDE_EXPORT bool authorizeKAction(const QString& action); + KDECORE_EXPORT bool authorizeKAction(const QString& action); /** * Returns whether a certain URL related action is authorized. @@ -61,7 +61,7 @@ namespace KAuthorized * @param destUrl The object of the action * @return true when the action is authorized, false otherwise. */ - KDE_EXPORT bool authorizeUrlAction(const QString& action, const KUrl& baseUrl, const KUrl& destUrl); + KDECORE_EXPORT bool authorizeUrlAction(const QString& action, const KUrl& baseUrl, const KUrl& destUrl); /** * Allow a certain URL action. This can be useful if your application @@ -71,7 +71,7 @@ namespace KAuthorized * @param baseUrl The url where the action originates from * @param _destUrl The object of the action */ - KDE_EXPORT void allowUrlAction(const QString& action, const KUrl& baseUrl, const KUrl& _destUrl); + KDECORE_EXPORT void allowUrlAction(const QString& action, const KUrl& baseUrl, const KUrl& _destUrl); /** * Returns whether access to a certain control module is authorized. @@ -79,7 +79,7 @@ namespace KAuthorized * @param menuId identifying the control module, e.g. kde-mouse.desktop * @return true if access to the module is authorized, false otherwise. */ - KDE_EXPORT bool authorizeControlModule(const QString& menuId); + KDECORE_EXPORT bool authorizeControlModule(const QString& menuId); /** * Returns which control modules from a given list are authorized for access. @@ -88,7 +88,7 @@ namespace KAuthorized * an example of a menu-id is kde-mouse.desktop. * @return Those control modules for which access has been authorized. */ - KDE_EXPORT QStringList authorizeControlModules(const QStringList& menuIds); + KDECORE_EXPORT QStringList authorizeControlModules(const QStringList& menuIds); } diff --git a/kdecore/localization/klocale.h b/kdecore/localization/klocale.h index 3d39d0c3..2b8c23eb 100644 --- a/kdecore/localization/klocale.h +++ b/kdecore/localization/klocale.h @@ -753,7 +753,7 @@ public: * * @return If nouns are declined */ - KDE_DEPRECATED bool nounDeclension() const; + KDECORE_DEPRECATED bool nounDeclension() const; //KDE5 move to KDateTime namespace /** @@ -1113,7 +1113,7 @@ public: * @see calendarSystem() * @return the name of the calendar system */ - KDE_DEPRECATED QString calendarType() const; + KDECORE_DEPRECATED QString calendarType() const; /** * @since 4.6 @@ -1136,7 +1136,7 @@ public: * @see setCalendarSystem() * @param calendarType the name of the calendar type */ - KDE_DEPRECATED void setCalendar(const QString & calendarType); + KDECORE_DEPRECATED void setCalendar(const QString & calendarType); /** * @since 4.6 diff --git a/kdecore/util/kexportplugin.h b/kdecore/util/kexportplugin.h index 1096fe62..95a286e3 100644 --- a/kdecore/util/kexportplugin.h +++ b/kdecore/util/kexportplugin.h @@ -50,7 +50,7 @@ struct KDEPluginVerificationData * \see KDEPluginVerificationData */ #define K_PLUGIN_VERIFICATION_DATA \ -Q_EXTERN_C KDE_EXPORT const KDEPluginVerificationData kde_plugin_verification_data = \ +Q_EXTERN_C Q_DECL_EXPORT const KDEPluginVerificationData kde_plugin_verification_data = \ { KDEPluginVerificationData::PluginVerificationDataVersion, KDE_VERSION, KDE_VERSION_STRING }; /** @@ -59,7 +59,7 @@ Q_EXTERN_C KDE_EXPORT const KDEPluginVerificationData kde_plugin_verification_da * You can later access the version number with KPluginLoader::pluginVersion() */ #define K_EXPORT_PLUGIN_VERSION(version) \ -Q_EXTERN_C KDE_EXPORT const quint32 kde_plugin_version = version; +Q_EXTERN_C Q_DECL_EXPORT const quint32 kde_plugin_version = version; /** diff --git a/kdecore/util/ksharedptr.h b/kdecore/util/ksharedptr.h index f6e67f95..5a55d758 100644 --- a/kdecore/util/ksharedptr.h +++ b/kdecore/util/ksharedptr.h @@ -29,7 +29,6 @@ #include #include -#include /** * \class KSharedPtr ksharedptr.h diff --git a/kdecore/util/kshell.h b/kdecore/util/kshell.h index e3644a01..0d6d4b13 100644 --- a/kdecore/util/kshell.h +++ b/kdecore/util/kshell.h @@ -22,6 +22,7 @@ #define KSHELL_H #include +#include class QStringList; class QString; diff --git a/kdemacros.h.cmake b/kdemacros.h.cmake index 7e2a815d..e1eb5fb6 100644 --- a/kdemacros.h.cmake +++ b/kdemacros.h.cmake @@ -30,8 +30,6 @@ #include -#cmakedefine __KDE_HAVE_GCC_VISIBILITY - /** * @def KDE_NO_EXPORT * @ingroup KDEMacros @@ -71,14 +69,16 @@ * @ingroup KDEMacros */ -#ifdef __KDE_HAVE_GCC_VISIBILITY -#define KDE_NO_EXPORT __attribute__ ((visibility("hidden"))) -#define KDE_EXPORT __attribute__ ((visibility("default"))) -#define KDE_IMPORT __attribute__ ((visibility("default"))) -#else -#define KDE_NO_EXPORT -#define KDE_EXPORT -#define KDE_IMPORT +#ifndef KDE_NO_EXPORT +# define KDE_NO_EXPORT Q_DECL_HIDDEN +#endif + +#ifndef KDE_EXPORT +#define KDE_EXPORT Q_DECL_EXPORT +#endif + +#ifndef KDE_IMPORT +#define KDE_IMPORT Q_DECL_IMPORT #endif /** diff --git a/kdesu/CMakeLists.txt b/kdesu/CMakeLists.txt index 8ad7670b..607d034c 100644 --- a/kdesu/CMakeLists.txt +++ b/kdesu/CMakeLists.txt @@ -64,9 +64,11 @@ install(TARGETS kdesu_stub DESTINATION ${LIBEXEC_INSTALL_DIR}) ########### install files ############### +generate_export_header(kdesu) + install( FILES - kdesu_export.h + ${CMAKE_CURRENT_BINARY_DIR}/kdesu_export.h client.h process.h su.h diff --git a/kdesu/kdesu_export.h b/kdesu/kdesu_export.h deleted file mode 100644 index eadee979..00000000 --- a/kdesu/kdesu_export.h +++ /dev/null @@ -1,36 +0,0 @@ -/* This file is part of the KDE project - Copyright (C) 2007 David Faure - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#ifndef KDESU_EXPORT_H -#define KDESU_EXPORT_H - -/* needed for KDE_EXPORT and KDE_IMPORT macros */ -#include - -#ifndef KDESU_EXPORT -# if defined(MAKE_KDESU_LIB) - /* We are building this library */ -# define KDESU_EXPORT KDE_EXPORT -# else - /* We are using this library */ -# define KDESU_EXPORT KDE_IMPORT -# endif -#endif - -#endif diff --git a/kdeui/CMakeLists.txt b/kdeui/CMakeLists.txt index 8e74ee01..fc449019 100644 --- a/kdeui/CMakeLists.txt +++ b/kdeui/CMakeLists.txt @@ -415,6 +415,8 @@ set_target_properties(kdeui PROPERTIES ########### install files ############### +generate_export_header(kdeui) + install( TARGETS kdeui EXPORT kdelibsLibraryTargets @@ -447,7 +449,7 @@ install( install( FILES - kdeui_export.h + ${CMAKE_CURRENT_BINARY_DIR}/kdeui_export.h actions/kactioncollection.h actions/kactioncategory.h actions/kaction.h diff --git a/kdeui/fonts/kfontutils.h b/kdeui/fonts/kfontutils.h index 96e4f0d8..a69c45e7 100644 --- a/kdeui/fonts/kfontutils.h +++ b/kdeui/fonts/kfontutils.h @@ -24,6 +24,7 @@ #define KFONTMETRICS_H #include "kdeui_export.h" +#include class QPainter; class QSizeF; diff --git a/kdeui/kdeui_export.h b/kdeui/kdeui_export.h deleted file mode 100644 index 725c6242..00000000 --- a/kdeui/kdeui_export.h +++ /dev/null @@ -1,40 +0,0 @@ -/* This file is part of the KDE project - Copyright (C) 2007 David Faure - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#ifndef KDEUI_EXPORT_H -#define KDEUI_EXPORT_H - -/* needed for KDE_EXPORT and KDE_IMPORT macros */ -#include - -#ifndef KDEUI_EXPORT -# if defined(MAKE_KDEUI_LIB) - /* We are building this library */ -# define KDEUI_EXPORT KDE_EXPORT -# else - /* We are using this library */ -# define KDEUI_EXPORT KDE_IMPORT -# endif -#endif - -# ifndef KDEUI_EXPORT_DEPRECATED -# define KDEUI_EXPORT_DEPRECATED KDE_DEPRECATED KDEUI_EXPORT -# endif - -#endif diff --git a/kdeui/kernel/kapplication.cpp b/kdeui/kernel/kapplication.cpp index a33f91e5..f7650dd7 100644 --- a/kdeui/kernel/kapplication.cpp +++ b/kdeui/kernel/kapplication.cpp @@ -397,15 +397,12 @@ void KApplicationPrivate::preqapplicationhack() KGlobal::config(); // initialize qt plugin path (see KComponentDataPrivate::lazyInit) } +#ifdef Q_WS_X11 int KApplication::xioErrhandler( Display* dpy ) { if(kapp) { -#ifdef Q_WS_X11 d->oldXIOErrorHandler( dpy ); -#else - Q_UNUSED(dpy); -#endif } exit( 1 ); return 0; @@ -413,7 +410,6 @@ int KApplication::xioErrhandler( Display* dpy ) int KApplication::xErrhandler( Display* dpy, void* err_ ) { // no idea how to make forward decl. for XErrorEvent -#ifdef Q_WS_X11 XErrorEvent* err = static_cast< XErrorEvent* >( err_ ); if(kapp) { @@ -424,7 +420,6 @@ int KApplication::xErrhandler( Display* dpy, void* err_ ) if (!fatalXError.isEmpty()) { abort(); } -#endif return 0; } @@ -432,12 +427,11 @@ void KApplication::iceIOErrorHandler( _IceConn *conn ) { emit aboutToQuit(); -#ifdef Q_WS_X11 if ( d->oldIceIOErrorHandler != NULL ) (*d->oldIceIOErrorHandler)( conn ); -#endif exit( 1 ); } +#endif // Q_WS_X11 void KApplicationPrivate::init(bool GUIenabled) { diff --git a/kdeui/kernel/kapplication.h b/kdeui/kernel/kapplication.h index 0e6b2e13..0dcd2a74 100644 --- a/kdeui/kernel/kapplication.h +++ b/kdeui/kernel/kapplication.h @@ -25,12 +25,6 @@ class KConfig; - -typedef unsigned long Atom; -#if !defined(Q_WS_X11) -typedef void Display; -#endif - #include #include #include @@ -275,7 +269,7 @@ public: */ void updateRemoteUserTimestamp( const QString& service, int time = 0 ); - +#ifdef Q_WS_X11 /** @internal */ @@ -295,6 +289,7 @@ public: * @internal */ void iceIOErrorHandler( _IceConn *conn ); +#endif // Q_WS_X11 /** * @internal diff --git a/kdeui/sonnet/highlighter.h b/kdeui/sonnet/highlighter.h index cfae0aa1..ad9e5699 100644 --- a/kdeui/sonnet/highlighter.h +++ b/kdeui/sonnet/highlighter.h @@ -23,7 +23,6 @@ #include #include -#include #include class QTextEdit; diff --git a/kdeui/util/kcrash.h b/kdeui/util/kcrash.h index 050194de..19537c4f 100644 --- a/kdeui/util/kcrash.h +++ b/kdeui/util/kcrash.h @@ -23,6 +23,7 @@ #define KCRASH_H #include +#include class QString; diff --git a/kdeui/util/kkeyserver.h b/kdeui/util/kkeyserver.h index 7df2111c..e7add880 100644 --- a/kdeui/util/kkeyserver.h +++ b/kdeui/util/kkeyserver.h @@ -24,6 +24,7 @@ #define KKEYSERVER_H #include +#include #if defined Q_WS_X11 /*or defined Q_WS_WIN*/ #include "kkeyserver_x11.h" diff --git a/kdeui/widgets/kstringvalidator.h b/kdeui/widgets/kstringvalidator.h index 430ce44d..7e1acaa3 100644 --- a/kdeui/widgets/kstringvalidator.h +++ b/kdeui/widgets/kstringvalidator.h @@ -151,7 +151,7 @@ class KDEUI_EXPORT KStringListValidator : public QValidator * @deprecated * @author Marc Mutz **/ -class KDEUI_EXPORT_DEPRECATED KMimeTypeValidator : public QValidator +class KDEUI_DEPRECATED_EXPORT KMimeTypeValidator : public QValidator { Q_OBJECT diff --git a/kdewebkit/CMakeLists.txt b/kdewebkit/CMakeLists.txt index fa074e95..8f5fbbde 100644 --- a/kdewebkit/CMakeLists.txt +++ b/kdewebkit/CMakeLists.txt @@ -24,18 +24,12 @@ set(kdewebkit_LIB_SRCS add_library(kdewebkit ${LIBRARY_TYPE} ${kdewebkit_LIB_SRCS}) -target_link_libraries(kdewebkit PRIVATE +target_link_libraries(kdewebkit ${KDE4_KPARTS_LIBS} ${KDE4_KDEUI_LIBS} -) -target_link_libraries(kdewebkit PUBLIC - kparts - kio - kdecore + ${KDE4_KIO_LIBS} ${QT_QTWEBKIT_LIBRARY} ${QT_QTNETWORK_LIBRARY} - ${QT_QTGUI_LIBRARY} - ${QT_QTCORE_LIBRARY} ) set_target_properties(kdewebkit PROPERTIES @@ -43,6 +37,8 @@ set_target_properties(kdewebkit PROPERTIES SOVERSION ${GENERIC_LIB_SOVERSION} ) +generate_export_header(kdewebkit) + install( TARGETS kdewebkit EXPORT kdelibsLibraryTargets @@ -51,7 +47,7 @@ install( install( FILES - kdewebkit_export.h + ${CMAKE_CURRENT_BINARY_DIR}/kdewebkit_export.h kwebwallet.h kgraphicswebview.h kwebpluginfactory.h diff --git a/kdewebkit/kdewebkit_export.h b/kdewebkit/kdewebkit_export.h deleted file mode 100644 index a83474c7..00000000 --- a/kdewebkit/kdewebkit_export.h +++ /dev/null @@ -1,43 +0,0 @@ -/* - * This file is part of the KDE project. - * - * Copyright (C) 2009 Urs Wolfer - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public License - * along with this library; see the file COPYING.LIB. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301, USA. - * - */ - -#ifndef KDEWEBKIT_EXPORT_H -#define KDEWEBKIT_EXPORT_H - -/* needed for KDE_EXPORT and KDE_IMPORT macros */ -#include - -#ifndef KDEWEBKIT_EXPORT -# if defined(MAKE_KDEWEBKIT_LIB) - /* We are building this library */ -# define KDEWEBKIT_EXPORT KDE_EXPORT -# else - /* We are using this library */ -# define KDEWEBKIT_EXPORT KDE_IMPORT -# endif -#endif - -# ifndef KDEWEBKIT_EXPORT_DEPRECATED -# define KDEWEBKIT_EXPORT_DEPRECATED KDE_DEPRECATED KDEWEBKIT_EXPORT -# endif - -#endif // KDEWEBKIT_EXPORT_H diff --git a/kdewebkit/kwebkitpart/src/sslinfodialog_p.h b/kdewebkit/kwebkitpart/src/sslinfodialog_p.h index 8dd0846b..9876d6a7 100644 --- a/kdewebkit/kwebkitpart/src/sslinfodialog_p.h +++ b/kdewebkit/kwebkitpart/src/sslinfodialog_p.h @@ -21,7 +21,6 @@ #ifndef SSLINFODIALOG_P_H #define SSLINFODIALOG_P_H -#include #include #include diff --git a/kdewebkit/kwebkitpart/src/websslinfo.h b/kdewebkit/kwebkitpart/src/websslinfo.h index b3268c4b..cc816426 100644 --- a/kdewebkit/kwebkitpart/src/websslinfo.h +++ b/kdewebkit/kwebkitpart/src/websslinfo.h @@ -20,8 +20,6 @@ #ifndef WEBSSLINFO_H #define WEBSSLINFO_H -#include - #include #include #include diff --git a/kexiv2/libkexiv2/CMakeLists.txt b/kexiv2/libkexiv2/CMakeLists.txt index 61349efb..671c8016 100644 --- a/kexiv2/libkexiv2/CMakeLists.txt +++ b/kexiv2/libkexiv2/CMakeLists.txt @@ -79,17 +79,19 @@ install( DESTINATION ${DATA_INSTALL_DIR}/libkexiv2/data ) +generate_export_header(kexiv2) + install( FILES kexiv2.h kexiv2data.h kexiv2previews.h - libkexiv2_export.h msgtextedit.h subjectwidget.h altlangstredit.h countryselector.h rotationmatrix.h + ${CMAKE_CURRENT_BINARY_DIR}/kexiv2_export.h ${CMAKE_CURRENT_BINARY_DIR}/version.h DESTINATION ${INCLUDE_INSTALL_DIR}/libkexiv2 COMPONENT Devel diff --git a/kexiv2/libkexiv2/altlangstredit.h b/kexiv2/libkexiv2/altlangstredit.h index bf15697a..443b1e73 100644 --- a/kexiv2/libkexiv2/altlangstredit.h +++ b/kexiv2/libkexiv2/altlangstredit.h @@ -33,7 +33,7 @@ // Local includes -#include "libkexiv2_export.h" +#include "kexiv2_export.h" #include "kexiv2.h" namespace KExiv2Iface diff --git a/kexiv2/libkexiv2/countryselector.h b/kexiv2/libkexiv2/countryselector.h index 313bd20f..3fd529d2 100644 --- a/kexiv2/libkexiv2/countryselector.h +++ b/kexiv2/libkexiv2/countryselector.h @@ -37,7 +37,7 @@ // Local includes -#include "libkexiv2_export.h" +#include "kexiv2_export.h" namespace KExiv2Iface { diff --git a/kexiv2/libkexiv2/kexiv2.h b/kexiv2/libkexiv2/kexiv2.h index b3ed63bf..78443855 100644 --- a/kexiv2/libkexiv2/kexiv2.h +++ b/kexiv2/libkexiv2/kexiv2.h @@ -52,7 +52,6 @@ // Local includes -#include "libkexiv2_export.h" #include "kexiv2data.h" namespace KExiv2Iface diff --git a/kexiv2/libkexiv2/kexiv2data.h b/kexiv2/libkexiv2/kexiv2data.h index 6b00fa7e..81a10258 100644 --- a/kexiv2/libkexiv2/kexiv2data.h +++ b/kexiv2/libkexiv2/kexiv2data.h @@ -34,7 +34,7 @@ // Local includes -#include "libkexiv2_export.h" +#include "kexiv2_export.h" namespace KExiv2Iface { diff --git a/kexiv2/libkexiv2/kexiv2previews.h b/kexiv2/libkexiv2/kexiv2previews.h index f7f6c7cd..3223c06b 100644 --- a/kexiv2/libkexiv2/kexiv2previews.h +++ b/kexiv2/libkexiv2/kexiv2previews.h @@ -36,7 +36,7 @@ // Local includes -#include "libkexiv2_export.h" +#include "kexiv2_export.h" class QImage; diff --git a/kexiv2/libkexiv2/libkexiv2_export.h b/kexiv2/libkexiv2/libkexiv2_export.h deleted file mode 100644 index 4b75cfca..00000000 --- a/kexiv2/libkexiv2/libkexiv2_export.h +++ /dev/null @@ -1,47 +0,0 @@ -/** =========================================================== - * @file - * - * This file is part of the KDE project - * - * @brief Helper for exporting functions/classes from the shared library - * - * @author Copyright (C) 2007 David Faure - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. - - * You should have received a copy of the GNU Library General Public License - * along with this library; see the file COPYING.LIB. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301, USA. - * - * ============================================================ */ - -#ifndef LIBKEXIV2_EXPORT_H -#define LIBKEXIV2_EXPORT_H - -/* needed for KDE_EXPORT and KDE_IMPORT macros */ -#include - -#ifndef KEXIV2_EXPORT -# if defined(MAKE_KEXIV2_LIB) - /* We are building this library */ -# define KEXIV2_EXPORT KDE_EXPORT -# else - /* We are using this library */ -# define KEXIV2_EXPORT KDE_IMPORT -# endif -#endif - -# ifndef KEXIV2_EXPORT_DEPRECATED -# define KEXIV2_EXPORT_DEPRECATED KDE_DEPRECATED KEXIV2_EXPORT -# endif - -#endif diff --git a/kexiv2/libkexiv2/msgtextedit.h b/kexiv2/libkexiv2/msgtextedit.h index e96042b8..c3236482 100644 --- a/kexiv2/libkexiv2/msgtextedit.h +++ b/kexiv2/libkexiv2/msgtextedit.h @@ -37,7 +37,7 @@ // Local includes -#include "libkexiv2_export.h" +#include "kexiv2_export.h" namespace KExiv2Iface { diff --git a/kexiv2/libkexiv2/rotationmatrix.h b/kexiv2/libkexiv2/rotationmatrix.h index ca9d9439..3dad219c 100644 --- a/kexiv2/libkexiv2/rotationmatrix.h +++ b/kexiv2/libkexiv2/rotationmatrix.h @@ -35,7 +35,6 @@ // Local includes #include "kexiv2.h" -#include "libkexiv2_export.h" namespace KExiv2Iface { diff --git a/kexiv2/libkexiv2/subjectwidget.h b/kexiv2/libkexiv2/subjectwidget.h index 1174577b..a3b35ae4 100644 --- a/kexiv2/libkexiv2/subjectwidget.h +++ b/kexiv2/libkexiv2/subjectwidget.h @@ -45,7 +45,7 @@ // Local includes -#include "libkexiv2_export.h" +#include "kexiv2_export.h" namespace KExiv2Iface { diff --git a/kfile/CMakeLists.txt b/kfile/CMakeLists.txt index 9f279dfa..4a27ba69 100644 --- a/kfile/CMakeLists.txt +++ b/kfile/CMakeLists.txt @@ -64,6 +64,8 @@ install( ${INSTALL_TARGETS_DEFAULT_ARGS} ) +generate_export_header(kfile) + install( FILES kdiroperator.h @@ -78,7 +80,7 @@ install( kurlnavigator.h knewfilemenu.h knameandurlinputdialog.h - kfile_export.h + ${CMAKE_CURRENT_BINARY_DIR}/kfile_export.h DESTINATION ${INCLUDE_INSTALL_DIR} COMPONENT Devel ) diff --git a/kfile/kfile_export.h b/kfile/kfile_export.h deleted file mode 100644 index 375b7977..00000000 --- a/kfile/kfile_export.h +++ /dev/null @@ -1,40 +0,0 @@ -/* This file is part of the KDE project - Copyright (C) 2007 David Faure - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#ifndef KFILE_EXPORT_H -#define KFILE_EXPORT_H - -/* needed for KDE_EXPORT and KDE_IMPORT macros */ -#include - -#ifndef KFILE_EXPORT -# if defined(MAKE_KFILE_LIB) - /* We are building this library */ -# define KFILE_EXPORT KDE_EXPORT -# else - /* We are using this library */ -# define KFILE_EXPORT KDE_IMPORT -# endif -#endif - -# ifndef KFILE_EXPORT_DEPRECATED -# define KFILE_EXPORT_DEPRECATED KDE_DEPRECATED KFILE_EXPORT -# endif - -#endif diff --git a/kimgio/pcx.h b/kimgio/pcx.h index 604c18b8..c3609a32 100644 --- a/kimgio/pcx.h +++ b/kimgio/pcx.h @@ -10,8 +10,6 @@ #ifndef PCX_H #define PCX_H - -#include #include #include #include diff --git a/kinit/CMakeLists.txt b/kinit/CMakeLists.txt index 291e3917..2d3314d5 100644 --- a/kinit/CMakeLists.txt +++ b/kinit/CMakeLists.txt @@ -76,7 +76,7 @@ install(TARGETS kshell4 ${INSTALL_TARGETS_DEFAULT_ARGS}) add_executable(lnusertemp lnusertemp.c) -target_link_libraries(lnusertemp kdefakes) +target_link_libraries(lnusertemp ${KDE4_KDECORE_LIBS}) install(TARGETS lnusertemp DESTINATION ${LIBEXEC_INSTALL_DIR}) diff --git a/kinit/kinit.cpp b/kinit/kinit.cpp index 77272058..219a167b 100644 --- a/kinit/kinit.cpp +++ b/kinit/kinit.cpp @@ -55,7 +55,6 @@ #include #include #include -#include #include #include #include diff --git a/kio/CMakeLists.txt b/kio/CMakeLists.txt index b47d5bd7..44b06756 100644 --- a/kio/CMakeLists.txt +++ b/kio/CMakeLists.txt @@ -306,9 +306,11 @@ install( DESTINATION ${SERVICETYPES_INSTALL_DIR} ) +generate_export_header(kio) + install( FILES - kio/kio_export.h + ${CMAKE_CURRENT_BINARY_DIR}/kio_export.h kio/accessmanager.h kio/connection.h kio/slaveinterface.h diff --git a/kio/bookmarks/kbookmarkimporter_ie.h b/kio/bookmarks/kbookmarkimporter_ie.h index b5f61f8e..74b1a93c 100644 --- a/kio/bookmarks/kbookmarkimporter_ie.h +++ b/kio/bookmarks/kbookmarkimporter_ie.h @@ -23,7 +23,6 @@ #include #include -#include #include #include diff --git a/kio/bookmarks/kbookmarkimporter_ns.h b/kio/bookmarks/kbookmarkimporter_ns.h index 44deaabc..06bdd50d 100644 --- a/kio/bookmarks/kbookmarkimporter_ns.h +++ b/kio/bookmarks/kbookmarkimporter_ns.h @@ -23,7 +23,6 @@ #include #include -#include #include "kbookmarkimporter.h" #include "kbookmarkexporter.h" diff --git a/kio/kfile/kpropertiesdialog.h b/kio/kfile/kpropertiesdialog.h index d80b8191..7baed7e4 100644 --- a/kio/kfile/kpropertiesdialog.h +++ b/kio/kfile/kpropertiesdialog.h @@ -26,7 +26,6 @@ #include -#include #include #include #include diff --git a/kio/kio/connection.h b/kio/kio/connection.h index c92efc84..17ed42aa 100644 --- a/kio/kio/connection.h +++ b/kio/kio/connection.h @@ -22,10 +22,10 @@ #ifndef KIO_CONNECTION_H #define KIO_CONNECTION_H -#if defined(MAKE_KIO_LIB) || defined(MAKE_KLAUNCHER) +#if defined(kio_EXPORTS) || defined(MAKE_KLAUNCHER) # define KIO_CONNECTION_EXPORT KIO_EXPORT #else -# define KIO_CONNECTION_EXPORT KIO_EXPORT_DEPRECATED +# define KIO_CONNECTION_EXPORT KIO_DEPRECATED_EXPORT #endif #include "kio_export.h" diff --git a/kio/kio/kio_export.h b/kio/kio/kio_export.h deleted file mode 100644 index 2f7c39e3..00000000 --- a/kio/kio/kio_export.h +++ /dev/null @@ -1,40 +0,0 @@ -/* This file is part of the KDE project - Copyright (C) 2007 David Faure - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#ifndef KIO_EXPORT_H -#define KIO_EXPORT_H - -/* needed for KDE_EXPORT and KDE_IMPORT macros */ -#include - -#ifndef KIO_EXPORT -# if defined(MAKE_KIO_LIB) - /* We are building this library */ -# define KIO_EXPORT KDE_EXPORT -# else - /* We are using this library */ -# define KIO_EXPORT KDE_IMPORT -# endif -#endif - -# ifndef KIO_EXPORT_DEPRECATED -# define KIO_EXPORT_DEPRECATED KDE_DEPRECATED KIO_EXPORT -# endif - -#endif diff --git a/kio/kio/ksambashare.h b/kio/kio/ksambashare.h index bf0bdb8d..8414b9f7 100644 --- a/kio/kio/ksambashare.h +++ b/kio/kio/ksambashare.h @@ -112,7 +112,7 @@ public: * * @deprecated */ - KDE_DEPRECATED QString smbConfPath() const; + KIO_DEPRECATED QString smbConfPath() const; Q_SIGNALS: /** diff --git a/kio/kio/metainfojob.h b/kio/kio/metainfojob.h index 00c17647..c2623069 100644 --- a/kio/kio/metainfojob.h +++ b/kio/kio/metainfojob.h @@ -112,7 +112,7 @@ namespace KIO { * @return the MetaInfoJob to retrieve the items * @deprecated use strigi or KFileMetaInfo */ - KIO_EXPORT_DEPRECATED MetaInfoJob* fileMetaInfo(const KFileItemList& items); + KIO_DEPRECATED_EXPORT MetaInfoJob* fileMetaInfo(const KFileItemList& items); /** * Retrieves meta information for the given items. @@ -121,7 +121,7 @@ namespace KIO { * @return the MetaInfoJob to retrieve the items * @deprecated use strigi or KFileMetaInfo */ - KIO_EXPORT_DEPRECATED MetaInfoJob* fileMetaInfo(const KUrl::List& items); + KIO_DEPRECATED_EXPORT MetaInfoJob* fileMetaInfo(const KUrl::List& items); } #endif diff --git a/kio/kio/paste.h b/kio/kio/paste.h index c1a0584c..3eb233b0 100644 --- a/kio/kio/paste.h +++ b/kio/kio/paste.h @@ -102,7 +102,7 @@ namespace KIO { * Note that you'll have to tell the user in case of an error (no data to paste), * while pasteMimeSource did that. */ - KIO_EXPORT_DEPRECATED CopyJob* pasteMimeSource( const QMimeData* data, const KUrl& destURL, + KIO_DEPRECATED_EXPORT CopyJob* pasteMimeSource( const QMimeData* data, const KUrl& destURL, const QString& dialogText, QWidget* widget, bool clipboard = false ); diff --git a/kio/kio/slaveinterface.h b/kio/kio/slaveinterface.h index 8dd1f17f..ee289623 100644 --- a/kio/kio/slaveinterface.h +++ b/kio/kio/slaveinterface.h @@ -130,7 +130,7 @@ public: * @since 4.8.2 * @deprecated */ - KDE_DEPRECATED QWidget* window() const; + KIO_DEPRECATED QWidget* window() const; /** * Sets the top level window used as a parent when displaying @@ -139,7 +139,7 @@ public: * @since 4.8.2 * @deprecated */ - KDE_DEPRECATED void setWindow(QWidget* window); + KIO_DEPRECATED void setWindow(QWidget* window); Q_SIGNALS: /////////// diff --git a/kio/kio/thumbcreator.cpp b/kio/kio/thumbcreator.cpp index c258df68..c4c1815c 100644 --- a/kio/kio/thumbcreator.cpp +++ b/kio/kio/thumbcreator.cpp @@ -19,6 +19,8 @@ #include "thumbcreator.h" +#include + ThumbCreator::~ThumbCreator() { } diff --git a/kio/kio/thumbsequencecreator.h b/kio/kio/thumbsequencecreator.h index 12de941c..0809417d 100644 --- a/kio/kio/thumbsequencecreator.h +++ b/kio/kio/thumbsequencecreator.h @@ -22,6 +22,8 @@ #include "thumbcreator.h" +#include + /** * @see ThumbCreator * diff --git a/kio/misc/kntlm/CMakeLists.txt b/kio/misc/kntlm/CMakeLists.txt index c7ddaff0..e0d9f37f 100644 --- a/kio/misc/kntlm/CMakeLists.txt +++ b/kio/misc/kntlm/CMakeLists.txt @@ -15,9 +15,11 @@ install( ${INSTALL_TARGETS_DEFAULT_ARGS} ) +generate_export_header(kntlm) + install( FILES - kntlm_export.h + ${CMAKE_CURRENT_BINARY_DIR}/kntlm_export.h kntlm.h DESTINATION ${INCLUDE_INSTALL_DIR}/kio COMPONENT Devel diff --git a/kio/misc/kntlm/kntlm_export.h b/kio/misc/kntlm/kntlm_export.h deleted file mode 100644 index ec27c9cb..00000000 --- a/kio/misc/kntlm/kntlm_export.h +++ /dev/null @@ -1,40 +0,0 @@ -/* This file is part of the KDE project - Copyright (C) 2007 David Faure - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#ifndef KNTLM_EXPORT_H -#define KNTLM_EXPORT_H - -/* needed for KDE_EXPORT and KDE_IMPORT macros */ -#include - -#ifndef KNTLM_EXPORT -# if defined(MAKE_KNTLM_LIB) - /* We are building this library */ -# define KNTLM_EXPORT KDE_EXPORT -# else - /* We are using this library */ -# define KNTLM_EXPORT KDE_IMPORT -# endif -#endif - -# ifndef KNTLM_EXPORT_DEPRECATED -# define KNTLM_EXPORT_DEPRECATED KDE_DEPRECATED KNTLM_EXPORT -# endif - -#endif diff --git a/kioslave/file/CMakeLists.txt b/kioslave/file/CMakeLists.txt index 3abb0738..71d6c0b7 100644 --- a/kioslave/file/CMakeLists.txt +++ b/kioslave/file/CMakeLists.txt @@ -30,3 +30,5 @@ install(TARGETS kio_file DESTINATION ${PLUGIN_INSTALL_DIR}) ########### install files ############### install(FILES file.protocol DESTINATION ${SERVICES_INSTALL_DIR}) + +generate_export_header(kio_file) diff --git a/kioslave/file/file.h b/kioslave/file/file.h index 79768ea2..f03b4f7d 100644 --- a/kioslave/file/file.h +++ b/kioslave/file/file.h @@ -23,7 +23,7 @@ #ifndef __file_h__ #define __file_h__ -#include "kioslave_file_export.h" +#include "kio_file_export.h" #include #include diff --git a/kioslave/file/kioslave_file_export.h b/kioslave/file/kioslave_file_export.h deleted file mode 100644 index ec09951c..00000000 --- a/kioslave/file/kioslave_file_export.h +++ /dev/null @@ -1,40 +0,0 @@ -/* This file is part of the KDE project - Copyright (C) 2007 David Faure - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#ifndef KIOSLAVE_FILE_EXPORT_H -#define KIOSLAVE_FILE_EXPORT_H - -/* needed for KDE_EXPORT and KDE_IMPORT macros */ -#include - -#ifndef KIOSLAVE_FILE_EXPORT -# if defined(MAKE_KIOSLAVE_FILE_LIB) || defined(MAKE_KIO_FILE_LIB) - /* We are building this library */ -# define KIOSLAVE_FILE_EXPORT KDE_EXPORT -# else - /* We are using this library */ -# define KIOSLAVE_FILE_EXPORT KDE_IMPORT -# endif -#endif - -# ifndef KIOSLAVE_FILE_EXPORT_DEPRECATED -# define KIOSLAVE_FILE_EXPORT_DEPRECATED KDE_DEPRECATED KIOSLAVE_FILE_EXPORT -# endif - -#endif diff --git a/knotify/CMakeLists.txt b/knotify/CMakeLists.txt index 9253989c..32eeae07 100644 --- a/knotify/CMakeLists.txt +++ b/knotify/CMakeLists.txt @@ -40,9 +40,11 @@ install( ########### install files ############### +generate_export_header(knotifyconfig) + install( FILES - knotifyconfig_export.h + ${CMAKE_CURRENT_BINARY_DIR}/knotifyconfig_export.h knotifyconfigwidget.h DESTINATION ${INCLUDE_INSTALL_DIR} COMPONENT Devel diff --git a/knotify/knotifyconfig_export.h b/knotify/knotifyconfig_export.h deleted file mode 100644 index 17418428..00000000 --- a/knotify/knotifyconfig_export.h +++ /dev/null @@ -1,36 +0,0 @@ -/* This file is part of the KDE project - Copyright (C) 2007 David Faure - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#ifndef KNOTIFYCONFIG_EXPORT_H -#define KNOTIFYCONFIG_EXPORT_H - -/* needed for KDE_EXPORT and KDE_IMPORT macros */ -#include - -#ifndef KNOTIFYCONFIG_EXPORT -# if defined(MAKE_KNOTIFYCONFIG_LIB) - /* We are building this library */ -# define KNOTIFYCONFIG_EXPORT KDE_EXPORT -# else - /* We are using this library */ -# define KNOTIFYCONFIG_EXPORT KDE_IMPORT -# endif -#endif - -#endif diff --git a/kparts/CMakeLists.txt b/kparts/CMakeLists.txt index 65a9283e..ac26a3a2 100644 --- a/kparts/CMakeLists.txt +++ b/kparts/CMakeLists.txt @@ -60,9 +60,11 @@ install( DESTINATION ${SERVICETYPES_INSTALL_DIR} ) +generate_export_header(kparts) + install( FILES - kparts_export.h + ${CMAKE_CURRENT_BINARY_DIR}/kparts_export.h part.h plugin.h partmanager.h diff --git a/kparts/kparts_export.h b/kparts/kparts_export.h deleted file mode 100644 index a803bfe7..00000000 --- a/kparts/kparts_export.h +++ /dev/null @@ -1,36 +0,0 @@ -/* This file is part of the KDE project - Copyright (C) 2006 David Faure - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#ifndef KPARTS_EXPORT_H -#define KPARTS_EXPORT_H - -/* needed for KDE_EXPORT and KDE_IMPORT macros */ -#include - -#ifndef KPARTS_EXPORT -# if defined(MAKE_KPARTS_LIB) - /* We are building this library */ -# define KPARTS_EXPORT KDE_EXPORT -# else - /* We are using this library */ -# define KPARTS_EXPORT KDE_IMPORT -# endif -#endif - -#endif diff --git a/kpty/CMakeLists.txt b/kpty/CMakeLists.txt index c0659797..4472b6f2 100644 --- a/kpty/CMakeLists.txt +++ b/kpty/CMakeLists.txt @@ -26,9 +26,11 @@ install( ${INSTALL_TARGETS_DEFAULT_ARGS} ) +generate_export_header(kpty) + install( FILES - kpty_export.h + ${CMAKE_CURRENT_BINARY_DIR}/kpty_export.h kpty.h kptydevice.h kptyprocess.h diff --git a/kpty/kpty.h b/kpty/kpty.h index b5c5c32b..43fbb3bf 100644 --- a/kpty/kpty.h +++ b/kpty/kpty.h @@ -23,6 +23,8 @@ #include "kpty_export.h" +#include + class KPtyPrivate; struct termios; diff --git a/kpty/kpty_export.h b/kpty/kpty_export.h deleted file mode 100644 index c1400a5d..00000000 --- a/kpty/kpty_export.h +++ /dev/null @@ -1,40 +0,0 @@ -/* This file is part of the KDE project - Copyright (C) 2007 David Faure - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#ifndef KPTY_EXPORT_H -#define KPTY_EXPORT_H - -/* needed for KDE_EXPORT and KDE_IMPORT macros */ -#include - -#ifndef KPTY_EXPORT -# if defined(MAKE_KDECORE_LIB) - /* We are building this library */ -# define KPTY_EXPORT KDE_EXPORT -# else - /* We are using this library */ -# define KPTY_EXPORT KDE_IMPORT -# endif -#endif - -# ifndef KPTY_EXPORT_DEPRECATED -# define KPTY_EXPORT_DEPRECATED KDE_DEPRECATED KPTY_EXPORT -# endif - -#endif diff --git a/kross/core/CMakeLists.txt b/kross/core/CMakeLists.txt index 2ee54b04..c714066c 100644 --- a/kross/core/CMakeLists.txt +++ b/kross/core/CMakeLists.txt @@ -34,9 +34,11 @@ install( ${INSTALL_TARGETS_DEFAULT_ARGS} ) +generate_export_header(krosscore BASE_NAME KROSS) + install( FILES - kross_export.h + ${CMAKE_CURRENT_BINARY_DIR}/kross_export.h krossconfig.h errorinterface.h childreninterface.h diff --git a/kross/core/kross_export.h b/kross/core/kross_export.h deleted file mode 100644 index d68ac5c1..00000000 --- a/kross/core/kross_export.h +++ /dev/null @@ -1,64 +0,0 @@ -/* This file is part of the KDE project - Copyright (C) 2007 David Faure - Copyright (C) 2007 Sebastian Sauer - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#ifndef KROSS_EXPORT_H -#define KROSS_EXPORT_H - -/* needed for KDE_EXPORT and KDE_IMPORT macros */ -#include - -#ifndef KROSS_EXPORT -# if defined(MAKE_KROSS_LIB) - /* We are building this library */ -# define KROSS_EXPORT KDE_EXPORT -# else - /* We are using this library */ -# define KROSS_EXPORT KDE_IMPORT -# endif -#endif - -#ifndef KROSSCORE_EXPORT -# if defined(MAKE_KROSSCORE_LIB) - /* We are building this library */ -# define KROSSCORE_EXPORT KDE_EXPORT -# else - /* We are using this library */ -# define KROSSCORE_EXPORT KDE_IMPORT -# endif -#endif - -#ifndef KROSSUI_EXPORT -# if defined(MAKE_KROSSUI_LIB) - /* We are building this library */ -# define KROSSUI_EXPORT KDE_EXPORT -# else - /* We are using this library */ -# define KROSSUI_EXPORT KDE_IMPORT -# endif -#endif - -# ifndef KROSS_EXPORT_DEPRECATED -# define KROSS_EXPORT_DEPRECATED KDE_DEPRECATED KROSS_EXPORT -# endif -# ifndef KROSSCORE_EXPORT_DEPRECATED -# define KROSSCORE_EXPORT_DEPRECATED KDE_DEPRECATED KROSSCORE_EXPORT -# endif - -#endif diff --git a/kross/qts/plugin.h b/kross/qts/plugin.h index f3c4759e..f6f06648 100644 --- a/kross/qts/plugin.h +++ b/kross/qts/plugin.h @@ -29,11 +29,12 @@ //#include //#include -#include //#include "errorinterface.h" //#include "childreninterface.h" -#define KROSSQTSPLUGIN_EXPORT KDE_EXPORT +#include + +#define KROSSQTSPLUGIN_EXPORT KROSS_EXPORT namespace Kross { diff --git a/kunitconversion/CMakeLists.txt b/kunitconversion/CMakeLists.txt index 390b8ac2..809d7386 100644 --- a/kunitconversion/CMakeLists.txt +++ b/kunitconversion/CMakeLists.txt @@ -89,13 +89,15 @@ install( ${INSTALL_TARGETS_DEFAULT_ARGS} ) +generate_export_header(kunitconversion) + install( FILES converter.h value.h unit.h unitcategory.h - kunitconversion_export.h + ${CMAKE_CURRENT_BINARY_DIR}/kunitconversion_export.h DESTINATION ${INCLUDE_INSTALL_DIR}/kunitconversion COMPONENT Devel ) diff --git a/kunitconversion/kunitconversion_export.h b/kunitconversion/kunitconversion_export.h deleted file mode 100644 index a6931bc9..00000000 --- a/kunitconversion/kunitconversion_export.h +++ /dev/null @@ -1,40 +0,0 @@ -/* This file is part of the KDE project - Copyright (C) 2007 David Faure - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#ifndef KUNITCONVERSION_EXPORT_H -#define KUNITCONVERSION_EXPORT_H - -/* needed for KDE_EXPORT and KDE_IMPORT macros */ -#include - -#ifndef KUNITCONVERSION_EXPORT -# if defined(MAKE_KUNITCONVERSION_LIB) - /* We are building this library */ -# define KUNITCONVERSION_EXPORT KDE_EXPORT -# else - /* We are using this library */ -# define KUNITCONVERSION_EXPORT KDE_IMPORT -# endif -#endif - -# ifndef KUNITCONVERSION_EXPORT_DEPRECATED -# define KUNITCONVERSION_EXPORT_DEPRECATED KDE_DEPRECATED KUNITCONVERSION_EXPORT -# endif - -#endif diff --git a/kutils/CMakeLists.txt b/kutils/CMakeLists.txt index 080e23ba..6ed0046f 100644 --- a/kutils/CMakeLists.txt +++ b/kutils/CMakeLists.txt @@ -34,9 +34,11 @@ install( DESTINATION ${SERVICETYPES_INSTALL_DIR} ) +generate_export_header(kemoticons) + install( FILES - kemoticons_export.h + ${CMAKE_CURRENT_BINARY_DIR}/kemoticons_export.h kemoticons/kemoticons.h kemoticons/kemoticonstheme.h kemoticons/kemoticonsprovider.h @@ -106,9 +108,11 @@ set_target_properties(kidletime PROPERTIES SOVERSION ${GENERIC_LIB_SOVERSION} ) +generate_export_header(kidletime) + install( FILES - kidletime_export.h + ${CMAKE_CURRENT_BINARY_DIR}/kidletime_export.h kidletime/kidletime.h DESTINATION ${INCLUDE_INSTALL_DIR} COMPONENT Devel diff --git a/kutils/kcmutils_export.h b/kutils/kcmutils_export.h deleted file mode 100644 index ff92ebf2..00000000 --- a/kutils/kcmutils_export.h +++ /dev/null @@ -1,36 +0,0 @@ -/* This file is part of the KDE project - Copyright (C) 2007 David Faure - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#ifndef KCMUTILS_EXPORT_H -#define KCMUTILS_EXPORT_H - -/* needed for KDE_EXPORT and KDE_IMPORT macros */ -#include - -#ifndef KCMUTILS_EXPORT -# if defined(MAKE_KCMUTILS_LIB) - /* We are building this library */ -# define KCMUTILS_EXPORT KDE_EXPORT -# else - /* We are using this library */ -# define KCMUTILS_EXPORT KDE_IMPORT -# endif -#endif - -#endif diff --git a/kutils/kemoticons_export.h b/kutils/kemoticons_export.h deleted file mode 100644 index ee5b3698..00000000 --- a/kutils/kemoticons_export.h +++ /dev/null @@ -1,36 +0,0 @@ -/* This file is part of the KDE project - Copyright (C) 2007 David Faure - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#ifndef KEMOTICONS_EXPORT_H -#define KEMOTICONS_EXPORT_H - -/* needed for KDE_EXPORT and KDE_IMPORT macros */ -#include - -#ifndef KEMOTICONS_EXPORT -# if defined(MAKE_KEMOTICONS_LIB) - /* We are building this library */ -# define KEMOTICONS_EXPORT KDE_EXPORT -# else - /* We are using this library */ -# define KEMOTICONS_EXPORT KDE_IMPORT -# endif -#endif - -#endif diff --git a/kutils/kidletime_export.h b/kutils/kidletime_export.h deleted file mode 100644 index ae3fda6a..00000000 --- a/kutils/kidletime_export.h +++ /dev/null @@ -1,36 +0,0 @@ -/* This file is part of the KDE project - Copyright (C) 2007 David Faure - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#ifndef KIDLETIME_EXPORT_H -#define KIDLETIME_EXPORT_H - -/* needed for KDE_EXPORT and KDE_IMPORT macros */ -#include - -#ifndef KIDLETIME_EXPORT -# if defined(MAKE_KIDLETIME_LIB) - /* We are building this library */ -# define KIDLETIME_EXPORT KDE_EXPORT -# else - /* We are using this library */ -# define KIDLETIME_EXPORT KDE_IMPORT -# endif -#endif - -#endif diff --git a/kutils/kmediaplayer/CMakeLists.txt b/kutils/kmediaplayer/CMakeLists.txt index 3c354294..f6483419 100644 --- a/kutils/kmediaplayer/CMakeLists.txt +++ b/kutils/kmediaplayer/CMakeLists.txt @@ -27,9 +27,11 @@ set_target_properties(kmediaplayer PROPERTIES SOVERSION ${KDE_NON_GENERIC_LIB_SOVERSION} ) +generate_export_header(kmediaplayer) + install( FILES - kmediaplayer_export.h + ${CMAKE_CURRENT_BINARY_DIR}/kmediaplayer_export.h kmediaplayer.h kmediawidget.h DESTINATION ${INCLUDE_INSTALL_DIR} diff --git a/kutils/kmediaplayer/kmediaplayer_export.h b/kutils/kmediaplayer/kmediaplayer_export.h deleted file mode 100644 index a0bdfef0..00000000 --- a/kutils/kmediaplayer/kmediaplayer_export.h +++ /dev/null @@ -1,35 +0,0 @@ -/* This file is part of the KDE libraries - Copyright (C) 2016 Ivailo Monev - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License version 2, as published by the Free Software Foundation. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#ifndef KMEDIAPLAYER_EXPORT_H -#define KMEDIAPLAYER_EXPORT_H - -/* needed for KDE_EXPORT and KDE_IMPORT macros */ -#include - -#ifndef KMEDIAPLAYER_EXPORT -# if defined(MAKE_KMEDIAPLAYER_LIB) - /* We are building this library */ -# define KMEDIAPLAYER_EXPORT KDE_EXPORT -# else - /* We are using this library */ -# define KMEDIAPLAYER_EXPORT KDE_IMPORT -# endif -#endif - -#endif // KMEDIAPLAYER_EXPORT_H diff --git a/kutils/kprintutils_export.h b/kutils/kprintutils_export.h deleted file mode 100644 index 1f773806..00000000 --- a/kutils/kprintutils_export.h +++ /dev/null @@ -1,36 +0,0 @@ -/* This file is part of the KDE project - Copyright (C) 2007 David Faure - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#ifndef KPRINTUTILS_EXPORT_H -#define KPRINTUTILS_EXPORT_H - -/* needed for KDE_EXPORT and KDE_IMPORT macros */ -#include - -#ifndef KPRINTUTILS_EXPORT -# if defined(MAKE_KPRINTUTILS_LIB) - /* We are building this library */ -# define KPRINTUTILS_EXPORT KDE_EXPORT -# else - /* We are using this library */ -# define KPRINTUTILS_EXPORT KDE_IMPORT -# endif -#endif - -#endif diff --git a/plasma/CMakeLists.txt b/plasma/CMakeLists.txt index 8571b58e..8f988b0a 100644 --- a/plasma/CMakeLists.txt +++ b/plasma/CMakeLists.txt @@ -226,6 +226,8 @@ install( ########### install files ############### +generate_export_header(plasma) + install( FILES packagemetadata.h @@ -255,7 +257,6 @@ install( windoweffects.h framesvg.h plasma.h - plasma_export.h popupapplet.h querymatch.h runnercontext.h @@ -267,6 +268,7 @@ install( theme.h tooltipcontent.h tooltipmanager.h + ${CMAKE_CURRENT_BINARY_DIR}/plasma_export.h ${CMAKE_CURRENT_BINARY_DIR}/version.h view.h wallpaper.h diff --git a/plasma/plasma_export.h b/plasma/plasma_export.h deleted file mode 100644 index a8874b0e..00000000 --- a/plasma/plasma_export.h +++ /dev/null @@ -1,40 +0,0 @@ -/* This file is part of the KDE project - Copyright 2007 Aaron Seigo - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#ifndef PLASMA_EXPORT_H -#define PLASMA_EXPORT_H - -/* needed for KDE_EXPORT and KDE_IMPORT macros */ -#include - -#ifndef PLASMA_EXPORT -# if defined(MAKE_PLASMA_LIB) - /* We are building this library */ -# define PLASMA_EXPORT KDE_EXPORT -# else - /* We are using this library */ -# define PLASMA_EXPORT KDE_IMPORT -# endif -#endif - -# ifndef PLASMA_EXPORT_DEPRECATED -# define PLASMA_EXPORT_DEPRECATED KDE_DEPRECATED PLASMA_EXPORT -# endif - -#endif diff --git a/solid/solid/CMakeLists.txt b/solid/solid/CMakeLists.txt index 7eecf86c..a0e859a9 100644 --- a/solid/solid/CMakeLists.txt +++ b/solid/solid/CMakeLists.txt @@ -7,11 +7,6 @@ include_directories( ${QT_QTGUI_INCLUDE_DIR} ) -configure_file( - solid_export.h.cmake - ${CMAKE_CURRENT_BINARY_DIR}/solid_export.h -) - include (CheckCXXSourceCompiles) check_cxx_source_compiles(" #ifdef __SUNPRO_CC @@ -396,6 +391,8 @@ endif() ########### install files ############### +generate_export_header(solid) + install( FILES ${CMAKE_CURRENT_BINARY_DIR}/solid_export.h diff --git a/solid/solid/solid_export.h.cmake b/solid/solid/solid_export.h.cmake deleted file mode 100644 index 96c117d3..00000000 --- a/solid/solid/solid_export.h.cmake +++ /dev/null @@ -1,53 +0,0 @@ -/* - Copyright 2007 David Faure - Copyright 2007 Kevin Ottens - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) version 3, or any - later version accepted by the membership of KDE e.V. (or its - successor approved by the membership of KDE e.V.), which shall - act as a proxy defined in Section 6 of version 3 of the license. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library. If not, see . -*/ - -#ifndef SOLID_EXPORT_H -#define SOLID_EXPORT_H - -#ifndef __KDE_HAVE_GCC_VISIBILITY -#cmakedefine __KDE_HAVE_GCC_VISIBILITY -#endif - -#ifdef SOLID_EXPORT - /* We are building a test case */ -# define SOLID_NO_EXPORT - -#else - /* We are not building a test case */ - -# ifdef __KDE_HAVE_GCC_VISIBILITY - -# define SOLID_NO_EXPORT __attribute__ ((visibility("hidden"))) -# define SOLID_EXPORT __attribute__ ((visibility("default"))) - -# else - -# define SOLID_NO_EXPORT -# define SOLID_EXPORT - -# endif -#endif - -#ifndef SOLID_EXPORT_DEPRECATED -# define SOLID_EXPORT_DEPRECATED KDE_DEPRECATED SOLID_EXPORT -#endif - -#endif diff --git a/threadweaver/CMakeLists.txt b/threadweaver/CMakeLists.txt index 5290e098..fd15e893 100644 --- a/threadweaver/CMakeLists.txt +++ b/threadweaver/CMakeLists.txt @@ -11,9 +11,11 @@ add_subdirectory(Weaver) # disabled for default kdelibs build: # add_subdirectory(Examples) +generate_export_header(threadweaver) + install( FILES - threadweaver_export.h + ${CMAKE_CURRENT_BINARY_DIR}/threadweaver_export.h DESTINATION ${INCLUDE_INSTALL_DIR}/threadweaver COMPONENT Devel ) diff --git a/threadweaver/threadweaver_export.h b/threadweaver/threadweaver_export.h deleted file mode 100644 index 651f2425..00000000 --- a/threadweaver/threadweaver_export.h +++ /dev/null @@ -1,36 +0,0 @@ -/* This file is part of the KDE project - Copyright (C) 2006 David Faure - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#ifndef THREADWEAVER_EXPORT_H -#define THREADWEAVER_EXPORT_H - -/* needed for KDE_EXPORT and KDE_IMPORT macros */ -#include - -#ifndef THREADWEAVER_EXPORT -# if defined(MAKE_THREADWEAVER_LIB) - /* We are building this library */ -# define THREADWEAVER_EXPORT KDE_EXPORT -# else - /* We are using this library */ -# define THREADWEAVER_EXPORT KDE_IMPORT -# endif -#endif - -#endif