aboutsummaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorAlexander Neundorf <neundorf@kde.org>2007-01-26 17:04:00 +0000
committerAlexander Neundorf <neundorf@kde.org>2007-01-26 17:04:00 +0000
commitbe45aa635bf842a1a08c6c389ec0daecd27bd5ab (patch)
treec1577d58250dfa9e88aac370b5402a97a46e9f80 /modules
parent778040ad50202b70ea00876e602d7a0aad07d556 (diff)
downloadextra-cmake-modules-be45aa635bf842a1a08c6c389ec0daecd27bd5ab.tar.gz
extra-cmake-modules-be45aa635bf842a1a08c6c389ec0daecd27bd5ab.tar.bz2
-introduce new internal variable _kdeBootStrapping, so that we don't have
to keep of the logic of detecting whether we are inside kdelibs -detabify Alex CCMAIL: montel@kde.org svn path=/trunk/KDE/kdelibs/; revision=627454
Diffstat (limited to 'modules')
-rw-r--r--modules/FindKDE4Internal.cmake21
-rw-r--r--modules/KDE4Macros.cmake36
2 files changed, 32 insertions, 25 deletions
diff --git a/modules/FindKDE4Internal.cmake b/modules/FindKDE4Internal.cmake
index d3626ee6..8a54f208 100644
--- a/modules/FindKDE4Internal.cmake
+++ b/modules/FindKDE4Internal.cmake
@@ -311,7 +311,7 @@ option(KDE4_ENABLE_FINAL "Enable final all-in-one compilation")
option(KDE4_BUILD_TESTS "Build the tests")
if( KDE4_ENABLE_FINAL)
- add_definitions(-DKDE_USE_FINAL)
+ add_definitions(-DKDE_USE_FINAL)
endif(KDE4_ENABLE_FINAL)
#Position-Independent-Executable is a feature of Binutils, Libc, and GCC that creates an executable
@@ -325,9 +325,14 @@ option(KDE4_ENABLE_FPIE "Enable platform supports PIE linking")
#are we trying to compile kdelibs ?
#then enter bootstrap mode
if(EXISTS ${CMAKE_SOURCE_DIR}/kdecore/kernel/kglobal.h)
-
+ set(_kdeBootStrapping TRUE)
message(STATUS "Building kdelibs...")
+else(EXISTS ${CMAKE_SOURCE_DIR}/kdecore/kernel/kglobal.h)
+ set(_kdeBootStrapping FALSE)
+endif(EXISTS ${CMAKE_SOURCE_DIR}/kdecore/kernel/kglobal.h)
+
+if (_kdeBootStrapping)
set(KDE4_INCLUDE_DIR ${CMAKE_SOURCE_DIR})
set(KDE4_KDECORE_LIBS ${QT_QTCORE_LIBRARY} kdecore)
set(KDE4_KDEUI_LIBS ${KDE4_KDECORE_LIBS} kdeui)
@@ -362,7 +367,7 @@ if(EXISTS ${CMAKE_SOURCE_DIR}/kdecore/kernel/kglobal.h)
set(KDE4_INSTALLED_VERSION_OK TRUE)
-else(EXISTS ${CMAKE_SOURCE_DIR}/kdecore/kernel/kglobal.h)
+else (_kdeBootStrapping)
# ... but NOT otherwise
set( _KDE4_KCONFIG_COMPILER_DEP)
@@ -520,7 +525,7 @@ else(EXISTS ${CMAKE_SOURCE_DIR}/kdecore/kernel/kglobal.h)
)
find_program(KDE4_MAKEKDEWIDGETS_EXECUTABLE NAME makekdewidgets )
-endif(EXISTS ${CMAKE_SOURCE_DIR}/kdecore/kernel/kglobal.h)
+endif (_kdeBootStrapping)
##################### and now the platform specific stuff ############################
@@ -548,9 +553,9 @@ if (WIN32)
# if we are compiling kdelibs, add KDEWIN32_LIBRARIES explicitely,
# otherwise they come from KDELibsDependencies.cmake, Alex
- if(EXISTS ${CMAKE_SOURCE_DIR}/kdecore/kernel/kglobal.h)
+ if (_kdeBootStrapping)
set( KDE4_KDECORE_LIBS ${KDE4_KDECORE_LIBS} ${KDEWIN32_LIBRARIES} )
- endif(EXISTS ${CMAKE_SOURCE_DIR}/kdecore/kernel/kglobal.h)
+ endif (_kdeBootStrapping)
# windows, mingw
if(MINGW)
@@ -812,7 +817,7 @@ endif (KDE4_INCLUDE_DIR AND KDE4_LIB_DIR AND KDE4_KCFGC_EXECUTABLE AND KDE4_INST
macro (KDE4_PRINT_RESULTS)
# inside kdelibs the include dir and lib dir are internal, not "found"
- if(NOT EXISTS ${CMAKE_SOURCE_DIR}/kdecore/kernel/kglobal.h)
+ if (NOT _kdeBootStrapping)
if(KDE4_INCLUDE_DIR)
message(STATUS "Found KDE4 include dir: ${KDE4_INCLUDE_DIR}")
else(KDE4_INCLUDE_DIR)
@@ -824,7 +829,7 @@ macro (KDE4_PRINT_RESULTS)
else(KDE4_LIB_DIR)
message(STATUS "Didn't find KDE4 core library")
endif(KDE4_LIB_DIR)
- endif(NOT EXISTS ${CMAKE_SOURCE_DIR}/kdecore/kernel/kglobal.h)
+ endif (NOT _kdeBootStrapping)
if(KDE4_KCFGC_EXECUTABLE)
message(STATUS "Found KDE4 kconfig_compiler preprocessor: ${KDE4_KCFGC_EXECUTABLE}")
diff --git a/modules/KDE4Macros.cmake b/modules/KDE4Macros.cmake
index 70f50c86..d4249447 100644
--- a/modules/KDE4Macros.cmake
+++ b/modules/KDE4Macros.cmake
@@ -245,14 +245,14 @@ macro (KDE4_CREATE_HANDBOOK _docbook)
get_filename_component(_input ${_docbook} ABSOLUTE)
set(_doc ${CMAKE_CURRENT_BINARY_DIR}/index.cache.bz2)
- set(_bootstrapOption)
#Boostrap
- if(EXISTS ${CMAKE_SOURCE_DIR}/kdecore/kernel/kglobal.h)
+ if (_kdeBootStrapping)
set(_ssheet ${CMAKE_SOURCE_DIR}/kdoctools/customization/kde-chunk.xsl)
set(_bootstrapOption "--srcdir=${CMAKE_SOURCE_DIR}/kdoctools/")
- else(EXISTS ${CMAKE_SOURCE_DIR}/kdecore/kernel/kglobal.h)
+ else (_kdeBootStrapping)
set(_ssheet ${DATA_INSTALL_DIR}/ksgmltools2/customization/kde-chunk.xsl)
- endif(EXISTS ${CMAKE_SOURCE_DIR}/kdecore/kernel/kglobal.h)
+ set(_bootstrapOption)
+ endif (_kdeBootStrapping)
add_custom_command(OUTPUT ${_doc}
COMMAND ${KDE4_MEINPROC_EXECUTABLE} --check ${_bootstrapOption} --cache ${_doc} ${_input}
@@ -261,18 +261,19 @@ macro (KDE4_CREATE_HANDBOOK _docbook)
add_custom_target(handbook ALL DEPENDS ${_doc})
endmacro (KDE4_CREATE_HANDBOOK)
+
macro (KDE4_CREATE_HTML_HANDBOOK _docbook)
get_filename_component(_input ${_docbook} ABSOLUTE)
set(_doc ${CMAKE_CURRENT_SOURCE_DIR}/index.html)
set(_bootstrapOption)
#Boostrap
- if(EXISTS ${CMAKE_SOURCE_DIR}/kdecore/kernel/kglobal.h)
+ if (_kdeBootStrapping)
set(_ssheet ${CMAKE_SOURCE_DIR}/kdoctools/customization/kde-chunk.xsl)
set(_bootstrapOption "--srcdir=${CMAKE_SOURCE_DIR}/kdoctools/")
- else(EXISTS ${CMAKE_SOURCE_DIR}/kdecore/kernel/kglobal.h)
+ else (_kdeBootStrapping)
set(_ssheet ${DATA_INSTALL_DIR}/ksgmltools2/customization/kde-chunk.xsl)
- endif(EXISTS ${CMAKE_SOURCE_DIR}/kdecore/kernel/kglobal.h)
+ endif (_kdeBootStrapping)
add_custom_command(OUTPUT ${_doc}
COMMAND ${KDE4_MEINPROC_EXECUTABLE} --check ${_bootstrapOption} -o ${_doc} ${_input}
@@ -550,7 +551,7 @@ macro (KDE4_HANDLE_RPATH_FOR_EXECUTABLE _target_NAME _type)
set(_ld_library_path "${LIBRARY_OUTPUT_PATH}/${CMAKE_CFG_INTDIR}\;${LIB_INSTALL_DIR}\;${KDE4_LIB_DIR}\;${QT_LIBRARY_DIR}")
get_target_property(_executable ${_target_NAME} LOCATION )
-
+
# use add_custom_target() to have the batch-file-wrapper generated during build time instead of cmake time
add_custom_command(TARGET ${_target_NAME} POST_BUILD
COMMAND ${CMAKE_COMMAND}
@@ -596,7 +597,7 @@ macro (KDE4_ADD_PLUGIN _target_NAME _with_PREFIX)
endmacro (KDE4_ADD_PLUGIN _target_NAME _with_PREFIX)
-# this macro checks is intended to check whether a list of source
+# this macro is intended to check whether a list of source
# files has the "NOGUI" or "RUN_UNINSTALLED" keywords at the beginning
# in _output_LIST the list of source files is returned with the "NOGUI"
# and "RUN_UNINSTALLED" keywords removed
@@ -692,7 +693,7 @@ macro (KDE4_ADD_TEST _target_NAME)
else (KDE4_BUILD_TESTS)
if (cmake_version GREATER 20403)
set(_go TRUE)
- set(_add_executable_param EXCLUDE_FROM_ALL)
+ set(_add_executable_param EXCLUDE_FROM_ALL)
endif (cmake_version GREATER 20403)
endif (KDE4_BUILD_TESTS)
@@ -702,18 +703,19 @@ macro (KDE4_ADD_TEST _target_NAME)
add_executable(${_target_NAME} ${_add_executable_param} ${ARGN} ${_automoc_FILES})
set_target_properties(${_target_NAME} PROPERTIES
- EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR}
- DEFINITIONS -DKDESRCDIR=\\"${CMAKE_CURRENT_SOURCE_DIR}\\"
- SKIP_BUILD_RPATH FALSE
- BUILD_WITH_INSTALL_RPATH FALSE)
+ EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR}
+ DEFINITIONS -DKDESRCDIR=\\"${CMAKE_CURRENT_SOURCE_DIR}\\"
+ SKIP_BUILD_RPATH FALSE
+ BUILD_WITH_INSTALL_RPATH FALSE)
if (WIN32)
- target_link_libraries(${_target_NAME} ${QT_QTMAIN_LIBRARY})
+ target_link_libraries(${_target_NAME} ${QT_QTMAIN_LIBRARY})
endif (WIN32)
endif (_go)
endmacro (KDE4_ADD_TEST)
+
macro (KDE4_ADD_EXECUTABLE _target_NAME)
kde4_check_executable_params( _SRCS _nogui _uninst ${ARGN})
@@ -759,7 +761,7 @@ macro (KDE4_ADD_EXECUTABLE _target_NAME)
endmacro (KDE4_ADD_EXECUTABLE)
-MACRO (KDE4_ADD_LIBRARY _target_NAME _lib_TYPE)
+macro (KDE4_ADD_LIBRARY _target_NAME _lib_TYPE)
#is the first argument is "WITH_PREFIX" then keep the standard "lib" prefix, otherwise set the prefix empty
set(_first_SRC ${_lib_TYPE})
@@ -796,7 +798,7 @@ MACRO (KDE4_ADD_LIBRARY _target_NAME _lib_TYPE)
set_target_properties(${_target_NAME} PROPERTIES DEFINE_SYMBOL ${_symbol})
endif (WIN32)
-ENDMACRO (KDE4_ADD_LIBRARY _target_NAME _lib_TYPE)
+endmacro (KDE4_ADD_LIBRARY _target_NAME _lib_TYPE)
macro (KDE4_ADD_WIDGET_FILES _sources)