diff --git a/drkonqi/statuswidget.h b/drkonqi/statuswidget.h index 93ffd838..8fdb901f 100644 --- a/drkonqi/statuswidget.h +++ b/drkonqi/statuswidget.h @@ -23,10 +23,10 @@ #include #include #include +#include class WrapLabel; class KPixmapSequenceWidget; -#include class StatusWidget: public QStackedWidget { diff --git a/drkonqi/systeminformation.cpp b/drkonqi/systeminformation.cpp index 1c17866d..c0c0cfb3 100644 --- a/drkonqi/systeminformation.cpp +++ b/drkonqi/systeminformation.cpp @@ -48,7 +48,7 @@ QString SystemInformation::fetchOSDetailInformation() const QString operatingSystem = "unspecified"; #ifdef HAVE_UNAME struct utsname buf; - if (uname(&buf) == -1) { + if (::uname(&buf) == -1) { kDebug() << "call to uname failed" << perror; } else { operatingSystem = QString::fromLocal8Bit(buf.sysname) + ' ' diff --git a/kcontrol/screensaver/CMakeLists.txt b/kcontrol/screensaver/CMakeLists.txt index 0235d783..9a6ae2a4 100644 --- a/kcontrol/screensaver/CMakeLists.txt +++ b/kcontrol/screensaver/CMakeLists.txt @@ -1,3 +1,8 @@ +include_directories( + # for kworkspace_export.h + ${CMAKE_BINARY_DIR}/libs/kworkspace +) + ########### next target ############### set(kcm_screensaver_PART_SRCS diff --git a/kdm/kcm/CMakeLists.txt b/kdm/kcm/CMakeLists.txt index 7e489da9..ffa7d2fb 100644 --- a/kdm/kcm/CMakeLists.txt +++ b/kdm/kcm/CMakeLists.txt @@ -1,3 +1,8 @@ +include_directories( + # for kworkspace_export.h + ${CMAKE_BINARY_DIR}/libs/kworkspace +) + set(kcm_kdm_PART_SRCS kdm-gen.cpp kdm-theme.cpp @@ -6,7 +11,8 @@ set(kcm_kdm_PART_SRCS kdm-conv.cpp main.cpp kbackedcombobox.cpp - positioner.cpp) + positioner.cpp +) kde4_add_plugin(kcm_kdm ${kcm_kdm_PART_SRCS}) diff --git a/khotkeys/CMakeLists.txt b/khotkeys/CMakeLists.txt index 2ed03c26..74238951 100644 --- a/khotkeys/CMakeLists.txt +++ b/khotkeys/CMakeLists.txt @@ -2,7 +2,9 @@ include_directories( ${CMAKE_CURRENT_SOURCE_DIR}/libkhotkeysprivate ${CMAKE_CURRENT_BINARY_DIR}/libkhotkeysprivate - ) + # for kworkspace_export.h + ${CMAKE_BINARY_DIR}/libs/kworkspace +) add_definitions(-DKDE_DEFAULT_DEBUG_AREA=1217) diff --git a/krunner/CMakeLists.txt b/krunner/CMakeLists.txt index ed0665ce..94648993 100644 --- a/krunner/CMakeLists.txt +++ b/krunner/CMakeLists.txt @@ -3,9 +3,13 @@ add_definitions(-DKDE_DEFAULT_DEBUG_AREA=1207) # for dbus_add_activation_service include(MacroDBusAddActivationService) -include_directories(${CMAKE_SOURCE_DIR}/libs/ksysguard - ${CMAKE_SOURCE_DIR}/libs/ksysguard/processcore - ${CMAKE_SOURCE_DIR}/libs/plasmagenericshell) +include_directories( + ${CMAKE_SOURCE_DIR}/libs/ksysguard + ${CMAKE_SOURCE_DIR}/libs/ksysguard/processcore + ${CMAKE_SOURCE_DIR}/libs/plasmagenericshell + # for kworkspace_export.h + ${CMAKE_BINARY_DIR}/libs/kworkspace +) set(krunner_KCFG_SRCS kcfg/krunnersettings.kcfgc kcfg/klaunchsettings.kcfgc) set(krunner_dbusAppXML dbus/org.kde.krunner.App.xml) diff --git a/kscreensaver/libkscreensaver/CMakeLists.txt b/kscreensaver/libkscreensaver/CMakeLists.txt index 37e2dca8..67021cdb 100644 --- a/kscreensaver/libkscreensaver/CMakeLists.txt +++ b/kscreensaver/libkscreensaver/CMakeLists.txt @@ -16,9 +16,8 @@ set_target_properties(kscreensaver PROPERTIES VERSION ${GENERIC_LIB_VERSION} SOVERSION ${GENERIC_LIB_SOVERSION} ) -set_target_properties(kscreensaver PROPERTIES - DEFINE_SYMBOL MAKE_KSCREENSAVER_LIB -) + +generate_export_header(kscreensaver) install( TARGETS kscreensaver @@ -35,7 +34,7 @@ install( FILES kscreensaver.h kscreensaver_vroot.h - kscreensaver_export.h + ${CMAKE_CURRENT_BINARY_DIR}/kscreensaver_export.h DESTINATION ${KDE4_INCLUDE_INSTALL_DIR} COMPONENT Devel ) diff --git a/kscreensaver/libkscreensaver/kscreensaver_export.h b/kscreensaver/libkscreensaver/kscreensaver_export.h deleted file mode 100644 index 1fbca522..00000000 --- a/kscreensaver/libkscreensaver/kscreensaver_export.h +++ /dev/null @@ -1,40 +0,0 @@ -/* This file is part of the KDE project - Copyright (C) 2012 Andrius da Costa Ribas - - 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 KSCREENSAVER_EXPORT_H -#define KSCREENSAVER_EXPORT_H - -/* needed for KDE_EXPORT and KDE_IMPORT macros */ -#include - -#ifndef KSCREENSAVER_EXPORT -# if defined(MAKE_KSCREENSAVER_LIB) - /* We are building this library */ -# define KSCREENSAVER_EXPORT KDE_EXPORT -# else - /* We are using this library */ -# define KSCREENSAVER_EXPORT KDE_IMPORT -# endif -#endif - -# ifndef KSCREENSAVER_EXPORT_DEPRECATED -# define KSCREENSAVER_EXPORT_DEPRECATED KDE_DEPRECATED KSCREENSAVER_EXPORT -# endif - -#endif diff --git a/ksmserver/CMakeLists.txt b/ksmserver/CMakeLists.txt index 0d7045d8..4ce8c688 100644 --- a/ksmserver/CMakeLists.txt +++ b/ksmserver/CMakeLists.txt @@ -1,11 +1,13 @@ -add_subdirectory( kcm ) - include_directories( ${CMAKE_SOURCE_DIR}/libs ${KDECLARATIVE_INCLUDE_DIR} + # for kworkspace_export.h + ${CMAKE_BINARY_DIR}/libs/kworkspace ) +add_subdirectory( kcm ) + if(ENABLE_TESTING) add_subdirectory(tests) endif() diff --git a/kwin/CMakeLists.txt b/kwin/CMakeLists.txt index 69aec95d..0cf85f03 100644 --- a/kwin/CMakeLists.txt +++ b/kwin/CMakeLists.txt @@ -12,7 +12,11 @@ if(NOT DBUSMENUQT_FOUND) set(KWIN_BUILD_KAPPMENU OFF) endif() -include_directories(${XCB_INCLUDE_DIR}) +include_directories( + ${XCB_INCLUDE_DIR} + # for kworkspace_export.h + ${CMAKE_BINARY_DIR}/libs/kworkspace +) # for kwin internal things configure_file(config-kwin.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-kwin.h) diff --git a/libs/kworkspace/CMakeLists.txt b/libs/kworkspace/CMakeLists.txt index bc9e900d..d2673b5c 100644 --- a/libs/kworkspace/CMakeLists.txt +++ b/libs/kworkspace/CMakeLists.txt @@ -1,4 +1,3 @@ - set(kworkspace_LIB_SRCS kdisplaymanager.cpp kwindowlistmenu.cpp @@ -32,9 +31,10 @@ target_link_libraries(kworkspace PUBLIC set_target_properties(kworkspace PROPERTIES VERSION ${GENERIC_LIB_VERSION} SOVERSION ${GENERIC_LIB_SOVERSION} - DEFINE_SYMBOL MAKE_KWORKSPACE_LIB ) +generate_export_header(kworkspace) + install( TARGETS kworkspace EXPORT kdeworkspaceLibraryTargets ${INSTALL_TARGETS_DEFAULT_ARGS} @@ -45,7 +45,7 @@ install( kdisplaymanager.h kwindowlistmenu.h kworkspace.h - kworkspace_export.h + ${CMAKE_CURRENT_BINARY_DIR}/kworkspace_export.h DESTINATION ${KDE4_INCLUDE_INSTALL_DIR}/kworkspace COMPONENT Devel ) diff --git a/libs/kworkspace/kworkspace_export.h b/libs/kworkspace/kworkspace_export.h deleted file mode 100644 index 99fdd6ce..00000000 --- a/libs/kworkspace/kworkspace_export.h +++ /dev/null @@ -1,40 +0,0 @@ -/* This file is part of the KDE project - Copyright (C) 2011 Andrius da Costa Ribas - - 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 KWORKSPACE_EXPORT_H -#define KWORKSPACE_EXPORT_H - -/* needed for KDE_EXPORT and KDE_IMPORT macros */ -#include - -#ifndef KWORKSPACE_EXPORT -# if defined(MAKE_KWORKSPACE_LIB) - /* We are building this library */ -# define KWORKSPACE_EXPORT KDE_EXPORT -# else - /* We are using this library */ -# define KWORKSPACE_EXPORT KDE_IMPORT -# endif -#endif - -# ifndef KWORKSPACE_EXPORT_DEPRECATED -# define KWORKSPACE_EXPORT_DEPRECATED KDE_DEPRECATED KWORKSPACE_EXPORT -# endif - -#endif diff --git a/libs/plasmagenericshell/CMakeLists.txt b/libs/plasmagenericshell/CMakeLists.txt index ec8284fe..8c17e391 100644 --- a/libs/plasmagenericshell/CMakeLists.txt +++ b/libs/plasmagenericshell/CMakeLists.txt @@ -1,3 +1,8 @@ +include_directories( + # for kworkspace_export.h + ${CMAKE_BINARY_DIR}/libs/kworkspace +) + if(ENABLE_TESTING) add_subdirectory(tests) endif() diff --git a/plasma/CMakeLists.txt b/plasma/CMakeLists.txt index b8acb969..1179e4aa 100644 --- a/plasma/CMakeLists.txt +++ b/plasma/CMakeLists.txt @@ -1,3 +1,8 @@ +include_directories( + # for kworkspace_export.h + ${CMAKE_BINARY_DIR}/libs/kworkspace +) + add_definitions(-DKDE_DEFAULT_DEBUG_AREA=1204) MACRO(installPackage dir component) diff --git a/powerdevil/daemon/CMakeLists.txt b/powerdevil/daemon/CMakeLists.txt index 7d510fea..c3ab68e0 100644 --- a/powerdevil/daemon/CMakeLists.txt +++ b/powerdevil/daemon/CMakeLists.txt @@ -1,5 +1,9 @@ -include_directories(${CMAKE_CURRENT_SOURCE_DIR} - ${CMAKE_CURRENT_BINARY_DIR}) +include_directories( + ${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_CURRENT_BINARY_DIR} + # for kworkspace_export.h + ${CMAKE_BINARY_DIR}/libs/kworkspace +) add_subdirectory(actions)