[kwin] Remove include of kdemacros.h from kwinglobals

Instead we generate an export header for kdeinit_kwin and use it
to declare the KWIN_EXPORT. With this change our libs don't include
any KDE4Support headers any more. One step closer to no KDE4Support.
This commit is contained in:
Martin Gräßlin 2013-12-06 08:37:16 +01:00
parent bad6b31a1c
commit e92d02ab61
4 changed files with 6 additions and 4 deletions

View file

@ -324,6 +324,7 @@ kf5_add_kdeinit_executable( kwin ${kwin_KDEINIT_SRCS})
target_link_libraries(kdeinit_kwin ${kwinLibs})
set_target_properties(kwin PROPERTIES OUTPUT_NAME ${KWIN_NAME})
set_target_properties(kdeinit_kwin PROPERTIES OUTPUT_NAME kdeinit4_${KWIN_NAME})
generate_export_header(kdeinit_kwin EXPORT_FILE_NAME kwin_export.h)
if(KWIN_BUILD_OPENGL)
if( KWIN_BUILD_OPENGL_1_COMPOSITING )
@ -348,6 +349,7 @@ install(TARGETS kwin ${INSTALL_TARGETS_DEFAULT_ARGS} )
install( FILES kwin.kcfg DESTINATION ${KCFG_INSTALL_DIR} RENAME ${KWIN_NAME}.kcfg )
install( FILES kwin.notifyrc DESTINATION ${DATA_INSTALL_DIR}/${KWIN_NAME} RENAME ${KWIN_NAME}.notifyrc)
install( FILES org.kde.KWin.xml DESTINATION ${DBUS_INTERFACES_INSTALL_DIR} )
install( FILES ${CMAKE_CURRENT_BINARY_DIR}/kwin_export.h DESTINATION ${INCLUDE_INSTALL_DIR} COMPONENT Devel)
if( KWIN_BUILD_SCRIPTING )
# Install the KWin/WindowSwitcher service type

View file

@ -239,7 +239,7 @@ static int edit(Window wid, bool whole_app)
} // namespace
extern "C"
KDE_EXPORT int kdemain(int argc, char* argv[])
KWIN_EXPORT int kdemain(int argc, char* argv[])
{
QApplication app(argc, argv);
app.setApplicationDisplayName(i18n("KWin"));

View file

@ -23,14 +23,14 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include <QtX11Extras/QX11Info>
#include <kdemacros.h>
#include <kwin_export.h>
#include <xcb/xcb.h>
#include <kwinconfig.h>
#define KWIN_EXPORT KDE_EXPORT
#define KWIN_QT5_PORTING 0
#define KWIN_EXPORT KDEINIT_KWIN_EXPORT
namespace KWin
{

View file

@ -376,7 +376,7 @@ static const char version[] = KWIN_VERSION_STRING;
static const char description[] = I18N_NOOP("KDE window manager");
extern "C"
KDE_EXPORT int kdemain(int argc, char * argv[])
KWIN_EXPORT int kdemain(int argc, char * argv[])
{
#ifdef M_TRIM_THRESHOLD
// Prevent fragmentation of the heap by malloc (glibc).