Vendredi, le 9 avril 2010, à 22:52, Andreas Pakulat a écrit: > On 09.04.10 22:45:41, Friedrich W. H. Kossebau wrote: > > Vendredi, le 9 avril 2010, à 21:46, vous avez écrit: > > > On Friday 09 April 2010, Friedrich W. H. Kossebau wrote: > > > > Hi, > > > > > > > > TechBase [TB] teaches to install Phonon to $KDEDIR (!=$QTDIR). So I > > > > have done. But I cannot get kdelibs to compile then, it only finds > > > > the system one, which is an older one. > > > > > > > > [TB] > > > > http://techbase.kde.org/Getting_Started/Build/KDE4/Prerequisites#Phon > > > > on > > > > > > > > FindPhonon.cmake uses > > > > > > > > find_path(PHONON_INCLUDE_DIR NAMES phonon/phonon_export.h > > > > > > > > HINTS > > > > ${KDE4_INCLUDE_INSTALL_DIR} > > > > ${QT_INCLUDE_DIR} > > > > ${INCLUDE_INSTALL_DIR} > > > > ${QT_LIBRARY_DIR}) > > > > > > > > But both KDE4_INCLUDE_INSTALL_DIR and INCLUDE_INSTALL_DIR are empty > > > > at this moment, > > > > > > > > message(STATUS > > > > "${INCLUDE_INSTALL_DIR}###${KDE4_INCLUDE_INSTALL_DIR}") > > > > > > > > gives only ###. What is wrong here? Why are both vars empty? > > > > > > You could set CMAKE_PREFIX_PATH, this will be prefered over everything > > > else. > > > > Not a prefered solution though, right? > > IMHO its the correct solution to tell cmake to search for libs in a > specific plugin. CMAKE_PREFIX_PATH is the official way with cmake to > influence how things like find_package, find_path and find_library work.
Okay, and I see TechBase even tells [TB] to extend CMAKE_PREFIX_PATH with the $KDEDIR, like export CMAKE_PREFIX_PATH=$KDEDIR:$CMAKE_PREFIX_PATH So in the end there is no need for FindPhonon.cmake to use theKDE4_* stuff, not only because the inbalance between bootstrapping (have to tell where Phonon sits even if in KDE install dirs) and non-bootstrapping (don't have to tell). Attached patches clean FindPhonon.cmake, also add a message to see which Phonon lib is actually used, and move the find_package(Phonon) back to the other find_packages, where it belongs. Okay to commit? [TB] http://techbase.kde.org/Getting_Started/Increased_Productivity_in_KDE4_with_Scripts Cheers Friedrich -- KDE Okteta - a simple hex editor - http://utils.kde.org/projects/okteta
Index: kdelibs/cmake/modules/FindKDE4Internal.cmake =================================================================== --- kdelibs/cmake/modules/FindKDE4Internal.cmake (Revision 1113287) +++ kdelibs/cmake/modules/FindKDE4Internal.cmake (Arbeitskopie) @@ -387,10 +387,12 @@ # restore the original CMAKE_MODULE_PATH set(CMAKE_MODULE_PATH ${_kde_cmake_module_path_back}) -# we check for Phonon not here, but further below, i.e. after KDELibsDependencies.cmake -# has been loaded, which helps in the case that phonon is installed to the same -# directory as kdelibs. -# find_package(Phonon ${_REQ_STRING_KDE4}) +# Find Phonon from gitorious.org +# only make Phonon REQUIRED if KDE4 itself is REQUIRED +find_package(Phonon "4.3.80" ${_REQ_STRING_KDE4}) +set(KDE4_PHONON_LIBRARY ${PHONON_LIBRARY}) +set(KDE4_PHONON_LIBS ${PHONON_LIBS}) +set(KDE4_PHONON_INCLUDES ${PHONON_INCLUDES}) # Check that we really found everything. @@ -405,6 +407,11 @@ return() endif(NOT QT4_FOUND) +if(NOT PHONON_FOUND) + message(STATUS "KDE4 not found, because Phonon was not found") + return() +endif(NOT PHONON_FOUND) + if(NOT AUTOMOC4_FOUND OR NOT _automoc4_version_ok) if(NOT AUTOMOC4_FOUND) message(${_REQ_STRING_KDE4_MESSAGE} "KDE4 not found, because Automoc4 not found.") @@ -621,24 +628,6 @@ endif(_kdeBootStrapping OR TARGET ${KDE4_TARGET_PREFIX}nepomuk) -################### try to find Phonon ############################################ - -# we do this here instead of above together with the checks for Perl etc. -# since FindPhonon.cmake also uses ${KDE4_LIB_INSTALL_DIR} to check for Phonon, -# which helps with finding the phonon installed as part of kdesupport: - -# only make Phonon REQUIRED if KDE4 itself is REQUIRED -find_package(Phonon 4.3.80 ${_REQ_STRING_KDE4}) -set(KDE4_PHONON_LIBRARY ${PHONON_LIBRARY}) -set(KDE4_PHONON_LIBS ${PHONON_LIBS}) -set(KDE4_PHONON_INCLUDES ${PHONON_INCLUDES}) - -if(NOT PHONON_FOUND) - message(STATUS "KDE4 not found, because Phonon was not found") - return() -endif(NOT PHONON_FOUND) - - ##################### provide some options ########################################## option(KDE4_ENABLE_FINAL "Enable final all-in-one compilation")
Index: kdelibs/cmake/modules/FindPhonon.cmake =================================================================== --- kdelibs/cmake/modules/FindPhonon.cmake (Revision 1113287) +++ kdelibs/cmake/modules/FindPhonon.cmake (Arbeitskopie) @@ -22,13 +22,14 @@ endmacro(_phonon_find_version) # the dirs listed with HINTS are searched before the default sets of dirs -find_library(PHONON_LIBRARY NAMES phonon HINTS ${KDE4_LIB_INSTALL_DIR} ${QT_LIBRARY_DIR}) -find_path(PHONON_INCLUDE_DIR NAMES phonon/phonon_export.h HINTS ${KDE4_INCLUDE_INSTALL_DIR} ${QT_INCLUDE_DIR} ${INCLUDE_INSTALL_DIR} ${QT_LIBRARY_DIR}) +find_library(PHONON_LIBRARY NAMES phonon HINTS ${QT_LIBRARY_DIR}) +find_path(PHONON_INCLUDE_DIR NAMES phonon/phonon_export.h HINTS ${QT_INCLUDE_DIR} ${INCLUDE_INSTALL_DIR} ${QT_LIBRARY_DIR}) if(PHONON_INCLUDE_DIR AND PHONON_LIBRARY) set(PHONON_LIBS ${phonon_LIB_DEPENDS} ${PHONON_LIBRARY}) set(PHONON_INCLUDES ${PHONON_INCLUDE_DIR}/KDE ${PHONON_INCLUDE_DIR}) _phonon_find_version() + message(STATUS "Found Phonon ${PHONON_VERSION}: ${PHONON_LIBRARY}") endif(PHONON_INCLUDE_DIR AND PHONON_LIBRARY) include(FindPackageHandleStandardArgs)
_______________________________________________ Kde-buildsystem mailing list Kde-buildsystem@kde.org https://mail.kde.org/mailman/listinfo/kde-buildsystem