diff options
-rw-r--r-- | modules/FindKDE4Internal.cmake | 8 | ||||
-rw-r--r-- | modules/FindLibAttica.cmake | 10 | ||||
-rw-r--r-- | modules/FindPolkitQt-1.cmake | 11 | ||||
-rw-r--r-- | modules/FindPolkitQt.cmake | 6 | ||||
-rw-r--r-- | modules/MacroOptionalFindPackage.cmake | 32 |
5 files changed, 49 insertions, 18 deletions
diff --git a/modules/FindKDE4Internal.cmake b/modules/FindKDE4Internal.cmake index 1ce3a7cb..94bb3775 100644 --- a/modules/FindKDE4Internal.cmake +++ b/modules/FindKDE4Internal.cmake @@ -123,6 +123,8 @@ # KDE4_USE_COMMON_CMAKE_PACKAGE_CONFIG_DIR - only present for CMake >= 2.6.3, defaults to TRUE # If enabled, the package should install its <package>Config.cmake file to # lib/cmake/<package>/ instead to lib/<package>/cmake +# KDE4_SERIALIZE_TOOL - wrapper to serialize potentially resource-intensive commands during +# parallel builds (set to 'icecc' when using icecream) # # It also adds the following macros and functions (from KDE4Macros.cmake) # KDE4_ADD_UI_FILES (SRCS_VAR file1.ui ... fileN.ui) @@ -626,6 +628,7 @@ endif(NOT PHONON_FOUND) option(KDE4_ENABLE_FINAL "Enable final all-in-one compilation") option(KDE4_BUILD_TESTS "Build the tests") option(KDE4_ENABLE_HTMLHANDBOOK "Create targets htmlhandbook for creating the html versions of the docbook docs") +set(KDE4_SERIALIZE_TOOL "" CACHE STRING "Tool to serialize resource-intensive commands in parallel builds") # if CMake 2.6.3 or above is used, provide an option which should be used by other KDE packages # whether to install a CMake FooConfig.cmake into lib/foo/cmake/ or /lib/cmake/foo/ @@ -665,6 +668,11 @@ if( KDE4_ENABLE_FINAL) add_definitions(-DKDE_USE_FINAL) endif(KDE4_ENABLE_FINAL) +if(KDE4_SERIALIZE_TOOL) + # parallel build with many meinproc invocations can consume a huge amount of memory + set(KDE4_MEINPROC_EXECUTABLE ${KDE4_SERIALIZE_TOOL} ${KDE4_MEINPROC_EXECUTABLE}) +endif(KDE4_SERIALIZE_TOOL) + # If we are building ! kdelibs, check where kdelibs are installed. # If they are installed in a directory which contains "lib64", we default to "64" for LIB_SUFFIX, # so the current project will by default also go into lib64. diff --git a/modules/FindLibAttica.cmake b/modules/FindLibAttica.cmake index f901075a..b9b0610a 100644 --- a/modules/FindLibAttica.cmake +++ b/modules/FindLibAttica.cmake @@ -14,11 +14,6 @@ IF (NOT LIBATTICA_MIN_VERSION) SET(LIBATTICA_MIN_VERSION "0.1.0") ENDIF(NOT LIBATTICA_MIN_VERSION) -IF (LIBATTICA_INCLUDE_DIR AND LIBATTICA_LIBRARIES) - # in cache already - SET(libattica_FIND_QUIETLY TRUE) -ENDIF (LIBATTICA_INCLUDE_DIR AND LIBATTICA_LIBRARIES) - IF (NOT WIN32) # use pkg-config to get the directories and then use these values # in the FIND_PATH() and FIND_LIBRARY() calls @@ -59,10 +54,9 @@ FIND_LIBRARY(LIBATTICA_LIBRARIES NAMES attica libattica ) INCLUDE(FindPackageHandleStandardArgs) -# handle the QUIETLY and REQUIRED arguments and set ATTICA_FOUND to TRUE if +# handle the QUIETLY and REQUIRED arguments and set LIBATTICA_FOUND to TRUE if # all listed variables are TRUE -FIND_PACKAGE_HANDLE_STANDARD_ARGS(libattica DEFAULT_MSG LIBATTICA_LIBRARIES LIBATTICA_INCLUDE_DIR LIBATTICA_VERSION_OK) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(LibAttica DEFAULT_MSG LIBATTICA_LIBRARIES LIBATTICA_INCLUDE_DIR LIBATTICA_VERSION_OK) MARK_AS_ADVANCED(LIBATTICA_INCLUDE_DIR LIBATTICA_LIBRARIES) - diff --git a/modules/FindPolkitQt-1.cmake b/modules/FindPolkitQt-1.cmake index 8ef5b3c9..159a54cc 100644 --- a/modules/FindPolkitQt-1.cmake +++ b/modules/FindPolkitQt-1.cmake @@ -74,7 +74,7 @@ find_library( POLKITQT-1_GUI_LIBRARY NAMES polkit-qt-gui-1 HINTS ${PC_POLKITQT-1_LIBDIR} ) -find_library( POLKITQT-1_AGENT_LIBRARY +find_library( POLKITQT-1_AGENT_LIBRARY NAMES polkit-qt-agent-1 HINTS ${PC_POLKITQT-1_LIBDIR} ) @@ -85,9 +85,14 @@ include(FindPackageHandleStandardArgs) # handle the QUIETLY and REQUIRED arguments and set POLKITQT-1_FOUND to TRUE if # all listed variables are TRUE -find_package_handle_standard_args(PolkitQt-1 DEFAULT_MSG POLKITQT-1_LIBRARIES POLKITQT-1_INCLUDE_DIR POLKITQT-1_VERSION_OK) +find_package_handle_standard_args(PolkitQt-1 DEFAULT_MSG POLKITQT-1_LIBRARIES POLKITQT-1_INCLUDE_DIR POLKITQT-1_VERSION_OK) -mark_as_advanced(POLKITQT-1_INCLUDE_DIR POLKITQT-1_CORE_LIBRARY POLKITQT-1_GUI_LIBRARY POLKITQT-1_LIBRARIES POLKITQT-1_VERSION_OK) +mark_as_advanced(POLKITQT-1_INCLUDE_DIR + POLKITQT-1_CORE_LIBRARY + POLKITQT-1_GUI_LIBRARY + POLKITQT-1_AGENT_LIBRARY + POLKITQT-1_VERSION_FILE + ) if (POLKITQT-1_FOUND) if (NOT PC_POLKITQT-1_PREFIX STREQUAL CMAKE_INSTALL_PREFIX) diff --git a/modules/FindPolkitQt.cmake b/modules/FindPolkitQt.cmake index 8f9f712f..84a2b8b5 100644 --- a/modules/FindPolkitQt.cmake +++ b/modules/FindPolkitQt.cmake @@ -88,7 +88,11 @@ include(FindPackageHandleStandardArgs) # all listed variables are TRUE find_package_handle_standard_args(PolkitQt DEFAULT_MSG POLKITQT_INCLUDE_DIR POLKITQT_GUI_LIBRARY POLKITQT_CORE_LIBRARY POLKITQT_VERSION_OK) -mark_as_advanced(POLKITQT_INCLUDE_DIR POLKITQT_CORE_LIBRARY POLKITQT_GUI_LIBRARY POLKITQT_LIBRARIES POLKITQT_VERSION_OK) +mark_as_advanced(POLKITQT_INCLUDE_DIR + POLKITQT_CORE_LIBRARY + POLKITQT_GUI_LIBRARY + POLKITQT_VERSION_FILE + ) if(POLKITQT_FOUND) get_filename_component(_POLKITQT_INSTALL_PREFIX "${POLKITQT_CORE_LIBRARY}" PATH) diff --git a/modules/MacroOptionalFindPackage.cmake b/modules/MacroOptionalFindPackage.cmake index f09952f3..d4ed48e3 100644 --- a/modules/MacroOptionalFindPackage.cmake +++ b/modules/MacroOptionalFindPackage.cmake @@ -7,22 +7,42 @@ # The standard <name>_FOUND variables can be used in the same way # as when using the normal FIND_PACKAGE() -# Copyright (c) 2006, Alexander Neundorf, <neundorf@kde.org> +# Copyright (c) 2006-2010 Alexander Neundorf, <neundorf@kde.org> # # Redistribution and use is allowed according to the terms of the BSD license. # For details see the accompanying COPYING-CMAKE-SCRIPTS file. +# This is just a helper macro to set a bunch of variables empty. +# We don't know whether the package uses UPPERCASENAME or CamelCaseName, so we try both: +macro(_MOFP_SET_EMPTY_IF_DEFINED _name _var) + if(DEFINED ${_name}_${_var}) + set(${_name}_${_var} "") + endif(DEFINED ${_name}_${_var}) + + string(TOUPPER ${_name} _nameUpper) + if(DEFINED ${_nameUpper}_${_var}) + set(${_nameUpper}_${_var} "") + endif(DEFINED ${_nameUpper}_${_var}) +endmacro(_MOFP_SET_EMPTY_IF_DEFINED _package _var) + macro (MACRO_OPTIONAL_FIND_PACKAGE _name ) option(WITH_${_name} "Search for ${_name} package" ON) if (WITH_${_name}) find_package(${_name} ${ARGN}) else (WITH_${_name}) - set(${_name}_FOUND) - set(${_name}_INCLUDE_DIR) - set(${_name}_INCLUDES) - set(${_name}_LIBRARY) - set(${_name}_LIBRARIES) + string(TOUPPER ${_name} _nameUpper) + set(${_name}_FOUND FALSE) + set(${_nameUpper}_FOUND FALSE) + + _mofp_set_empty_if_defined(${_name} INCLUDE_DIRS) + _mofp_set_empty_if_defined(${_name} INCLUDE_DIR) + _mofp_set_empty_if_defined(${_name} INCLUDES) + _mofp_set_empty_if_defined(${_name} LIBRARY) + _mofp_set_empty_if_defined(${_name} LIBRARIES) + _mofp_set_empty_if_defined(${_name} LIBS) + _mofp_set_empty_if_defined(${_name} FLAGS) + _mofp_set_empty_if_defined(${_name} DEFINITIONS) endif (WITH_${_name}) endmacro (MACRO_OPTIONAL_FIND_PACKAGE) |