diff options
Diffstat (limited to 'modules/FindKDE4Internal.cmake')
-rw-r--r-- | modules/FindKDE4Internal.cmake | 31 |
1 files changed, 18 insertions, 13 deletions
diff --git a/modules/FindKDE4Internal.cmake b/modules/FindKDE4Internal.cmake index 1ce3a7cb..a551fb10 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) @@ -173,7 +175,7 @@ # are created. Under Windows this flag is also necessary to separate between applications # with GUI and without. On other UNIX systems this flag has no effect. # The option TEST is for internal use only. -# The option RUN_UNINSTALLED is ignored. It was necessary with KDE 4.0 and 4.1 +# The option RUN_UNINSTALLED is ignored. It was necessary with KDE 4.0 and 4.1 # if the executable had to be run from the build tree. Since KDE 4.2 all # executables can be always run uninstalled (the RPATH of executables which are not # yet installed points since then into the buildtree and is changed @@ -217,7 +219,7 @@ # KDE4_INSTALL_AUTH_ACTIONS( HELPER_ID ACTIONS_FILE ) # This macro generates an action file, depending on the backend used, for applications using KAuth. # It accepts the helper id (the DBUS name) and a file containing the actions (check kdelibs/kdecore/auth/example -# for file format). The macro will take care of generating the file according to the backend specified, +# for file format). The macro will take care of generating the file according to the backend specified, # and to install it in the right location. This (at the moment) means that on Linux (PolicyKit) a .policy # file will be generated and installed into the policykit action directory (usually /usr/share/PolicyKit/policy/), # and on Mac (Authorization Services) will be added to the system action registry using the native MacOS API during @@ -338,7 +340,7 @@ if( ${QT_MIN_VERSION} VERSION_LESS "4.5.0" ) endif( ${QT_MIN_VERSION} VERSION_LESS "4.5.0" ) # Tell FindQt4.cmake to point the QT_QTFOO_LIBRARY targets at the imported targets -# for the Qt libraries, so we get full handling of release and debug versions of the +# for the Qt libraries, so we get full handling of release and debug versions of the # Qt libs and are flexible regarding the install location of Qt under Windows: set(QT_USE_IMPORTED_TARGETS TRUE) @@ -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. @@ -899,7 +907,7 @@ if (WIN32) # windows, microsoft compiler if(MSVC) set( _KDE4_PLATFORM_DEFINITIONS -DKDE_FULL_TEMPLATE_EXPORT_INSTANTIATION -DWIN32_LEAN_AND_MEAN ) - + # C4250: 'class1' : inherits 'class2::member' via dominance set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -wd4250" ) # C4251: 'identifier' : class 'type' needs to have dll-interface to be used by clients of class 'type2' @@ -1058,7 +1066,7 @@ if (MSVC) set (KDE4_ENABLE_EXCEPTIONS -EHsc) # Qt disables the native wchar_t type, do it too to avoid linking issues - set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Zc:wchar_t-" ) + set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Zc:wchar_t-" ) # make sure that no header adds libcmt by default using #pragma comment(lib, "libcmt.lib") as done by mfc/afx.h kde_check_flag_exists("/NODEFAULTLIB:libcmt /DEFAULTLIB:msvcrt" CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO "Release with Debug Info") @@ -1156,19 +1164,16 @@ if (CMAKE_COMPILER_IS_GNUCXX) set (KDE4_C_FLAGS "-fvisibility=hidden") # check that Qt defines Q_DECL_EXPORT as __attribute__ ((visibility("default"))) # if it doesn't and KDE compiles with hidden default visibiltiy plugins will break - set(_source "#include <QtCore/QtGlobal>\n int main()\n {\n #ifdef QT_VISIBILITY_AVAILABLE \n return 0;\n #else \n return 1; \n #endif \n }\n") + set(_source "#include <QtCore/QtGlobal>\n int main()\n {\n #ifndef QT_VISIBILITY_AVAILABLE \n #error QT_VISIBILITY_AVAILABLE is not available\n #endif \n }\n") set(_source_file ${CMAKE_BINARY_DIR}/CMakeTmp/check_qt_visibility.cpp) file(WRITE "${_source_file}" "${_source}") set(_include_dirs "-DINCLUDE_DIRECTORIES:STRING=${QT_INCLUDES}") - try_run(_run_result _compile_result ${CMAKE_BINARY_DIR} ${_source_file} CMAKE_FLAGS "${_include_dirs}" COMPILE_OUTPUT_VARIABLE _compile_output_var) + try_compile(_compile_result ${CMAKE_BINARY_DIR} ${_source_file} CMAKE_FLAGS "${_include_dirs}" COMPILE_OUTPUT_VARIABLE _compile_output_var) if(NOT _compile_result) - message(FATAL_ERROR "Could not compile simple test program:\n ${_source}\n${_compile_output_var}") - endif(NOT _compile_result) - if(_run_result) message(FATAL_ERROR "Qt compiled without support for -fvisibility=hidden. This will break plugins and linking of some applications. Please fix your Qt installation.") - endif(_run_result) + endif(NOT _compile_result) if (GCC_IS_NEWER_THAN_4_2) set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility-inlines-hidden") @@ -1225,13 +1230,13 @@ macro (KDE4_PRINT_RESULTS) # inside kdelibs the include dir and lib dir are internal, not "found" if (NOT _kdeBootStrapping) if(KDE4_INCLUDE_DIR) - message(STATUS "Found KDE 4.4 include dir: ${KDE4_INCLUDE_DIR}") + message(STATUS "Found KDE 4.5 include dir: ${KDE4_INCLUDE_DIR}") else(KDE4_INCLUDE_DIR) message(STATUS "ERROR: unable to find the KDE 4 headers") endif(KDE4_INCLUDE_DIR) if(KDE4_LIB_DIR) - message(STATUS "Found KDE 4.4 library dir: ${KDE4_LIB_DIR}") + message(STATUS "Found KDE 4.5 library dir: ${KDE4_LIB_DIR}") else(KDE4_LIB_DIR) message(STATUS "ERROR: unable to find the KDE 4 core library") endif(KDE4_LIB_DIR) |