aboutsummaryrefslogtreecommitdiff
path: root/modules/FindKDE4Internal.cmake
diff options
context:
space:
mode:
authorAlexander Neundorf <neundorf@kde.org>2008-05-10 21:48:49 +0000
committerAlexander Neundorf <neundorf@kde.org>2008-05-10 21:48:49 +0000
commite679996e1a351e33d29c532e7871f47d59a3a0e3 (patch)
tree23ca0670c88b01ce0eaa338a483e2045dd7dba1e /modules/FindKDE4Internal.cmake
parentd4366ab703662b705ad10840c5beef47dfe8297b (diff)
downloadextra-cmake-modules-e679996e1a351e33d29c532e7871f47d59a3a0e3.tar.gz
extra-cmake-modules-e679996e1a351e33d29c532e7871f47d59a3a0e3.tar.bz2
-use automoc4 from kdesupport if available, otherwise fallback to the one from kdelibs.
In a few weeks automoc4 from kdesupport will be required. Alex CCMAIL: kretz@kde.org svn path=/trunk/KDE/kdelibs/; revision=806300
Diffstat (limited to 'modules/FindKDE4Internal.cmake')
-rw-r--r--modules/FindKDE4Internal.cmake37
1 files changed, 32 insertions, 5 deletions
diff --git a/modules/FindKDE4Internal.cmake b/modules/FindKDE4Internal.cmake
index 6e8bad88..cee539c3 100644
--- a/modules/FindKDE4Internal.cmake
+++ b/modules/FindKDE4Internal.cmake
@@ -228,6 +228,10 @@ set(QT_MIN_VERSION "4.4.0")
#this line includes FindQt4.cmake, which searches the Qt library and headers
find_package(Qt4 REQUIRED)
+# automoc4 (from kdesupport) is not yet required, but will be in June
+# until then still automoc from kdelibs is used as fallback, Alex
+find_package(Automoc4)
+
# Perl is required for building KDE software,
find_package(Perl REQUIRED)
@@ -275,13 +279,27 @@ if (_kdeBootStrapping)
set(LIBRARY_OUTPUT_PATH ${EXECUTABLE_OUTPUT_PATH} )
# CMAKE_CFG_INTDIR is the output subdirectory created e.g. by XCode and MSVC
set(KDE4_KCFGC_EXECUTABLE ${EXECUTABLE_OUTPUT_PATH}/${CMAKE_CFG_INTDIR}/kconfig_compiler )
- set(KDE4_AUTOMOC_EXECUTABLE ${EXECUTABLE_OUTPUT_PATH}/${CMAKE_CFG_INTDIR}/kde4automoc )
+
+ # use automoc4 from kdesupport if it has been found
+ if(AUTOMOC4_EXECUTABLE)
+ set(KDE4_AUTOMOC_EXECUTABLE "${AUTOMOC4_EXECUTABLE}" )
+ else(AUTOMOC4_EXECUTABLE)
+ set(KDE4_AUTOMOC_EXECUTABLE ${EXECUTABLE_OUTPUT_PATH}/${CMAKE_CFG_INTDIR}/kde4automoc )
+ endif(AUTOMOC4_EXECUTABLE)
+
set(KDE4_MEINPROC_EXECUTABLE ${EXECUTABLE_OUTPUT_PATH}/${CMAKE_CFG_INTDIR}/meinproc4 )
set(KDE4_MAKEKDEWIDGETS_EXECUTABLE ${EXECUTABLE_OUTPUT_PATH}/${CMAKE_CFG_INTDIR}/makekdewidgets )
else (WIN32)
set(LIBRARY_OUTPUT_PATH ${CMAKE_BINARY_DIR}/lib )
set(KDE4_KCFGC_EXECUTABLE ${EXECUTABLE_OUTPUT_PATH}/${CMAKE_CFG_INTDIR}/kconfig_compiler.shell )
- set(KDE4_AUTOMOC_EXECUTABLE ${EXECUTABLE_OUTPUT_PATH}/${CMAKE_CFG_INTDIR}/kde4automoc.shell )
+
+ # use automoc4 from kdesupport if it has been found
+ if(AUTOMOC4_EXECUTABLE)
+ set(KDE4_AUTOMOC_EXECUTABLE "${AUTOMOC4_EXECUTABLE}" )
+ else(AUTOMOC4_EXECUTABLE)
+ set(KDE4_AUTOMOC_EXECUTABLE ${EXECUTABLE_OUTPUT_PATH}/${CMAKE_CFG_INTDIR}/kde4automoc.shell )
+ endif(AUTOMOC4_EXECUTABLE)
+
set(KDE4_MEINPROC_EXECUTABLE ${EXECUTABLE_OUTPUT_PATH}/${CMAKE_CFG_INTDIR}/meinproc4.shell )
set(KDE4_MAKEKDEWIDGETS_EXECUTABLE ${EXECUTABLE_OUTPUT_PATH}/${CMAKE_CFG_INTDIR}/makekdewidgets.shell )
endif (WIN32)
@@ -290,10 +308,15 @@ if (_kdeBootStrapping)
# when building kdelibs, make the kcfg rules depend on the binaries...
set( _KDE4_KCONFIG_COMPILER_DEP kconfig_compiler)
- set( _KDE4_AUTOMOC_EXECUTABLE_DEP kde4automoc)
set( _KDE4_MAKEKDEWIDGETS_DEP makekdewidgets)
set( _KDE4_MEINPROC_EXECUTABLE_DEP meinproc4)
+ if(AUTOMOC4_EXECUTABLE)
+ set( _KDE4_AUTOMOC_EXECUTABLE_DEP)
+ else(AUTOMOC4_EXECUTABLE)
+ set( _KDE4_AUTOMOC_EXECUTABLE_DEP kde4automoc)
+ endif(AUTOMOC4_EXECUTABLE)
+
set(KDE4_INSTALLED_VERSION_OK TRUE)
else (_kdeBootStrapping)
@@ -431,8 +454,12 @@ else (_kdeBootStrapping)
find_program(KDE4_KCFGC_EXECUTABLE NAME kconfig_compiler PATHS ${KDE4_BIN_INSTALL_DIR} NO_DEFAULT_PATH )
find_program(KDE4_KCFGC_EXECUTABLE NAME kconfig_compiler )
- find_program(KDE4_AUTOMOC_EXECUTABLE NAME kde4automoc PATHS ${KDE4_BIN_INSTALL_DIR} NO_DEFAULT_PATH )
- find_program(KDE4_AUTOMOC_EXECUTABLE NAME kde4automoc )
+ if (AUTOMOC4_EXECUTABLE)
+ set(KDE4_AUTOMOC_EXECUTABLE "${AUTOMOC4_EXECUTABLE}")
+ else (AUTOMOC4_EXECUTABLE)
+ find_program(KDE4_AUTOMOC_EXECUTABLE NAME kde4automoc PATHS ${KDE4_BIN_INSTALL_DIR} NO_DEFAULT_PATH )
+ find_program(KDE4_AUTOMOC_EXECUTABLE NAME kde4automoc )
+ endif (AUTOMOC4_EXECUTABLE)
find_program(KDE4_MEINPROC_EXECUTABLE NAME meinproc4 PATHS ${KDE4_BIN_INSTALL_DIR} NO_DEFAULT_PATH )
find_program(KDE4_MEINPROC_EXECUTABLE NAME meinproc4 )