diff options
-rw-r--r-- | modules/FindKDE4Internal.cmake | 33 |
1 files changed, 27 insertions, 6 deletions
diff --git a/modules/FindKDE4Internal.cmake b/modules/FindKDE4Internal.cmake index fb1b3f1d..fc9008f1 100644 --- a/modules/FindKDE4Internal.cmake +++ b/modules/FindKDE4Internal.cmake @@ -224,10 +224,6 @@ set(QT_MIN_VERSION "4.4.0") #this line includes FindQt4.cmake, which searches the Qt library and headers find_package(Qt4 REQUIRED) -if (NOT QT_DBUSXML2CPP_EXECUTABLE) - message(FATAL_ERROR "Qt4 qdbusxml2cpp was not found. Make sure it has been built and installed by Qt") -endif (NOT QT_DBUSXML2CPP_EXECUTABLE) - # Perl is required for building KDE software, find_package(Perl REQUIRED) @@ -656,15 +652,40 @@ endif(WIN32) if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" GREATER 2.4) + + # some developers may be using an cmake cvs version which didn't have set_property() yet + # Tell them that a more recent version is required. if(NOT COMMAND SET_PROPERTY) - message(FATAL_ERROR "You are using an old version of CMake from cvs, please update to CMake >= 2.6.0 or cvs at least from Feb 20th, 2008") + message(FATAL_ERROR "You are using an old version of CMake from cvs, please update to CMake >= 2.6.0 or cvs at least from Feb 20th, 2008") endif(NOT COMMAND SET_PROPERTY) # CMake 2.6 gives errors if there are multiple targets with the same name # we use this for the target "buildtests", which is created for the unit tests # and which depends on the tests, so building "buildtests" builds all the tests # enabling this property disables this check in CMake - set_property(GLOBAL PROPERTY ALLOW_DUPLICATE_CUSTOM_TARGETS 1) + set_property(GLOBAL PROPERTY ALLOW_DUPLICATE_CUSTOM_TARGETS TRUE) + + # CMake 2.6 uses the full file names of the libraries when linking and so + # doesn't use -L anymore to list the link dirs. Now the dependencies created + # export_library_dependencies() lists the in-project libraries without + # path, i.e. with only the logical name ("kdecore"), so they don't link + # Setting this variable to true has the effect that the link dirs are + # listed nevertheless also with CMake 2.6. + set(CMAKE_LINK_OLD_PATHS TRUE) + + + # the following link_directories() command could be inserted in the KDELibsDependencies.cmake + # file. This should basically also fix the linking problem for libs with just the + # symbolic name (coming from export_library_dependencies()). But this will need + # adapting also the other places where export_library_dependencies() is used. + # I guess just enabling the compatibility option above is more safe. + # Once we require CMake >= 2.6.0 this will be reworked. Alex + # + # # in CMake 2.6 the handling of the link directories has changed, so we need this here + # if(\"\${CMAKE_MAJOR_VERSION}.\${CMAKE_MINOR_VERSION}\" GREATER 2.4) + # link_directories( \"\${KDE4_LIB_INSTALL_DIR}\" ) + # endif(\"\${CMAKE_MAJOR_VERSION}.\${CMAKE_MINOR_VERSION}\" GREATER 2.4) + endif("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" GREATER 2.4) |