aboutsummaryrefslogtreecommitdiff
path: root/modules/KDE4Macros.cmake
diff options
context:
space:
mode:
authorAlexander Neundorf <neundorf@kde.org>2006-02-12 14:38:04 +0000
committerAlexander Neundorf <neundorf@kde.org>2006-02-12 14:38:04 +0000
commit75a07dd38b4a491a9d16d24492bea5c6ba90a8ff (patch)
tree0a65094e22bba335545b8ffe4a33fe7790edb21c /modules/KDE4Macros.cmake
parentbce40e0de3b22a291ecaa2b75358e6a998e1579b (diff)
downloadextra-cmake-modules-75a07dd38b4a491a9d16d24492bea5c6ba90a8ff.tar.gz
extra-cmake-modules-75a07dd38b4a491a9d16d24492bea5c6ba90a8ff.tar.bz2
-moved the cmake code to find kdewin32 out of FindKDE4.cmake and into its own FindKDEWIN32.cmake file
-added a new FindGNUWIN32.cmake file, which tries to find the gnuwin32 base directory -changed all "FOO_LIBRARY" variable names to "FOO_LIBRARIES" to be more consistent with the other cmake modules -added a macro_getenv_win_path() which replaces all backslahes with slashes from environment variables -modified the kde4_add_kcfg_files() command, so that the generated header is also processed by moc -all tests compile and link Alex CCMAIL:kde-buildsystem@kde.org The changes to the windows stuff are untested, since I don't have a windows box. Please check that everything still works. Please have a look at FindGNUWIN32.cmake, there are probably ways to improve this. The resulting GNUWIN32_DIR variable is used in other cmake modules as default path to search for headers and libraries. svn path=/trunk/KDE/kdelibs/; revision=508648
Diffstat (limited to 'modules/KDE4Macros.cmake')
-rw-r--r--modules/KDE4Macros.cmake7
1 files changed, 7 insertions, 0 deletions
diff --git a/modules/KDE4Macros.cmake b/modules/KDE4Macros.cmake
index 61c6dc97..cd8af459 100644
--- a/modules/KDE4Macros.cmake
+++ b/modules/KDE4Macros.cmake
@@ -109,12 +109,19 @@ MACRO(KDE4_ADD_KCFG_FILES _sources)
SET(_src_FILE ${CMAKE_CURRENT_BINARY_DIR}/${_basename}.cpp)
SET(_header_FILE ${CMAKE_CURRENT_BINARY_DIR}/${_basename}.h)
+ SET(_moc_FILE ${CMAKE_CURRENT_BINARY_DIR}/${_basename}.moc)
ADD_CUSTOM_COMMAND(OUTPUT ${_src_FILE}
COMMAND ${KDE4_KCFGC_EXECUTABLE}
ARGS ${CMAKE_CURRENT_SOURCE_DIR}/${_kcfg_FILE} ${_tmp_FILE}
DEPENDS ${_tmp_FILE} ${CMAKE_CURRENT_SOURCE_DIR}/${_kcfg_FILE} ${_KDE4_KCONFIG_COMPILER_DEP} )
+
+ SET_SOURCE_FILES_PROPERTIES(${_header_FILE} PROPERTIES GENERATED TRUE)
+ QT4_GENERATE_MOC(${_header_FILE} ${_moc_FILE} )
+
+ MACRO_ADD_FILE_DEPENDENCIES(${_src_FILE} ${_moc_FILE} )
+
SET(${_sources} ${${_sources}} ${_src_FILE})
ENDFOREACH (_current_FILE)