diff --git a/CMakeLists.txt b/CMakeLists.txt --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -879,7 +879,9 @@ ${PIGMENT_INCLUDES} ${KOMAIN_INCLUDES} ${CMAKE_SOURCE_DIR}/libs/widgets - ${CMAKE_SOURCE_DIR}/libs/kopageapp ${CMAKE_SOURCE_DIR}/libs/kopageapp/commands ${CMAKE_BINARY_DIR}/libs/kopageapp ) + ${CMAKE_SOURCE_DIR}/libs/kopageapp + ${CMAKE_SOURCE_DIR}/libs/kopageapp/commands + ${CMAKE_BINARY_DIR}/libs/kopageapp ) ############################################# #### filter libraries #### diff --git a/filters/libmsooxml/CMakeLists.txt b/filters/libmsooxml/CMakeLists.txt --- a/filters/libmsooxml/CMakeLists.txt +++ b/filters/libmsooxml/CMakeLists.txt @@ -40,6 +40,7 @@ ) add_library(komsooxml SHARED ${msooxml_LIB_SRCS}) +generate_export_header(komsooxml BASE_NAME komsooxml) target_link_libraries(komsooxml mso koodf2 koodf komain KF5::Archive) if(Qca-qt5_FOUND) @@ -54,7 +55,7 @@ if (FALSE) # these headers are private for now install( FILES - komsooxml_export.h + ${CMAKE_CURRENT_BINARY_DIR}/komsooxml_export.h MsooXmlContentTypes.h MsooXmlReader.h MsooXmlReader_p.h diff --git a/filters/libmsooxml/komsooxml_export.h b/filters/libmsooxml/komsooxml_export.h deleted file mode 100644 --- a/filters/libmsooxml/komsooxml_export.h +++ /dev/null @@ -1,44 +0,0 @@ -/* - * This file is part of Office 2007 Filters for Calligra - * - * Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). - * - * Contact: Suresh Chande suresh.chande@nokia.com - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public License - * version 2.1 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 - * 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, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA - * 02110-1301 USA - * - */ - -#ifndef KOMSOOXML_EXPORT_H -#define KOMSOOXML_EXPORT_H - -/* needed for KDE_EXPORT and KDE_IMPORT macros */ -#include - -#ifndef KOMSOOXML_EXPORT -# if defined(MAKE_KOMSOOXML_LIB) -/* We are building this library */ -# define KOMSOOXML_EXPORT KDE_EXPORT -# else -/* We are using this library */ -# define KOMSOOXML_EXPORT KDE_IMPORT -# endif -#endif - -# ifndef KOMSOOXML_EXPORT_DEPRECATED -# define KOMSOOXML_EXPORT_DEPRECATED KDE_DEPRECATED KOMSOOXML_EXPORT -# endif - -#endif diff --git a/filters/libodf2/CMakeLists.txt b/filters/libodf2/CMakeLists.txt --- a/filters/libodf2/CMakeLists.txt +++ b/filters/libodf2/CMakeLists.txt @@ -51,6 +51,7 @@ ) add_library(koodf2 SHARED ${koodf2_LIB_SRCS}) +generate_export_headers(koodf2 BASE_NAME koodf2) target_link_libraries(koodf2 koodf mso KF5::KIOWidgets KF5::KDELibs4Support Qt5::Xml) target_link_libraries(koodf2 LINK_INTERFACE_LIBRARIES KF5::KIOWidgets) @@ -62,7 +63,7 @@ install( FILES - koodf2_export.h + ${CMAKE_CURRENT_BINARY_DIR}/koodf2_export.h KoStyle.h KoTable.h diff --git a/krita/image/CMakeLists.txt b/krita/image/CMakeLists.txt --- a/krita/image/CMakeLists.txt +++ b/krita/image/CMakeLists.txt @@ -41,6 +41,7 @@ include_directories( ${CMAKE_SOURCE_DIR}/krita/image/metadata + ${CMAKE_BINARY_DIR}/libs/widgets 3rdparty ) @@ -302,6 +303,7 @@ ) add_library(kritaimage SHARED ${kritaimage_LIB_SRCS} ${einspline_SRCS}) +# generate_export_header(kritaimage BASE_NAME kritaimage) target_link_libraries(kritaimage kritaglobal kritapsd koodf pigmentcms kundo2 kowidgetutils Qt5::Concurrent) target_link_libraries(kritaimage LINK_INTERFACE_LIBRARIES kritaglobal kritapsd koodf pigmentcms kundo2 kowidgetutils Qt5::Concurrent) diff --git a/krita/image/kritaimage_export.h b/krita/image/kritaimage_export.h --- a/krita/image/kritaimage_export.h +++ b/krita/image/kritaimage_export.h @@ -28,7 +28,7 @@ #if defined(_WIN32) || defined(_WIN64) #ifndef KRITAIMAGE_EXPORT -# ifdef MAKE_KRITAIMAGE_LIB +# ifdef kritaimage_EXPORTS # define KRITAIMAGE_EXPORT KDE_EXPORT # else # define KRITAIMAGE_EXPORT KDE_IMPORT @@ -44,7 +44,7 @@ /* Now the same for Krita*_TEST_EXPORT, if compiling with unit tests enabled */ #ifdef COMPILING_TESTS # if defined _WIN32 || defined _WIN64 -# if defined(MAKE_KRITAIMAGE_LIB) +# if defined(kritaimage_EXPORTS) # define KRITAIMAGE_TEST_EXPORT KDE_EXPORT # else # define KRITAIMAGE_TEST_EXPORT KDE_IMPORT diff --git a/krita/libbrush/CMakeLists.txt b/krita/libbrush/CMakeLists.txt --- a/krita/libbrush/CMakeLists.txt +++ b/krita/libbrush/CMakeLists.txt @@ -21,6 +21,7 @@ ) add_library(kritalibbrush SHARED ${kritalibbrush_LIB_SRCS} ) +generate_export_header(kritalibbrush BASE_NAME kritabrush EXPORT_MACRO_NAME BRUSH_EXPORT) if (WIN32) target_link_libraries(kritalibbrush kritaimage kowidgets Qt5::Svg ${WIN32_PLATFORM_NET_LIBS}) diff --git a/krita/libbrush/kritabrush_export.h b/krita/libbrush/kritabrush_export.h deleted file mode 100644 --- a/krita/libbrush/kritabrush_export.h +++ /dev/null @@ -1,43 +0,0 @@ -/* - This file is part of krita - Copyright (c) 2015 Friedrich W. H. Kossebau - - 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 KRITABRUSH_EXPORT_H -#define KRITABRUSH_EXPORT_H - -#include - -/* We use _WIN32/_WIN64 instead of Q_OS_WIN so that this header can be used from C files too */ -#if defined(_WIN32) || defined(_WIN64) - -#ifndef BRUSH_EXPORT -# ifdef MAKE_KRITALIBBRUSH_LIB -# define BRUSH_EXPORT KDE_EXPORT -# else -# define BRUSH_EXPORT KDE_IMPORT -# endif -#endif - -#else // not windows - -#define BRUSH_EXPORT KDE_EXPORT - -#endif /* not windows */ - -#endif /* KRITABRUSH_EXPORT_H */ diff --git a/krita/libcolor/CMakeLists.txt b/krita/libcolor/CMakeLists.txt --- a/krita/libcolor/CMakeLists.txt +++ b/krita/libcolor/CMakeLists.txt @@ -2,11 +2,14 @@ add_subdirectory(colord) set(kritacolor_LIB_SRCS kis_color_manager.h linux/kis_color_manager.cpp) set(kritacolor_EXTRA_LIBRARIES kritacolord) +elseif (MSVC) + set(kritacolor_LIB_SRCS kis_color_manager.h dummy/kis_color_manager.cpp ${CMAKE_CURRENT_BINARY_DIR}/kritacolor_export.h) else () set(kritacolor_LIB_SRCS dummy/kis_color_manager.cpp) endif () -kde4_add_library(kritacolor SHARED ${kritacolor_LIB_SRCS} ) +add_library(kritacolor SHARED ${kritacolor_LIB_SRCS} ) +generate_export_header(kritacolor BASE_NAME kritacolor) target_link_libraries(kritacolor ${QT_QTCORE_LIBRARY} KF5::KDELibs4Support ${kritacolor_EXTRA_LIBRARIES}) diff --git a/krita/libcolor/kis_color_manager.h b/krita/libcolor/kis_color_manager.h --- a/krita/libcolor/kis_color_manager.h +++ b/krita/libcolor/kis_color_manager.h @@ -30,7 +30,7 @@ * * TODO: support other devices than monitors */ -class KRITALIBCOLOR_EXPORT KisColorManager : public QObject +class KRITACOLOR_EXPORT KisColorManager : public QObject { Q_OBJECT diff --git a/krita/libcolor/kritacolor_export.h b/krita/libcolor/kritacolor_export.h deleted file mode 100644 --- a/krita/libcolor/kritacolor_export.h +++ /dev/null @@ -1,45 +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 KRITACOLOR_EXPORT_H -#define KRITACOLOR_EXPORT_H - -/* needed for KDE_EXPORT and KDE_IMPORT macros */ -#include - -/* We use _WIN32/_WIN64 instead of Q_OS_WIN so that this header can be used from C files too */ -#if defined _WIN32 || defined _WIN64 - -#ifndef KRITALIBCOLOR_EXPORT -# if defined(MAKE_KRITACOLOR_LIB) -/* We are building this library */ -# define KRITALIBCOLOR_EXPORT KDE_EXPORT -# else -/* We are using this library */ -# define KRITALIBCOLOR_EXPORT KDE_IMPORT -# endif -#endif - -#else /* UNIX */ - -#define KRITALIBCOLOR_EXPORT KDE_EXPORT - -#endif - -#endif diff --git a/krita/libpsd/CMakeLists.txt b/krita/libpsd/CMakeLists.txt --- a/krita/libpsd/CMakeLists.txt +++ b/krita/libpsd/CMakeLists.txt @@ -1,4 +1,5 @@ include_directories(${KOTEXT_INCLUDES}) +include_directories(${CMAKE_BINARY_DIR}/krita/libpsd) #For kispsd_include.h add_subdirectory( tests ) @@ -19,7 +20,8 @@ asl/kis_asl_writer.cpp ) -kde4_add_library(kritapsd SHARED ${kritapsd_LIB_SRCS} ) +add_library(kritapsd SHARED ${kritapsd_LIB_SRCS} ) +generate_export_header(kritapsd BASE_NAME kritapsd) if (WIN32) target_link_libraries(kritapsd pigmentcms kritaglobal KF5::KDELibs4Support ${QT_QTCORE_LIBRARY} ${QT_QTGUI_LIBRARY} ${WIN32_PLATFORM_NET_LIBS}) diff --git a/krita/plugins/formats/psd/CMakeLists.txt b/krita/plugins/formats/psd/CMakeLists.txt --- a/krita/plugins/formats/psd/CMakeLists.txt +++ b/krita/plugins/formats/psd/CMakeLists.txt @@ -5,6 +5,7 @@ configure_file(config_psd.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config_psd.h) include_directories(${ZLIB_INCLUDE_DIR}) +include_directories(${CMAKE_BINARY_DIR}/krita/libpsd) #For kispsd_include.h set(LIB_PSD_SRCS psd_header.cpp diff --git a/krita/plugins/formats/psd/tests/CMakeLists.txt b/krita/plugins/formats/psd/tests/CMakeLists.txt --- a/krita/plugins/formats/psd/tests/CMakeLists.txt +++ b/krita/plugins/formats/psd/tests/CMakeLists.txt @@ -1,3 +1,5 @@ +include_directories(${CMAKE_BINARY_DIR}/krita/libpsd) #For kispsd_include.h + set( EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR} ) include_directories( ${CMAKE_SOURCE_DIR}/.. ${CMAKE_SOURCE_DIR}/krita/sdk/tests ) diff --git a/krita/plugins/paintops/libpaintop/CMakeLists.txt b/krita/plugins/paintops/libpaintop/CMakeLists.txt --- a/krita/plugins/paintops/libpaintop/CMakeLists.txt +++ b/krita/plugins/paintops/libpaintop/CMakeLists.txt @@ -82,6 +82,7 @@ ) add_library(kritalibpaintop SHARED ${kritalibpaintop_LIB_SRCS} ) +generate_export_header(kritalibpaintop BASE_NAME paintop EXPORT_MACRO_NAME PAINTOP_EXPORT) target_link_libraries(kritalibpaintop kritaui kritalibbrush kowidgetutils) target_link_libraries(kritalibpaintop LINK_INTERFACE_LIBRARIES kritaui kritalibbrush) diff --git a/krita/plugins/paintops/libpaintop/kis_brush_chooser.h b/krita/plugins/paintops/libpaintop/kis_brush_chooser.h --- a/krita/plugins/paintops/libpaintop/kis_brush_chooser.h +++ b/krita/plugins/paintops/libpaintop/kis_brush_chooser.h @@ -19,7 +19,7 @@ #define KIS_BRUSH_CHOOSER_H_ #include -#include +#include "kritapaintop_export.h" #include class KisDoubleSliderSpinBox; diff --git a/krita/plugins/paintops/libpaintop/kritapaintop_export.h b/krita/plugins/paintops/libpaintop/kritapaintop_export.h --- a/krita/plugins/paintops/libpaintop/kritapaintop_export.h +++ b/krita/plugins/paintops/libpaintop/kritapaintop_export.h @@ -27,7 +27,7 @@ #if defined(_WIN32) || defined(_WIN64) #ifndef PAINTOP_EXPORT -# ifdef MAKE_KRITALIBPAINTOP_LIB +# ifdef kritalibpaintop_EXPORTS # define PAINTOP_EXPORT KDE_EXPORT # else # define PAINTOP_EXPORT KDE_IMPORT @@ -43,7 +43,7 @@ /* Now the same for Krita*_TEST_EXPORT, if compiling with unit tests enabled */ #ifdef COMPILING_TESTS # if defined _WIN32 || defined _WIN64 -# if defined(MAKE_KRITALIBPAINTOP_LIB) +# if defined(kritalibpaintop_EXPORTS) # define PAINTOP_TEST_EXPORT KDE_EXPORT # else # define PAINTOP_TEST_EXPORT KDE_IMPORT diff --git a/krita/plugins/tools/defaulttools/CMakeLists.txt b/krita/plugins/tools/defaulttools/CMakeLists.txt --- a/krita/plugins/tools/defaulttools/CMakeLists.txt +++ b/krita/plugins/tools/defaulttools/CMakeLists.txt @@ -25,6 +25,7 @@ ki18n_wrap_ui(kritadefaulttools_PART_SRCS wdgcolorpicker.ui wdgmovetool.ui) add_library(kritadefaulttools MODULE ${kritadefaulttools_PART_SRCS}) +generate_export_header(kritadefaulttools BASE_NAME kritadefaulttools) kcoreaddons_desktop_to_json(kritadefaulttools kritadefaulttools.desktop) target_link_libraries(kritadefaulttools kritaui basicflakes) diff --git a/krita/plugins/tools/defaulttools/kritadefaulttools_export.h b/krita/plugins/tools/defaulttools/kritadefaulttools_export.h --- a/krita/plugins/tools/defaulttools/kritadefaulttools_export.h +++ b/krita/plugins/tools/defaulttools/kritadefaulttools_export.h @@ -25,7 +25,7 @@ #ifdef COMPILING_TESTS # if defined _WIN32 || defined _WIN64 -# if defined(MAKE_KRITADEFAULTTOOLS_LIB) +# if defined(kritadefaulttools_EXPORTS) # define KRITADEFAULTTOOLS_TEST_EXPORT KDE_EXPORT # else # define KRITADEFAULTTOOLS_TEST_EXPORT KDE_IMPORT diff --git a/krita/plugins/tools/defaulttools/strokes/move_stroke_strategy.h b/krita/plugins/tools/defaulttools/strokes/move_stroke_strategy.h --- a/krita/plugins/tools/defaulttools/strokes/move_stroke_strategy.h +++ b/krita/plugins/tools/defaulttools/strokes/move_stroke_strategy.h @@ -21,7 +21,7 @@ #include "kis_stroke_strategy_undo_command_based.h" #include "kis_types.h" -#include "kritadefaulttools_export.h" +#include "../kritadefaulttools_export.h" class KisUpdatesFacade; class KisPostExecutionUndoAdapter; diff --git a/krita/plugins/tools/tool_transform2/CMakeLists.txt b/krita/plugins/tools/tool_transform2/CMakeLists.txt --- a/krita/plugins/tools/tool_transform2/CMakeLists.txt +++ b/krita/plugins/tools/tool_transform2/CMakeLists.txt @@ -25,7 +25,9 @@ ki18n_wrap_ui(kritatooltransform_PART_SRCS wdg_tool_transform.ui) -add_library(kritatooltransform MODULE ${kritatooltransform_PART_SRCS}) +add_library(kritatooltransform SHARED ${kritatooltransform_PART_SRCS}) +generate_export_header(kritatooltransform BASE_NAME kritatooltransform) + kcoreaddons_desktop_to_json(kritatooltransform kritatooltransform.desktop) if (NOT GSL_FOUND) diff --git a/krita/plugins/tools/tool_transform2/kritatooltransform_export.h b/krita/plugins/tools/tool_transform2/kritatooltransform_export.h --- a/krita/plugins/tools/tool_transform2/kritatooltransform_export.h +++ b/krita/plugins/tools/tool_transform2/kritatooltransform_export.h @@ -25,7 +25,7 @@ #ifdef COMPILING_TESTS # if defined _WIN32 || defined _WIN64 -# if defined(MAKE_KRITATOOLTRANSFORM_LIB) +# if defined(kritatooltransform_EXPORTS) # define KRITATOOLTRANSFORM_TEST_EXPORT KDE_EXPORT # else # define KRITATOOLTRANSFORM_TEST_EXPORT KDE_IMPORT diff --git a/krita/plugins/tools/tool_transform2/strokes/transform_stroke_strategy.h b/krita/plugins/tools/tool_transform2/strokes/transform_stroke_strategy.h --- a/krita/plugins/tools/tool_transform2/strokes/transform_stroke_strategy.h +++ b/krita/plugins/tools/tool_transform2/strokes/transform_stroke_strategy.h @@ -25,6 +25,7 @@ #include #include "tool_transform_args.h" #include +#include diff --git a/krita/plugins/tools/tool_transform2/tests/CMakeLists.txt b/krita/plugins/tools/tool_transform2/tests/CMakeLists.txt --- a/krita/plugins/tools/tool_transform2/tests/CMakeLists.txt +++ b/krita/plugins/tools/tool_transform2/tests/CMakeLists.txt @@ -1,5 +1,5 @@ set( EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR} ) -include_directories( ${KOMAIN_INCLUDES} ${CMAKE_CURRENT_SOURCE_DIR}/.. ${CMAKE_SOURCE_DIR}/krita/sdk/tests ) +include_directories( ${KOMAIN_INCLUDES} ${CMAKE_CURRENT_SOURCE_DIR}/.. ${CMAKE_CURRENT_BINARY_DIR}/.. ${CMAKE_SOURCE_DIR}/krita/sdk/tests ) macro_add_unittest_definitions() diff --git a/krita/plugins/tools/tool_transform2/tool_transform_args.h b/krita/plugins/tools/tool_transform2/tool_transform_args.h --- a/krita/plugins/tools/tool_transform2/tool_transform_args.h +++ b/krita/plugins/tools/tool_transform2/tool_transform_args.h @@ -26,7 +26,7 @@ #include #include #include "kis_liquify_properties.h" -#include +#include "kritatooltransform_export.h" #include diff --git a/krita/sketch/CMakeLists.txt b/krita/sketch/CMakeLists.txt --- a/krita/sketch/CMakeLists.txt +++ b/krita/sketch/CMakeLists.txt @@ -112,8 +112,9 @@ # ============================================================================= add_library(kritasketchlib SHARED ${kritasketchlib_SRCS}) +generate_export_headers(kritasketchlib BASE_NAME kritasketch) set_target_properties(kritasketchlib - PROPERTIES VERSION ${GENERIC_CALLIGRA_LIB_VERSION} SOVERSION ${GENERIC_CALLIGRA_LIB_SOVERSION} DEFINE_SYMBOL MAKE_KRITA_SKETCH_LIB + PROPERTIES VERSION ${GENERIC_CALLIGRA_LIB_VERSION} SOVERSION ${GENERIC_CALLIGRA_LIB_SOVERSION} ) diff --git a/krita/ui/CMakeLists.txt b/krita/ui/CMakeLists.txt --- a/krita/ui/CMakeLists.txt +++ b/krita/ui/CMakeLists.txt @@ -448,6 +448,7 @@ QT5_WRAP_CPP(kritaui_HEADERS_MOC KisDocumentSectionPropertyAction_p.h) add_library(kritaui SHARED ${kritaui_HEADERS_MOC} ${kritaui_LIB_SRCS} ) +generate_export_header(kritaui BASE_NAME kritaui) target_link_libraries(kritaui KF5::GlobalAccel KF5::KDELibs4Support) if (NOT WIN32) diff --git a/krita/ui/kritaui_export.h b/krita/ui/kritaui_export.h --- a/krita/ui/kritaui_export.h +++ b/krita/ui/kritaui_export.h @@ -27,7 +27,7 @@ #if defined(_WIN32) || defined(_WIN64) #ifndef KRITAUI_EXPORT -# ifdef MAKE_KRITAUI_LIB +# ifdef kritaui_EXPORTS # define KRITAUI_EXPORT KDE_EXPORT # else # define KRITAUI_EXPORT KDE_IMPORT @@ -43,7 +43,7 @@ /* Now the same for Krita*_TEST_EXPORT, if compiling with unit tests enabled */ #ifdef COMPILING_TESTS # if defined _WIN32 || defined _WIN64 -# if defined(MAKE_KRITAUI_LIB) +# if defined(kritaui_EXPORTS) # define KRITAUI_TEST_EXPORT KDE_EXPORT # else # define KRITAUI_TEST_EXPORT KDE_IMPORT diff --git a/libs/basicflakes/CMakeLists.txt b/libs/basicflakes/CMakeLists.txt --- a/libs/basicflakes/CMakeLists.txt +++ b/libs/basicflakes/CMakeLists.txt @@ -16,6 +16,7 @@ add_library(basicflakes SHARED ${basicflakes_LIB_SRCS}) +generate_export_header(basicflakes) target_link_libraries(basicflakes kowidgets flake pigmentcms) @@ -28,7 +29,7 @@ install( FILES tools/KoCreatePathTool.h tools/KoPencilTool.h - basicflakes_export.h + ${CMAKE_CURRENT_BINARY_DIR}/basicflakes_export.h DESTINATION ${INCLUDE_INSTALL_DIR}/calligra diff --git a/libs/flake/CMakeLists.txt b/libs/flake/CMakeLists.txt --- a/libs/flake/CMakeLists.txt +++ b/libs/flake/CMakeLists.txt @@ -218,6 +218,7 @@ ) add_library(flake SHARED ${flake_SRCS}) +# generate_export_header(flake BASE_NAME flake) target_link_libraries(flake pigmentcms kowidgetutils koodf Qt5::Svg) target_link_libraries(flake LINK_INTERFACE_LIBRARIES pigmentcms kowidgetutils koodf) diff --git a/libs/flake/KoFilterEffectFactoryBase.h b/libs/flake/KoFilterEffectFactoryBase.h --- a/libs/flake/KoFilterEffectFactoryBase.h +++ b/libs/flake/KoFilterEffectFactoryBase.h @@ -24,6 +24,7 @@ class KoFilterEffect; class KoFilterEffectConfigWidgetBase; +class QString; /// API docs go here class FLAKE_EXPORT KoFilterEffectFactoryBase diff --git a/libs/flake/KoSnapData.h b/libs/flake/KoSnapData.h --- a/libs/flake/KoSnapData.h +++ b/libs/flake/KoSnapData.h @@ -21,6 +21,7 @@ #define KOSNAPDATA_H #include +#include /** * This class is used to provide additional data to the snap guide. diff --git a/libs/flake/flake_export.h b/libs/flake/flake_export.h --- a/libs/flake/flake_export.h +++ b/libs/flake/flake_export.h @@ -24,7 +24,7 @@ #include #ifndef FLAKE_EXPORT -# if defined(MAKE_FLAKE_LIB) +# if defined(flake_EXPORTS) /* We are building this library */ # define FLAKE_EXPORT KDE_EXPORT # define FLAKE_TEST_EXPORT KDE_EXPORT diff --git a/libs/kopageapp/CMakeLists.txt b/libs/kopageapp/CMakeLists.txt --- a/libs/kopageapp/CMakeLists.txt +++ b/libs/kopageapp/CMakeLists.txt @@ -70,7 +70,7 @@ install(TARGETS kopageapp ${INSTALL_TARGETS_DEFAULT_ARGS}) install(FILES - kopageapp_export.h + ${CMAKE_CURRENT_BINARY_DIR}/kopageapp_export.h KoPACanvas.h KoPACanvasItem.h KoPACanvasBase.h diff --git a/libs/kotext/CMakeLists.txt b/libs/kotext/CMakeLists.txt --- a/libs/kotext/CMakeLists.txt +++ b/libs/kotext/CMakeLists.txt @@ -132,6 +132,7 @@ endif() add_library(kotext SHARED ${kotext_LIB_SRCS}) +# generate_export_header(kotext BASE_NAME kotext) target_link_libraries(kotext flake) if( SHOULD_BUILD_FEATURE_RDF ) diff --git a/libs/kotext/kotext_export.h b/libs/kotext/kotext_export.h --- a/libs/kotext/kotext_export.h +++ b/libs/kotext/kotext_export.h @@ -27,7 +27,7 @@ #if defined _WIN32 || defined _WIN64 #ifndef KOTEXT_EXPORT -# if defined(MAKE_KOTEXT_LIB) +# if defined(kotext_EXPORTS) /* We are building this library */ # define KOTEXT_EXPORT KDE_EXPORT # else @@ -46,7 +46,7 @@ #ifdef COMPILING_TESTS #if defined _WIN32 || defined _WIN64 -# if defined(MAKE_KOTEXT_LIB) +# if defined(kotext_EXPORTS) # define KOTEXT_TEST_EXPORT KDE_EXPORT # else # define KOTEXT_TEST_EXPORT KDE_IMPORT diff --git a/libs/main/komain_export.h b/libs/main/komain_export.h --- a/libs/main/komain_export.h +++ b/libs/main/komain_export.h @@ -28,7 +28,7 @@ #if defined _WIN32 || defined _WIN64 #ifndef KOMAIN_EXPORT -# if defined(MAKE_KOMAIN_LIB) +# if defined(komain_EXPORTS) /* We are building this library */ # define KOMAIN_EXPORT KDE_EXPORT # else diff --git a/libs/textlayout/CMakeLists.txt b/libs/textlayout/CMakeLists.txt --- a/libs/textlayout/CMakeLists.txt +++ b/libs/textlayout/CMakeLists.txt @@ -32,6 +32,7 @@ add_library(kotextlayout SHARED ${textlayout_LIB_SRCS}) +generate_export_header(kotextlayout BASE_NAME kotextlayout) target_link_libraries(kotextlayout kotext) target_link_libraries(kotextlayout LINK_INTERFACE_LIBRARIES kotext) diff --git a/libs/textlayout/kotextlayout_export.h b/libs/textlayout/kotextlayout_export.h --- a/libs/textlayout/kotextlayout_export.h +++ b/libs/textlayout/kotextlayout_export.h @@ -27,7 +27,7 @@ #if defined _WIN32 || defined _WIN64 #ifndef KOTEXTLAYOUT_EXPORT -# if defined(MAKE_KOTEXTLAYOUT_LIB) +# if defined(kotextlayout_EXPORTS) /* We are building this library */ # define KOTEXTLAYOUT_EXPORT KDE_EXPORT # else @@ -46,7 +46,7 @@ #ifdef COMPILING_TESTS #if defined _WIN32 || defined _WIN64 -# if defined(MAKE_KOTEXTLAYOUT_LIB) +# if defined(kotextlayout_EXPORTS) # define KOTEXTLAYOUT_TEST_EXPORT KDE_EXPORT # else # define KOTEXTLAYOUT_TEST_EXPORT KDE_IMPORT diff --git a/libs/vectorimage/CMakeLists.txt b/libs/vectorimage/CMakeLists.txt --- a/libs/vectorimage/CMakeLists.txt +++ b/libs/vectorimage/CMakeLists.txt @@ -26,6 +26,7 @@ ) add_library(kovectorimage SHARED ${vectorimage_LIB_SRCS}) +generate_export_header(kovectorimage BASE_NAME kovectorimage) target_link_libraries(kovectorimage KF5::KDELibs4Support Qt5::Gui Qt5::PrintSupport) target_link_libraries(kovectorimage LINK_INTERFACE_LIBRARIES ) diff --git a/libs/widgets/CMakeLists.txt b/libs/widgets/CMakeLists.txt --- a/libs/widgets/CMakeLists.txt +++ b/libs/widgets/CMakeLists.txt @@ -3,6 +3,7 @@ include_directories(${KOTEXT_INCLUDES} ${KOODF_INCLUDES} ${PIGMENT_INCLUDES}) include_directories(${CMAKE_SOURCE_DIR}/libs/widgetutils) +include_directories(${CMAKE_CURRENT_BINARY_DIR}) if (LIBATTICA_FOUND) include_directories(${LIBATTICA_INCLUDE_DIR}) endif () @@ -99,6 +100,7 @@ add_library(kowidgets SHARED ${kowidgets_LIB_SRCS}) +generate_export_header(kowidgets BASE_NAME kowidgets) target_link_libraries(kowidgets kotext pigmentcms kowidgetutils) @@ -127,7 +129,7 @@ KoPageLayoutWidget.h KoPagePreviewWidget.h KoPositionSelector.h - kowidgets_export.h + ${CMAKE_CURRENT_BINARY_DIR}/kowidgets_export.h KoZoomAction.h KoZoomController.h KoZoomInput.h diff --git a/libs/widgets/KoTriangleColorSelector.h b/libs/widgets/KoTriangleColorSelector.h --- a/libs/widgets/KoTriangleColorSelector.h +++ b/libs/widgets/KoTriangleColorSelector.h @@ -22,6 +22,7 @@ #include #include "kowidgets_export.h" +#include class KoColor; class KoColorDisplayRendererInterface; diff --git a/libs/widgets/kowidgets_export.h b/libs/widgets/kowidgets_export.h deleted file mode 100644 --- a/libs/widgets/kowidgets_export.h +++ /dev/null @@ -1,45 +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 KOWIDGETS_EXPORT_H -#define KOWIDGETS_EXPORT_H - -/* needed for KDE_EXPORT and KDE_IMPORT macros */ -#include - -/* We use _WIN32/_WIN64 instead of Q_OS_WIN so that this header can be used from C files too */ -#if defined _WIN32 || defined _WIN64 - -#ifndef KOWIDGETS_EXPORT -# if defined(MAKE_KOWIDGETS_LIB) -/* We are building this library */ -# define KOWIDGETS_EXPORT KDE_EXPORT -# else -/* We are using this library */ -# define KOWIDGETS_EXPORT KDE_IMPORT -# endif -#endif - -#else /* UNIX */ - -#define KOWIDGETS_EXPORT KDE_EXPORT - -#endif - -#endif diff --git a/sheets/CMakeLists.txt b/sheets/CMakeLists.txt --- a/sheets/CMakeLists.txt +++ b/sheets/CMakeLists.txt @@ -291,6 +291,7 @@ add_library(calligrasheetsodf SHARED ${calligrasheetsodf_LIB_SRCS}) +generate_export_header(calligrasheetsodf BASE_NAME calligrasheetsodf) target_link_libraries(calligrasheetsodf komain) target_link_libraries(calligrasheetsodf LINK_INTERFACE_LIBRARIES komain) @@ -302,6 +303,7 @@ add_library(calligrasheetscommon SHARED ${calligrasheetscommon_LIB_SRCS}) +generate_export_header(calligrasheetscommon BASE_NAME calligrasheetscommon) target_link_libraries(calligrasheetscommon komain @@ -325,6 +327,8 @@ set (calligrasheetspart_PART_SRCS part/Factory_init.cpp ) add_library(calligrasheetspart MODULE ${calligrasheetspart_PART_SRCS}) +generate_export_header(calligrasheetspart BASE_NAME calligrasheetspart) + kcoreaddons_desktop_to_json(calligrasheetspart sheetspart.desktop) target_link_libraries(calligrasheetspart calligrasheetscommon ) @@ -342,7 +346,7 @@ install( FILES - calligra_sheets_export.h + ${CMAKE_CURRENT_BINARY_DIR}/calligra_sheets_export.h calligra_sheets_limits.h Cell.h