|
Rex Dieter |
29094f |
From a003654d36b9e409931d15af68091d1f366bd46e Mon Sep 17 00:00:00 2001
|
|
Rex Dieter |
29094f |
From: David Faure <faure@kde.org>
|
|
Rex Dieter |
29094f |
Date: Thu, 16 Jun 2011 08:49:28 +0200
|
|
Rex Dieter |
29094f |
Subject: [PATCH 29/33] Fix missing include dirs (current source and build dir)
|
|
Rex Dieter |
29094f |
when moc is run.
|
|
Rex Dieter |
29094f |
|
|
Rex Dieter |
29094f |
Apparently these dirs are not in the directory property "INCLUDE_DIRECTORIES",
|
|
Rex Dieter |
29094f |
so they need to be added by hand.
|
|
Rex Dieter |
29094f |
|
|
Rex Dieter |
29094f |
This fixes compilation of kdelibs/kdewebkit with KDE_NO_DEPRECATED=TRUE:
|
|
Rex Dieter |
29094f |
moc didn't find kdewebkit_export.h (and silently ignored it), so kdemacros.h
|
|
Rex Dieter |
29094f |
was not included, and KDE_NO_DEPRECATED was not set, leading to signals
|
|
Rex Dieter |
29094f |
only in the moc file and not in the header file, at compile time.
|
|
Rex Dieter |
29094f |
|
|
Rex Dieter |
29094f |
Alex: is there a way to only do this when CMAKE_INCLUDE_CURRENT_DIR is on?
|
|
Rex Dieter |
29094f |
CCMAIL: neundorf@kde.org
|
|
Rex Dieter |
29094f |
---
|
|
Rex Dieter |
29094f |
Automoc4Config.cmake | 6 ++++++
|
|
Rex Dieter |
29094f |
1 file changed, 6 insertions(+)
|
|
Rex Dieter |
29094f |
|
|
Rex Dieter |
29094f |
diff --git a/Automoc4Config.cmake b/Automoc4Config.cmake
|
|
Rex Dieter |
29094f |
index d608513..f0dc204 100644
|
|
Rex Dieter |
29094f |
--- a/Automoc4Config.cmake
|
|
Rex Dieter |
29094f |
+++ b/Automoc4Config.cmake
|
|
Rex Dieter |
29094f |
@@ -135,6 +135,9 @@ macro(AUTOMOC4 _target_NAME _SRCS)
|
|
Rex Dieter |
29094f |
get_directory_property(_moc_defs DEFINITIONS)
|
|
Rex Dieter |
29094f |
get_directory_property(_moc_cdefs COMPILE_DEFINITIONS)
|
|
Rex Dieter |
29094f |
|
|
Rex Dieter |
29094f |
+ # Assume CMAKE_INCLUDE_CURRENT_DIR is set
|
|
Rex Dieter |
29094f |
+ list(APPEND _moc_incs ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR})
|
|
Rex Dieter |
29094f |
+
|
|
Rex Dieter |
29094f |
# configure_file replaces _moc_files, _moc_incs, _moc_cdefs and _moc_defs
|
|
Rex Dieter |
29094f |
configure_file(${_AUTOMOC4_CURRENT_DIR}/automoc4.files.in ${_automoc_source}.files)
|
|
Rex Dieter |
29094f |
|
|
Rex Dieter |
29094f |
@@ -198,6 +201,9 @@ macro(_ADD_AUTOMOC4_TARGET _target_NAME _SRCS)
|
|
Rex Dieter |
29094f |
get_directory_property(_moc_defs DEFINITIONS)
|
|
Rex Dieter |
29094f |
get_directory_property(_moc_cdefs COMPILE_DEFINITIONS)
|
|
Rex Dieter |
29094f |
|
|
Rex Dieter |
29094f |
+ # Assume CMAKE_INCLUDE_CURRENT_DIR is set
|
|
Rex Dieter |
29094f |
+ list(APPEND _moc_incs ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR})
|
|
Rex Dieter |
29094f |
+
|
|
Rex Dieter |
29094f |
# configure_file replaces _moc_files, _moc_incs, _moc_cdefs and _moc_defs
|
|
Rex Dieter |
29094f |
configure_file(${_AUTOMOC4_CURRENT_DIR}/automoc4.files.in ${_automoc_dotFiles})
|
|
Rex Dieter |
29094f |
|
|
Rex Dieter |
29094f |
--
|
|
Rex Dieter |
29094f |
2.4.3
|
|
Rex Dieter |
29094f |
|