From c4dde17dd66a6deef414d84468f36d4dbebd9905 Mon Sep 17 00:00:00 2001 From: Allen Winter Date: Mon, 14 Jul 2008 12:09:46 +0000 Subject: increase GENERIC library version from .1 to .2. DO NOT EVEN THINK ABOUT BACKPORTING THIS svn path=/trunk/KDE/kdelibs/; revision=832335 --- modules/KDE4Defaults.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/KDE4Defaults.cmake b/modules/KDE4Defaults.cmake index 60c62e35..e2af0acd 100644 --- a/modules/KDE4Defaults.cmake +++ b/modules/KDE4Defaults.cmake @@ -29,10 +29,10 @@ endif (NOT CMAKE_SKIP_RPATH) # define the generic version of the libraries here # this makes it easy to advance it when the next KDE release comes -set(GENERIC_LIB_VERSION "4.1.0") +set(GENERIC_LIB_VERSION "4.2.0") set(GENERIC_LIB_SOVERSION "4") -set(KDE_NON_GENERIC_LIB_VERSION "5.1.0") +set(KDE_NON_GENERIC_LIB_VERSION "5.2.0") set(KDE_NON_GENERIC_LIB_SOVERSION "5") # windows does not support LD_LIBRARY_PATH or similar -- cgit v1.2.1 From 26ecc84e22b0b5ee47221bea5d009af03c50cefc Mon Sep 17 00:00:00 2001 From: Helio Castro Date: Tue, 15 Jul 2008 21:19:57 +0000 Subject: - Logic fix for boost subminor test detection by Andreas Pakulat. It fixes Mandriva 1.35.0 boos detection svn path=/trunk/KDE/kdelibs/; revision=832964 --- modules/FindBoost.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/FindBoost.cmake b/modules/FindBoost.cmake index 01075ec7..7f3aff9e 100644 --- a/modules/FindBoost.cmake +++ b/modules/FindBoost.cmake @@ -482,10 +482,10 @@ ELSE (_boost_IN_CACHE) SET( Boost_FOUND TRUE ) IF( Boost_FIND_VERSION_MAJOR AND Boost_MAJOR_VERSION LESS "${Boost_FIND_VERSION_MAJOR}" ) SET( Boost_FOUND FALSE ) - ELSE( Boost_FIND_VERSION_MAJOR AND Boost_MAJOR_VERSION LESS "${Boost_FIND_VERSION_MAJOR}" ) + ELSEIF( Boost_FIND_VERSION_MAJOR AND Boost_MAJOR_VERSION EQUAL "${Boost_FIND_VERSION_MAJOR}" ) IF( Boost_FIND_VERSION_MINOR AND Boost_MINOR_VERSION LESS "${Boost_FIND_VERSION_MINOR}" ) SET( Boost_FOUND FALSE ) - ELSE( Boost_FIND_VERSION_MINOR AND Boost_MINOR_VERSION LESS "${Boost_FIND_VERSION_MINOR}" ) + ELSEIF( Boost_FIND_VERSION_MINOR AND Boost_MINOR_VERSION EQUAL "${Boost_FIND_VERSION_MINOR}" ) IF( Boost_FIND_VERSION_PATCH AND Boost_SUBMINOR_VERSION LESS "${Boost_FIND_VERSION_PATCH}" ) SET( Boost_FOUND FALSE ) ENDIF( Boost_FIND_VERSION_PATCH AND Boost_SUBMINOR_VERSION LESS "${Boost_FIND_VERSION_PATCH}" ) -- cgit v1.2.1 From 4f31359d3639c6eb8cdbed23f034c9eeb7f8d69d Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Thu, 17 Jul 2008 01:24:08 +0000 Subject: fix typo svn path=/trunk/KDE/kdelibs/; revision=833559 --- modules/KDE4Macros.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/KDE4Macros.cmake b/modules/KDE4Macros.cmake index 6da11793..4e4abe83 100644 --- a/modules/KDE4Macros.cmake +++ b/modules/KDE4Macros.cmake @@ -1117,7 +1117,7 @@ endmacro(_KDE4_EXPORT_LIBRARY_DEPENDENCIES) macro (KDE4_TARGET_LINK_INTERFACE_LIBRARIES _target _interface_libs) if(KDE4_ENABLE_EXPERIMENTAL_LIB_EXPORT AND UNIX )# AND NOT APPLE) - set_target_properties("${_target}" "${_interface_libs}") + set_target_properties("${_target}" PROPERTIES LINK_INTERFACE_LIBRARIES "${_interface_libs}") endif(KDE4_ENABLE_EXPERIMENTAL_LIB_EXPORT AND UNIX)# AND NOT APPLE) endmacro (KDE4_TARGET_LINK_INTERFACE_LIBRARIES) -- cgit v1.2.1 From 05dd0162ab74822f2c5ebb808f2c4fdaa853ee71 Mon Sep 17 00:00:00 2001 From: Christian Ehrlicher Date: Fri, 18 Jul 2008 21:04:33 +0000 Subject: fix for targets with '-' in name on windows svn path=/trunk/KDE/kdelibs/; revision=834424 --- modules/KDE4Macros.cmake | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/KDE4Macros.cmake b/modules/KDE4Macros.cmake index 4e4abe83..4374c6fe 100644 --- a/modules/KDE4Macros.cmake +++ b/modules/KDE4Macros.cmake @@ -657,6 +657,7 @@ macro (KDE4_ADD_KDEINIT_EXECUTABLE _target_NAME ) # keep the library there- if(WIN32) set(_KDEINIT4_TARGET_NAME_ ${_target_NAME}) + string(REGEX REPLACE "[-]" "_" _KDEINIT4_TARGET_NAME_ "${_KDEINIT4_TARGET_NAME_}") configure_file(${KDE4_MODULE_DIR}/kde4init_win32lib_dummy.cpp.in ${CMAKE_CURRENT_BINARY_DIR}/${_target_NAME}_win32lib_dummy.cpp) add_library(kdeinit_${_target_NAME} STATIC ${CMAKE_CURRENT_BINARY_DIR}/${_target_NAME}_win32lib_dummy.cpp) -- cgit v1.2.1 From 78b4c5fa3eafd4fe888a1fe8b1e62bfdb763d571 Mon Sep 17 00:00:00 2001 From: Andreas Pakulat Date: Sat, 19 Jul 2008 09:16:31 +0000 Subject: Explain the various build types that KDE4 supports and add Debugfull to the build configuration types for CMake > 2.5 svn path=/trunk/KDE/kdelibs/; revision=834533 --- modules/FindKDE4Internal.cmake | 31 ++++++++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/modules/FindKDE4Internal.cmake b/modules/FindKDE4Internal.cmake index e873d0ee..486b3fe0 100644 --- a/modules/FindKDE4Internal.cmake +++ b/modules/FindKDE4Internal.cmake @@ -199,6 +199,27 @@ # _KDE4_PLATFORM_INCLUDE_DIRS is used only internally # _KDE4_PLATFORM_DEFINITIONS is used only internally +# Note on the possible values for CMAKE_BUILD_TYPE and how KDE handles +# the flags for those buildtypes. FindKDE4Internal supports the values +# Debug, Release, Relwithdebinfo, Profile and Debugfull +# +# Release +# optimised for speed, qDebug/kDebug turned off, no debug symbols +# Release with debug info +# optimised for speed, debugging symbols on (-g) +# Debug +# optimised but debuggable, debugging on (-g) +# (-fno-reorder-blocks -fno-schedule-insns -fno-inline) +# DebugFull +# no optimisation, full debugging on (-g3) +# Profile +# DebugFull + -ftest-coverage -fprofile-arcs +# +# It is expected that the "Debug" build type be still debuggable with gdb +# without going all over the place, but still produce better performance. +# It's also important to note that gcc cannot detect all warning conditions +# unless the optimiser is active. + # Copyright (c) 2006-2008, Alexander Neundorf # Copyright (c) 2006, Laurent Montel, # @@ -360,7 +381,6 @@ else (_kdeBootStrapping) find_library(KDE4_KDEUI_LIBRARY NAMES kdeui PATHS ${KDE4_LIB_INSTALL_DIR} NO_DEFAULT_PATH ) set(KDE4_KDEUI_LIBS ${kdeui_LIB_DEPENDS} ${KDE4_KDEUI_LIBRARY} ) - find_library(KDE4_KIO_LIBRARY NAMES kio PATHS ${KDE4_LIB_INSTALL_DIR} NO_DEFAULT_PATH ) set(KDE4_KIO_LIBS ${kio_LIB_DEPENDS} ${KDE4_KIO_LIBRARY} ) @@ -897,6 +917,10 @@ endif(MSVC) if (CMAKE_COMPILER_IS_GNUCXX) + if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" GREATER 2.6) + set (CMAKE_CONFIGURATION_TYPES ${CMAKE_CONFIGURATION_TYPES} "Debugfull") + endif("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" GREATER 2.6) + set (KDE4_ENABLE_EXCEPTIONS -fexceptions) # Select flags. set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 -g") @@ -1003,6 +1027,11 @@ endif (CMAKE_COMPILER_IS_GNUCXX) if (CMAKE_C_COMPILER MATCHES "icc") + + if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" GREATER 2.6) + set (CMAKE_CONFIGURATION_TYPES ${CMAKE_CONFIGURATION_TYPES} "Debugfull") + endif("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" GREATER 2.6) + set (KDE4_ENABLE_EXCEPTIONS -fexceptions) # Select flags. set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 -g") -- cgit v1.2.1 From dfc0012e60c462bf9deca55b4a57d56896f92575 Mon Sep 17 00:00:00 2001 From: Alexander Neundorf Date: Sat, 19 Jul 2008 13:37:15 +0000 Subject: automoc in kdelibs is dead since a few weeks Alex CCMAIL: kretz@kde.org svn path=/trunk/KDE/kdelibs/; revision=834705 --- CMakeLists.txt | 6 +- automoc/CMakeLists.txt | 5 - automoc/kde4automoc.cpp | 345 ------------------------------------------------ 3 files changed, 1 insertion(+), 355 deletions(-) delete mode 100644 automoc/CMakeLists.txt delete mode 100644 automoc/kde4automoc.cpp diff --git a/CMakeLists.txt b/CMakeLists.txt index 5a4b45da..a89a38bb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,8 +1,4 @@ - -#if(NOT AUTOMOC4_EXECUTABLE) -# # this is just a fallback in case automoc4 from kdesupport isn't found, Alex -# add_subdirectory(automoc) -#endif(NOT AUTOMOC4_EXECUTABLE) +# automoc comes now from kdesupport, Alex add_subdirectory(modules) diff --git a/automoc/CMakeLists.txt b/automoc/CMakeLists.txt deleted file mode 100644 index 553aa1af..00000000 --- a/automoc/CMakeLists.txt +++ /dev/null @@ -1,5 +0,0 @@ -include_directories(${QT_INCLUDE_DIR}) -add_executable(kde4automoc kde4automoc.cpp) -kde4_handle_rpath_for_executable(kde4automoc "RUN_UNINSTALLED") -target_link_libraries(kde4automoc ${QT_QTCORE_LIBRARY}) -install(TARGETS kde4automoc DESTINATION ${BIN_INSTALL_DIR}) diff --git a/automoc/kde4automoc.cpp b/automoc/kde4automoc.cpp deleted file mode 100644 index 68ccdbdb..00000000 --- a/automoc/kde4automoc.cpp +++ /dev/null @@ -1,345 +0,0 @@ -/* This file is part of the KDE project - Copyright (C) 2007 Matthias Kretz - - This program is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public License as - published by the Free Software Foundation; either version 2 of - the License, or (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA - 02110-1301, USA. - -*/ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -class AutoMoc -{ - public: - AutoMoc(); - bool run(); - - private: - void generateMoc(const QString &sourceFile, const QString &mocFileName); - void waitForProcesses(); - void usage(const QString &); - void echoColor(const QString &msg) - { - QProcess *cmakeEcho = new QProcess; - cmakeEcho->setProcessChannelMode(QProcess::ForwardedChannels); - QStringList args(cmakeEchoColorArgs); - args << msg; - cmakeEcho->start(QLatin1String("cmake"), args, QIODevice::NotOpen); - processes.enqueue(Process(cmakeEcho, QString())); - } - - QString builddir; - QString mocExe; - QStringList mocIncludes; - QStringList cmakeEchoColorArgs; - const bool verbose; - QTextStream cerr; - QTextStream cout; - struct Process - { - Process(QProcess *a, const QString &b) : qproc(a), mocFilePath(b) {} - QProcess *qproc; - QString mocFilePath; - }; - QQueue processes; - bool failed; -}; - -void AutoMoc::usage(const QString &path) -{ - cout << "usage: " << path << " " << endl; - ::exit(EXIT_FAILURE); -} - -int main(int argc, char **argv) -{ - QCoreApplication app(argc, argv); - if (!AutoMoc().run()) { - return EXIT_FAILURE; - } - return 0; -} - -AutoMoc::AutoMoc() - : verbose(!qgetenv("VERBOSE").isEmpty()), cerr(stderr), cout(stdout), failed(false) -{ - const QByteArray colorEnv = qgetenv("COLOR"); - cmakeEchoColorArgs << QLatin1String("-E") << QLatin1String("cmake_echo_color") - << QLatin1String("--switch=") + colorEnv << QLatin1String("--blue") - << QLatin1String("--bold"); -} - -bool AutoMoc::run() -{ - const QStringList args = QCoreApplication::arguments(); - Q_ASSERT(args.size() > 0); - if (args.size() < 4) { - usage(args[0]); - } - QFile outfile(args[1]); - const QFileInfo outfileInfo(outfile); - - QString srcdir(args[2]); - if (!srcdir.endsWith('/')) { - srcdir += '/'; - } - builddir = args[3]; - if (!builddir.endsWith('/')) { - builddir += '/'; - } - mocExe = args[4]; - - QFile dotFiles(args[1] + ".files"); - dotFiles.open(QIODevice::ReadOnly | QIODevice::Text); - QByteArray line = dotFiles.readLine(); - Q_ASSERT(line == "MOC_INCLUDES:\n"); - line = dotFiles.readLine().trimmed(); - const QStringList incPaths = QString::fromUtf8(line).split(';'); - foreach (const QString &path, incPaths) { - if (!path.isEmpty()) { - mocIncludes << "-I" + path; - } - } - line = dotFiles.readLine(); - Q_ASSERT(line == "SOURCES:\n"); - line = dotFiles.readLine().trimmed(); - dotFiles.close(); - const QStringList sourceFiles = QString::fromUtf8(line).split(';'); - - // the program goes through all .cpp files to see which moc files are included. It is not really - // interesting how the moc file is named, but what file the moc is created from. Once a moc is - // included the same moc may not be included in the _automoc.cpp file anymore. OTOH if there's a - // header containing Q_OBJECT where no corresponding moc file is included anywhere a - // moc_.cpp file is created and included in the _automoc.cpp file. - QHash includedMocs; // key = moc source filepath, value = moc output filepath - QHash notIncludedMocs; // key = moc source filepath, value = moc output filename - - QRegExp mocIncludeRegExp(QLatin1String("[\n]\\s*#\\s*include\\s+[\"<](moc_[^ \">]+\\.cpp|[^ \">]+\\.moc)[\">]")); - QRegExp qObjectRegExp(QLatin1String("[\n]\\s*Q_OBJECT\\b")); - QStringList headerExtensions; - headerExtensions << ".h" << ".hpp" << ".hxx" << ".H"; - foreach (const QString &absFilename, sourceFiles) { - //qDebug() << absFilename; - const QFileInfo sourceFileInfo(absFilename); - if (absFilename.endsWith(".cpp") || absFilename.endsWith(".cc") || - absFilename.endsWith(".cxx") || absFilename.endsWith(".C")) { - //qDebug() << "check .cpp file"; - QFile sourceFile(absFilename); - sourceFile.open(QIODevice::ReadOnly); - const QByteArray contents = sourceFile.readAll(); - if (contents.isEmpty()) { - cerr << "kde4automoc: empty source file: " << absFilename << endl; - continue; - } - const QString contentsString = QString::fromUtf8(contents); - const QString absPath = sourceFileInfo.absolutePath() + '/'; - Q_ASSERT(absPath.endsWith('/')); - int matchOffset = mocIncludeRegExp.indexIn(contentsString); - if (matchOffset < 0) { - // no moc #include, look whether we need to create a moc from the .h nevertheless - //qDebug() << "no moc #include in the .cpp file"; - const QString basename = sourceFileInfo.completeBaseName(); - const QString headername = absPath + basename + ".h"; - if (QFile::exists(headername) && !includedMocs.contains(headername) && - !notIncludedMocs.contains(headername)) { - const QString currentMoc = "moc_" + basename + ".cpp"; - QFile header(headername); - header.open(QIODevice::ReadOnly); - const QByteArray contents = header.readAll(); - if (qObjectRegExp.indexIn(QString::fromUtf8(contents)) >= 0) { - //qDebug() << "header contains Q_OBJECT macro"; - notIncludedMocs.insert(headername, currentMoc); - } - } - const QString privateHeaderName = absPath + basename + "_p.h"; - if (QFile::exists(privateHeaderName) && !includedMocs.contains(privateHeaderName) && - !notIncludedMocs.contains(privateHeaderName)) { - const QString currentMoc = "moc_" + basename + "_p.cpp"; - QFile header(privateHeaderName); - header.open(QIODevice::ReadOnly); - const QByteArray contents = header.readAll(); - if (qObjectRegExp.indexIn(QString::fromUtf8(contents)) >= 0) { - //qDebug() << "header contains Q_OBJECT macro"; - notIncludedMocs.insert(privateHeaderName, currentMoc); - } - } - } else { - do { // call this for every moc include in the file - const QString currentMoc = mocIncludeRegExp.cap(1); - //qDebug() << "found moc include: " << currentMoc << " at offset " << matchOffset; - QString basename = QFileInfo(currentMoc).completeBaseName(); - const bool moc_style = currentMoc.startsWith("moc_"); - if (moc_style || qObjectRegExp.indexIn(contentsString) < 0) { - if (moc_style) { - basename = basename.right(basename.length() - 4); - } - bool headerFound = false; - foreach (const QString &ext, headerExtensions) { - QString sourceFilePath = absPath + basename + ext; - if (QFile::exists(sourceFilePath)) { - headerFound = true; - includedMocs.insert(sourceFilePath, currentMoc); - notIncludedMocs.remove(sourceFilePath); - break; - } - } - if (!headerFound) { - cerr << "kde4automoc: The file \"" << absFilename << - "\" includes the moc file \"" << currentMoc << "\", but \"" << - absPath + basename + "{" + headerExtensions.join(",") + "}" << - "\" do not exist." << endl; - ::exit(EXIT_FAILURE); - } - } else { - includedMocs.insert(absFilename, currentMoc); - notIncludedMocs.remove(absFilename); - } - - matchOffset = mocIncludeRegExp.indexIn(contentsString, - matchOffset + currentMoc.length()); - } while(matchOffset >= 0); - } - } else if (absFilename.endsWith(".h") || absFilename.endsWith(".hpp") || - absFilename.endsWith(".hxx") || absFilename.endsWith(".H")) { - if (!includedMocs.contains(absFilename) && !notIncludedMocs.contains(absFilename)) { - // if this header is not getting processed yet and is explicitly mentioned for the - // automoc the moc is run unconditionally on the header and the resulting file is - // included in the _automoc.cpp file (unless there's a .cpp file later on that - // includes the moc from this header) - const QString currentMoc = "moc_" + sourceFileInfo.completeBaseName() + ".cpp"; - notIncludedMocs.insert(absFilename, currentMoc); - } - } else { - if (verbose) { - cout << "kde4automoc: ignoring file '" << absFilename << "' with unknown suffix" << endl; - } - } - } - - // run moc on all the moc's that are #included in source files - QHash::ConstIterator end = includedMocs.constEnd(); - QHash::ConstIterator it = includedMocs.constBegin(); - for (; it != end; ++it) { - generateMoc(it.key(), it.value()); - } - - QByteArray automocSource; - QTextStream outStream(&automocSource, QIODevice::WriteOnly); - outStream << "/* This file is autogenerated, do not edit */\n"; - - if (notIncludedMocs.isEmpty()) { - outStream << "enum some_compilers { need_more_than_nothing };\n"; - } else { - // run moc on the remaining headers and include them in the _automoc.cpp file - end = notIncludedMocs.constEnd(); - it = notIncludedMocs.constBegin(); - for (; it != end; ++it) { - generateMoc(it.key(), it.value()); - outStream << "#include \"" << it.value() << "\"\n"; - } - } - - // let all remaining moc processes finish - waitForProcesses(); - - if (failed) { - // if any moc process failed we don't want to touch the _automoc.cpp file so that - // kde4automoc is rerun until the issue is fixed - cerr << "returning failed.."<< endl; - return false; - } - outStream.flush(); - - // source file that includes all remaining moc files - outfile.open(QIODevice::WriteOnly | QIODevice::Text | QIODevice::Truncate); - outfile.write(automocSource); - outfile.close(); - - return true; -} - -void AutoMoc::waitForProcesses() -{ - while (!processes.isEmpty()) { - Process proc = processes.dequeue(); - - bool result = proc.qproc->waitForFinished(-1); - //ignore errors from the cmake echo process - if (!proc.mocFilePath.isEmpty()) { - if (!result || proc.qproc->exitCode()) { - cerr << "kde4automoc: process for " << proc.mocFilePath - << " failed: " << proc.qproc->errorString() << endl; - cerr << "pid to wait for: " << proc.qproc->pid() << endl; - cerr << "processes in queue: " << processes.size() << endl; - failed = true; - QFile::remove(proc.mocFilePath); - } - } - delete proc.qproc; - } -} - -void AutoMoc::generateMoc(const QString &sourceFile, const QString &mocFileName) -{ - //qDebug() << Q_FUNC_INFO << sourceFile << mocFileName; - const QString mocFilePath = builddir + mocFileName; - if (QFileInfo(mocFilePath).lastModified() < QFileInfo(sourceFile).lastModified()) { - if (verbose) { - echoColor("Generating " + mocFilePath + " from " + sourceFile); - } else { - echoColor("Generating " + mocFileName); - } - - // we don't want too many child processes -#ifdef Q_OS_FREEBSD - static const int max_processes = 0; -#else - static const int max_processes = 10; -#endif - - if (processes.size() > max_processes) { - waitForProcesses(); - } - - QProcess *mocProc = new QProcess; - mocProc->setProcessChannelMode(QProcess::ForwardedChannels); - QStringList args(mocIncludes); -#ifdef Q_OS_WIN - args << "-DWIN32"; -#endif - args << QLatin1String("-o") << mocFilePath << sourceFile; - //qDebug() << "executing: " << mocExe << args; - mocProc->start(mocExe, args, QIODevice::NotOpen); - if (mocProc->waitForStarted()) - processes.enqueue(Process(mocProc, mocFilePath)); - else { - cerr << "kde4automoc: process for " << mocFilePath << "failed to start: " - << mocProc->errorString() << endl; - failed = true; - delete mocProc; - } - } -} -- cgit v1.2.1 From e30c2c3ff44d43c179c891fe94d1e2fe9f5b7873 Mon Sep 17 00:00:00 2001 From: Alexander Neundorf Date: Sun, 20 Jul 2008 09:26:40 +0000 Subject: -remove empty lines from documentation block in FindQt4.cmake, so everything is included again in the generated documentatiom -lowercase FindTaglib.cmake Alex svn path=/trunk/KDE/kdelibs/; revision=835221 --- modules/FindQt4.cmake | 4 ---- modules/FindTaglib.cmake | 49 +++++++++++++++++++++++++----------------------- 2 files changed, 26 insertions(+), 27 deletions(-) diff --git a/modules/FindQt4.cmake b/modules/FindQt4.cmake index 797bd972..55c44dfd 100644 --- a/modules/FindQt4.cmake +++ b/modules/FindQt4.cmake @@ -219,7 +219,6 @@ # The qtmain library for Windows QT_QTMAIN_LIBRARY # # The QtUiTools library: QT_QTUITOOLS_LIBRARY - # # The QtAssistantClient library: QT_QTASSISTANTCLIENT_LIBRARY # @@ -230,9 +229,6 @@ # The QtXmlPatterns library: QT_QTXMLPATTERNS_LIBRARY # # The Phonon library: QT_PHONON_LIBRARY - - - # # also defined, but NOT for general use are # QT_MOC_EXECUTABLE Where to find the moc tool. diff --git a/modules/FindTaglib.cmake b/modules/FindTaglib.cmake index 35fd6b03..3edfdb4a 100644 --- a/modules/FindTaglib.cmake +++ b/modules/FindTaglib.cmake @@ -14,37 +14,40 @@ if(NOT TAGLIB_MIN_VERSION) set(TAGLIB_MIN_VERSION "1.4") endif(NOT TAGLIB_MIN_VERSION) -IF(NOT WIN32) - FIND_PROGRAM(TAGLIBCONFIG_EXECUTABLE NAMES taglib-config PATHS +if(NOT WIN32) + find_program(TAGLIBCONFIG_EXECUTABLE NAMES taglib-config PATHS ${BIN_INSTALL_DIR} ) -ENDIF(NOT WIN32) +endif(NOT WIN32) + #reset vars set(TAGLIB_LIBRARIES) set(TAGLIB_CFLAGS) # if taglib-config has been found -IF(TAGLIBCONFIG_EXECUTABLE) +if(TAGLIBCONFIG_EXECUTABLE) - EXEC_PROGRAM(${TAGLIBCONFIG_EXECUTABLE} ARGS --version RETURN_VALUE _return_VALUE OUTPUT_VARIABLE TAGLIB_VERSION) + exec_program(${TAGLIBCONFIG_EXECUTABLE} ARGS --version RETURN_VALUE _return_VALUE OUTPUT_VARIABLE TAGLIB_VERSION) if(TAGLIB_VERSION STRLESS "${TAGLIB_MIN_VERSION}") - MESSAGE(STATUS "TagLib version not found: version searched :${TAGLIB_MIN_VERSION}, found ${TAGLIB_VERSION}") - SET(TAGLIB_FOUND FALSE) + message(STATUS "TagLib version not found: version searched :${TAGLIB_MIN_VERSION}, found ${TAGLIB_VERSION}") + set(TAGLIB_FOUND FALSE) else(TAGLIB_VERSION STRLESS "${TAGLIB_MIN_VERSION}") - EXEC_PROGRAM(${TAGLIBCONFIG_EXECUTABLE} ARGS --libs RETURN_VALUE _return_VALUE OUTPUT_VARIABLE TAGLIB_LIBRARIES) + exec_program(${TAGLIBCONFIG_EXECUTABLE} ARGS --libs RETURN_VALUE _return_VALUE OUTPUT_VARIABLE TAGLIB_LIBRARIES) - EXEC_PROGRAM(${TAGLIBCONFIG_EXECUTABLE} ARGS --cflags RETURN_VALUE _return_VALUE OUTPUT_VARIABLE TAGLIB_CFLAGS) + exec_program(${TAGLIBCONFIG_EXECUTABLE} ARGS --cflags RETURN_VALUE _return_VALUE OUTPUT_VARIABLE TAGLIB_CFLAGS) - IF(TAGLIB_LIBRARIES AND TAGLIB_CFLAGS) - SET(TAGLIB_FOUND TRUE) + if(TAGLIB_LIBRARIES AND TAGLIB_CFLAGS) + set(TAGLIB_FOUND TRUE) message(STATUS "Found taglib: ${TAGLIB_LIBRARIES}") - ENDIF(TAGLIB_LIBRARIES AND TAGLIB_CFLAGS) + endif(TAGLIB_LIBRARIES AND TAGLIB_CFLAGS) + + endif(TAGLIB_VERSION STRLESS "${TAGLIB_MIN_VERSION}") + mark_as_advanced(TAGLIB_CFLAGS TAGLIB_LIBRARIES) + +else(TAGLIBCONFIG_EXECUTABLE) - endif(TAGLIB_VERSION STRLESS "${TAGLIB_MIN_VERSION}") - MARK_AS_ADVANCED(TAGLIB_CFLAGS TAGLIB_LIBRARIES) -ELSE(TAGLIBCONFIG_EXECUTABLE) include(FindLibraryWithDebug) include(FindPackageHandleStandardArgs) @@ -67,16 +70,16 @@ ELSE(TAGLIBCONFIG_EXECUTABLE) find_package_handle_standard_args(Taglib DEFAULT_MSG TAGLIB_INCLUDES TAGLIB_LIBRARIES) -ENDIF(TAGLIBCONFIG_EXECUTABLE) +endif(TAGLIBCONFIG_EXECUTABLE) if(TAGLIB_FOUND) - IF(NOT Taglib_FIND_QUIETLY AND TAGLIBCONFIG_EXECUTABLE) - MESSAGE(STATUS "Taglib found: ${TAGLIB_LIBRARIES}") - ENDIF(NOT Taglib_FIND_QUIETLY AND TAGLIBCONFIG_EXECUTABLE) -ELSE(TAGLIB_FOUND) - IF(Taglib_FIND_REQUIRED) - MESSAGE(FATAL_ERROR "Could not find Taglib") - ENDIF(Taglib_FIND_REQUIRED) + if(NOT Taglib_FIND_QUIETLY AND TAGLIBCONFIG_EXECUTABLE) + message(STATUS "Taglib found: ${TAGLIB_LIBRARIES}") + endif(NOT Taglib_FIND_QUIETLY AND TAGLIBCONFIG_EXECUTABLE) +else(TAGLIB_FOUND) + if(Taglib_FIND_REQUIRED) + message(FATAL_ERROR "Could not find Taglib") + endif(Taglib_FIND_REQUIRED) endif(TAGLIB_FOUND) -- cgit v1.2.1 From 5d69cd884cefe000851884ea9c3f3ec851fe4122 Mon Sep 17 00:00:00 2001 From: Alexander Neundorf Date: Sun, 20 Jul 2008 10:26:08 +0000 Subject: FindPCRE.cmake: lowercasing FindSharedMimeInfo.cmake: document SHARED_MIME_INFO_MINIMUM_VERSION and add a comment about the WORKING_DIRECTORY FindGStreamer.cmake: use FIND_PACKAGE_HANDLE_STANDARD_ARGS() FindExiv2.cmake: lowercasing, document EXIV2_MIN_VERSION FindKDE4Internal.cmake: remove empty lines from documentation block so everything is included again in the generated documentation Alex svn path=/trunk/KDE/kdelibs/; revision=835253 --- modules/FindExiv2.cmake | 18 +++++++++------- modules/FindGSSAPI.cmake | 44 ++++++++++++++++++++-------------------- modules/FindGStreamer.cmake | 17 ++-------------- modules/FindKDE4Internal.cmake | 13 ++++++------ modules/FindPCRE.cmake | 18 ++++++++-------- modules/FindSharedMimeInfo.cmake | 5 +++++ 6 files changed, 56 insertions(+), 59 deletions(-) diff --git a/modules/FindExiv2.cmake b/modules/FindExiv2.cmake index 5555c92e..5bef48be 100644 --- a/modules/FindExiv2.cmake +++ b/modules/FindExiv2.cmake @@ -1,4 +1,8 @@ # - Try to find the Exiv2 library +# +# EXIV2_MIN_VERSION - You can set this variable to the minimum version you need +# before doing FIND_PACKAGE(Exiv2). The default is 0.12. +# # Once done this will define # # EXIV2_FOUND - system has libexiv2 @@ -10,23 +14,23 @@ if (EXIV2_INCLUDE_DIR AND EXIV2_LIBRARIES) # in cache already - SET(EXIV2_FOUND TRUE) + set(EXIV2_FOUND TRUE) else (EXIV2_INCLUDE_DIR AND EXIV2_LIBRARIES) if (NOT WIN32) # use pkg-config to get the directories and then use these values # in the FIND_PATH() and FIND_LIBRARY() calls - INCLUDE(UsePkgConfig) + include(UsePkgConfig) if(NOT EXIV2_MIN_VERSION) set(EXIV2_MIN_VERSION "0.12") endif(NOT EXIV2_MIN_VERSION) - PKGCONFIG(exiv2 _EXIV2IncDir _EXIV2LinkDir _EXIV2LinkFlags _EXIV2Cflags) + pkgconfig(exiv2 _EXIV2IncDir _EXIV2LinkDir _EXIV2LinkFlags _EXIV2Cflags) if(_EXIV2LinkFlags) # query pkg-config asking for a Exiv2 >= 0.12 - EXEC_PROGRAM(${PKGCONFIG_EXECUTABLE} ARGS --atleast-version=${EXIV2_MIN_VERSION} exiv2 RETURN_VALUE _return_VALUE OUTPUT_VARIABLE _pkgconfigDevNull ) + exec_program(${PKGCONFIG_EXECUTABLE} ARGS --atleast-version=${EXIV2_MIN_VERSION} exiv2 RETURN_VALUE _return_VALUE OUTPUT_VARIABLE _pkgconfigDevNull ) if(_return_VALUE STREQUAL "0") message(STATUS "Found Exiv2 release >= ${EXIV2_MIN_VERSION}") set(EXIV2_VERSION_GOOD_FOUND TRUE) @@ -47,11 +51,11 @@ else (EXIV2_INCLUDE_DIR AND EXIV2_LIBRARIES) if(EXIV2_VERSION_GOOD_FOUND) set(EXIV2_DEFINITIONS ${_EXIV2Cflags}) - FIND_PATH(EXIV2_INCLUDE_DIR exiv2/exif.hpp + find_path(EXIV2_INCLUDE_DIR exiv2/exif.hpp ${_EXIV2IncDir} ) - FIND_LIBRARY(EXIV2_LIBRARIES NAMES exiv2 libexiv2 + find_library(EXIV2_LIBRARIES NAMES exiv2 libexiv2 PATHS ${_EXIV2LinkDir} ) @@ -76,7 +80,7 @@ else (EXIV2_INCLUDE_DIR AND EXIV2_LIBRARIES) endif (Exiv2_FIND_REQUIRED) endif (EXIV2_FOUND) - MARK_AS_ADVANCED(EXIV2_INCLUDE_DIR EXIV2_LIBRARIES) + mark_as_advanced(EXIV2_INCLUDE_DIR EXIV2_LIBRARIES) endif (EXIV2_INCLUDE_DIR AND EXIV2_LIBRARIES) diff --git a/modules/FindGSSAPI.cmake b/modules/FindGSSAPI.cmake index 45e4e0e1..0951c675 100644 --- a/modules/FindGSSAPI.cmake +++ b/modules/FindGSSAPI.cmake @@ -32,34 +32,34 @@ else(GSSAPI_LIBS AND GSSAPI_FLAVOR) if(KRB5_CONFIG) - SET(HAVE_KRB5_GSSAPI TRUE) - EXEC_PROGRAM(${KRB5_CONFIG} ARGS --libs gssapi RETURN_VALUE _return_VALUE OUTPUT_VARIABLE GSSAPI_LIBS) - IF(_return_VALUE) - MESSAGE(STATUS "GSSAPI configure check failed.") - SET(HAVE_KRB5_GSSAPI FALSE) - ENDIF(_return_VALUE) + set(HAVE_KRB5_GSSAPI TRUE) + exec_program(${KRB5_CONFIG} ARGS --libs gssapi RETURN_VALUE _return_VALUE OUTPUT_VARIABLE GSSAPI_LIBS) + if(_return_VALUE) + message(STATUS "GSSAPI configure check failed.") + set(HAVE_KRB5_GSSAPI FALSE) + endif(_return_VALUE) - EXEC_PROGRAM(${KRB5_CONFIG} ARGS --cflags gssapi RETURN_VALUE _return_VALUE OUTPUT_VARIABLE GSSAPI_INCS) + exec_program(${KRB5_CONFIG} ARGS --cflags gssapi RETURN_VALUE _return_VALUE OUTPUT_VARIABLE GSSAPI_INCS) string(REGEX REPLACE "(\r?\n)+$" "" GSSAPI_INCS "${GSSAPI_INCS}") string(REGEX REPLACE " *-I" ";" GSSAPI_INCS "${GSSAPI_INCS}") - EXEC_PROGRAM(${KRB5_CONFIG} ARGS --vendor RETURN_VALUE _return_VALUE OUTPUT_VARIABLE gssapi_flavor_tmp) + exec_program(${KRB5_CONFIG} ARGS --vendor RETURN_VALUE _return_VALUE OUTPUT_VARIABLE gssapi_flavor_tmp) set(GSSAPI_FLAVOR_MIT) - IF(gssapi_flavor_tmp MATCHES ".*Massachusetts.*") - SET(GSSAPI_FLAVOR "MIT") - ELSE(gssapi_flavor_tmp MATCHES ".*Massachusetts.*") - SET(GSSAPI_FLAVOR "HEIMDAL") - ENDIF(gssapi_flavor_tmp MATCHES ".*Massachusetts.*") + if(gssapi_flavor_tmp MATCHES ".*Massachusetts.*") + set(GSSAPI_FLAVOR "MIT") + else(gssapi_flavor_tmp MATCHES ".*Massachusetts.*") + set(GSSAPI_FLAVOR "HEIMDAL") + endif(gssapi_flavor_tmp MATCHES ".*Massachusetts.*") - IF(NOT HAVE_KRB5_GSSAPI) - IF (gssapi_flavor_tmp MATCHES "Sun Microsystems.*") - MESSAGE(STATUS "Solaris Kerberos does not have GSSAPI; this is normal.") - SET(GSSAPI_LIBS) - SET(GSSAPI_INCS) - ELSE(gssapi_flavor_tmp MATCHES "Sun Microsystems.*") - MESSAGE(WARNING "${KRB5_CONFIG} failed unexpectedly.") - ENDIF(gssapi_flavor_tmp MATCHES "Sun Microsystems.*") - ENDIF(NOT HAVE_KRB5_GSSAPI) + if(NOT HAVE_KRB5_GSSAPI) + if (gssapi_flavor_tmp MATCHES "Sun Microsystems.*") + message(STATUS "Solaris Kerberos does not have GSSAPI; this is normal.") + set(GSSAPI_LIBS) + set(GSSAPI_INCS) + else(gssapi_flavor_tmp MATCHES "Sun Microsystems.*") + message(WARNING "${KRB5_CONFIG} failed unexpectedly.") + endif(gssapi_flavor_tmp MATCHES "Sun Microsystems.*") + endif(NOT HAVE_KRB5_GSSAPI) if(GSSAPI_LIBS) # GSSAPI_INCS can be also empty, so don't rely on that set(GSSAPI_FOUND TRUE) diff --git a/modules/FindGStreamer.cmake b/modules/FindGStreamer.cmake index f75e92d9..5a94452b 100644 --- a/modules/FindGStreamer.cmake +++ b/modules/FindGStreamer.cmake @@ -68,20 +68,7 @@ ELSE (GSTREAMER_INTERFACE_LIBRARY) MESSAGE(STATUS "GStreamer: WARNING: interface library not found") ENDIF (GSTREAMER_INTERFACE_LIBRARY) -IF (GSTREAMER_INCLUDE_DIR AND GSTREAMER_LIBRARIES AND GSTREAMER_BASE_LIBRARY AND GSTREAMER_INTERFACE_LIBRARY) - SET(GSTREAMER_FOUND TRUE) -ELSE (GSTREAMER_INCLUDE_DIR AND GSTREAMER_LIBRARIES AND GSTREAMER_BASE_LIBRARY AND GSTREAMER_INTERFACE_LIBRARY) - SET(GSTREAMER_FOUND FALSE) -ENDIF (GSTREAMER_INCLUDE_DIR AND GSTREAMER_LIBRARIES AND GSTREAMER_BASE_LIBRARY AND GSTREAMER_INTERFACE_LIBRARY) - -IF (GSTREAMER_FOUND) - IF (NOT GStreamer_FIND_QUIETLY) - MESSAGE(STATUS "Found GStreamer: ${GSTREAMER_LIBRARIES}") - ENDIF (NOT GStreamer_FIND_QUIETLY) -ELSE (GSTREAMER_FOUND) - IF (GStreamer_FIND_REQUIRED) - MESSAGE(SEND_ERROR "Could NOT find GStreamer") - ENDIF (GStreamer_FIND_REQUIRED) -ENDIF (GSTREAMER_FOUND) +INCLUDE(FindPackageHandleStandardArgs) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(GStreamer DEFAULT_MSG GSTREAMER_LIBRARIES GSTREAMER_INCLUDE_DIR GSTREAMER_BASE_LIBRARY GSTREAMER_INTERFACE_LIBRARY) MARK_AS_ADVANCED(GSTREAMER_INCLUDE_DIR GSTREAMER_LIBRARIES GSTREAMER_BASE_LIBRARY GSTREAMER_INTERFACE_LIBRARY) diff --git a/modules/FindKDE4Internal.cmake b/modules/FindKDE4Internal.cmake index 486b3fe0..ee0100eb 100644 --- a/modules/FindKDE4Internal.cmake +++ b/modules/FindKDE4Internal.cmake @@ -194,12 +194,9 @@ # The resulting manpage will be installed to when using # INSTALL_DESTINATION , or to / if # SUBDIR is specified. - - -# _KDE4_PLATFORM_INCLUDE_DIRS is used only internally -# _KDE4_PLATFORM_DEFINITIONS is used only internally - -# Note on the possible values for CMAKE_BUILD_TYPE and how KDE handles +# +# +# A note on the possible values for CMAKE_BUILD_TYPE and how KDE handles # the flags for those buildtypes. FindKDE4Internal supports the values # Debug, Release, Relwithdebinfo, Profile and Debugfull # @@ -220,6 +217,9 @@ # It's also important to note that gcc cannot detect all warning conditions # unless the optimiser is active. +# _KDE4_PLATFORM_INCLUDE_DIRS is used only internally +# _KDE4_PLATFORM_DEFINITIONS is used only internally + # Copyright (c) 2006-2008, Alexander Neundorf # Copyright (c) 2006, Laurent Montel, # @@ -401,6 +401,7 @@ else (_kdeBootStrapping) find_library(KDE4_KJS_LIBRARY NAMES kjs PATHS ${KDE4_LIB_INSTALL_DIR} NO_DEFAULT_PATH ) set(KDE4_KJS_LIBS ${kjs_LIB_DEPENDS} ${KDE4_KJS_LIBRARY} ) + find_library(KDE4_KJSAPI_LIBRARY NAMES kjsapi PATHS ${KDE4_LIB_INSTALL_DIR} NO_DEFAULT_PATH ) set(KDE4_KJSAPI_LIBS ${kjsapi_LIB_DEPENDS} ${KDE4_KJSAPI_LIBRARY} ) diff --git a/modules/FindPCRE.cmake b/modules/FindPCRE.cmake index 56f015a8..ba2de623 100644 --- a/modules/FindPCRE.cmake +++ b/modules/FindPCRE.cmake @@ -17,23 +17,23 @@ if (PCRE_INCLUDE_DIR AND PCRE_PCREPOSIX_LIBRARY AND PCRE_PCRE_LIBRARY) endif (PCRE_INCLUDE_DIR AND PCRE_PCREPOSIX_LIBRARY AND PCRE_PCRE_LIBRARY) -IF (NOT WIN32) +if (NOT WIN32) # use pkg-config to get the directories and then use these values # in the FIND_PATH() and FIND_LIBRARY() calls - INCLUDE(UsePkgConfig) + include(UsePkgConfig) - PKGCONFIG(libpcre _PCREIncDir _PCRELinkDir _PCRELinkFlags _PCRECflags) -ENDIF (NOT WIN32) + pkgconfig(libpcre _PCREIncDir _PCRELinkDir _PCRELinkFlags _PCRECflags) +endif (NOT WIN32) -FIND_PATH(PCRE_INCLUDE_DIR pcre.h PATHS ${_PCREIncDir} PATH_SUFFIXES pcre) +find_path(PCRE_INCLUDE_DIR pcre.h PATHS ${_PCREIncDir} PATH_SUFFIXES pcre) -FIND_LIBRARY(PCRE_PCRE_LIBRARY NAMES pcre PATHS ${_PCRELinkDir}) +find_library(PCRE_PCRE_LIBRARY NAMES pcre PATHS ${_PCRELinkDir}) -FIND_LIBRARY(PCRE_PCREPOSIX_LIBRARY NAMES pcreposix PATHS ${_PCRELinkDir}) +find_library(PCRE_PCREPOSIX_LIBRARY NAMES pcreposix PATHS ${_PCRELinkDir}) include(FindPackageHandleStandardArgs) -FIND_PACKAGE_HANDLE_STANDARD_ARGS(PCRE DEFAULT_MSG PCRE_INCLUDE_DIR PCRE_PCRE_LIBRARY PCRE_PCREPOSIX_LIBRARY ) +find_package_handle_standard_args(PCRE DEFAULT_MSG PCRE_INCLUDE_DIR PCRE_PCRE_LIBRARY PCRE_PCREPOSIX_LIBRARY ) set(PCRE_LIBRARIES ${PCRE_PCRE_LIBRARY} ${PCRE_PCREPOSIX_LIBRARY}) -MARK_AS_ADVANCED(PCRE_INCLUDE_DIR PCRE_LIBRARIES PCRE_PCREPOSIX_LIBRARY PCRE_PCRE_LIBRARY) +mark_as_advanced(PCRE_INCLUDE_DIR PCRE_LIBRARIES PCRE_PCREPOSIX_LIBRARY PCRE_PCRE_LIBRARY) diff --git a/modules/FindSharedMimeInfo.cmake b/modules/FindSharedMimeInfo.cmake index 510c4992..707cb006 100644 --- a/modules/FindSharedMimeInfo.cmake +++ b/modules/FindSharedMimeInfo.cmake @@ -1,4 +1,7 @@ # - Try to find the shared-mime-info package +# +# SHARED_MIME_INFO_MINIMUM_VERSION - Set this to the minimum version you need, default is 0.18 +# # Once done this will define # # SHARED_MIME_INFO_FOUND - system has the shared-mime-info package @@ -61,9 +64,11 @@ macro(UPDATE_XDG_MIMETYPES _path) else("${_xdgmimeDir}" STREQUAL packages ) set(_xdgmimeDir "${_path}") endif("${_xdgmimeDir}" STREQUAL packages ) + install(CODE " set(DESTDIR_VALUE \"\$ENV{DESTDIR}\") if (NOT DESTDIR_VALUE) + # under Windows relative paths are used, that's why it runs from CMAKE_INSTALL_PREFIX execute_process(COMMAND ${UPDATE_MIME_DATABASE_EXECUTABLE} ${_xdgmimeDir} WORKING_DIRECTORY ${CMAKE_INSTALL_PREFIX}) endif (NOT DESTDIR_VALUE) -- cgit v1.2.1 From 08639d2275bd5b3fa5e479f3c2020d5269ee5a9b Mon Sep 17 00:00:00 2001 From: Alexander Neundorf Date: Sun, 20 Jul 2008 10:35:34 +0000 Subject: -rename XMLLINT_EXECUTABLE to LIBXML2_XMLLINT_EXECUTABLE so it follows the styleguide for cmake modules and is properly prefixed -document LIBXML2_XMLLINT_EXECUTABLE -keep XMLLINT_EXECUTABLE for backwards compat. with KDE 4.0.x -consistent casing -adapt config-kdoctools.h.cmake to LIBXML2_XMLLINT_EXECUTABLE Alex svn path=/trunk/KDE/kdelibs/; revision=835259 --- modules/FindLibXml2.cmake | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/modules/FindLibXml2.cmake b/modules/FindLibXml2.cmake index 5f23c184..bbe5e8b2 100644 --- a/modules/FindLibXml2.cmake +++ b/modules/FindLibXml2.cmake @@ -1,10 +1,11 @@ # - Try to find LibXml2 # Once done this will define # -# LIBXML2_FOUND - system has LibXml2 -# LIBXML2_INCLUDE_DIR - the LibXml2 include directory -# LIBXML2_LIBRARIES - the libraries needed to use LibXml2 +# LIBXML2_FOUND - System has LibXml2 +# LIBXML2_INCLUDE_DIR - The LibXml2 include directory +# LIBXML2_LIBRARIES - The libraries needed to use LibXml2 # LIBXML2_DEFINITIONS - Compiler switches required for using LibXml2 +# LIBXML2_XMLLINT_EXECUTABLE - The XML checking tool xmllint coming with LibXml2 # Copyright (c) 2006, Alexander Neundorf, # @@ -42,11 +43,13 @@ ELSE (LIBXML2_INCLUDE_DIR AND LIBXML2_LIBRARIES) SET(LIBXML2_FOUND FALSE) ENDIF (LIBXML2_INCLUDE_DIR AND LIBXML2_LIBRARIES) -FIND_PROGRAM(XMLLINT_EXECUTABLE xmllint) +FIND_PROGRAM(LIBXML2_XMLLINT_EXECUTABLE xmllint) +# for backwards compat. with KDE 4.0.x: +SET(XMLLINT_EXECUTABLE "${LIBXML2_XMLLINT_EXECUTABLE}") -if( NOT XMLLINT_EXECUTABLE ) +IF( NOT LIBXML2_XMLLINT_EXECUTABLE ) MESSAGE(STATUS "xmllint program not found. Install it if you want validate generated doc file.") -endif(NOT XMLLINT_EXECUTABLE ) +ENDIF(NOT LIBXML2_XMLLINT_EXECUTABLE ) IF (LIBXML2_FOUND) IF (NOT LibXml2_FIND_QUIETLY) @@ -58,5 +61,5 @@ ELSE (LIBXML2_FOUND) ENDIF (LibXml2_FIND_REQUIRED) ENDIF (LIBXML2_FOUND) -MARK_AS_ADVANCED(LIBXML2_INCLUDE_DIR LIBXML2_LIBRARIES XMLLINT_EXECUTABLE) +MARK_AS_ADVANCED(LIBXML2_INCLUDE_DIR LIBXML2_LIBRARIES LIBXML2_XMLLINT_EXECUTABLE) -- cgit v1.2.1 From d78a37149af30be50c9b6301887c5cbdc01a106f Mon Sep 17 00:00:00 2001 From: Alexander Neundorf Date: Sun, 20 Jul 2008 11:53:44 +0000 Subject: prefix KDE4_TARGET_LINK_INTERFACE_LIBRARIES with a "_", it is unused in svn and will be removed again for 4.2 I'd like to do the same in the 4.1 branch. Objections ? Alex CCMAIL: mueller@kde.org svn path=/trunk/KDE/kdelibs/; revision=835295 --- modules/KDE4Macros.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/KDE4Macros.cmake b/modules/KDE4Macros.cmake index 4374c6fe..ee689751 100644 --- a/modules/KDE4Macros.cmake +++ b/modules/KDE4Macros.cmake @@ -1116,11 +1116,11 @@ macro(_KDE4_EXPORT_LIBRARY_DEPENDENCIES _append_or_write _filename) endif(KDE4_ENABLE_EXPERIMENTAL_LIB_EXPORT AND UNIX)# AND NOT APPLE) endmacro(_KDE4_EXPORT_LIBRARY_DEPENDENCIES) -macro (KDE4_TARGET_LINK_INTERFACE_LIBRARIES _target _interface_libs) +macro (_KDE4_TARGET_LINK_INTERFACE_LIBRARIES _target _interface_libs) if(KDE4_ENABLE_EXPERIMENTAL_LIB_EXPORT AND UNIX )# AND NOT APPLE) set_target_properties("${_target}" PROPERTIES LINK_INTERFACE_LIBRARIES "${_interface_libs}") endif(KDE4_ENABLE_EXPERIMENTAL_LIB_EXPORT AND UNIX)# AND NOT APPLE) -endmacro (KDE4_TARGET_LINK_INTERFACE_LIBRARIES) +endmacro (_KDE4_TARGET_LINK_INTERFACE_LIBRARIES) macro (KDE4_INSTALL_HANDBOOK _lang) message(STATUS "KDE4_INSTALL_HANDBOOK() is deprecated. Remove it please. Now all is done in KDE4_CREATE_HANDBOOK.") -- cgit v1.2.1 From 09adc1e34b027d8be325ac2c3243f0cfdf090df4 Mon Sep 17 00:00:00 2001 From: Alexander Neundorf Date: Sun, 20 Jul 2008 17:39:58 +0000 Subject: add a message in case somebody stumbles about a KDE4_TARGET_LINK_INTERFACE_LIBRARIES() call that it has been renamed Alex svn path=/trunk/KDE/kdelibs/; revision=835491 --- modules/KDE4Macros.cmake | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modules/KDE4Macros.cmake b/modules/KDE4Macros.cmake index ee689751..c30973da 100644 --- a/modules/KDE4Macros.cmake +++ b/modules/KDE4Macros.cmake @@ -1122,6 +1122,10 @@ macro (_KDE4_TARGET_LINK_INTERFACE_LIBRARIES _target _interface_libs) endif(KDE4_ENABLE_EXPERIMENTAL_LIB_EXPORT AND UNIX)# AND NOT APPLE) endmacro (_KDE4_TARGET_LINK_INTERFACE_LIBRARIES) +macro (KDE4_TARGET_LINK_INTERFACE_LIBRARIES _target _interface_libs) + message(FATAL_ERROR "KDE4_TARGET_LINK_INTERFACE_LIBRARIES() has been renamed to _KDE4_TARGET_LINK_INTERFACE_LIBRARIES(), so use that instead") +endmacro (KDE4_TARGET_LINK_INTERFACE_LIBRARIES _target _interface_libs) + macro (KDE4_INSTALL_HANDBOOK _lang) message(STATUS "KDE4_INSTALL_HANDBOOK() is deprecated. Remove it please. Now all is done in KDE4_CREATE_HANDBOOK.") endmacro (KDE4_INSTALL_HANDBOOK ) -- cgit v1.2.1 From d87b53240577e1228d49dd309092b1aea5c8621b Mon Sep 17 00:00:00 2001 From: Alexander Neundorf Date: Sun, 20 Jul 2008 22:36:02 +0000 Subject: -consistent lowercasing -use mark_as_advanced() for the right variables (i.e. the ones which go into the cache) -also search for the old style header so we can give a better error message Alex svn path=/trunk/KDE/kdelibs/; revision=835669 --- modules/FindFFmpeg.cmake | 38 ++++++++++++++++++++++++++++++-------- 1 file changed, 30 insertions(+), 8 deletions(-) diff --git a/modules/FindFFmpeg.cmake b/modules/FindFFmpeg.cmake index 8baf0af7..16233510 100644 --- a/modules/FindFFmpeg.cmake +++ b/modules/FindFFmpeg.cmake @@ -17,13 +17,14 @@ if (FFMPEG_LIBRARIES)# AND FFMPEG_DEFINITIONS) set(FFMPEG_FOUND TRUE) else (FFMPEG_LIBRARIES)# AND FFMPEG_DEFINITIONS) -IF (NOT WIN32) + +if (NOT WIN32) # use pkg-config to get the directories and then use these values # in the FIND_PATH() and FIND_LIBRARY() calls - INCLUDE(UsePkgConfig) + include(UsePkgConfig) - PKGCONFIG(libavcodec _FFMPEGIncDir _FFMPEGLinkDir _FFMPEGLinkFlags _FFMPEGCflags) -ENDIF (NOT WIN32) + pkgconfig(libavcodec _FFMPEGIncDir _FFMPEGLinkDir _FFMPEGLinkFlags _FFMPEGCflags) +endif (NOT WIN32) #set(FFMPEG_DEFINITIONS ${_FFMPEGCflags}) # @@ -39,6 +40,15 @@ ENDIF (NOT WIN32) NO_DEFAULT_PATH ) + # also search for the old style include dir, just for the purpose + # of giving a useful error message if an old libavcodec is installed + # and the user might wonder why it is not found + find_path(FFMPEG_INCLUDE_DIR_OLD_STYLE ffmpeg/avcodec.h + PATHS + ${_FFMPEGIncDir} + NO_DEFAULT_PATH + ) + find_library(AVCODEC_LIBRARIES NAMES avcodec PATHS ${_FFMPEGLinkDir} @@ -70,21 +80,33 @@ ENDIF (NOT WIN32) set(FFMPEG_LIBRARIES ${FFMPEG_LIBRARIES} ${AVUTIL_LIBRARIES}) endif (AVUTIL_LIBRARIES) - if (FFMPEG_LIBRARIES) + if (FFMPEG_LIBRARIES AND FFMPEG_INCLUDE_DIR) set(FFMPEG_FOUND TRUE) - endif (FFMPEG_LIBRARIES) + endif (FFMPEG_LIBRARIES AND FFMPEG_INCLUDE_DIR) if (FFMPEG_FOUND) if (NOT FFmpeg_FIND_QUIETLY) message(STATUS "Found FFMPEG: ${FFMPEG_LIBRARIES} ${FFMPEG_INCLUDE_DIR}") endif (NOT FFmpeg_FIND_QUIETLY) else (FFMPEG_FOUND) + # only an old libavcodec was found ? + if (FFMPEG_INCLUDE_DIR_OLD_STYLE AND NOT FFMPEG_INCLUDE_DIR AND NOT FFmpeg_FIND_QUIETLY) + message(STATUS "Found old version of libavcodec, but a newer version is required.") + endif (FFMPEG_INCLUDE_DIR_OLD_STYLE AND NOT FFMPEG_INCLUDE_DIR AND NOT FFmpeg_FIND_QUIETLY) + if (FFmpeg_FIND_REQUIRED) message(FATAL_ERROR "Could NOT find FFMPEG") + else (FFmpeg_FIND_REQUIRED) + if (NOT FFmpeg_FIND_QUIETLY) + message(STATUS "Could NOT find FFMPEG") + endif (NOT FFmpeg_FIND_QUIETLY) endif (FFmpeg_FIND_REQUIRED) endif (FFMPEG_FOUND) - MARK_AS_ADVANCED(FFMPEG_LIBRARIES) - MARK_AS_ADVANCED(FFMPEG_INCLUDE_DIR) + mark_as_advanced(AVCODEC_LIBRARIES + AVFORMAT_LIBRARIES + AVUTIL_LIBRARIES + FFMPEG_INCLUDE_DIR + FFMPEG_INCLUDE_DIR_OLD_STYLE) endif (FFMPEG_LIBRARIES)# AND FFMPEG_DEFINITIONS) -- cgit v1.2.1 From 4e0138ca6cd56722c140c22c31b838d420173744 Mon Sep 17 00:00:00 2001 From: Laurent Montel Date: Mon, 21 Jul 2008 11:09:49 +0000 Subject: Be sure that we defined TAGLIB_INCLUDES svn path=/trunk/KDE/kdelibs/; revision=835837 --- modules/FindTaglib.cmake | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/modules/FindTaglib.cmake b/modules/FindTaglib.cmake index 3edfdb4a..ad1e1010 100644 --- a/modules/FindTaglib.cmake +++ b/modules/FindTaglib.cmake @@ -42,9 +42,10 @@ if(TAGLIBCONFIG_EXECUTABLE) set(TAGLIB_FOUND TRUE) message(STATUS "Found taglib: ${TAGLIB_LIBRARIES}") endif(TAGLIB_LIBRARIES AND TAGLIB_CFLAGS) - + string(REGEX REPLACE " *-I" ";" TAGLIB_CFLAGS "${TAGLIB_CFLAGS}") + set(TAGLIB_INCLUDES ${TAGLIB_CFLAGS}) endif(TAGLIB_VERSION STRLESS "${TAGLIB_MIN_VERSION}") - mark_as_advanced(TAGLIB_CFLAGS TAGLIB_LIBRARIES) + mark_as_advanced(TAGLIB_CFLAGS TAGLIB_LIBRARIES TAGLIB_INCLUDES) else(TAGLIBCONFIG_EXECUTABLE) -- cgit v1.2.1 From 80377f8c74f047b0adefdcfa13d6340dbdaf98e7 Mon Sep 17 00:00:00 2001 From: Alexander Neundorf Date: Mon, 21 Jul 2008 19:19:06 +0000 Subject: -also disable _KDE4_TARGET_LINK_INTERFACE_LIBRARIES() and use the renamed LINK_INTERFACE_LIBRARIES target property instead: set_target_properties(foo PROPERTIES ${KDE4_DISABLE_PROPERTY_}LINK_INTERFACE_LIBRARIES "kdeui;kdecore" ) While this doesn't look very nice, it is completely forward and backward compatible (i.e. cmake 2.4 doesn't complain, cmake 2.6 works, both versions work as soon as the reduced link interface is the default (soon), if somebody uses this with kdelibs which don't have that anymore he will get the reduced interface instead of errors, so all should be ok) Alex CCMAIL: mueller@kde.org svn path=/trunk/KDE/kdelibs/; revision=836131 --- modules/FindKDE4Internal.cmake | 17 ++++++++++++++++- modules/KDE4Macros.cmake | 6 ++---- 2 files changed, 18 insertions(+), 5 deletions(-) diff --git a/modules/FindKDE4Internal.cmake b/modules/FindKDE4Internal.cmake index ee0100eb..abe6bea3 100644 --- a/modules/FindKDE4Internal.cmake +++ b/modules/FindKDE4Internal.cmake @@ -493,9 +493,24 @@ 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") -# this one enables the smaller link interface for libs on UNIX (exceot OSX) +# this one enables the smaller link interface for libs on UNIX +set(KDE4_DISABLE_PROPERTY_ ) if(UNIX )# AND NOT APPLE) option(KDE4_ENABLE_EXPERIMENTAL_LIB_EXPORT "Enable the experimental reduced library exports" FALSE) + # The purpose of the KDE4_DISABLE_PROPERTY_ variable is to be used as a prefix for + # the target property LINK_INTERFACE_LIBRARIES. If it is empty, the property will have its + # correct name, if it's not empty, it will be a different name, i.e. the actual property + # will not be set, i.e. disabled. See kdelibs/kdecore/CMakeLists.txt for an example. + # This will be removed again as soon as we require cmake >= 2.6.0. + # If enabled, make it empty, so the property will keep it's actual name. + if (KDE4_ENABLE_EXPERIMENTAL_LIB_EXPORT) + set(KDE4_DISABLE_PROPERTY_ ) + else (KDE4_ENABLE_EXPERIMENTAL_LIB_EXPORT) + # If disabled, make it non-empty, so the property name will change from "LINK_INTERFACE_LIBRARIES" + # to "DISABLED_LINK_INTERFACE_LIBRARIES", which is a different (non-existing) target property, and so + # setting that property won't have an effect + set(KDE4_DISABLE_PROPERTY_ "DISABLED_") + endif (KDE4_ENABLE_EXPERIMENTAL_LIB_EXPORT) endif(UNIX)# AND NOT APPLE) diff --git a/modules/KDE4Macros.cmake b/modules/KDE4Macros.cmake index c30973da..768a36e2 100644 --- a/modules/KDE4Macros.cmake +++ b/modules/KDE4Macros.cmake @@ -1117,13 +1117,11 @@ macro(_KDE4_EXPORT_LIBRARY_DEPENDENCIES _append_or_write _filename) endmacro(_KDE4_EXPORT_LIBRARY_DEPENDENCIES) macro (_KDE4_TARGET_LINK_INTERFACE_LIBRARIES _target _interface_libs) - if(KDE4_ENABLE_EXPERIMENTAL_LIB_EXPORT AND UNIX )# AND NOT APPLE) - set_target_properties("${_target}" PROPERTIES LINK_INTERFACE_LIBRARIES "${_interface_libs}") - endif(KDE4_ENABLE_EXPERIMENTAL_LIB_EXPORT AND UNIX)# AND NOT APPLE) + message(FATAL_ERROR "_KDE4_TARGET_LINK_INTERFACE_LIBRARIES() doesn't exist anymore. Set the LINK_INTERFACE_LIBRARIES target property instead. See kdelibs/kdecore/CMakeLists.txt for an example.") endmacro (_KDE4_TARGET_LINK_INTERFACE_LIBRARIES) macro (KDE4_TARGET_LINK_INTERFACE_LIBRARIES _target _interface_libs) - message(FATAL_ERROR "KDE4_TARGET_LINK_INTERFACE_LIBRARIES() has been renamed to _KDE4_TARGET_LINK_INTERFACE_LIBRARIES(), so use that instead") + message(FATAL_ERROR "KDE4_TARGET_LINK_INTERFACE_LIBRARIES() doesn't exist anymore. Set the LINK_INTERFACE_LIBRARIES target property instead. See kdelibs/kdecore/CMakeLists.txt for an example.") endmacro (KDE4_TARGET_LINK_INTERFACE_LIBRARIES _target _interface_libs) macro (KDE4_INSTALL_HANDBOOK _lang) -- cgit v1.2.1 From 8d9efc2b285ef9f5dff75958a659eb20bb239d69 Mon Sep 17 00:00:00 2001 From: Laurent Montel Date: Mon, 21 Jul 2008 20:23:58 +0000 Subject: Better to not change TAGLIB_CFLAGS svn path=/trunk/KDE/kdelibs/; revision=836159 --- modules/FindTaglib.cmake | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/modules/FindTaglib.cmake b/modules/FindTaglib.cmake index ad1e1010..5bbb8ee1 100644 --- a/modules/FindTaglib.cmake +++ b/modules/FindTaglib.cmake @@ -42,8 +42,7 @@ if(TAGLIBCONFIG_EXECUTABLE) set(TAGLIB_FOUND TRUE) message(STATUS "Found taglib: ${TAGLIB_LIBRARIES}") endif(TAGLIB_LIBRARIES AND TAGLIB_CFLAGS) - string(REGEX REPLACE " *-I" ";" TAGLIB_CFLAGS "${TAGLIB_CFLAGS}") - set(TAGLIB_INCLUDES ${TAGLIB_CFLAGS}) + string(REGEX REPLACE " *-I" ";" TAGLIB_INCLUDES "${TAGLIB_CFLAGS}") endif(TAGLIB_VERSION STRLESS "${TAGLIB_MIN_VERSION}") mark_as_advanced(TAGLIB_CFLAGS TAGLIB_LIBRARIES TAGLIB_INCLUDES) -- cgit v1.2.1 From eac9e3fbd8ebd93c3847be8dd2413382f9d4a352 Mon Sep 17 00:00:00 2001 From: Christian Ehrlicher Date: Mon, 21 Jul 2008 21:14:57 +0000 Subject: fix automoc4 for msvc as discussed on kde-buildsystem svn path=/trunk/KDE/kdelibs/; revision=836190 --- modules/KDE4Macros.cmake | 27 ++++++++++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-) diff --git a/modules/KDE4Macros.cmake b/modules/KDE4Macros.cmake index 768a36e2..23943590 100644 --- a/modules/KDE4Macros.cmake +++ b/modules/KDE4Macros.cmake @@ -552,13 +552,20 @@ macro (KDE4_ADD_PLUGIN _target_NAME _with_PREFIX) endif (${_with_PREFIX} STREQUAL "WITH_PREFIX") set(_SRCS ${_first_SRC} ${ARGN}) - kde4_handle_automoc(${_target_NAME} _SRCS) + if(MSVC) + add_automoc4_target("${_target_NAME}_automoc" _SRCS) + else(MSVC) + automoc4(${_target_NAME} _SRCS) + endif(MSVC) if (KDE4_ENABLE_FINAL) kde4_create_final_files(${CMAKE_CURRENT_BINARY_DIR}/${_target_NAME}_final_cpp.cpp _separate_files ${_SRCS}) add_library(${_target_NAME} MODULE ${CMAKE_CURRENT_BINARY_DIR}/${_target_NAME}_final_cpp.cpp ${_separate_files}) else (KDE4_ENABLE_FINAL) add_library(${_target_NAME} MODULE ${_SRCS}) endif (KDE4_ENABLE_FINAL) + if(MSVC) + add_dependencies(${_target_NAME} "${_target_NAME}_automoc") + endif(MSVC) if (_first_SRC) set_target_properties(${_target_NAME} PROPERTIES PREFIX "") @@ -802,13 +809,20 @@ macro (KDE4_ADD_EXECUTABLE _target_NAME) set(_add_executable_param ${_add_executable_param} EXCLUDE_FROM_ALL) endif (_test AND NOT KDE4_BUILD_TESTS) - kde4_handle_automoc(${_target_NAME} _SRCS) + if(MSVC) + add_automoc4_target("${_target_NAME}_automoc" _SRCS) + else(MSVC) + automoc4(${_target_NAME} _SRCS) + endif(MSVC) if (KDE4_ENABLE_FINAL) kde4_create_final_files(${CMAKE_CURRENT_BINARY_DIR}/${_target_NAME}_final_cpp.cpp _separate_files ${_SRCS}) add_executable(${_target_NAME} ${_add_executable_param} ${CMAKE_CURRENT_BINARY_DIR}/${_target_NAME}_final_cpp.cpp ${_separate_files}) else (KDE4_ENABLE_FINAL) add_executable(${_target_NAME} ${_add_executable_param} ${_SRCS}) endif (KDE4_ENABLE_FINAL) + if(MSVC) + add_dependencies(${_target_NAME} "${_target_NAME}_automoc") + endif(MSVC) if (_test) set_target_properties(${_target_NAME} PROPERTIES COMPILE_FLAGS -DKDESRCDIR="\\"${CMAKE_CURRENT_SOURCE_DIR}\\"") @@ -843,13 +857,20 @@ macro (KDE4_ADD_LIBRARY _target_NAME _lib_TYPE) endif (${_lib_TYPE} STREQUAL "MODULE") set(_SRCS ${_first_SRC} ${ARGN}) - kde4_handle_automoc(${_target_NAME} _SRCS) + if(MSVC) + add_automoc4_target("${_target_NAME}_automoc" _SRCS) + else(MSVC) + automoc4(${_target_NAME} _SRCS) + endif(MSVC) if (KDE4_ENABLE_FINAL) kde4_create_final_files(${CMAKE_CURRENT_BINARY_DIR}/${_target_NAME}_final_cpp.cpp _separate_files ${_SRCS}) add_library(${_target_NAME} ${_add_lib_param} ${CMAKE_CURRENT_BINARY_DIR}/${_target_NAME}_final_cpp.cpp ${_separate_files}) else (KDE4_ENABLE_FINAL) add_library(${_target_NAME} ${_add_lib_param} ${_SRCS}) endif (KDE4_ENABLE_FINAL) + if(MSVC) + add_dependencies(${_target_NAME} "${_target_NAME}_automoc") + endif(MSVC) kde4_handle_rpath_for_library(${_target_NAME}) -- cgit v1.2.1 From 84ec6ed78d78cd11ba2b37b1b641d5c878d2ddd7 Mon Sep 17 00:00:00 2001 From: Ralf Habacker Date: Tue, 22 Jul 2008 08:57:44 +0000 Subject: corrected doc svn path=/trunk/KDE/kdelibs/; revision=836434 --- modules/FindKDEWIN.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/FindKDEWIN.cmake b/modules/FindKDEWIN.cmake index 550d11d3..dfd7d071 100644 --- a/modules/FindKDEWIN.cmake +++ b/modules/FindKDEWIN.cmake @@ -1,4 +1,4 @@ -# - Try to find the directory in which the kdewin32 library and other win32 related libraries lives +# - Try to find the directory in which the kde windows supplementary libraries are living # # used environment vars # KDEWIN_DIR - kdewin root dir -- cgit v1.2.1 From 520c0acdb8b9f93f54a18a73ef203ec7e9e44756 Mon Sep 17 00:00:00 2001 From: Alexander Neundorf Date: Tue, 22 Jul 2008 22:50:07 +0000 Subject: -fix linking on Windows, here by default the LINK_INTERFACE_LIBRARIES properties was set, while it was intended that by default it shouldn't be set Alex CCMAIL: kde-windows@kde.org svn path=/trunk/KDE/kdelibs/; revision=836766 --- modules/FindKDE4Internal.cmake | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/modules/FindKDE4Internal.cmake b/modules/FindKDE4Internal.cmake index abe6bea3..a4173664 100644 --- a/modules/FindKDE4Internal.cmake +++ b/modules/FindKDE4Internal.cmake @@ -493,23 +493,25 @@ 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") -# this one enables the smaller link interface for libs on UNIX -set(KDE4_DISABLE_PROPERTY_ ) +# This option enables the reduced link interface for libs on UNIX +# +# The purpose of the KDE4_DISABLE_PROPERTY_ variable is to be used as a prefix for +# the target property LINK_INTERFACE_LIBRARIES. If it is empty, the property will have its +# correct name, if it's not empty, it will be a different name, i.e. the actual property +# will not be set, i.e. disabled. See kdelibs/kdecore/CMakeLists.txt for an example. +# +# By default (i.e. also for Windows) make it non-empty, so the property name will +# change from "LINK_INTERFACE_LIBRARIES" to "DISABLED_LINK_INTERFACE_LIBRARIES", +# which is a different (non-existing) target property, and so setting that property +# won't have an effect +set(KDE4_DISABLE_PROPERTY_ "DISABLED_") + if(UNIX )# AND NOT APPLE) option(KDE4_ENABLE_EXPERIMENTAL_LIB_EXPORT "Enable the experimental reduced library exports" FALSE) - # The purpose of the KDE4_DISABLE_PROPERTY_ variable is to be used as a prefix for - # the target property LINK_INTERFACE_LIBRARIES. If it is empty, the property will have its - # correct name, if it's not empty, it will be a different name, i.e. the actual property - # will not be set, i.e. disabled. See kdelibs/kdecore/CMakeLists.txt for an example. - # This will be removed again as soon as we require cmake >= 2.6.0. # If enabled, make it empty, so the property will keep it's actual name. + # and the LINK_INTERFACE_LIBRARIES property will be set. if (KDE4_ENABLE_EXPERIMENTAL_LIB_EXPORT) set(KDE4_DISABLE_PROPERTY_ ) - else (KDE4_ENABLE_EXPERIMENTAL_LIB_EXPORT) - # If disabled, make it non-empty, so the property name will change from "LINK_INTERFACE_LIBRARIES" - # to "DISABLED_LINK_INTERFACE_LIBRARIES", which is a different (non-existing) target property, and so - # setting that property won't have an effect - set(KDE4_DISABLE_PROPERTY_ "DISABLED_") endif (KDE4_ENABLE_EXPERIMENTAL_LIB_EXPORT) endif(UNIX)# AND NOT APPLE) -- cgit v1.2.1 From 0021044744fe12e9f601eb37207d31be277466d0 Mon Sep 17 00:00:00 2001 From: Christian Ehrlicher Date: Wed, 23 Jul 2008 18:19:11 +0000 Subject: enable KDE4_ENABLE_EXPERIMENTAL_LIB for windows too - kdelibs compiles fine with this option svn path=/trunk/KDE/kdelibs/; revision=837076 --- modules/FindKDE4Internal.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/FindKDE4Internal.cmake b/modules/FindKDE4Internal.cmake index a4173664..ed2eb31b 100644 --- a/modules/FindKDE4Internal.cmake +++ b/modules/FindKDE4Internal.cmake @@ -506,14 +506,14 @@ option(KDE4_ENABLE_HTMLHANDBOOK "Create targets htmlhandbook for creating the h # won't have an effect set(KDE4_DISABLE_PROPERTY_ "DISABLED_") -if(UNIX )# AND NOT APPLE) +if(UNIX OR WIN32)# AND NOT APPLE) option(KDE4_ENABLE_EXPERIMENTAL_LIB_EXPORT "Enable the experimental reduced library exports" FALSE) # If enabled, make it empty, so the property will keep it's actual name. # and the LINK_INTERFACE_LIBRARIES property will be set. if (KDE4_ENABLE_EXPERIMENTAL_LIB_EXPORT) set(KDE4_DISABLE_PROPERTY_ ) endif (KDE4_ENABLE_EXPERIMENTAL_LIB_EXPORT) -endif(UNIX)# AND NOT APPLE) +endif(UNIX OR WIN32)# AND NOT APPLE) if( KDE4_ENABLE_FINAL) -- cgit v1.2.1 From 3edd4013064ea436f4088b96d9fa883e2cda7809 Mon Sep 17 00:00:00 2001 From: Christian Ehrlicher Date: Wed, 23 Jul 2008 20:02:17 +0000 Subject: remove the condition around KDE4_ENABLE_EXPERIMENTAL_LIB completely svn path=/trunk/KDE/kdelibs/; revision=837109 --- modules/FindKDE4Internal.cmake | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/modules/FindKDE4Internal.cmake b/modules/FindKDE4Internal.cmake index ed2eb31b..48692482 100644 --- a/modules/FindKDE4Internal.cmake +++ b/modules/FindKDE4Internal.cmake @@ -506,14 +506,12 @@ option(KDE4_ENABLE_HTMLHANDBOOK "Create targets htmlhandbook for creating the h # won't have an effect set(KDE4_DISABLE_PROPERTY_ "DISABLED_") -if(UNIX OR WIN32)# AND NOT APPLE) - option(KDE4_ENABLE_EXPERIMENTAL_LIB_EXPORT "Enable the experimental reduced library exports" FALSE) - # If enabled, make it empty, so the property will keep it's actual name. - # and the LINK_INTERFACE_LIBRARIES property will be set. - if (KDE4_ENABLE_EXPERIMENTAL_LIB_EXPORT) - set(KDE4_DISABLE_PROPERTY_ ) - endif (KDE4_ENABLE_EXPERIMENTAL_LIB_EXPORT) -endif(UNIX OR WIN32)# AND NOT APPLE) +option(KDE4_ENABLE_EXPERIMENTAL_LIB_EXPORT "Enable the experimental reduced library exports" FALSE) +# If enabled, make it empty, so the property will keep it's actual name. +# and the LINK_INTERFACE_LIBRARIES property will be set. +if (KDE4_ENABLE_EXPERIMENTAL_LIB_EXPORT) + set(KDE4_DISABLE_PROPERTY_ ) +endif (KDE4_ENABLE_EXPERIMENTAL_LIB_EXPORT) if( KDE4_ENABLE_FINAL) -- cgit v1.2.1 From 79a8944216a50da283f76e897f657aa45032dd3c Mon Sep 17 00:00:00 2001 From: Allen Winter Date: Thu, 24 Jul 2008 15:25:54 +0000 Subject: compute variables for SOPRANO_PLUGIN_FOO_FOUND tidy up a bit CCMAIL: trueg@kde.org svn path=/trunk/KDE/kdelibs/; revision=837396 --- modules/FindSoprano.cmake | 74 ++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 60 insertions(+), 14 deletions(-) diff --git a/modules/FindSoprano.cmake b/modules/FindSoprano.cmake index 0cc278b0..203a2fdc 100644 --- a/modules/FindSoprano.cmake +++ b/modules/FindSoprano.cmake @@ -10,6 +10,13 @@ # SOPRANO_SERVER_LIBRARIES - The Soprano server library (libsopranoserver) # SOPRANO_VERSION - The Soprano version (string value) # +# SOPRANO_PLUGIN_NQUADPARSER_FOUND - true if the nquadparser plugin is found +# SOPRANO_PLUGIN_NQUADSERIALIZER_FOUND - true if the nquadserializer plugin is found +# SOPRANO_PLUGIN_RAPTORPARSER_FOUND - true if the raptorparser plugin is found +# SOPRANO_PLUGIN_RAPTORSERIALIZER_FOUND - true if the raptorserializer plugin is found +# SOPRANO_PLUGIN_REDLANDBACKEND_FOUND - true if the redlandbackend plugin is found +# SOPRANO_PLUGIN_SESAME2BACKEND_FOUND - true if the sesame2backend plugin is found + # Options: # Set SOPRANO_MIN_VERSION to set the minimum required Soprano version (default: 1.99) # @@ -23,9 +30,9 @@ # set(SopranoIndex_FOUND TRUE) #else(SOPRANO_INCLUDE_DIR AND SOPRANO_LIBRARIES AND SOPRANO_INDEX_LIBRARIES AND SOPRANO_SERVER_LIBRARIES) - INCLUDE(FindLibraryWithDebug) + include(FindLibraryWithDebug) - FIND_PATH(SOPRANO_INCLUDE_DIR + find_path(SOPRANO_INCLUDE_DIR NAMES soprano/soprano.h PATHS @@ -33,7 +40,7 @@ ${INCLUDE_INSTALL_DIR} ) - FIND_LIBRARY_WITH_DEBUG(SOPRANO_INDEX_LIBRARIES + find_library_with_debug(SOPRANO_INDEX_LIBRARIES WIN32_DEBUG_POSTFIX d NAMES sopranoindex @@ -42,7 +49,7 @@ ${LIB_INSTALL_DIR} ) - FIND_LIBRARY_WITH_DEBUG(SOPRANO_CLIENT_LIBRARIES + find_library_with_debug(SOPRANO_CLIENT_LIBRARIES WIN32_DEBUG_POSTFIX d NAMES sopranoclient @@ -51,7 +58,7 @@ ${LIB_INSTALL_DIR} ) - FIND_LIBRARY_WITH_DEBUG(SOPRANO_LIBRARIES + find_library_with_debug(SOPRANO_LIBRARIES WIN32_DEBUG_POSTFIX d NAMES soprano PATHS @@ -59,7 +66,7 @@ ${LIB_INSTALL_DIR} ) - FIND_LIBRARY_WITH_DEBUG(SOPRANO_SERVER_LIBRARIES + find_library_with_debug(SOPRANO_SERVER_LIBRARIES WIN32_DEBUG_POSTFIX d NAMES sopranoserver @@ -89,15 +96,15 @@ # check Soprano version # We set a default for the minimum required version to be backwards compatible - IF(NOT SOPRANO_MIN_VERSION) - SET(SOPRANO_MIN_VERSION "1.99") - ENDIF(NOT SOPRANO_MIN_VERSION) + if(NOT SOPRANO_MIN_VERSION) + set(SOPRANO_MIN_VERSION "1.99") + endif(NOT SOPRANO_MIN_VERSION) if(Soprano_FOUND) - FILE(READ ${SOPRANO_INCLUDE_DIR}/soprano/version.h SOPRANO_VERSION_CONTENT) - STRING(REGEX MATCH "SOPRANO_VERSION_STRING \".*\"\n" SOPRANO_VERSION_MATCH ${SOPRANO_VERSION_CONTENT}) - IF (SOPRANO_VERSION_MATCH) - STRING(REGEX REPLACE "SOPRANO_VERSION_STRING \"(.*)\"\n" "\\1" SOPRANO_VERSION ${SOPRANO_VERSION_MATCH}) + file(READ ${SOPRANO_INCLUDE_DIR}/soprano/version.h SOPRANO_VERSION_CONTENT) + string(REGEX MATCH "SOPRANO_VERSION_STRING \".*\"\n" SOPRANO_VERSION_MATCH ${SOPRANO_VERSION_CONTENT}) + if(SOPRANO_VERSION_MATCH) + string(REGEX REPLACE "SOPRANO_VERSION_STRING \"(.*)\"\n" "\\1" SOPRANO_VERSION ${SOPRANO_VERSION_MATCH}) if(SOPRANO_VERSION STRLESS "${SOPRANO_MIN_VERSION}") set(Soprano_FOUND FALSE) if(Soprano_FIND_REQUIRED) @@ -106,15 +113,54 @@ message(STATUS "Soprano version ${SOPRANO_VERSION} is too old. Please install ${SOPRANO_MIN_VERSION} or newer") endif(Soprano_FIND_REQUIRED) endif(SOPRANO_VERSION STRLESS "${SOPRANO_MIN_VERSION}") - ENDIF (SOPRANO_VERSION_MATCH) + endif(SOPRANO_VERSION_MATCH) endif(Soprano_FOUND) + #look for parser plugins + if(Soprano_FOUND) + set(SOPRANO_PLUGIN_DIR ${KDE4_DATA_DIR}) + string(REGEX REPLACE "apps.*$" "" SOPRANO_PLUGIN_DIR ${SOPRANO_PLUGIN_DIR}) + set(SOPRANO_PLUGIN_DIR "${SOPRANO_PLUGIN_DIR}/soprano/plugins") + + if(EXISTS ${SOPRANO_PLUGIN_DIR}/nquadparser.desktop) + set(SOPRANO_PLUGIN_NQUADPARSER_FOUND TRUE) + set(_plugins "${_plugins} nquadparser") + endif(EXISTS ${SOPRANO_PLUGIN_DIR}/nquadparser.desktop) + + if(EXISTS ${SOPRANO_PLUGIN_DIR}/nquadserializer.desktop) + set(SOPRANO_PLUGIN_NQUADSERIALIZER_FOUND TRUE) + set(_plugins "${_plugins} nquadserializer") + endif(EXISTS ${SOPRANO_PLUGIN_DIR}/nquadserializer.desktop) + + if(EXISTS ${SOPRANO_PLUGIN_DIR}/raptorparser.desktop) + set(SOPRANO_PLUGIN_RAPTORPARSER_FOUND TRUE) + set(_plugins "${_plugins} raptorparser") + endif(EXISTS ${SOPRANO_PLUGIN_DIR}/raptorparser.desktop) + + if(EXISTS ${SOPRANO_PLUGIN_DIR}/raptorserializer.desktop) + set(SOPRANO_PLUGIN_RAPTORSERIALIZER_FOUND TRUE) + set(_plugins "${_plugins} raptorserializer") + endif(EXISTS ${SOPRANO_PLUGIN_DIR}/raptorserializer.desktop) + + if(EXISTS ${SOPRANO_PLUGIN_DIR}/redlandbackend.desktop) + set(SOPRANO_PLUGIN_REDLANDBACKEND_FOUND TRUE) + set(_plugins "${_plugins} redlandbackend") + endif(EXISTS ${SOPRANO_PLUGIN_DIR}/redlandbackend.desktop) + + if(EXISTS ${SOPRANO_PLUGIN_DIR}/sesame2backend.desktop) + set(SOPRANO_PLUGIN_SESAME2BACKEND_FOUND TRUE) + set(_plugins "${_plugins} sesame2backend") + endif(EXISTS ${SOPRANO_PLUGIN_DIR}/sesame2backend.desktop) + + endif(Soprano_FOUND) + if(Soprano_FOUND) if(NOT Soprano_FIND_QUIETLY) message(STATUS "Found Soprano: ${SOPRANO_LIBRARIES}") message(STATUS "Found Soprano includes: ${SOPRANO_INCLUDE_DIR}") message(STATUS "Found Soprano Index: ${SOPRANO_INDEX_LIBRARIES}") message(STATUS "Found Soprano Client: ${SOPRANO_CLIENT_LIBRARIES}") + message(STATUS "Found Sopranos Plugins: ${_plugins}") endif(NOT Soprano_FIND_QUIETLY) else(Soprano_FOUND) if(Soprano_FIND_REQUIRED) -- cgit v1.2.1 From 71addb9f8d97b07ba3a017527d765499a73f9995 Mon Sep 17 00:00:00 2001 From: Allen Winter Date: Thu, 24 Jul 2008 16:44:36 +0000 Subject: revert. no ready yet. svn path=/trunk/KDE/kdelibs/; revision=837419 --- modules/FindSoprano.cmake | 74 +++++++++-------------------------------------- 1 file changed, 14 insertions(+), 60 deletions(-) diff --git a/modules/FindSoprano.cmake b/modules/FindSoprano.cmake index 203a2fdc..0cc278b0 100644 --- a/modules/FindSoprano.cmake +++ b/modules/FindSoprano.cmake @@ -10,13 +10,6 @@ # SOPRANO_SERVER_LIBRARIES - The Soprano server library (libsopranoserver) # SOPRANO_VERSION - The Soprano version (string value) # -# SOPRANO_PLUGIN_NQUADPARSER_FOUND - true if the nquadparser plugin is found -# SOPRANO_PLUGIN_NQUADSERIALIZER_FOUND - true if the nquadserializer plugin is found -# SOPRANO_PLUGIN_RAPTORPARSER_FOUND - true if the raptorparser plugin is found -# SOPRANO_PLUGIN_RAPTORSERIALIZER_FOUND - true if the raptorserializer plugin is found -# SOPRANO_PLUGIN_REDLANDBACKEND_FOUND - true if the redlandbackend plugin is found -# SOPRANO_PLUGIN_SESAME2BACKEND_FOUND - true if the sesame2backend plugin is found - # Options: # Set SOPRANO_MIN_VERSION to set the minimum required Soprano version (default: 1.99) # @@ -30,9 +23,9 @@ # set(SopranoIndex_FOUND TRUE) #else(SOPRANO_INCLUDE_DIR AND SOPRANO_LIBRARIES AND SOPRANO_INDEX_LIBRARIES AND SOPRANO_SERVER_LIBRARIES) - include(FindLibraryWithDebug) + INCLUDE(FindLibraryWithDebug) - find_path(SOPRANO_INCLUDE_DIR + FIND_PATH(SOPRANO_INCLUDE_DIR NAMES soprano/soprano.h PATHS @@ -40,7 +33,7 @@ ${INCLUDE_INSTALL_DIR} ) - find_library_with_debug(SOPRANO_INDEX_LIBRARIES + FIND_LIBRARY_WITH_DEBUG(SOPRANO_INDEX_LIBRARIES WIN32_DEBUG_POSTFIX d NAMES sopranoindex @@ -49,7 +42,7 @@ ${LIB_INSTALL_DIR} ) - find_library_with_debug(SOPRANO_CLIENT_LIBRARIES + FIND_LIBRARY_WITH_DEBUG(SOPRANO_CLIENT_LIBRARIES WIN32_DEBUG_POSTFIX d NAMES sopranoclient @@ -58,7 +51,7 @@ ${LIB_INSTALL_DIR} ) - find_library_with_debug(SOPRANO_LIBRARIES + FIND_LIBRARY_WITH_DEBUG(SOPRANO_LIBRARIES WIN32_DEBUG_POSTFIX d NAMES soprano PATHS @@ -66,7 +59,7 @@ ${LIB_INSTALL_DIR} ) - find_library_with_debug(SOPRANO_SERVER_LIBRARIES + FIND_LIBRARY_WITH_DEBUG(SOPRANO_SERVER_LIBRARIES WIN32_DEBUG_POSTFIX d NAMES sopranoserver @@ -96,15 +89,15 @@ # check Soprano version # We set a default for the minimum required version to be backwards compatible - if(NOT SOPRANO_MIN_VERSION) - set(SOPRANO_MIN_VERSION "1.99") - endif(NOT SOPRANO_MIN_VERSION) + IF(NOT SOPRANO_MIN_VERSION) + SET(SOPRANO_MIN_VERSION "1.99") + ENDIF(NOT SOPRANO_MIN_VERSION) if(Soprano_FOUND) - file(READ ${SOPRANO_INCLUDE_DIR}/soprano/version.h SOPRANO_VERSION_CONTENT) - string(REGEX MATCH "SOPRANO_VERSION_STRING \".*\"\n" SOPRANO_VERSION_MATCH ${SOPRANO_VERSION_CONTENT}) - if(SOPRANO_VERSION_MATCH) - string(REGEX REPLACE "SOPRANO_VERSION_STRING \"(.*)\"\n" "\\1" SOPRANO_VERSION ${SOPRANO_VERSION_MATCH}) + FILE(READ ${SOPRANO_INCLUDE_DIR}/soprano/version.h SOPRANO_VERSION_CONTENT) + STRING(REGEX MATCH "SOPRANO_VERSION_STRING \".*\"\n" SOPRANO_VERSION_MATCH ${SOPRANO_VERSION_CONTENT}) + IF (SOPRANO_VERSION_MATCH) + STRING(REGEX REPLACE "SOPRANO_VERSION_STRING \"(.*)\"\n" "\\1" SOPRANO_VERSION ${SOPRANO_VERSION_MATCH}) if(SOPRANO_VERSION STRLESS "${SOPRANO_MIN_VERSION}") set(Soprano_FOUND FALSE) if(Soprano_FIND_REQUIRED) @@ -113,54 +106,15 @@ message(STATUS "Soprano version ${SOPRANO_VERSION} is too old. Please install ${SOPRANO_MIN_VERSION} or newer") endif(Soprano_FIND_REQUIRED) endif(SOPRANO_VERSION STRLESS "${SOPRANO_MIN_VERSION}") - endif(SOPRANO_VERSION_MATCH) + ENDIF (SOPRANO_VERSION_MATCH) endif(Soprano_FOUND) - #look for parser plugins - if(Soprano_FOUND) - set(SOPRANO_PLUGIN_DIR ${KDE4_DATA_DIR}) - string(REGEX REPLACE "apps.*$" "" SOPRANO_PLUGIN_DIR ${SOPRANO_PLUGIN_DIR}) - set(SOPRANO_PLUGIN_DIR "${SOPRANO_PLUGIN_DIR}/soprano/plugins") - - if(EXISTS ${SOPRANO_PLUGIN_DIR}/nquadparser.desktop) - set(SOPRANO_PLUGIN_NQUADPARSER_FOUND TRUE) - set(_plugins "${_plugins} nquadparser") - endif(EXISTS ${SOPRANO_PLUGIN_DIR}/nquadparser.desktop) - - if(EXISTS ${SOPRANO_PLUGIN_DIR}/nquadserializer.desktop) - set(SOPRANO_PLUGIN_NQUADSERIALIZER_FOUND TRUE) - set(_plugins "${_plugins} nquadserializer") - endif(EXISTS ${SOPRANO_PLUGIN_DIR}/nquadserializer.desktop) - - if(EXISTS ${SOPRANO_PLUGIN_DIR}/raptorparser.desktop) - set(SOPRANO_PLUGIN_RAPTORPARSER_FOUND TRUE) - set(_plugins "${_plugins} raptorparser") - endif(EXISTS ${SOPRANO_PLUGIN_DIR}/raptorparser.desktop) - - if(EXISTS ${SOPRANO_PLUGIN_DIR}/raptorserializer.desktop) - set(SOPRANO_PLUGIN_RAPTORSERIALIZER_FOUND TRUE) - set(_plugins "${_plugins} raptorserializer") - endif(EXISTS ${SOPRANO_PLUGIN_DIR}/raptorserializer.desktop) - - if(EXISTS ${SOPRANO_PLUGIN_DIR}/redlandbackend.desktop) - set(SOPRANO_PLUGIN_REDLANDBACKEND_FOUND TRUE) - set(_plugins "${_plugins} redlandbackend") - endif(EXISTS ${SOPRANO_PLUGIN_DIR}/redlandbackend.desktop) - - if(EXISTS ${SOPRANO_PLUGIN_DIR}/sesame2backend.desktop) - set(SOPRANO_PLUGIN_SESAME2BACKEND_FOUND TRUE) - set(_plugins "${_plugins} sesame2backend") - endif(EXISTS ${SOPRANO_PLUGIN_DIR}/sesame2backend.desktop) - - endif(Soprano_FOUND) - if(Soprano_FOUND) if(NOT Soprano_FIND_QUIETLY) message(STATUS "Found Soprano: ${SOPRANO_LIBRARIES}") message(STATUS "Found Soprano includes: ${SOPRANO_INCLUDE_DIR}") message(STATUS "Found Soprano Index: ${SOPRANO_INDEX_LIBRARIES}") message(STATUS "Found Soprano Client: ${SOPRANO_CLIENT_LIBRARIES}") - message(STATUS "Found Sopranos Plugins: ${_plugins}") endif(NOT Soprano_FIND_QUIETLY) else(Soprano_FOUND) if(Soprano_FIND_REQUIRED) -- cgit v1.2.1 From c0908d4c556204d89d7c8d2631c888d38cda0b56 Mon Sep 17 00:00:00 2001 From: Allen Winter Date: Thu, 24 Jul 2008 18:44:00 +0000 Subject: second attempt: compute variables for SOPRANO_PLUGIN_FOO_FOUND tidy up a bit svn path=/trunk/KDE/kdelibs/; revision=837464 --- modules/FindSoprano.cmake | 80 ++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 66 insertions(+), 14 deletions(-) diff --git a/modules/FindSoprano.cmake b/modules/FindSoprano.cmake index 0cc278b0..31377768 100644 --- a/modules/FindSoprano.cmake +++ b/modules/FindSoprano.cmake @@ -10,6 +10,13 @@ # SOPRANO_SERVER_LIBRARIES - The Soprano server library (libsopranoserver) # SOPRANO_VERSION - The Soprano version (string value) # +# SOPRANO_PLUGIN_NQUADPARSER_FOUND - true if the nquadparser plugin is found +# SOPRANO_PLUGIN_NQUADSERIALIZER_FOUND - true if the nquadserializer plugin is found +# SOPRANO_PLUGIN_RAPTORPARSER_FOUND - true if the raptorparser plugin is found +# SOPRANO_PLUGIN_RAPTORSERIALIZER_FOUND - true if the raptorserializer plugin is found +# SOPRANO_PLUGIN_REDLANDBACKEND_FOUND - true if the redlandbackend plugin is found +# SOPRANO_PLUGIN_SESAME2BACKEND_FOUND - true if the sesame2backend plugin is found + # Options: # Set SOPRANO_MIN_VERSION to set the minimum required Soprano version (default: 1.99) # @@ -23,9 +30,9 @@ # set(SopranoIndex_FOUND TRUE) #else(SOPRANO_INCLUDE_DIR AND SOPRANO_LIBRARIES AND SOPRANO_INDEX_LIBRARIES AND SOPRANO_SERVER_LIBRARIES) - INCLUDE(FindLibraryWithDebug) + include(FindLibraryWithDebug) - FIND_PATH(SOPRANO_INCLUDE_DIR + find_path(SOPRANO_INCLUDE_DIR NAMES soprano/soprano.h PATHS @@ -33,7 +40,7 @@ ${INCLUDE_INSTALL_DIR} ) - FIND_LIBRARY_WITH_DEBUG(SOPRANO_INDEX_LIBRARIES + find_library_with_debug(SOPRANO_INDEX_LIBRARIES WIN32_DEBUG_POSTFIX d NAMES sopranoindex @@ -42,7 +49,7 @@ ${LIB_INSTALL_DIR} ) - FIND_LIBRARY_WITH_DEBUG(SOPRANO_CLIENT_LIBRARIES + find_library_with_debug(SOPRANO_CLIENT_LIBRARIES WIN32_DEBUG_POSTFIX d NAMES sopranoclient @@ -51,7 +58,7 @@ ${LIB_INSTALL_DIR} ) - FIND_LIBRARY_WITH_DEBUG(SOPRANO_LIBRARIES + find_library_with_debug(SOPRANO_LIBRARIES WIN32_DEBUG_POSTFIX d NAMES soprano PATHS @@ -59,7 +66,7 @@ ${LIB_INSTALL_DIR} ) - FIND_LIBRARY_WITH_DEBUG(SOPRANO_SERVER_LIBRARIES + find_library_with_debug(SOPRANO_SERVER_LIBRARIES WIN32_DEBUG_POSTFIX d NAMES sopranoserver @@ -89,15 +96,15 @@ # check Soprano version # We set a default for the minimum required version to be backwards compatible - IF(NOT SOPRANO_MIN_VERSION) - SET(SOPRANO_MIN_VERSION "1.99") - ENDIF(NOT SOPRANO_MIN_VERSION) + if(NOT SOPRANO_MIN_VERSION) + set(SOPRANO_MIN_VERSION "1.99") + endif(NOT SOPRANO_MIN_VERSION) if(Soprano_FOUND) - FILE(READ ${SOPRANO_INCLUDE_DIR}/soprano/version.h SOPRANO_VERSION_CONTENT) - STRING(REGEX MATCH "SOPRANO_VERSION_STRING \".*\"\n" SOPRANO_VERSION_MATCH ${SOPRANO_VERSION_CONTENT}) - IF (SOPRANO_VERSION_MATCH) - STRING(REGEX REPLACE "SOPRANO_VERSION_STRING \"(.*)\"\n" "\\1" SOPRANO_VERSION ${SOPRANO_VERSION_MATCH}) + file(READ ${SOPRANO_INCLUDE_DIR}/soprano/version.h SOPRANO_VERSION_CONTENT) + string(REGEX MATCH "SOPRANO_VERSION_STRING \".*\"\n" SOPRANO_VERSION_MATCH ${SOPRANO_VERSION_CONTENT}) + if(SOPRANO_VERSION_MATCH) + string(REGEX REPLACE "SOPRANO_VERSION_STRING \"(.*)\"\n" "\\1" SOPRANO_VERSION ${SOPRANO_VERSION_MATCH}) if(SOPRANO_VERSION STRLESS "${SOPRANO_MIN_VERSION}") set(Soprano_FOUND FALSE) if(Soprano_FIND_REQUIRED) @@ -106,15 +113,60 @@ message(STATUS "Soprano version ${SOPRANO_VERSION} is too old. Please install ${SOPRANO_MIN_VERSION} or newer") endif(Soprano_FIND_REQUIRED) endif(SOPRANO_VERSION STRLESS "${SOPRANO_MIN_VERSION}") - ENDIF (SOPRANO_VERSION_MATCH) + endif(SOPRANO_VERSION_MATCH) endif(Soprano_FOUND) + #look for parser plugins + if(Soprano_FOUND) + find_path(SOPRANO_PLUGIN_DIR + NAMES + soprano/plugins + PATHS + ${SHARE_INSTALL_PREFIX} /usr/share /usr/local/share + NO_DEFAULT_PATH + NO_SYSTEM_ENVIRONMENT_PATH + ) + set(SOPRANO_PLUGIN_DIR "${SOPRANO_PLUGIN_DIR}/soprano/plugins") + + if(EXISTS ${SOPRANO_PLUGIN_DIR}/nquadparser.desktop) + set(SOPRANO_PLUGIN_NQUADPARSER_FOUND TRUE) + set(_plugins "${_plugins} nquadparser") + endif(EXISTS ${SOPRANO_PLUGIN_DIR}/nquadparser.desktop) + + if(EXISTS ${SOPRANO_PLUGIN_DIR}/nquadserializer.desktop) + set(SOPRANO_PLUGIN_NQUADSERIALIZER_FOUND TRUE) + set(_plugins "${_plugins} nquadserializer") + endif(EXISTS ${SOPRANO_PLUGIN_DIR}/nquadserializer.desktop) + + if(EXISTS ${SOPRANO_PLUGIN_DIR}/raptorparser.desktop) + set(SOPRANO_PLUGIN_RAPTORPARSER_FOUND TRUE) + set(_plugins "${_plugins} raptorparser") + endif(EXISTS ${SOPRANO_PLUGIN_DIR}/raptorparser.desktop) + + if(EXISTS ${SOPRANO_PLUGIN_DIR}/raptorserializer.desktop) + set(SOPRANO_PLUGIN_RAPTORSERIALIZER_FOUND TRUE) + set(_plugins "${_plugins} raptorserializer") + endif(EXISTS ${SOPRANO_PLUGIN_DIR}/raptorserializer.desktop) + + if(EXISTS ${SOPRANO_PLUGIN_DIR}/redlandbackend.desktop) + set(SOPRANO_PLUGIN_REDLANDBACKEND_FOUND TRUE) + set(_plugins "${_plugins} redlandbackend") + endif(EXISTS ${SOPRANO_PLUGIN_DIR}/redlandbackend.desktop) + + if(EXISTS ${SOPRANO_PLUGIN_DIR}/sesame2backend.desktop) + set(SOPRANO_PLUGIN_SESAME2BACKEND_FOUND TRUE) + set(_plugins "${_plugins} sesame2backend") + endif(EXISTS ${SOPRANO_PLUGIN_DIR}/sesame2backend.desktop) + + endif(Soprano_FOUND) + if(Soprano_FOUND) if(NOT Soprano_FIND_QUIETLY) message(STATUS "Found Soprano: ${SOPRANO_LIBRARIES}") message(STATUS "Found Soprano includes: ${SOPRANO_INCLUDE_DIR}") message(STATUS "Found Soprano Index: ${SOPRANO_INDEX_LIBRARIES}") message(STATUS "Found Soprano Client: ${SOPRANO_CLIENT_LIBRARIES}") + message(STATUS "Found Sopranos Plugins: ${_plugins}") endif(NOT Soprano_FIND_QUIETLY) else(Soprano_FOUND) if(Soprano_FIND_REQUIRED) -- cgit v1.2.1 From 394fcdfdbba0af6d29de9b12ded03e4279f37227 Mon Sep 17 00:00:00 2001 From: Allen Winter Date: Thu, 24 Jul 2008 18:44:34 +0000 Subject: fix indentation SVN_SILENT: svn path=/trunk/KDE/kdelibs/; revision=837465 --- modules/FindSoprano.cmake | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/modules/FindSoprano.cmake b/modules/FindSoprano.cmake index 31377768..42d228ca 100644 --- a/modules/FindSoprano.cmake +++ b/modules/FindSoprano.cmake @@ -118,14 +118,14 @@ #look for parser plugins if(Soprano_FOUND) - find_path(SOPRANO_PLUGIN_DIR - NAMES - soprano/plugins - PATHS - ${SHARE_INSTALL_PREFIX} /usr/share /usr/local/share - NO_DEFAULT_PATH - NO_SYSTEM_ENVIRONMENT_PATH - ) + find_path(SOPRANO_PLUGIN_DIR + NAMES + soprano/plugins + PATHS + ${SHARE_INSTALL_PREFIX} /usr/share /usr/local/share + NO_DEFAULT_PATH + NO_SYSTEM_ENVIRONMENT_PATH + ) set(SOPRANO_PLUGIN_DIR "${SOPRANO_PLUGIN_DIR}/soprano/plugins") if(EXISTS ${SOPRANO_PLUGIN_DIR}/nquadparser.desktop) -- cgit v1.2.1 From 129034d56614dd8a28092b9ebdf696a824ae8dfd Mon Sep 17 00:00:00 2001 From: Allen Winter Date: Fri, 25 Jul 2008 13:31:42 +0000 Subject: fix typo SVN_SILENT: svn path=/trunk/KDE/kdelibs/; revision=837686 --- modules/FindSoprano.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/FindSoprano.cmake b/modules/FindSoprano.cmake index 42d228ca..84581a3f 100644 --- a/modules/FindSoprano.cmake +++ b/modules/FindSoprano.cmake @@ -166,7 +166,7 @@ message(STATUS "Found Soprano includes: ${SOPRANO_INCLUDE_DIR}") message(STATUS "Found Soprano Index: ${SOPRANO_INDEX_LIBRARIES}") message(STATUS "Found Soprano Client: ${SOPRANO_CLIENT_LIBRARIES}") - message(STATUS "Found Sopranos Plugins: ${_plugins}") + message(STATUS "Found Soprano Plugins:${_plugins}") endif(NOT Soprano_FIND_QUIETLY) else(Soprano_FOUND) if(Soprano_FIND_REQUIRED) -- cgit v1.2.1 From 8ffc474403fe1f7181d9d78c89e2b52010889887 Mon Sep 17 00:00:00 2001 From: Alexander Neundorf Date: Mon, 28 Jul 2008 22:11:42 +0000 Subject: -print a reminder that starting next week at least cmake 2.6.0 is required for building KDE 4 trunk Hint: you can easily install multiple versions of cmake by just putting them into separate directories and then calling them initially with the full path: /opt/cmake-2.6.0/bin/cmake ... Alex svn path=/trunk/KDE/kdelibs/; revision=838859 --- modules/FindKDE4Internal.cmake | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/modules/FindKDE4Internal.cmake b/modules/FindKDE4Internal.cmake index 48692482..7946ab16 100644 --- a/modules/FindKDE4Internal.cmake +++ b/modules/FindKDE4Internal.cmake @@ -235,6 +235,16 @@ if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" STREQUAL "2.5") message(FATAL_ERROR "You are using CMake 2.5, which was the unreleased development version between 2.4 and 2.6. This is no longer supported. Please update to CMake 2.6 or current cvs HEAD.") endif("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" STREQUAL "2.5") +# print a reminder to update cmake to at least 2.6.0 +if ("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" LESS "2.6") + message(STATUS " +************************************************************************ +From August 4th CMake >= 2.6.0 will be required, please update your CMake, e.g. from http://www.cmake.org/HTML/Download.html . +************************************************************************ +") +endif ("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" LESS "2.6") + + # CMake 2.6, set compatibility behaviour to cmake 2.4 # this must be executed always, because the CMAKE_MINIMUM_REQUIRED() command above # resets the policy settings, so we get a lot of warnings -- cgit v1.2.1 From b662f6f1b92adc97e8600b30accb5277b35bbb2f Mon Sep 17 00:00:00 2001 From: Alexander Neundorf Date: Mon, 28 Jul 2008 22:25:51 +0000 Subject: -make the reduced link interface the default Dirk fixed most (all ?) of the breakage this causes, let's see if there is something left (i.e. adding missing libraries to the TARGET_LINK_LIBRARIES() calls) Alex svn path=/trunk/KDE/kdelibs/; revision=838863 --- modules/FindKDE4Internal.cmake | 40 +++++++++++++++++++++------------------- 1 file changed, 21 insertions(+), 19 deletions(-) diff --git a/modules/FindKDE4Internal.cmake b/modules/FindKDE4Internal.cmake index 7946ab16..76667209 100644 --- a/modules/FindKDE4Internal.cmake +++ b/modules/FindKDE4Internal.cmake @@ -503,25 +503,27 @@ 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") -# This option enables the reduced link interface for libs on UNIX -# -# The purpose of the KDE4_DISABLE_PROPERTY_ variable is to be used as a prefix for -# the target property LINK_INTERFACE_LIBRARIES. If it is empty, the property will have its -# correct name, if it's not empty, it will be a different name, i.e. the actual property -# will not be set, i.e. disabled. See kdelibs/kdecore/CMakeLists.txt for an example. -# -# By default (i.e. also for Windows) make it non-empty, so the property name will -# change from "LINK_INTERFACE_LIBRARIES" to "DISABLED_LINK_INTERFACE_LIBRARIES", -# which is a different (non-existing) target property, and so setting that property -# won't have an effect -set(KDE4_DISABLE_PROPERTY_ "DISABLED_") - -option(KDE4_ENABLE_EXPERIMENTAL_LIB_EXPORT "Enable the experimental reduced library exports" FALSE) -# If enabled, make it empty, so the property will keep it's actual name. -# and the LINK_INTERFACE_LIBRARIES property will be set. -if (KDE4_ENABLE_EXPERIMENTAL_LIB_EXPORT) - set(KDE4_DISABLE_PROPERTY_ ) -endif (KDE4_ENABLE_EXPERIMENTAL_LIB_EXPORT) +# Remove this below once it's sure it really works, Alex + +# # This option enables the reduced link interface for libs on UNIX +# # +# # The purpose of the KDE4_DISABLE_PROPERTY_ variable is to be used as a prefix for +# # the target property LINK_INTERFACE_LIBRARIES. If it is empty, the property will have its +# # correct name, if it's not empty, it will be a different name, i.e. the actual property +# # will not be set, i.e. disabled. See kdelibs/kdecore/CMakeLists.txt for an example. +# # +# # By default (i.e. also for Windows) make it non-empty, so the property name will +# # change from "LINK_INTERFACE_LIBRARIES" to "DISABLED_LINK_INTERFACE_LIBRARIES", +# # which is a different (non-existing) target property, and so setting that property +# # won't have an effect +# set(KDE4_DISABLE_PROPERTY_ "DISABLED_") +# +# option(KDE4_ENABLE_EXPERIMENTAL_LIB_EXPORT "Enable the experimental reduced library exports" FALSE) +# # If enabled, make it empty, so the property will keep it's actual name. +# # and the LINK_INTERFACE_LIBRARIES property will be set. +# if (KDE4_ENABLE_EXPERIMENTAL_LIB_EXPORT) +# set(KDE4_DISABLE_PROPERTY_ ) +# endif (KDE4_ENABLE_EXPERIMENTAL_LIB_EXPORT) if( KDE4_ENABLE_FINAL) -- cgit v1.2.1 From da1f88e6f0443ff75eb12dd2288ce9bab488f2c2 Mon Sep 17 00:00:00 2001 From: Alexander Neundorf Date: Tue, 29 Jul 2008 05:59:42 +0000 Subject: -this was missing from the commit last night, which enabled the reduced link interface: always write the reduced link information into KDELibsDependencies file Alex svn path=/trunk/KDE/kdelibs/; revision=838965 --- modules/KDE4Macros.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/KDE4Macros.cmake b/modules/KDE4Macros.cmake index 23943590..d4dec0d2 100644 --- a/modules/KDE4Macros.cmake +++ b/modules/KDE4Macros.cmake @@ -1107,7 +1107,7 @@ endmacro (KDE4_ADD_APP_ICON) macro(_KDE4_EXPORT_LIBRARY_DEPENDENCIES _append_or_write _filename) - if(KDE4_ENABLE_EXPERIMENTAL_LIB_EXPORT AND UNIX )# AND NOT APPLE) +# if(KDE4_ENABLE_EXPERIMENTAL_LIB_EXPORT AND UNIX )# AND NOT APPLE) # get all cmake variables which end in _LIB_DEPENDS # then parse the target name out of them @@ -1134,7 +1134,7 @@ macro(_KDE4_EXPORT_LIBRARY_DEPENDENCIES _append_or_write _filename) endif(NOT "${target}" STREQUAL "${currentVar}") endforeach(currentVar ${allVars}) - endif(KDE4_ENABLE_EXPERIMENTAL_LIB_EXPORT AND UNIX)# AND NOT APPLE) +# endif(KDE4_ENABLE_EXPERIMENTAL_LIB_EXPORT AND UNIX)# AND NOT APPLE) endmacro(_KDE4_EXPORT_LIBRARY_DEPENDENCIES) macro (_KDE4_TARGET_LINK_INTERFACE_LIBRARIES _target _interface_libs) -- cgit v1.2.1 From 66e40ab24c86424c72c33af885b3d07d14189b7e Mon Sep 17 00:00:00 2001 From: Matthias Kretz Date: Tue, 29 Jul 2008 15:13:19 +0000 Subject: when using cmake 2.6.0 make sure it's using automoc 0.9.84 or later svn path=/trunk/KDE/kdelibs/; revision=839226 --- modules/FindKDE4Internal.cmake | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/modules/FindKDE4Internal.cmake b/modules/FindKDE4Internal.cmake index 76667209..12b8d058 100644 --- a/modules/FindKDE4Internal.cmake +++ b/modules/FindKDE4Internal.cmake @@ -271,6 +271,19 @@ find_package(Qt4 REQUIRED) # automoc4 (from kdesupport) is now required, Alex find_package(Automoc4 REQUIRED) + +if (CMAKE_MAJOR_VERSION GREATER 4) + # cmake 2.6.0 and automoc4 0.9.83 didn't add the necessary definitions for backends to moc calls + if (NOT AUTOMOC4_VERSION) + # the version macro was added for 0.9.84 + set(AUTOMOC4_VERSION "0.9.83") + endif (NOT AUTOMOC4_VERSION) + macro_ensure_version("0.9.84" "${AUTOMOC4_VERSION}" _automoc4_version_ok) + if (NOT _automoc4_version_ok) + message(FATAL_ERROR "Your version of automoc4 is too old. You have ${AUTOMOC4_VERSION}, you need at least 0.9.84") + endif (NOT _automoc4_version_ok) +endif (CMAKE_MAJOR_VERSION GREATER 4) + # use automoc4 from kdesupport set(KDE4_AUTOMOC_EXECUTABLE "${AUTOMOC4_EXECUTABLE}" ) -- cgit v1.2.1 From 1733614cf4ca29151c669773366bfce9c24abd0b Mon Sep 17 00:00:00 2001 From: Alexander Neundorf Date: Mon, 4 Aug 2008 23:54:21 +0000 Subject: -require cmake >= 2.6.0 -remove some tests for the current cmake versions Alex svn path=/trunk/KDE/kdelibs/; revision=842236 --- modules/FindKDE4Internal.cmake | 65 ++++++++++++------------------------------ 1 file changed, 18 insertions(+), 47 deletions(-) diff --git a/modules/FindKDE4Internal.cmake b/modules/FindKDE4Internal.cmake index 12b8d058..482fb5e6 100644 --- a/modules/FindKDE4Internal.cmake +++ b/modules/FindKDE4Internal.cmake @@ -228,36 +228,23 @@ # this is required now by cmake 2.6 and so must not be skipped by if(KDE4_FOUND) below -cmake_minimum_required(VERSION 2.4.5 FATAL_ERROR) - -# cmake 2.5, i.e. the cvs version between 2.4 and 2.6, is not supported -if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" STREQUAL "2.5") - message(FATAL_ERROR "You are using CMake 2.5, which was the unreleased development version between 2.4 and 2.6. This is no longer supported. Please update to CMake 2.6 or current cvs HEAD.") -endif("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" STREQUAL "2.5") - -# print a reminder to update cmake to at least 2.6.0 -if ("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" LESS "2.6") - message(STATUS " -************************************************************************ -From August 4th CMake >= 2.6.0 will be required, please update your CMake, e.g. from http://www.cmake.org/HTML/Download.html . -************************************************************************ -") -endif ("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" LESS "2.6") - +cmake_minimum_required(VERSION 2.6.0 FATAL_ERROR) +# this second call will never fail +# it is here for the effect that it sets the cmake policies to the 2.4.x compatibility settings for now +cmake_minimum_required(VERSION 2.4.5) # CMake 2.6, set compatibility behaviour to cmake 2.4 # this must be executed always, because the CMAKE_MINIMUM_REQUIRED() command above # resets the policy settings, so we get a lot of warnings -if(COMMAND CMAKE_POLICY) - # CMP0000: don't require cmake_minimum_version() directly in the top level CMakeLists.txt, FindKDE4Internal.cmake is good enough - cmake_policy(SET CMP0000 OLD) - # CMP0002: in KDE4 we have multiple targets with the same name for the unit tests - cmake_policy(SET CMP0002 OLD) - # CMP0003: add the link paths to the link command as with cmake 2.4 - cmake_policy(SET CMP0003 OLD) - # CMP0005: keep escaping behaviour for definitions added via add_definitions() - cmake_policy(SET CMP0005 OLD) -endif(COMMAND CMAKE_POLICY) + +# CMP0000: don't require cmake_minimum_version() directly in the top level CMakeLists.txt, FindKDE4Internal.cmake is good enough +cmake_policy(SET CMP0000 OLD) +# CMP0002: in KDE4 we have multiple targets with the same name for the unit tests +cmake_policy(SET CMP0002 OLD) +# CMP0003: add the link paths to the link command as with cmake 2.4 +cmake_policy(SET CMP0003 OLD) +# CMP0005: keep escaping behaviour for definitions added via add_definitions() +cmake_policy(SET CMP0005 OLD) # Only do something if it hasn't been found yet @@ -699,40 +686,24 @@ set(INSTALL_TARGETS_DEFAULT_ARGS RUNTIME DESTINATION "${BIN_INSTALL_DIR}" # on the Mac support an extra install directory for application bundles starting with cmake 2.6 if(APPLE) - if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" GREATER "2.5") - set(INSTALL_TARGETS_DEFAULT_ARGS ${INSTALL_TARGETS_DEFAULT_ARGS} - BUNDLE DESTINATION "${BUNDLE_INSTALL_DIR}" ) - endif("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" GREATER "2.5") + set(INSTALL_TARGETS_DEFAULT_ARGS ${INSTALL_TARGETS_DEFAULT_ARGS} + BUNDLE DESTINATION "${BUNDLE_INSTALL_DIR}" ) endif(APPLE) ############## add some more default search paths ############### # -# always search in the directory where cmake is installed -# and in the current installation prefix # the KDE4_xxx_INSTALL_DIR variables are empty when building kdelibs itself # and otherwise point to the kde4 install dirs -# they will be set by default starting with cmake 2.6.0, maybe already 2.4.8 - -# also add the install directory of the running cmake to the search directories -# CMAKE_ROOT is CMAKE_INSTALL_PREFIX/share/cmake, so we need to go two levels up -get_filename_component(_CMAKE_INSTALL_DIR "${CMAKE_ROOT}" PATH) -get_filename_component(_CMAKE_INSTALL_DIR "${_CMAKE_INSTALL_DIR}" PATH) set(CMAKE_SYSTEM_INCLUDE_PATH ${CMAKE_SYSTEM_INCLUDE_PATH} - "${KDE4_INCLUDE_INSTALL_DIR}" - "${_CMAKE_INSTALL_DIR}/include" - "${CMAKE_INSTALL_PREFIX}/include" ) + "${KDE4_INCLUDE_INSTALL_DIR}") set(CMAKE_SYSTEM_PROGRAM_PATH ${CMAKE_SYSTEM_PROGRAM_PATH} - "${KDE4_BIN_INSTALL_DIR}" - "${_CMAKE_INSTALL_DIR}/bin" - "${CMAKE_INSTALL_PREFIX}/bin" ) + "${KDE4_BIN_INSTALL_DIR}" ) set(CMAKE_SYSTEM_LIBRARY_PATH ${CMAKE_SYSTEM_LIBRARY_PATH} - "${KDE4_LIB_INSTALL_DIR}" - "${_CMAKE_INSTALL_DIR}/lib" - "${CMAKE_INSTALL_PREFIX}/lib" ) + "${KDE4_LIB_INSTALL_DIR}" ) # under Windows dlls may be also installed in bin/ if(WIN32) -- cgit v1.2.1 From 1cdfb0f2255e25ddaa68907bd490584572babac4 Mon Sep 17 00:00:00 2001 From: Andreas Pakulat Date: Tue, 5 Aug 2008 08:09:55 +0000 Subject: Fix my earlier mistake, Debugfull should be enabled for anything greater 2.5 (i.e. 2.6.0 and onwards) svn path=/trunk/KDE/kdelibs/; revision=842305 --- modules/FindKDE4Internal.cmake | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/FindKDE4Internal.cmake b/modules/FindKDE4Internal.cmake index 482fb5e6..33204332 100644 --- a/modules/FindKDE4Internal.cmake +++ b/modules/FindKDE4Internal.cmake @@ -929,9 +929,9 @@ endif(MSVC) if (CMAKE_COMPILER_IS_GNUCXX) - if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" GREATER 2.6) + if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" GREATER 2.5) set (CMAKE_CONFIGURATION_TYPES ${CMAKE_CONFIGURATION_TYPES} "Debugfull") - endif("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" GREATER 2.6) + endif("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" GREATER 2.5) set (KDE4_ENABLE_EXCEPTIONS -fexceptions) # Select flags. @@ -1040,9 +1040,9 @@ endif (CMAKE_COMPILER_IS_GNUCXX) if (CMAKE_C_COMPILER MATCHES "icc") - if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" GREATER 2.6) + if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" GREATER 2.5) set (CMAKE_CONFIGURATION_TYPES ${CMAKE_CONFIGURATION_TYPES} "Debugfull") - endif("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" GREATER 2.6) + endif("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" GREATER 2.5) set (KDE4_ENABLE_EXCEPTIONS -fexceptions) # Select flags. -- cgit v1.2.1 From 0240a0e5dd4e6e546a8df6e8453d80d4686dca79 Mon Sep 17 00:00:00 2001 From: Alexander Neundorf Date: Tue, 5 Aug 2008 19:32:56 +0000 Subject: -no need to test for > 2.5, since 2.6.0 is required now, so it is always > 2.5 Alex CCMAIL: apaku@gmx.de svn path=/trunk/KDE/kdelibs/; revision=842686 --- modules/FindKDE4Internal.cmake | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/modules/FindKDE4Internal.cmake b/modules/FindKDE4Internal.cmake index 33204332..4ea3d2e3 100644 --- a/modules/FindKDE4Internal.cmake +++ b/modules/FindKDE4Internal.cmake @@ -929,9 +929,7 @@ endif(MSVC) if (CMAKE_COMPILER_IS_GNUCXX) - if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" GREATER 2.5) - set (CMAKE_CONFIGURATION_TYPES ${CMAKE_CONFIGURATION_TYPES} "Debugfull") - endif("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" GREATER 2.5) + set (CMAKE_CONFIGURATION_TYPES ${CMAKE_CONFIGURATION_TYPES} "Debugfull") set (KDE4_ENABLE_EXCEPTIONS -fexceptions) # Select flags. @@ -1040,9 +1038,7 @@ endif (CMAKE_COMPILER_IS_GNUCXX) if (CMAKE_C_COMPILER MATCHES "icc") - if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" GREATER 2.5) - set (CMAKE_CONFIGURATION_TYPES ${CMAKE_CONFIGURATION_TYPES} "Debugfull") - endif("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" GREATER 2.5) + set (CMAKE_CONFIGURATION_TYPES ${CMAKE_CONFIGURATION_TYPES} "Debugfull") set (KDE4_ENABLE_EXCEPTIONS -fexceptions) # Select flags. -- cgit v1.2.1 From a5ee1f9b369e753b88143329a289e437f0a7f272 Mon Sep 17 00:00:00 2001 From: Matthias Kretz Date: Wed, 6 Aug 2008 15:10:23 +0000 Subject: one check less, now that cmake 2.6.0 is required svn path=/trunk/KDE/kdelibs/; revision=843151 --- modules/FindKDE4Internal.cmake | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/modules/FindKDE4Internal.cmake b/modules/FindKDE4Internal.cmake index 4ea3d2e3..3ab33147 100644 --- a/modules/FindKDE4Internal.cmake +++ b/modules/FindKDE4Internal.cmake @@ -259,17 +259,15 @@ find_package(Qt4 REQUIRED) # automoc4 (from kdesupport) is now required, Alex find_package(Automoc4 REQUIRED) -if (CMAKE_MAJOR_VERSION GREATER 4) - # cmake 2.6.0 and automoc4 0.9.83 didn't add the necessary definitions for backends to moc calls - if (NOT AUTOMOC4_VERSION) - # the version macro was added for 0.9.84 - set(AUTOMOC4_VERSION "0.9.83") - endif (NOT AUTOMOC4_VERSION) - macro_ensure_version("0.9.84" "${AUTOMOC4_VERSION}" _automoc4_version_ok) - if (NOT _automoc4_version_ok) - message(FATAL_ERROR "Your version of automoc4 is too old. You have ${AUTOMOC4_VERSION}, you need at least 0.9.84") - endif (NOT _automoc4_version_ok) -endif (CMAKE_MAJOR_VERSION GREATER 4) +# cmake 2.6.0 and automoc4 < 0.9.84 don't work right for -D flags +if (NOT AUTOMOC4_VERSION) + # the version macro was added for 0.9.84 + set(AUTOMOC4_VERSION "0.9.83") +endif (NOT AUTOMOC4_VERSION) +macro_ensure_version("0.9.84" "${AUTOMOC4_VERSION}" _automoc4_version_ok) +if (NOT _automoc4_version_ok) + message(FATAL_ERROR "Your version of automoc4 is too old. You have ${AUTOMOC4_VERSION}, you need at least 0.9.84") +endif (NOT _automoc4_version_ok) # use automoc4 from kdesupport set(KDE4_AUTOMOC_EXECUTABLE "${AUTOMOC4_EXECUTABLE}" ) -- cgit v1.2.1 From f52bf584332ce5904ed5f6b2c8a4a00cec695b01 Mon Sep 17 00:00:00 2001 From: Alexander Neundorf Date: Wed, 6 Aug 2008 20:44:05 +0000 Subject: -initialize LIB_SUFFIX to 64 (or 32) if kdelibs have been installed to lib64 (or lib32) Does anybody think this might be a bad idea or cause problems under some weird circumstances ? Alex CCMAIL: kde-buildsystem@kde.org svn path=/trunk/KDE/kdelibs/; revision=843268 --- modules/FindKDE4Internal.cmake | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/modules/FindKDE4Internal.cmake b/modules/FindKDE4Internal.cmake index 3ab33147..6859f7dc 100644 --- a/modules/FindKDE4Internal.cmake +++ b/modules/FindKDE4Internal.cmake @@ -534,7 +534,19 @@ endif(KDE4_ENABLE_FINAL) # info from "http://www.linuxfromscratch.org/hlfs/view/unstable/glibc/chapter02/pie.html" option(KDE4_ENABLE_FPIE "Enable platform supports PIE linking") -set(LIB_SUFFIX "" CACHE STRING "Define suffix of directory name (32/64)" ) +# 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. +# The same for lib32. Alex +set(_Init_LIB_SUFFIX "") +if ("${KDE4_LIB_DIR}" MATCHES lib64) + set(_Init_LIB_SUFFIX 64) +endif ("${KDE4_LIB_DIR}" MATCHES lib64) +if ("${KDE4_LIB_DIR}" MATCHES lib32) + set(_Init_LIB_SUFFIX 32) +endif ("${KDE4_LIB_DIR}" MATCHES lib32) + +set(LIB_SUFFIX "${_Init_LIB_SUFFIX}" CACHE STRING "Define suffix of directory name (32/64)" ) ########## the following are directories where stuff will be installed to ########### -- cgit v1.2.1 From feebc3c9de4b839403de3c96d86822eeaf6d4182 Mon Sep 17 00:00:00 2001 From: Ralf Habacker Date: Fri, 8 Aug 2008 20:50:36 +0000 Subject: limit KDEWIN_LIBRARIES to the library identified by the recent cmake build type - the new link interface of cmake 2.6.x does not support the optimized/debug library prefixes, using them results for example into kde4-config link error not finding 'optimized' library. svn path=/trunk/KDE/kdelibs/; revision=844126 --- modules/FindKDEWIN32.cmake | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/modules/FindKDEWIN32.cmake b/modules/FindKDEWIN32.cmake index 589b1531..79c66dc6 100644 --- a/modules/FindKDEWIN32.cmake +++ b/modules/FindKDEWIN32.cmake @@ -14,8 +14,6 @@ if (WIN32) - include(FindLibraryWithDebug) - if (NOT KDEWIN32_DIR) if(NOT KDEWIN_FOUND) find_package(KDEWIN) @@ -28,9 +26,15 @@ if (WIN32) # search for kdewin32 in the default install directory for applications (default of (n)make install) FILE(TO_CMAKE_PATH "${CMAKE_LIBRARY_PATH}" _cmakeLibraryPathCmakeStyle) - find_library_with_debug(KDEWIN32_LIBRARY - WIN32_DEBUG_POSTFIX d - NAMES kdewin32 + + if (CMAKE_BUILD_TYPE STREQUAL "Debug") + set (LIBRARY_NAME kdewin32d) + else (CMAKE_BUILD_TYPE STREQUAL "Debug") + set (LIBRARY_NAME kdewin32) + endif (CMAKE_BUILD_TYPE STREQUAL "Debug") + + find_library(KDEWIN32_LIBRARY + NAMES ${LIBRARY_NAME} PATHS ${_cmakeLibraryPathCmakeStyle} ${CMAKE_INSTALL_PREFIX}/lib -- cgit v1.2.1 From 2186f87998b7a1d8f1d87809eb8fb758f0843507 Mon Sep 17 00:00:00 2001 From: Ralf Habacker Date: Fri, 8 Aug 2008 20:53:38 +0000 Subject: updated doc svn path=/trunk/KDE/kdelibs/; revision=844128 --- modules/FindKDEWIN32.cmake | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/modules/FindKDEWIN32.cmake b/modules/FindKDEWIN32.cmake index 79c66dc6..d22a85a7 100644 --- a/modules/FindKDEWIN32.cmake +++ b/modules/FindKDEWIN32.cmake @@ -7,7 +7,7 @@ # KDEWIN32_LIBRARIES - The libraries needed to use KDEWIN32 # Copyright (c) 2006, Alexander Neundorf, -# Copyright (c) 2007, Ralf Habacker, +# Copyright (c) 2007-2008, Ralf Habacker, # # Redistribution and use is allowed according to the terms of the BSD license. # For details see the accompanying COPYING-CMAKE-SCRIPTS file. @@ -41,8 +41,6 @@ if (WIN32) NO_SYSTEM_ENVIRONMENT_PATH ) - # kdelibs/win/ has to be built before the rest of kdelibs/ - # eventually it will be moved out from kdelibs/ if (KDEWIN32_LIBRARY AND KDEWIN32_INCLUDE_DIR) set(KDEWIN32_FOUND TRUE) # add needed system libs -- cgit v1.2.1 From 648a847d1d40efe245ba8ca00f3dfc121053c79d Mon Sep 17 00:00:00 2001 From: Alexander Neundorf Date: Sat, 9 Aug 2008 14:06:54 +0000 Subject: disable the reduced link interface for now for windows, since there people have problems since they are actually using the "debug" and "optimized" keywords for libraries, which leads to problems with cmake 2.6.0 and 2.6.1 when linking (it tries to link against -ldebug or -loptimized) Alex CCMAIL: kde-windows@kde.org svn path=/trunk/KDE/kdelibs/; revision=844368 --- modules/FindKDE4Internal.cmake | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/modules/FindKDE4Internal.cmake b/modules/FindKDE4Internal.cmake index 6859f7dc..d99c131d 100644 --- a/modules/FindKDE4Internal.cmake +++ b/modules/FindKDE4Internal.cmake @@ -514,8 +514,13 @@ option(KDE4_ENABLE_HTMLHANDBOOK "Create targets htmlhandbook for creating the h # # change from "LINK_INTERFACE_LIBRARIES" to "DISABLED_LINK_INTERFACE_LIBRARIES", # # which is a different (non-existing) target property, and so setting that property # # won't have an effect -# set(KDE4_DISABLE_PROPERTY_ "DISABLED_") -# + +# disable this for now for Windows, since there is an issue with the use of "debug" and +# "optimized" in the LINK_INTERFACE_LIBRARIES target property, Alex +if (WIN32) + set(KDE4_DISABLE_PROPERTY_ "DISABLED_") +endif(WIN32) + # option(KDE4_ENABLE_EXPERIMENTAL_LIB_EXPORT "Enable the experimental reduced library exports" FALSE) # # If enabled, make it empty, so the property will keep it's actual name. # # and the LINK_INTERFACE_LIBRARIES property will be set. -- cgit v1.2.1 From 6402cc6a7ad14a3c37408dc0624eac8d5095fd52 Mon Sep 17 00:00:00 2001 From: Alexander Neundorf Date: Sun, 10 Aug 2008 09:13:30 +0000 Subject: use the new-style cmake 2.6 find_package() mode which automatically searches for the installed Automoc4Config.cmake in the appropriate directories. Alex svn path=/trunk/KDE/kdelibs/; revision=844694 --- modules/FindAutomoc4.cmake | 39 ++++++--------------------------------- 1 file changed, 6 insertions(+), 33 deletions(-) diff --git a/modules/FindAutomoc4.cmake b/modules/FindAutomoc4.cmake index ad3ed05f..fad02bef 100644 --- a/modules/FindAutomoc4.cmake +++ b/modules/FindAutomoc4.cmake @@ -20,40 +20,13 @@ # check if we are inside KDESupport and automoc is enabled if("${KDESupport_SOURCE_DIR}" STREQUAL "${CMAKE_SOURCE_DIR}") # when building this project as part of kdesupport - set(AUTOMOC4_CONFIG_FILE "${KDESupport_SOURCE_DIR}/automoc/Automoc4Config.cmake") + include("${KDESupport_SOURCE_DIR}/automoc/Automoc4Config.cmake") else("${KDESupport_SOURCE_DIR}" STREQUAL "${CMAKE_SOURCE_DIR}") # when building this project outside kdesupport - - # CMAKE_[SYSTEM_]PREFIX_PATH exists starting with cmake 2.6.0 - file(TO_CMAKE_PATH "$ENV{CMAKE_PREFIX_PATH}" _env_CMAKE_PREFIX_PATH) - file(TO_CMAKE_PATH "$ENV{CMAKE_LIBRARY_PATH}" _env_CMAKE_LIBRARY_PATH) - - find_file(AUTOMOC4_CONFIG_FILE NAMES Automoc4Config.cmake - PATH_SUFFIXES automoc4 lib/automoc4 lib64/automoc4 - PATHS ${_env_CMAKE_PREFIX_PATH} ${CMAKE_PREFIX_PATH} ${CMAKE_SYSTEM_PREFIX_PATH} - ${_env_CMAKE_LIBRARY_PATH} ${CMAKE_LIBRARY_PATH} ${CMAKE_SYSTEM_LIBRARY_PATH} - ${CMAKE_INSTALL_PREFIX} - NO_DEFAULT_PATH ) + # use the new "config-mode" of cmake 2.6, which searches the installed Automoc4Config.cmake file + # see the man page for details + find_package(Automoc4 QUIET NO_MODULE) endif("${KDESupport_SOURCE_DIR}" STREQUAL "${CMAKE_SOURCE_DIR}") - -if(AUTOMOC4_CONFIG_FILE) - include(${AUTOMOC4_CONFIG_FILE}) - set(AUTOMOC4_FOUND TRUE) -else(AUTOMOC4_CONFIG_FILE) - set(AUTOMOC4_FOUND FALSE) -endif(AUTOMOC4_CONFIG_FILE) - -if (AUTOMOC4_FOUND) - if (NOT Automoc4_FIND_QUIETLY) - message(STATUS "Found Automoc4: ${AUTOMOC4_EXECUTABLE}") - endif (NOT Automoc4_FIND_QUIETLY) -else (AUTOMOC4_FOUND) - if (Automoc4_FIND_REQUIRED) - message(FATAL_ERROR "Did not find automoc4 (part of kdesupport).") - else (Automoc4_FIND_REQUIRED) - if (NOT Automoc4_FIND_QUIETLY) - message(STATUS "Did not find automoc4 (part of kdesupport).") - endif (NOT Automoc4_FIND_QUIETLY) - endif (Automoc4_FIND_REQUIRED) -endif (AUTOMOC4_FOUND) +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(Automoc4 "Did not find automoc4 (part of kdesupport)." AUTOMOC4_EXECUTABLE) -- cgit v1.2.1 From 989a8c1696b3f8a245ccafd3f90a805a1f283d37 Mon Sep 17 00:00:00 2001 From: Alexander Neundorf Date: Mon, 11 Aug 2008 23:33:22 +0000 Subject: mostly revert patch from yesterday, since it doesn't seem to support 64bit yet Alex svn path=/trunk/KDE/kdelibs/; revision=845536 --- modules/FindAutomoc4.cmake | 39 ++++++++++++++++++++++++++++++--------- 1 file changed, 30 insertions(+), 9 deletions(-) diff --git a/modules/FindAutomoc4.cmake b/modules/FindAutomoc4.cmake index fad02bef..03b0b23d 100644 --- a/modules/FindAutomoc4.cmake +++ b/modules/FindAutomoc4.cmake @@ -17,16 +17,37 @@ # Redistribution and use is allowed according to the terms of the BSD license. # For details see the accompanying COPYING-CMAKE-SCRIPTS file. -# check if we are inside KDESupport and automoc is enabled -if("${KDESupport_SOURCE_DIR}" STREQUAL "${CMAKE_SOURCE_DIR}") - # when building this project as part of kdesupport - include("${KDESupport_SOURCE_DIR}/automoc/Automoc4Config.cmake") -else("${KDESupport_SOURCE_DIR}" STREQUAL "${CMAKE_SOURCE_DIR}") - # when building this project outside kdesupport - # use the new "config-mode" of cmake 2.6, which searches the installed Automoc4Config.cmake file - # see the man page for details - find_package(Automoc4 QUIET NO_MODULE) +# enable the code below again when cmake also searches in lib64/ (should be 2.6.2), Alex +# # check if we are inside KDESupport and automoc is enabled +# if("${KDESupport_SOURCE_DIR}" STREQUAL "${CMAKE_SOURCE_DIR}") +# # when building this project as part of kdesupport +# include("${KDESupport_SOURCE_DIR}/automoc/Automoc4Config.cmake") +# else("${KDESupport_SOURCE_DIR}" STREQUAL "${CMAKE_SOURCE_DIR}") +# # when building this project outside kdesupport +# # use the new "config-mode" of cmake 2.6, which searches the installed Automoc4Config.cmake file +# # see the man page for details +# find_package(Automoc4 QUIET NO_MODULE) +# endif("${KDESupport_SOURCE_DIR}" STREQUAL "${CMAKE_SOURCE_DIR}") + +if("${KDESupport_SOURCE_DIR}" STREQUAL "${CMAKE_SOURCE_DIR}") + # when building this project as part of kdesupport + set(AUTOMOC4_CONFIG_FILE "${KDESupport_SOURCE_DIR}/automoc/Automoc4Config.cmake") +else("${KDESupport_SOURCE_DIR}" STREQUAL "${CMAKE_SOURCE_DIR}") + # when building this project outside kdesupport + # CMAKE_[SYSTEM_]PREFIX_PATH exists starting with cmake 2.6.0 + file(TO_CMAKE_PATH "$ENV{CMAKE_PREFIX_PATH}" _env_CMAKE_PREFIX_PATH) + file(TO_CMAKE_PATH "$ENV{CMAKE_LIBRARY_PATH}" _env_CMAKE_LIBRARY_PATH) + find_file(AUTOMOC4_CONFIG_FILE NAMES Automoc4Config.cmake + PATH_SUFFIXES automoc4 lib/automoc4 lib64/automoc4 + PATHS ${_env_CMAKE_PREFIX_PATH} ${CMAKE_PREFIX_PATH} ${CMAKE_SYSTEM_PREFIX_PATH} + ${_env_CMAKE_LIBRARY_PATH} ${CMAKE_LIBRARY_PATH} ${CMAKE_SYSTEM_LIBRARY_PATH} + ${CMAKE_INSTALL_PREFIX} + NO_DEFAULT_PATH ) endif("${KDESupport_SOURCE_DIR}" STREQUAL "${CMAKE_SOURCE_DIR}") +if(AUTOMOC4_CONFIG_FILE) + include(${AUTOMOC4_CONFIG_FILE}) +endif(AUTOMOC4_CONFIG_FILE) + include(FindPackageHandleStandardArgs) find_package_handle_standard_args(Automoc4 "Did not find automoc4 (part of kdesupport)." AUTOMOC4_EXECUTABLE) -- cgit v1.2.1 From 29585aa3811a7ce9e195825f1f0eb3b7970ceb14 Mon Sep 17 00:00:00 2001 From: Alexander Neundorf Date: Mon, 11 Aug 2008 23:37:06 +0000 Subject: potential_problems was just a remnant of early cmake porting FindPackageHandleStandardArgs.cmake now comes with cmake, so we don't need our pwn copy here anymore Alex svn path=/trunk/KDE/kdelibs/; revision=845538 --- modules/FindPackageHandleStandardArgs.cmake | 60 ----------------------------- modules/potential_problems | 2 - 2 files changed, 62 deletions(-) delete mode 100644 modules/FindPackageHandleStandardArgs.cmake delete mode 100644 modules/potential_problems diff --git a/modules/FindPackageHandleStandardArgs.cmake b/modules/FindPackageHandleStandardArgs.cmake deleted file mode 100644 index 7f122edc..00000000 --- a/modules/FindPackageHandleStandardArgs.cmake +++ /dev/null @@ -1,60 +0,0 @@ -# FIND_PACKAGE_HANDLE_STANDARD_ARGS(NAME (DEFAULT_MSG|"Custom failure message") VAR1 ... ) -# -# This macro is intended to be used in FindXXX.cmake modules files. -# It handles the REQUIRED and QUIET argument to FIND_PACKAGE() and -# it also sets the _FOUND variable. -# The package is found if all variables listed are TRUE. -# Example: -# -# FIND_PACKAGE_HANDLE_STANDARD_ARGS(LibXml2 DEFAULT_MSG LIBXML2_LIBRARIES LIBXML2_INCLUDE_DIR) -# -# LibXml2 is considered to be found, if both LIBXML2_LIBRARIES and -# LIBXML2_INCLUDE_DIR are valid. Then also LIBXML2_FOUND is set to TRUE. -# If it is not found and REQUIRED was used, it fails with FATAL_ERROR, -# independent whether QUIET was used or not. -# -# If it is found, the location is reported using the VAR1 argument, so -# here a message "Found LibXml2: /usr/lib/libxml2.so" will be printed out. -# If the second argument is DEFAULT_MSG, the message in the failure case will -# be "Could NOT find LibXml2", if you don't like this message you can specify -# your own custom failure message there. - -MACRO(FIND_PACKAGE_HANDLE_STANDARD_ARGS _NAME _FAIL_MSG _VAR1 ) - - IF("${_FAIL_MSG}" STREQUAL "DEFAULT_MSG") - IF (${_NAME}_FIND_REQUIRED) - SET(_FAIL_MESSAGE "Could not find REQUIRED package ${_NAME}") - ELSE (${_NAME}_FIND_REQUIRED) - SET(_FAIL_MESSAGE "Could not find OPTIONAL package ${_NAME}") - ENDIF (${_NAME}_FIND_REQUIRED) - ELSE("${_FAIL_MSG}" STREQUAL "DEFAULT_MSG") - SET(_FAIL_MESSAGE "${_FAIL_MSG}") - ENDIF("${_FAIL_MSG}" STREQUAL "DEFAULT_MSG") - - STRING(TOUPPER ${_NAME} _NAME_UPPER) - - SET(${_NAME_UPPER}_FOUND TRUE) - IF(NOT ${_VAR1}) - SET(${_NAME_UPPER}_FOUND FALSE) - ENDIF(NOT ${_VAR1}) - - FOREACH(_CURRENT_VAR ${ARGN}) - IF(NOT ${_CURRENT_VAR}) - SET(${_NAME_UPPER}_FOUND FALSE) - ENDIF(NOT ${_CURRENT_VAR}) - ENDFOREACH(_CURRENT_VAR) - - IF (${_NAME_UPPER}_FOUND) - IF (NOT ${_NAME}_FIND_QUIETLY) - MESSAGE(STATUS "Found ${_NAME}: ${${_VAR1}}") - ENDIF (NOT ${_NAME}_FIND_QUIETLY) - ELSE (${_NAME_UPPER}_FOUND) - IF (${_NAME}_FIND_REQUIRED) - MESSAGE(FATAL_ERROR "${_FAIL_MESSAGE}") - ELSE (${_NAME}_FIND_REQUIRED) - IF (NOT ${_NAME}_FIND_QUIETLY) - MESSAGE(STATUS "${_FAIL_MESSAGE}") - ENDIF (NOT ${_NAME}_FIND_QUIETLY) - ENDIF (${_NAME}_FIND_REQUIRED) - ENDIF (${_NAME_UPPER}_FOUND) -ENDMACRO(FIND_PACKAGE_HANDLE_STANDARD_ARGS) diff --git a/modules/potential_problems b/modules/potential_problems deleted file mode 100644 index b4558a21..00000000 --- a/modules/potential_problems +++ /dev/null @@ -1,2 +0,0 @@ -/CMakeLists.txt find_package(Perl REQUIRED) -KDE4_AUTOMOC: -DQ_WS_X11 -- cgit v1.2.1 From 261b3691e2c7ed049e40f71843ad3a44260de9dc Mon Sep 17 00:00:00 2001 From: Alexander Neundorf Date: Tue, 12 Aug 2008 07:49:48 +0000 Subject: -add Carbon to the "link interface" of kdecore on Mac, this fixes linking libkopete (and shouldn't hurt, if it does, please let me know) -handle standard argument handling to FindCarbon.cmake Alex svn path=/trunk/KDE/kdelibs/; revision=845637 --- modules/FindCarbon.cmake | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/modules/FindCarbon.cmake b/modules/FindCarbon.cmake index de788f74..2b0d979e 100644 --- a/modules/FindCarbon.cmake +++ b/modules/FindCarbon.cmake @@ -8,11 +8,15 @@ # Redistribution and use is allowed according to the terms of the BSD license. # For details see the accompanying COPYING-CMAKE-SCRIPTS file. -INCLUDE(CMakeFindFrameworks) +include(CMakeFindFrameworks) -CMAKE_FIND_FRAMEWORKS(Carbon) +cmake_find_frameworks(Carbon) if (Carbon_FRAMEWORKS) set(CARBON_LIBRARY "-framework Carbon" CACHE FILEPATH "Carbon framework" FORCE) set(CARBON_FOUND 1) endif (Carbon_FRAMEWORKS) + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(Carbon DEFAULT_MSG CARBON_LIBRARY) + -- cgit v1.2.1 From c362b85b1b3ae1cf41d8451b6397e81426368a4a Mon Sep 17 00:00:00 2001 From: David Faure Date: Wed, 13 Aug 2008 15:44:20 +0000 Subject: Similar patch as in branch: more informative output when automoc4 isn't found. svn path=/trunk/KDE/kdelibs/; revision=846504 --- modules/FindAutomoc4.cmake | 35 +++++++++++++++++++---------------- 1 file changed, 19 insertions(+), 16 deletions(-) diff --git a/modules/FindAutomoc4.cmake b/modules/FindAutomoc4.cmake index 03b0b23d..5cf75627 100644 --- a/modules/FindAutomoc4.cmake +++ b/modules/FindAutomoc4.cmake @@ -29,25 +29,28 @@ # find_package(Automoc4 QUIET NO_MODULE) # endif("${KDESupport_SOURCE_DIR}" STREQUAL "${CMAKE_SOURCE_DIR}") -if("${KDESupport_SOURCE_DIR}" STREQUAL "${CMAKE_SOURCE_DIR}") - # when building this project as part of kdesupport +if("${KDESupport_SOURCE_DIR}" STREQUAL "${CMAKE_SOURCE_DIR}") + # when building this project as part of kdesupport set(AUTOMOC4_CONFIG_FILE "${KDESupport_SOURCE_DIR}/automoc/Automoc4Config.cmake") -else("${KDESupport_SOURCE_DIR}" STREQUAL "${CMAKE_SOURCE_DIR}") - # when building this project outside kdesupport - # CMAKE_[SYSTEM_]PREFIX_PATH exists starting with cmake 2.6.0 - file(TO_CMAKE_PATH "$ENV{CMAKE_PREFIX_PATH}" _env_CMAKE_PREFIX_PATH) - file(TO_CMAKE_PATH "$ENV{CMAKE_LIBRARY_PATH}" _env_CMAKE_LIBRARY_PATH) - find_file(AUTOMOC4_CONFIG_FILE NAMES Automoc4Config.cmake - PATH_SUFFIXES automoc4 lib/automoc4 lib64/automoc4 - PATHS ${_env_CMAKE_PREFIX_PATH} ${CMAKE_PREFIX_PATH} ${CMAKE_SYSTEM_PREFIX_PATH} - ${_env_CMAKE_LIBRARY_PATH} ${CMAKE_LIBRARY_PATH} ${CMAKE_SYSTEM_LIBRARY_PATH} - ${CMAKE_INSTALL_PREFIX} - NO_DEFAULT_PATH ) +else("${KDESupport_SOURCE_DIR}" STREQUAL "${CMAKE_SOURCE_DIR}") + # when building this project outside kdesupport + # CMAKE_[SYSTEM_]PREFIX_PATH exists starting with cmake 2.6.0 + file(TO_CMAKE_PATH "$ENV{CMAKE_PREFIX_PATH}" _env_CMAKE_PREFIX_PATH) + file(TO_CMAKE_PATH "$ENV{CMAKE_LIBRARY_PATH}" _env_CMAKE_LIBRARY_PATH) + set(AUTOMOC4_SEARCH_PATHS + ${_env_CMAKE_PREFIX_PATH} ${CMAKE_PREFIX_PATH} ${CMAKE_SYSTEM_PREFIX_PATH} + ${_env_CMAKE_LIBRARY_PATH} ${CMAKE_LIBRARY_PATH} ${CMAKE_SYSTEM_LIBRARY_PATH} + ${CMAKE_INSTALL_PREFIX} + ) + find_file(AUTOMOC4_CONFIG_FILE NAMES Automoc4Config.cmake + PATH_SUFFIXES automoc4 lib/automoc4 lib64/automoc4 + PATHS ${AUTOMOC4_SEARCH_PATHS} + NO_DEFAULT_PATH ) endif("${KDESupport_SOURCE_DIR}" STREQUAL "${CMAKE_SOURCE_DIR}") -if(AUTOMOC4_CONFIG_FILE) - include(${AUTOMOC4_CONFIG_FILE}) +if(AUTOMOC4_CONFIG_FILE) + include(${AUTOMOC4_CONFIG_FILE}) endif(AUTOMOC4_CONFIG_FILE) include(FindPackageHandleStandardArgs) -find_package_handle_standard_args(Automoc4 "Did not find automoc4 (part of kdesupport)." AUTOMOC4_EXECUTABLE) +find_package_handle_standard_args(Automoc4 "Did not find automoc4 (part of kdesupport). Searched for Automoc4Config.cmake in ${AUTOMOC4_SEARCH_PATHS} using suffixes automoc4 lib/automoc4 lib64/automoc4." AUTOMOC4_EXECUTABLE) -- cgit v1.2.1 From b8079a1830eae2bda2eeadaf7f2ebf6cff173391 Mon Sep 17 00:00:00 2001 From: Alexander Neundorf Date: Thu, 14 Aug 2008 20:28:45 +0000 Subject: add a switch to disable all optional dirs initially, e.g. for building only one of all the subdirs (requested by Saro) Alex CCMAIL: ps_ml@gmx.de svn path=/trunk/KDE/kdelibs/; revision=847137 --- modules/MacroOptionalAddSubdirectory.cmake | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/modules/MacroOptionalAddSubdirectory.cmake b/modules/MacroOptionalAddSubdirectory.cmake index b0d565c2..9566bb4c 100644 --- a/modules/MacroOptionalAddSubdirectory.cmake +++ b/modules/MacroOptionalAddSubdirectory.cmake @@ -19,7 +19,11 @@ MACRO (MACRO_OPTIONAL_ADD_SUBDIRECTORY _dir ) GET_FILENAME_COMPONENT(_fullPath ${_dir} ABSOLUTE) IF(EXISTS ${_fullPath}) - OPTION(BUILD_${_dir} "Build directory ${_dir}" TRUE) + SET(_DEFAULT_OPTION_VALUE TRUE) + IF(DISABLE_ALL_OPTIONAL_SUBDIRS) + SET(_DEFAULT_OPTION_VALUE FALSE) + ENDIF(DISABLE_ALL_OPTIONAL_SUBDIRS) + OPTION(BUILD_${_dir} "Build directory ${_dir}" ${_DEFAULT_OPTION_VALUE}) IF(BUILD_${_dir}) ADD_SUBDIRECTORY(${_dir}) ENDIF(BUILD_${_dir}) -- cgit v1.2.1 From bd92489875467b8bc671100678b7dda86e2374ee Mon Sep 17 00:00:00 2001 From: Alexander Neundorf Date: Thu, 14 Aug 2008 20:35:47 +0000 Subject: fix comment in the generated file, it was not correct anymore, the option was removed two weeks ago or so Alex svn path=/trunk/KDE/kdelibs/; revision=847138 --- modules/KDE4Macros.cmake | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/modules/KDE4Macros.cmake b/modules/KDE4Macros.cmake index d4dec0d2..7c57e6a4 100644 --- a/modules/KDE4Macros.cmake +++ b/modules/KDE4Macros.cmake @@ -1119,9 +1119,7 @@ macro(_KDE4_EXPORT_LIBRARY_DEPENDENCIES _append_or_write _filename) # Alex file(${_append_or_write} "${_filename}" "# The following variables have been created by kde4_export_library_dependencies() -# The contents have been determined from the LINK_INTERFACE_LIBRARIES target property of the respective libraries. -# The option KDE4_ENABLE_EXPERIMENTAL_LIB_EXPORT has been enabled to create the file this way. -# You can modify KDE4_ENABLE_EXPERIMENTAL_LIB_EXPORT using \"make edit_cache\"\n\n") +# The contents have been determined from the LINK_INTERFACE_LIBRARIES target property of the respective libraries.\n\n") get_cmake_property(allVars VARIABLES) set(allLibs "") foreach(currentVar ${allVars}) -- cgit v1.2.1 From 605c7c4a491fa6014e005d00e6a1d02a63aa2d51 Mon Sep 17 00:00:00 2001 From: Alexander Neundorf Date: Thu, 14 Aug 2008 22:13:31 +0000 Subject: -add some documentation Alex svn path=/trunk/KDE/kdelibs/; revision=847189 --- modules/MacroEnsureOutOfSourceBuild.cmake | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modules/MacroEnsureOutOfSourceBuild.cmake b/modules/MacroEnsureOutOfSourceBuild.cmake index ef4d525f..cb26e0c3 100644 --- a/modules/MacroEnsureOutOfSourceBuild.cmake +++ b/modules/MacroEnsureOutOfSourceBuild.cmake @@ -1,5 +1,9 @@ # - MACRO_ENSURE_OUT_OF_SOURCE_BUILD() # MACRO_ENSURE_OUT_OF_SOURCE_BUILD() +# Call this macro in your project if you want to enforce out-of-source builds. +# If an in-source build is detected, it will abort with the given error message. +# This macro works in any of the CMakeLists.txt of your project, but the recommended +# location to call this is close to the beginning of the top level CMakeLists.txt # Copyright (c) 2006, Alexander Neundorf, # -- cgit v1.2.1 From 29d21f3abbfc6b6e9f9c44ac699443fe880fba7d Mon Sep 17 00:00:00 2001 From: Andreas Pakulat Date: Fri, 15 Aug 2008 23:50:11 +0000 Subject: Allow to use a minimum version with cmake's find_package() call, like find_package(KDE4 4.2.0 REQUIRED). Include some documentation for it. svn path=/trunk/KDE/kdelibs/; revision=847677 --- modules/FindKDE4Internal.cmake | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/modules/FindKDE4Internal.cmake b/modules/FindKDE4Internal.cmake index d99c131d..f3a1d93c 100644 --- a/modules/FindKDE4Internal.cmake +++ b/modules/FindKDE4Internal.cmake @@ -216,6 +216,12 @@ # without going all over the place, but still produce better performance. # It's also important to note that gcc cannot detect all warning conditions # unless the optimiser is active. +# +# This module allows to depend on a particular minimum version of kdelibs. +# To acomplish that one should use the apropriate cmake syntax for +# find_package. For example to depend on kdelibs >= 4.1.0 one should use +# +# find_package(KDE4 4.1.0 REQUIRED) # _KDE4_PLATFORM_INCLUDE_DIRS is used only internally # _KDE4_PLATFORM_DEFINITIONS is used only internally @@ -352,7 +358,25 @@ else (_kdeBootStrapping) # we need at least this version: if (NOT KDE_MIN_VERSION) - set(KDE_MIN_VERSION "3.9.0") + if (KDE4_FIND_VERSION_MAJOR) + message("${KDE4_FIND_VERSION_MAJOR}") + if (${KDE4_FIND_VERSION_MAJOR} EQUAL 4) + if (KDE4_FIND_VERSION_MINOR) + set(KDE_MIN_VERSION "4.${KDE4_FIND_VERSION_MINOR}") + else (KDE4_FIND_VERSION_MINOR) + set(KDE_MIN_VERSION "4.0") + endif (KDE4_FIND_VERSION_MINOR) + if (KDE4_FIND_VERSION_PATCH) + set(KDE_MIN_VERSION "${KDE_MIN_VERSION}.${KDE4_FIND_VERSION_PATCH}") + else (KDE4_FIND_VERSION_PATCH) + set(KDE_MIN_VERSION "${KDE_MIN_VERSION}.0") + endif (KDE4_FIND_VERSION_PATCH) + else (${KDE4_FIND_VERSION_MAJOR} EQUAL 4) + message(FATAL_ERROR "FindKDE4 can only be used with KDE 4") + endif (${KDE4_FIND_VERSION_MAJOR} EQUAL 4) + else (KDE4_FIND_VERSION_MAJOR) + set (KDE_MIN_VERSION "4.0.0") + endif (KDE4_FIND_VERSION_MAJOR) endif (NOT KDE_MIN_VERSION) #message(STATUS "KDE_MIN_VERSION=${KDE_MIN_VERSION} found ${KDEVERSION}") -- cgit v1.2.1 From 8fcd46e47bcdcc5722fbbd98e3c0d86088e086a1 Mon Sep 17 00:00:00 2001 From: Alexander Neundorf Date: Sat, 16 Aug 2008 11:41:12 +0000 Subject: partly sync with cmake: /usr/pkg is searched anyway, initialize the _LIBRARIES and INCLUDE_DIR variables Alex svn path=/trunk/KDE/kdelibs/; revision=847811 --- modules/FindX11.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/FindX11.cmake b/modules/FindX11.cmake index 27702886..2d6d24e9 100644 --- a/modules/FindX11.cmake +++ b/modules/FindX11.cmake @@ -48,7 +48,6 @@ IF (UNIX) SET(CMAKE_FIND_FRAMEWORK NEVER) SET(X11_INC_SEARCH_PATH /usr/pkg/xorg/include - /usr/pkg/include /usr/X11R6/include /usr/X11R7/include /usr/include/X11 @@ -59,7 +58,6 @@ IF (UNIX) SET(X11_LIB_SEARCH_PATH /usr/pkg/xorg/lib - /usr/pkg/lib /usr/X11R6/lib /usr/X11R7/lib /usr/openwin/lib @@ -134,6 +132,7 @@ IF (UNIX) GET_FILENAME_COMPONENT(X11_LIBRARY_DIR ${X11_X11_LIB} PATH) ENDIF(X11_X11_LIB) + SET(X11_INCLUDE_DIR) # start with empty list IF(X11_X11_INCLUDE_PATH) SET(X11_INCLUDE_DIR ${X11_INCLUDE_DIR} ${X11_X11_INCLUDE_PATH}) ENDIF(X11_X11_INCLUDE_PATH) @@ -152,6 +151,7 @@ IF (UNIX) SET(X11_INCLUDE_DIR ${X11_INCLUDE_DIR} ${X11_Xshape_INCLUDE_PATH}) ENDIF(X11_Xshape_INCLUDE_PATH) + SET(X11_LIBRARIES) # start with empty list IF(X11_X11_LIB) SET(X11_LIBRARIES ${X11_LIBRARIES} ${X11_X11_LIB}) ENDIF(X11_X11_LIB) -- cgit v1.2.1 From 0abebd1516eaf9a77b9a75e8a8937ed82d8df38e Mon Sep 17 00:00:00 2001 From: Alexander Neundorf Date: Sat, 16 Aug 2008 11:46:27 +0000 Subject: - FindLibXslt.cmake: proper naming for the variable for the executable - FindTIFF.cmake: minor cosmetics (sync with cmake) *PkgConfig: not required anymore now that we require cmake 2.6.0 Alex svn path=/trunk/KDE/kdelibs/; revision=847813 --- modules/FindLibXslt.cmake | 8 +- modules/FindPkgConfig.cmake | 360 -------------------------------------------- modules/FindTIFF.cmake | 4 +- modules/UsePkgConfig.cmake | 61 -------- 4 files changed, 7 insertions(+), 426 deletions(-) delete mode 100644 modules/FindPkgConfig.cmake delete mode 100644 modules/UsePkgConfig.cmake diff --git a/modules/FindLibXslt.cmake b/modules/FindLibXslt.cmake index f84f4c26..f951693f 100644 --- a/modules/FindLibXslt.cmake +++ b/modules/FindLibXslt.cmake @@ -5,7 +5,7 @@ # LIBXSLT_INCLUDE_DIR - the LibXslt include directory # LIBXSLT_LIBRARIES - Link these to LibXslt # LIBXSLT_DEFINITIONS - Compiler switches required for using LibXslt -# XSLTPROC_EXECUTABLE - path to the xsltproc tool +# LIBXSLT_XSLTPROC_EXECUTABLE - path to the xsltproc tool # Copyright (c) 2006, Alexander Neundorf, # @@ -46,7 +46,9 @@ ELSE (LIBXSLT_INCLUDE_DIR AND LIBXSLT_LIBRARIES) SET(LIBXSLT_FOUND FALSE) ENDIF (LIBXSLT_INCLUDE_DIR AND LIBXSLT_LIBRARIES) -FIND_PROGRAM(XSLTPROC_EXECUTABLE xsltproc) +FIND_PROGRAM(LIBEXSLT_XSLTPROC_EXECUTABLE xsltproc) +# For compatibility with FindLibXslt.cmake from KDE 4.[01].x +SET(XSLTPROC_EXECUTABLE ${LIBEXSLT_XSLTPROC_EXECUTABLE}) IF (LIBXSLT_FOUND) IF (NOT LibXslt_FIND_QUIETLY) @@ -58,5 +60,5 @@ ELSE (LIBXSLT_FOUND) ENDIF (LibXslt_FIND_REQUIRED) ENDIF (LIBXSLT_FOUND) -MARK_AS_ADVANCED(LIBXSLT_INCLUDE_DIR LIBXSLT_LIBRARIES LIBEXSLT_LIBRARIES XSLTPROC_EXECUTABLE) +MARK_AS_ADVANCED(LIBXSLT_INCLUDE_DIR LIBXSLT_LIBRARIES LIBEXSLT_LIBRARIES LIBEXSLT_XSLTPROC_EXECUTABLE) diff --git a/modules/FindPkgConfig.cmake b/modules/FindPkgConfig.cmake deleted file mode 100644 index 34ef039a..00000000 --- a/modules/FindPkgConfig.cmake +++ /dev/null @@ -1,360 +0,0 @@ -# - a pkg-config module for CMake -# -# Usage: -# pkg_check_modules( [REQUIRED] []*) -# checks for all the given modules -# -# pkg_search_module( [REQUIRED] []*) -# checks for given modules and uses the first working one -# -# When the 'REQUIRED' argument was set, macros will fail with an error -# when module(s) could not be found -# -# It sets the following variables: -# PKG_CONFIG_FOUND ... true if pkg-config works on the system -# PKG_CONFIG_EXECUTABLE ... pathname of the pkg-config program -# _FOUND ... set to 1 if module(s) exist -# -# For the following variables two sets of values exist; first one is the -# common one and has the given PREFIX. The second set contains flags -# which are given out when pkgconfig was called with the '--static' -# option. -# _LIBRARIES ... only the libraries (w/o the '-l') -# _LIBRARY_DIRS ... the paths of the libraries (w/o the '-L') -# _LDFLAGS ... all required linker flags -# _LDFLAGS_OTHERS ... all other linker flags -# _INCLUDE_DIRS ... the '-I' preprocessor flags (w/o the '-I') -# _CFLAGS ... all required cflags -# _CFLAGS_OTHERS ... the other compiler flags -# -# = for common case -# = _STATIC for static linking -# -# There are some special variables whose prefix depends on the count -# of given modules. When there is only one module, stays -# unchanged. When there are multiple modules, the prefix will be -# changed to _: -# _VERSION ... version of the module -# _PREFIX ... prefix-directory of the module -# _INCLUDEDIR ... include-dir of the module -# _LIBDIR ... lib-dir of the module -# -# = when |MODULES| == 1, else -# = _ -# -# A parameter can have the following formats: -# {MODNAME} ... matches any version -# {MODNAME}>={VERSION} ... at least version is required -# {MODNAME}={VERSION} ... exactly version is required -# {MODNAME}<={VERSION} ... modules must not be newer than -# -# Examples -# pkg_check_modules (GLIB2 glib-2.0) -# -# pkg_check_modules (GLIB2 glib-2.0>=2.10) -# requires at least version 2.10 of glib2 and defines e.g. -# GLIB2_VERSION=2.10.3 -# -# pkg_check_modules (FOO glib-2.0>=2.10 gtk+-2.0) -# requires both glib2 and gtk2, and defines e.g. -# FOO_glib-2.0_VERSION=2.10.3 -# FOO_gtk+-2.0_VERSION=2.8.20 -# -# pkg_check_modules (XRENDER REQUIRED xrender) -# defines e.g.: -# XRENDER_LIBRARIES=Xrender;X11 -# XRENDER_STATIC_LIBRARIES=Xrender;X11;pthread;Xau;Xdmcp -# -# pkg_search_module (BAR libxml-2.0 libxml2 libxml>=2) - - -# Copyright (C) 2006 Enrico Scholz -# -# Redistribution and use, with or without modification, are permitted -# provided that the following conditions are met: -# -# 1. Redistributions must retain the above copyright notice, this -# list of conditions and the following disclaimer. -# 2. The name of the author may not be used to endorse or promote -# products derived from this software without specific prior -# written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY -# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE -# GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER -# IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR -# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN -# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - -### Common stuff #### -set(PKG_CONFIG_VERSION 1) -set(PKG_CONFIG_FOUND 0) - -find_program(PKG_CONFIG_EXECUTABLE NAMES pkg-config DOC "pkg-config executable") -mark_as_advanced(PKG_CONFIG_EXECUTABLE) - -if(PKG_CONFIG_EXECUTABLE) - set(PKG_CONFIG_FOUND 1) -endif(PKG_CONFIG_EXECUTABLE) - - -# Unsets the given variables -macro(_pkgconfig_unset var) - set(${var} "" CACHE INTERNAL "") -endmacro(_pkgconfig_unset) - -macro(_pkgconfig_set var value) - set(${var} ${value} CACHE INTERNAL "") -endmacro(_pkgconfig_set) - -# Invokes pkgconfig, cleans up the result and sets variables -macro(_pkgconfig_invoke _pkglist _prefix _varname _regexp) - set(_pkgconfig_invoke_result) - - execute_process( - COMMAND ${PKG_CONFIG_EXECUTABLE} ${ARGN} ${_pkglist} - OUTPUT_VARIABLE _pkgconfig_invoke_result - RESULT_VARIABLE _pkgconfig_failed) - - if (_pkgconfig_failed) - set(_pkgconfig_${_varname} "") - _pkgconfig_unset(${_prefix}_${_varname}) - else(_pkgconfig_failed) - string(REGEX REPLACE "[\r\n]" " " _pkgconfig_invoke_result "${_pkgconfig_invoke_result}") - string(REGEX REPLACE " +$" "" _pkgconfig_invoke_result "${_pkgconfig_invoke_result}") - - if (NOT ${_regexp} STREQUAL "") - string(REGEX REPLACE "${_regexp}" " " _pkgconfig_invoke_result "${_pkgconfig_invoke_result}") - endif(NOT ${_regexp} STREQUAL "") - - separate_arguments(_pkgconfig_invoke_result) - - #message(STATUS " ${_varname} ... ${_pkgconfig_invoke_result}") - set(_pkgconfig_${_varname} ${_pkgconfig_invoke_result}) - _pkgconfig_set(${_prefix}_${_varname} "${_pkgconfig_invoke_result}") - endif(_pkgconfig_failed) -endmacro(_pkgconfig_invoke) - -# Invokes pkgconfig two times; once without '--static' and once with -# '--static' -macro(_pkgconfig_invoke_dyn _pkglist _prefix _varname cleanup_regexp) - _pkgconfig_invoke("${_pkglist}" ${_prefix} ${_varname} "${cleanup_regexp}" ${ARGN}) - _pkgconfig_invoke("${_pkglist}" ${_prefix} STATIC_${_varname} "${cleanup_regexp}" --static ${ARGN}) -endmacro(_pkgconfig_invoke_dyn) - -# Splits given arguments into options and a package list -macro(_pkgconfig_parse_options _result _is_req) - set(${_is_req} 0) - - foreach(_pkg ${ARGN}) - if (_pkg STREQUAL "REQUIRED") - set(${_is_req} 1) - endif (_pkg STREQUAL "REQUIRED") - endforeach(_pkg ${ARGN}) - - set(${_result} ${ARGN}) - list(REMOVE_ITEM ${_result} "REQUIRED") -endmacro(_pkgconfig_parse_options) - -### -macro(_pkg_check_modules_internal _is_required _is_silent _prefix) - _pkgconfig_unset(${_prefix}_FOUND) - _pkgconfig_unset(${_prefix}_VERSION) - _pkgconfig_unset(${_prefix}_PREFIX) - _pkgconfig_unset(${_prefix}_INCLUDEDIR) - _pkgconfig_unset(${_prefix}_LIBDIR) - _pkgconfig_unset(${_prefix}_LIBS) - _pkgconfig_unset(${_prefix}_LIBS_L) - _pkgconfig_unset(${_prefix}_LIBS_PATHS) - _pkgconfig_unset(${_prefix}_LIBS_OTHER) - _pkgconfig_unset(${_prefix}_CFLAGS) - _pkgconfig_unset(${_prefix}_CFLAGS_I) - _pkgconfig_unset(${_prefix}_CFLAGS_OTHER) - _pkgconfig_unset(${_prefix}_STATIC_LIBDIR) - _pkgconfig_unset(${_prefix}_STATIC_LIBS) - _pkgconfig_unset(${_prefix}_STATIC_LIBS_L) - _pkgconfig_unset(${_prefix}_STATIC_LIBS_PATHS) - _pkgconfig_unset(${_prefix}_STATIC_LIBS_OTHER) - _pkgconfig_unset(${_prefix}_STATIC_CFLAGS) - _pkgconfig_unset(${_prefix}_STATIC_CFLAGS_I) - _pkgconfig_unset(${_prefix}_STATIC_CFLAGS_OTHER) - - # create a better addressable variable of the modules and calculate its size - set(_pkg_check_modules_list ${ARGN}) - list(LENGTH _pkg_check_modules_list _pkg_check_modules_cnt) - - if(PKG_CONFIG_EXECUTABLE) - # give out status message telling checked module - if (NOT ${_is_silent}) - if (_pkg_check_modules_cnt EQUAL 1) - message(STATUS "checking for module '${_pkg_check_modules_list}'") - else(_pkg_check_modules_cnt EQUAL 1) - message(STATUS "checking for modules '${_pkg_check_modules_list}'") - endif(_pkg_check_modules_cnt EQUAL 1) - endif(NOT ${_is_silent}) - - set(_pkg_check_modules_packages) - set(_pkg_check_modules_failed) - - # iterate through module list and check whether they exist and match the required version - foreach (_pkg_check_modules_pkg ${_pkg_check_modules_list}) - set(_pkg_check_modules_exist_query) - - # check whether version is given - if (_pkg_check_modules_pkg MATCHES ".*(>=|=|<=).*") - string(REGEX REPLACE "(.*[^><])(>=|=|<=)(.*)" "\\1" _pkg_check_modules_pkg_name "${_pkg_check_modules_pkg}") - string(REGEX REPLACE "(.*[^><])(>=|=|<=)(.*)" "\\2" _pkg_check_modules_pkg_op "${_pkg_check_modules_pkg}") - string(REGEX REPLACE "(.*[^><])(>=|=|<=)(.*)" "\\3" _pkg_check_modules_pkg_ver "${_pkg_check_modules_pkg}") - else(_pkg_check_modules_pkg MATCHES ".*(>=|=|<=).*") - set(_pkg_check_modules_pkg_name "${_pkg_check_modules_pkg}") - set(_pkg_check_modules_pkg_op) - set(_pkg_check_modules_pkg_ver) - endif(_pkg_check_modules_pkg MATCHES ".*(>=|=|<=).*") - - # handle the operands - if (_pkg_check_modules_pkg_op STREQUAL ">=") - list(APPEND _pkg_check_modules_exist_query --atleast-version) - endif(_pkg_check_modules_pkg_op STREQUAL ">=") - - if (_pkg_check_modules_pkg_op STREQUAL "=") - list(APPEND _pkg_check_modules_exist_query --exact-version) - endif(_pkg_check_modules_pkg_op STREQUAL "=") - - if (_pkg_check_modules_pkg_op STREQUAL "<=") - list(APPEND _pkg_check_modules_exist_query --max-version) - endif(_pkg_check_modules_pkg_op STREQUAL "<=") - - # create the final query which is of the format: - # * --atleast-version - # * --exact-version - # * --max-version - # * --exists - if (_pkg_check_modules_pkg_op) - list(APPEND _pkg_check_modules_exist_query "${_pkg_check_modules_pkg_ver}") - else(_pkg_check_modules_pkg_op) - list(APPEND _pkg_check_modules_exist_query --exists) - endif(_pkg_check_modules_pkg_op) - - _pkgconfig_unset(${_prefix}_${_pkg_check_modules_pkg_name}_VERSION) - _pkgconfig_unset(${_prefix}_${_pkg_check_modules_pkg_name}_PREFIX) - _pkgconfig_unset(${_prefix}_${_pkg_check_modules_pkg_name}_INCLUDEDIR) - _pkgconfig_unset(${_prefix}_${_pkg_check_modules_pkg_name}_LIBDIR) - - list(APPEND _pkg_check_modules_exist_query "${_pkg_check_modules_pkg_name}") - list(APPEND _pkg_check_modules_packages "${_pkg_check_modules_pkg_name}") - - # execute the query - execute_process( - COMMAND ${PKG_CONFIG_EXECUTABLE} ${_pkg_check_modules_exist_query} - RESULT_VARIABLE _pkgconfig_retval) - - # evaluate result and tell failures - if (_pkgconfig_retval) - if(NOT ${_is_silent}) - message(STATUS " package '${_pkg_check_modules_pkg}' not found") - endif(NOT ${_is_silent}) - - set(_pkg_check_modules_failed 1) - endif(_pkgconfig_retval) - endforeach(_pkg_check_modules_pkg) - - if(_pkg_check_modules_failed) - # fail when requested - if (${_is_required}) - message(SEND_ERROR "A required package was not found") - endif (${_is_required}) - else(_pkg_check_modules_failed) - # when we are here, we checked whether requested modules - # exist. Now, go through them and set variables - - _pkgconfig_set(${_prefix}_FOUND 1) - list(LENGTH _pkg_check_modules_packages pkg_count) - - # iterate through all modules again and set individual variables - foreach (_pkg_check_modules_pkg ${_pkg_check_modules_packages}) - # handle case when there is only one package required - if (pkg_count EQUAL 1) - set(_pkg_check_prefix "${_prefix}") - else(pkg_count EQUAL 1) - set(_pkg_check_prefix "${_prefix}_${_pkg_check_modules_pkg}") - endif(pkg_count EQUAL 1) - - _pkgconfig_invoke(${_pkg_check_modules_pkg} "${_pkg_check_prefix}" VERSION "" --modversion ) - _pkgconfig_invoke(${_pkg_check_modules_pkg} "${_pkg_check_prefix}" PREFIX "" --variable=prefix ) - _pkgconfig_invoke(${_pkg_check_modules_pkg} "${_pkg_check_prefix}" INCLUDEDIR "" --variable=includedir ) - _pkgconfig_invoke(${_pkg_check_modules_pkg} "${_pkg_check_prefix}" LIBDIR "" --variable=libdir ) - - message(STATUS " found ${_pkg_check_modules_pkg}, version ${_pkgconfig_VERSION}") - endforeach(_pkg_check_modules_pkg) - - # set variables which are combined for multiple modules - _pkgconfig_invoke_dyn("${_pkg_check_modules_packages}" "${_prefix}" LIBRARIES "(^| )-l" --libs-only-l ) - _pkgconfig_invoke_dyn("${_pkg_check_modules_packages}" "${_prefix}" LIBRARY_DIRS "(^| )-L" --libs-only-L ) - _pkgconfig_invoke_dyn("${_pkg_check_modules_packages}" "${_prefix}" LDFLAGS "" --libs ) - _pkgconfig_invoke_dyn("${_pkg_check_modules_packages}" "${_prefix}" LDFLAGS_OTHER "" --libs-only-other ) - - _pkgconfig_invoke_dyn("${_pkg_check_modules_packages}" "${_prefix}" INCLUDE_DIRS "(^| )-I" --cflags-only-I ) - _pkgconfig_invoke_dyn("${_pkg_check_modules_packages}" "${_prefix}" CFLAGS "" --cflags ) - _pkgconfig_invoke_dyn("${_pkg_check_modules_packages}" "${_prefix}" CFLAGS_OTHER "" --cflags-only-other ) - endif(_pkg_check_modules_failed) - else(PKG_CONFIG_EXECUTABLE) - if (${_is_required}) - message(SEND_ERROR "pkg-config tool not found") - endif (${_is_required}) - endif(PKG_CONFIG_EXECUTABLE) -endmacro(_pkg_check_modules_internal) - -### -### User visible macros start here -### - -### -macro(pkg_check_modules _prefix _module0) - # check cached value - if (NOT DEFINED __pkg_config_checked_${_prefix} OR __pkg_config_checked_${_prefix} LESS ${PKG_CONFIG_VERSION}) - _pkgconfig_parse_options (_pkg_modules _pkg_is_required "${_module0}" ${ARGN}) - _pkg_check_modules_internal("${_pkg_is_required}" 0 "${_prefix}" ${_pkg_modules}) - - _pkgconfig_set(__pkg_config_checked_${_prefix} ${PKG_CONFIG_VERSION}) - endif(NOT DEFINED __pkg_config_checked_${_prefix} OR __pkg_config_checked_${_prefix} LESS ${PKG_CONFIG_VERSION}) -endmacro(pkg_check_modules) - -### -macro(pkg_search_module _prefix _module0) - # check cached value - if (NOT DEFINED __pkg_config_checked_${_prefix} OR __pkg_config_checked_${_prefix} LESS ${PKG_CONFIG_VERSION}) - set(_pkg_modules_found 0) - _pkgconfig_parse_options(_pkg_modules_alt _pkg_is_required "${_module0}" ${ARGN}) - - message(STATUS "checking for one of the modules '${_pkg_modules_alt}'") - - # iterate through all modules and stop at the first working one. - foreach(_pkg_alt ${_pkg_modules_alt}) - if(NOT _pkg_modules_found) - _pkg_check_modules_internal(0 1 "${_prefix}" "${_pkg_alt}") - endif(NOT _pkg_modules_found) - - if (${_prefix}_FOUND) - set(_pkg_modules_found 1) - endif(${_prefix}_FOUND) - endforeach(_pkg_alt) - - if (NOT ${_prefix}_FOUND) - if(${_pkg_is_required}) - message(SEND_ERROR "None of the required '${_pkg_modules_alt}' found") - endif(${_pkg_is_required}) - endif(NOT ${_prefix}_FOUND) - - _pkgconfig_set(__pkg_config_checked_${_prefix} ${PKG_CONFIG_VERSION}) - endif(NOT DEFINED __pkg_config_checked_${_prefix} OR __pkg_config_checked_${_prefix} LESS ${PKG_CONFIG_VERSION}) -endmacro(pkg_search_module) - -### Local Variables: -### mode: cmake -### End: diff --git a/modules/FindTIFF.cmake b/modules/FindTIFF.cmake index 24b75b9f..829a3485 100644 --- a/modules/FindTIFF.cmake +++ b/modules/FindTIFF.cmake @@ -3,8 +3,8 @@ # This module defines # TIFF_INCLUDE_DIR, where to find tiff.h, etc. # TIFF_LIBRARIES, libraries to link against to use TIFF. -# TIFF_FOUND, If false, do NOT try to use TIFF. -# also defined, but NOT for general use are +# TIFF_FOUND, If false, do not try to use TIFF. +# also defined, but not for general use are # TIFF_LIBRARY, where to find the TIFF library. # Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. diff --git a/modules/UsePkgConfig.cmake b/modules/UsePkgConfig.cmake deleted file mode 100644 index 8d6e0d34..00000000 --- a/modules/UsePkgConfig.cmake +++ /dev/null @@ -1,61 +0,0 @@ - -# THIS IS A SLIGHTLY ENHANCED COPY OVER THE ONE OF CMAKE 2.4.7. DO NOT MODIFY IT FURTHER - -# - pkg-config module for CMake -# -# Defines the following macros: -# -# PKGCONFIG(package includedir libdir linkflags cflags) -# -# Calling PKGCONFIG will fill the desired information into the 4 given arguments, -# e.g. PKGCONFIG(libart-2.0 LIBART_INCLUDE_DIR LIBART_LINK_DIR LIBART_LINK_FLAGS LIBART_CFLAGS) -# if pkg-config was NOT found or the specified software package doesn't exist, the -# variable will be empty when the function returns, otherwise they will contain the respective information -# - -FIND_PROGRAM(PKGCONFIG_EXECUTABLE NAMES pkg-config PATHS /usr/local/bin ) - -MACRO(PKGCONFIG _package _include_DIR _link_DIR _link_FLAGS _cflags) -# reset the variables at the beginning - SET(${_include_DIR}) - SET(${_link_DIR}) - SET(${_link_FLAGS}) - SET(${_cflags}) - - # if pkg-config has been found - IF(PKGCONFIG_EXECUTABLE) - - EXEC_PROGRAM(${PKGCONFIG_EXECUTABLE} ARGS ${_package} --exists RETURN_VALUE _return_VALUE OUTPUT_VARIABLE _pkgconfigDevNull ) - - # and if the package of interest also exists for pkg-config, then get the information - IF(NOT _return_VALUE) - - EXEC_PROGRAM(${PKGCONFIG_EXECUTABLE} ARGS ${_package} --variable=includedir - OUTPUT_VARIABLE ${_include_DIR} ) - string(REGEX REPLACE "[\r\n]" " " ${_include_DIR} "${${_include_DIR}}") - - - EXEC_PROGRAM(${PKGCONFIG_EXECUTABLE} ARGS ${_package} --variable=libdir - OUTPUT_VARIABLE ${_link_DIR} ) - string(REGEX REPLACE "[\r\n]" " " ${_link_DIR} "${${_link_DIR}}") - - EXEC_PROGRAM(${PKGCONFIG_EXECUTABLE} ARGS ${_package} --libs - OUTPUT_VARIABLE ${_link_FLAGS} ) - string(REGEX REPLACE "[\r\n]" " " ${_link_FLAGS} "${${_link_FLAGS}}") - - EXEC_PROGRAM(${PKGCONFIG_EXECUTABLE} ARGS ${_package} --cflags - OUTPUT_VARIABLE ${_cflags} ) - string(REGEX REPLACE "[\r\n]" " " ${_cflags} "${${_cflags}}") - - ELSE( NOT _return_VALUE) - - MESSAGE(STATUS "KDE CMake PKGCONFIG macro indicates that ${_package} is not installed on your computer.") - MESSAGE(STATUS "Install the package which contains ${_package}.pc if you want to support this feature.") - - ENDIF(NOT _return_VALUE) - - ENDIF(PKGCONFIG_EXECUTABLE) - -ENDMACRO(PKGCONFIG _include_DIR _link_DIR _link_FLAGS _cflags) - -MARK_AS_ADVANCED(PKGCONFIG_EXECUTABLE) -- cgit v1.2.1 From fc0b8c3e07dd46a910ce22b53f0dd1f73cb2bd64 Mon Sep 17 00:00:00 2001 From: Alexander Neundorf Date: Sat, 16 Aug 2008 12:07:00 +0000 Subject: fix typo Alex svn path=/trunk/KDE/kdelibs/; revision=847820 --- modules/FindLibXslt.cmake | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/FindLibXslt.cmake b/modules/FindLibXslt.cmake index f951693f..41443d07 100644 --- a/modules/FindLibXslt.cmake +++ b/modules/FindLibXslt.cmake @@ -46,9 +46,9 @@ ELSE (LIBXSLT_INCLUDE_DIR AND LIBXSLT_LIBRARIES) SET(LIBXSLT_FOUND FALSE) ENDIF (LIBXSLT_INCLUDE_DIR AND LIBXSLT_LIBRARIES) -FIND_PROGRAM(LIBEXSLT_XSLTPROC_EXECUTABLE xsltproc) +FIND_PROGRAM(LIBXSLT_XSLTPROC_EXECUTABLE xsltproc) # For compatibility with FindLibXslt.cmake from KDE 4.[01].x -SET(XSLTPROC_EXECUTABLE ${LIBEXSLT_XSLTPROC_EXECUTABLE}) +SET(XSLTPROC_EXECUTABLE ${LIBXSLT_XSLTPROC_EXECUTABLE}) IF (LIBXSLT_FOUND) IF (NOT LibXslt_FIND_QUIETLY) @@ -60,5 +60,5 @@ ELSE (LIBXSLT_FOUND) ENDIF (LibXslt_FIND_REQUIRED) ENDIF (LIBXSLT_FOUND) -MARK_AS_ADVANCED(LIBXSLT_INCLUDE_DIR LIBXSLT_LIBRARIES LIBEXSLT_LIBRARIES LIBEXSLT_XSLTPROC_EXECUTABLE) +MARK_AS_ADVANCED(LIBXSLT_INCLUDE_DIR LIBXSLT_LIBRARIES LIBEXSLT_LIBRARIES LIBXSLT_XSLTPROC_EXECUTABLE) -- cgit v1.2.1 From 5a6db306b15b36e42649cee6543217dfe766ddff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Jacob?= Date: Sat, 16 Aug 2008 12:56:38 +0000 Subject: *make Eigen2 install to prefix/include/eigen2/Eigen *Add FindEigen2.cmake module in kdelibs svn path=/trunk/KDE/kdelibs/; revision=847916 --- modules/FindEigen2.cmake | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 modules/FindEigen2.cmake diff --git a/modules/FindEigen2.cmake b/modules/FindEigen2.cmake new file mode 100644 index 00000000..924c69a0 --- /dev/null +++ b/modules/FindEigen2.cmake @@ -0,0 +1,30 @@ +# - Try to find Eigen2 lib +# Once done this will define +# +# EIGEN2_FOUND - system has eigen lib +# EIGEN2_INCLUDE_DIR - the eigen include directory + +# Copyright (c) 2006, 2007 Montel Laurent, +# Redistribution and use is allowed according to the terms of the BSD license. +# For details see the accompanying COPYING-CMAKE-SCRIPTS file. + +if (EIGEN2_INCLUDE_DIR) + + # in cache already + set(EIGEN2_FOUND TRUE) + +else (EIGEN2_INCLUDE_DIR) + +find_path(EIGEN2_INCLUDE_DIR NAMES Eigen/Core + PATHS + ${INCLUDE_INSTALL_DIR}/eigen2 + ) + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(Eigen2 DEFAULT_MSG EIGEN2_INCLUDE_DIR ) + + +mark_as_advanced(EIGEN2_INCLUDE_DIR) + +endif(EIGEN2_INCLUDE_DIR) + -- cgit v1.2.1 From c8fdd34370f5f0929cb1e531641ed93dbc7e5ae8 Mon Sep 17 00:00:00 2001 From: Alexander Neundorf Date: Sat, 16 Aug 2008 15:26:55 +0000 Subject: don't override BUILD_ with the DISABLE_ALL master switch Alex svn path=/trunk/KDE/kdelibs/; revision=848008 --- modules/MacroOptionalAddSubdirectory.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/MacroOptionalAddSubdirectory.cmake b/modules/MacroOptionalAddSubdirectory.cmake index 9566bb4c..32e25141 100644 --- a/modules/MacroOptionalAddSubdirectory.cmake +++ b/modules/MacroOptionalAddSubdirectory.cmake @@ -20,9 +20,9 @@ MACRO (MACRO_OPTIONAL_ADD_SUBDIRECTORY _dir ) GET_FILENAME_COMPONENT(_fullPath ${_dir} ABSOLUTE) IF(EXISTS ${_fullPath}) SET(_DEFAULT_OPTION_VALUE TRUE) - IF(DISABLE_ALL_OPTIONAL_SUBDIRS) + IF(DISABLE_ALL_OPTIONAL_SUBDIRS AND NOT DEFINED BUILD_${_dir}) SET(_DEFAULT_OPTION_VALUE FALSE) - ENDIF(DISABLE_ALL_OPTIONAL_SUBDIRS) + ENDIF(DISABLE_ALL_OPTIONAL_SUBDIRS AND NOT DEFINED BUILD_${_dir}) OPTION(BUILD_${_dir} "Build directory ${_dir}" ${_DEFAULT_OPTION_VALUE}) IF(BUILD_${_dir}) ADD_SUBDIRECTORY(${_dir}) -- cgit v1.2.1 From 25a8e8e0ae2e029817589e000869c0fdfc6e10f8 Mon Sep 17 00:00:00 2001 From: Alexander Neundorf Date: Sat, 16 Aug 2008 23:20:20 +0000 Subject: FindQt4.cmake: fail if Qt3 has already been found FATAL_ERROR also if called QUIETLY FindKDE4Internal.cmake: only abort with FATAL_ERROR if we are REQUIRED, otherwise just RETURN() and don't set KDE4_FOUND Alex svn path=/trunk/KDE/kdelibs/; revision=848106 --- modules/FindKDE4Internal.cmake | 53 +++++++++++++++++++++++++++++++++++------- modules/FindQt4.cmake | 33 ++++++++++++++++++-------- 2 files changed, 68 insertions(+), 18 deletions(-) diff --git a/modules/FindKDE4Internal.cmake b/modules/FindKDE4Internal.cmake index f3a1d93c..76e1648b 100644 --- a/modules/FindKDE4Internal.cmake +++ b/modules/FindKDE4Internal.cmake @@ -258,12 +258,21 @@ if(NOT KDE4_FOUND) include (MacroEnsureVersion) +# we may only search for other packages with "REQUIRED" if we are required ourselves +if(KDE4_FIND_REQUIRED) + set(_REQ_STRING_KDE4 "REQUIRED") + set(_REQ_STRING_KDE4_MESSAGE "FATAL_ERROR") +else(KDE4_FIND_REQUIRED) + set(_REQ_STRING_KDE4 ) + set(_REQ_STRING_KDE4_MESSAGE "STATUS") +endif(KDE4_FIND_REQUIRED) + set(QT_MIN_VERSION "4.4.0") #this line includes FindQt4.cmake, which searches the Qt library and headers -find_package(Qt4 REQUIRED) +find_package(Qt4 ${_REQ_STRING_KDE4}) # automoc4 (from kdesupport) is now required, Alex -find_package(Automoc4 REQUIRED) +find_package(Automoc4 ${_REQ_STRING_KDE4}) # cmake 2.6.0 and automoc4 < 0.9.84 don't work right for -D flags if (NOT AUTOMOC4_VERSION) @@ -271,15 +280,43 @@ if (NOT AUTOMOC4_VERSION) set(AUTOMOC4_VERSION "0.9.83") endif (NOT AUTOMOC4_VERSION) macro_ensure_version("0.9.84" "${AUTOMOC4_VERSION}" _automoc4_version_ok) -if (NOT _automoc4_version_ok) - message(FATAL_ERROR "Your version of automoc4 is too old. You have ${AUTOMOC4_VERSION}, you need at least 0.9.84") -endif (NOT _automoc4_version_ok) -# use automoc4 from kdesupport +# for compatibility with KDE 4.0.x set(KDE4_AUTOMOC_EXECUTABLE "${AUTOMOC4_EXECUTABLE}" ) -# Perl is required for building KDE software, -find_package(Perl REQUIRED) +# Perl is required for building KDE software +find_package(Perl ${_REQ_STRING_KDE4}) + +# Check that we really found everything. +# If KDE4 was searched with REQUIRED, we error out with FATAL_ERROR if something wasn't found +# already above in the other FIND_PACKAGE() calls. +# If KDE4 was searched without REQUIRED and something in the FIND_PACKAGE() calls above wasn't found, +# then we get here and must check that everything has actually been found. If something is missing, +# we must not fail with FATAL_ERROR, but only not set KDE4_FOUND. +if(NOT PERL_FOUND) + message(STATUS "KDE4 not found, because Perl not found") + return() +endif(NOT PERL_FOUND) + +if(NOT QT4_FOUND) + message(STATUS "KDE4 not found, because Qt4 not found") + return() +endif(NOT QT4_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.") + return() + else(NOT AUTOMOC4_FOUND) + if(NOT _automoc4_version_ok) + message(${_REQ_STRING_KDE4_MESSAGE} "Your version of automoc4 is too old. You have ${AUTOMOC4_VERSION}, you need at least 0.9.84") + return() + endif(NOT _automoc4_version_ok) + endif(NOT AUTOMOC4_FOUND) +endif(NOT AUTOMOC4_FOUND OR NOT _automoc4_version_ok) + + +# now we are sure we have everything we need include (MacroLibrary) include (CheckCXXCompilerFlag) diff --git a/modules/FindQt4.cmake b/modules/FindQt4.cmake index 55c44dfd..8952807d 100644 --- a/modules/FindQt4.cmake +++ b/modules/FindQt4.cmake @@ -259,10 +259,24 @@ # Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. # See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. -if (QT4_QMAKE_FOUND) - # Check already done in this cmake run, nothing more to do -else (QT4_QMAKE_FOUND) +# If Qt3 has already been found, fail. +IF(QT_QT_LIBRARY) + IF(Qt4_FIND_REQUIRED) + MESSAGE( FATAL_ERROR "Qt3 and Qt4 cannot be used together in one project.") + ELSE(Qt4_FIND_REQUIRED) + IF(NOT Qt4_FIND_QUIETLY) + MESSAGE( STATUS "Qt3 and Qt4 cannot be used together in one project.") + ENDIF(NOT Qt4_FIND_QUIETLY) + RETURN() + ENDIF(Qt4_FIND_REQUIRED) +ENDIF(QT_QTCORE_LIBRARY) + + +IF (QT4_QMAKE_FOUND) + # Check already done in this cmake run, nothing more to do + RETURN() +ENDIF (QT4_QMAKE_FOUND) # check that QT_NO_DEBUG is defined for release configurations MACRO(QT_CHECK_FLAG_EXISTS FLAG VAR DOC) @@ -501,9 +515,9 @@ IF (QT4_QMAKE_FOUND) ENDIF( QT_QTCORE_INCLUDE_DIR AND NOT QT_INCLUDE_DIR) IF( NOT QT_INCLUDE_DIR) - IF( NOT Qt4_FIND_QUIETLY AND Qt4_FIND_REQUIRED) + IF(Qt4_FIND_REQUIRED) MESSAGE( FATAL_ERROR "Could NOT find QtGlobal header") - ENDIF( NOT Qt4_FIND_QUIETLY AND Qt4_FIND_REQUIRED) + ENDIF(Qt4_FIND_REQUIRED) ENDIF( NOT QT_INCLUDE_DIR) ############################################# @@ -925,9 +939,9 @@ IF (QT4_QMAKE_FOUND) ENDIF (QT_USE_FRAMEWORKS) IF( NOT QT_QTCORE_LIBRARY ) - IF( NOT Qt4_FIND_QUIETLY AND Qt4_FIND_REQUIRED) + IF(Qt4_FIND_REQUIRED) MESSAGE( FATAL_ERROR "Could NOT find QtCore. Check ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log for more details.") - ENDIF( NOT Qt4_FIND_QUIETLY AND Qt4_FIND_REQUIRED) + ENDIF(Qt4_FIND_REQUIRED) ENDIF( NOT QT_QTCORE_LIBRARY ) # Set QT_QTASSISTANT_LIBRARY @@ -1449,7 +1463,7 @@ IF (QT4_QMAKE_FOUND) SET( QT_QT_LIBRARY "") ELSE(QT4_QMAKE_FOUND) - + SET(QT_QMAKE_EXECUTABLE "${QT_QMAKE_EXECUTABLE}-NOTFOUND" CACHE FILEPATH "Invalid qmake found" FORCE) IF(Qt4_FIND_REQUIRED) IF(QT4_INSTALLED_VERSION_TOO_OLD) @@ -1462,7 +1476,6 @@ ELSE(QT4_QMAKE_FOUND) MESSAGE(STATUS "The installed Qt version ${QTVERSION} is too old, at least version ${QT_MIN_VERSION} is required") ENDIF(QT4_INSTALLED_VERSION_TOO_OLD AND NOT Qt4_FIND_QUIETLY) ENDIF(Qt4_FIND_REQUIRED) - -ENDIF (QT4_QMAKE_FOUND) + ENDIF (QT4_QMAKE_FOUND) -- cgit v1.2.1 From b90b4f097e19ed69c97824935ebdbf8dd9d45a78 Mon Sep 17 00:00:00 2001 From: Andreas Pakulat Date: Sun, 17 Aug 2008 08:21:26 +0000 Subject: Document the KDE_MIN_VERSION variable and that its deprecated. svn path=/trunk/KDE/kdelibs/; revision=848173 --- modules/FindKDE4Internal.cmake | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modules/FindKDE4Internal.cmake b/modules/FindKDE4Internal.cmake index 76e1648b..041c90a3 100644 --- a/modules/FindKDE4Internal.cmake +++ b/modules/FindKDE4Internal.cmake @@ -222,6 +222,10 @@ # find_package. For example to depend on kdelibs >= 4.1.0 one should use # # find_package(KDE4 4.1.0 REQUIRED) +# +# In earlier versions of KDE you could use the variable KDE_MIN_VERSION to +# have such a dependency. This variable is deprecated with KDE 4.2.0, but +# will still work to make the module backwards-compatible. # _KDE4_PLATFORM_INCLUDE_DIRS is used only internally # _KDE4_PLATFORM_DEFINITIONS is used only internally -- cgit v1.2.1 From 28112bf4ace2ef56dbcaa7edcfd0762988b3b50f Mon Sep 17 00:00:00 2001 From: Laurent Montel Date: Sun, 17 Aug 2008 08:43:56 +0000 Subject: Fix close "if" svn path=/trunk/KDE/kdelibs/; revision=848174 --- modules/FindQt4.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/FindQt4.cmake b/modules/FindQt4.cmake index 8952807d..fec95c6e 100644 --- a/modules/FindQt4.cmake +++ b/modules/FindQt4.cmake @@ -270,7 +270,7 @@ IF(QT_QT_LIBRARY) ENDIF(NOT Qt4_FIND_QUIETLY) RETURN() ENDIF(Qt4_FIND_REQUIRED) -ENDIF(QT_QTCORE_LIBRARY) +ENDIF(QT_QT_LIBRARY) IF (QT4_QMAKE_FOUND) -- cgit v1.2.1 From e233fa57b38b755435bc22dbb568460831eee439 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Jacob?= Date: Tue, 19 Aug 2008 13:34:45 +0000 Subject: SVN_SILENT backport minor fix svn path=/trunk/KDE/kdelibs/; revision=849395 --- modules/FindEigen2.cmake | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/FindEigen2.cmake b/modules/FindEigen2.cmake index 924c69a0..59eb1dfc 100644 --- a/modules/FindEigen2.cmake +++ b/modules/FindEigen2.cmake @@ -18,6 +18,7 @@ else (EIGEN2_INCLUDE_DIR) find_path(EIGEN2_INCLUDE_DIR NAMES Eigen/Core PATHS ${INCLUDE_INSTALL_DIR}/eigen2 + ${KDE4_INCLUDE_DIR}/eigen2 ) include(FindPackageHandleStandardArgs) -- cgit v1.2.1 From 4c42cb3b51962cc04f8de936f37065901f9aa355 Mon Sep 17 00:00:00 2001 From: Helio Castro Date: Tue, 19 Aug 2008 21:51:29 +0000 Subject: Xine move to phonon svn path=/trunk/KDE/kdelibs/; revision=849666 --- modules/FindXine.cmake | 72 -------------------------------------------------- 1 file changed, 72 deletions(-) delete mode 100644 modules/FindXine.cmake diff --git a/modules/FindXine.cmake b/modules/FindXine.cmake deleted file mode 100644 index 534613a6..00000000 --- a/modules/FindXine.cmake +++ /dev/null @@ -1,72 +0,0 @@ -# - Try to find the XINE library -# Once done this will define -# -# XINE_FOUND - system has the XINE library -# XINE_VERSION - XINE version -# XINE_BUGFIX_VERSION - the XINE bugfix version -# XINE_INCLUDE_DIR - the XINE include directory -# XINE_LIBRARY - The libraries needed to use XINE -# XINE_XCB_FOUND - libxine can use XCB for video output - -# Copyright (c) 2006,2007 Laurent Montel, -# Copyright (c) 2006, Matthias Kretz, -# -# Redistribution and use is allowed according to the terms of the BSD license. -# For details see the accompanying COPYING-CMAKE-SCRIPTS file. - -if (XINE_INCLUDE_DIR AND XINE_LIBRARY) - # Already in cache, be silent - set(Xine_FIND_QUIETLY TRUE) -endif (XINE_INCLUDE_DIR AND XINE_LIBRARY) - IF (NOT WIN32) - INCLUDE(UsePkgConfig) - PKGCONFIG(libxine _LibXineIncDir _LibXineLinkDir _LibXineLinkFlags _LibXineCflags) - EXEC_PROGRAM(${PKGCONFIG_EXECUTABLE} ARGS "--variable=prefix libxine" OUTPUT_VARIABLE _LibXinePrefix) - ENDIF (NOT WIN32) -FIND_PATH(XINE_INCLUDE_DIR NAMES xine.h - PATHS - ${_LibXineIncDir} - NO_DEFAULT_PATH) - -FIND_LIBRARY(XINE_LIBRARY NAMES xine - PATHS - ${_LibXineLinkDir} - NO_DEFAULT_PATH -) - -FIND_PROGRAM(XINECONFIG_EXECUTABLE NAMES xine-config PATHS - ${_LibXinePrefix}/bin -) - -if (XINE_INCLUDE_DIR AND XINE_LIBRARY AND XINECONFIG_EXECUTABLE) - EXEC_PROGRAM(${XINECONFIG_EXECUTABLE} ARGS --version RETURN_VALUE _return_VALUE OUTPUT_VARIABLE XINE_VERSION) - macro_ensure_version(1.1.1 ${XINE_VERSION} XINE_VERSION_OK) - if (XINE_VERSION_OK) - set(XINE_FOUND TRUE) - string(REGEX REPLACE "[0-9].[0-9]." "" XINE_BUGFIX_VERSION ${XINE_VERSION}) - endif (XINE_VERSION_OK) -endif (XINE_INCLUDE_DIR AND XINE_LIBRARY AND XINECONFIG_EXECUTABLE) - - -if( XINE_FOUND ) - INCLUDE(CheckCSourceCompiles) - SET(CMAKE_REQUIRED_INCLUDES ${XINE_INCLUDE_DIR}) - SET(CMAKE_REQUIRED_LIBRARIES ${XINE_LIBRARY}) - CHECK_C_SOURCE_COMPILES("#include \nint main()\n{\n xine_open_video_driver(xine_new(), \"auto\", XINE_VISUAL_TYPE_XCB, NULL);\n return 0;\n}\n" XINE_XCB_FOUND) -endif(XINE_FOUND) - -if (XINE_FOUND) - if (NOT Xine_FIND_QUIETLY) - message(STATUS "Found XINE: ${XINE_LIBRARY}") - endif (NOT Xine_FIND_QUIETLY) - # if(XINECONFIG_EXECUTABLE) - # EXEC_PROGRAM(${XINECONFIG_EXECUTABLE} ARGS --plugindir RETURN_VALUE _return_VALUE OUTPUT_VARIABLE XINEPLUGINSDIR) - # MESSAGE(STATUS "XINEPLUGINSDIR :<${XINEPLUGINSDIR}>") - # endif(XINECONFIG_EXECUTABLE) -else (XINE_FOUND) - if (Xine_FIND_REQUIRED) - message(FATAL_ERROR "Could NOT find XINE 1.1.1 or greater") - endif (Xine_FIND_REQUIRED) -endif (XINE_FOUND) - -MARK_AS_ADVANCED(XINE_INCLUDE_DIR XINE_LIBRARY) -- cgit v1.2.1 From 3b35b9f193a88d6d174aef3da979729952a7a261 Mon Sep 17 00:00:00 2001 From: Jos van den Oever Date: Wed, 20 Aug 2008 21:06:31 +0000 Subject: Require at least Strigi 0.6.0 (SVN trunk) because a BC change was needed in libstreamanalyzer to support ARM architecture. svn path=/trunk/KDE/kdelibs/; revision=850153 --- modules/FindStrigi.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/FindStrigi.cmake b/modules/FindStrigi.cmake index a3725a90..8fc521c7 100644 --- a/modules/FindStrigi.cmake +++ b/modules/FindStrigi.cmake @@ -15,7 +15,7 @@ include(FindLibraryWithDebug) if(NOT STRIGI_MIN_VERSION) - set(STRIGI_MIN_VERSION "0.5.9") + set(STRIGI_MIN_VERSION "0.6.0") endif(NOT STRIGI_MIN_VERSION) if (WIN32) -- cgit v1.2.1 From 65b7a8a860cd48f219914f989d0ec52bd4e2685a Mon Sep 17 00:00:00 2001 From: Alexander Neundorf Date: Wed, 20 Aug 2008 23:34:36 +0000 Subject: -disable setting the LINK_INTERFACE_LIBRARIES temporarily for cmake cvs HEAD and the soon to be released 2.6.2, since what is silently ignored and fails at link time now (or is hacked working as jaroslaw did) will fail the at cmake time, which is better, but will break e.g. Jaroslaws workarounds This will be fixed correctly when I'm back from vacation in two weeks. Alex svn path=/trunk/KDE/kdelibs/; revision=850198 --- modules/FindKDE4Internal.cmake | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/modules/FindKDE4Internal.cmake b/modules/FindKDE4Internal.cmake index 041c90a3..5ca46f96 100644 --- a/modules/FindKDE4Internal.cmake +++ b/modules/FindKDE4Internal.cmake @@ -582,9 +582,16 @@ option(KDE4_ENABLE_HTMLHANDBOOK "Create targets htmlhandbook for creating the h # disable this for now for Windows, since there is an issue with the use of "debug" and # "optimized" in the LINK_INTERFACE_LIBRARIES target property, Alex -if (WIN32) + +# disable the reduced linking temporarily for Windows, cmake HEAD and the soon-to-be-released cmake 2.6.2 +# With 2.6.0 and 2.6.1 it can happen that the "debug", "optimized" and "general" keywords are +# misinterpreted by cmake as library names, the linking fails. Usually this happens under Windows. +# In 2.6.2 this will be an error at cmake time, so we disable it for now and once we require +# 2.6.2 we'll fix it the right way (using TARGET_LINK_LIBRARIES(foo LINK_INTERFACE_LIBRARIES ...) +if (WIN32 OR "${CMAKE_MINOR_VERSION}" EQUAL 7 OR "${CMAKE_PATCH_VERSION}" EQUAL 2) set(KDE4_DISABLE_PROPERTY_ "DISABLED_") -endif(WIN32) +endif (WIN32 OR "${CMAKE_MINOR_VERSION}" EQUAL 7 OR "${CMAKE_PATCH_VERSION}" EQUAL 2) +#endif(WIN32) # option(KDE4_ENABLE_EXPERIMENTAL_LIB_EXPORT "Enable the experimental reduced library exports" FALSE) # # If enabled, make it empty, so the property will keep it's actual name. -- cgit v1.2.1 From 87299c07951d5b28767ee8949e40ff1942307bde Mon Sep 17 00:00:00 2001 From: Andreas Pakulat Date: Thu, 21 Aug 2008 07:49:08 +0000 Subject: Re-Add FindXine.cmake, removing it is a source-incompatible change and breaks kdemultimedia compilation. svn path=/trunk/KDE/kdelibs/; revision=850292 --- modules/FindXine.cmake | 72 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 modules/FindXine.cmake diff --git a/modules/FindXine.cmake b/modules/FindXine.cmake new file mode 100644 index 00000000..534613a6 --- /dev/null +++ b/modules/FindXine.cmake @@ -0,0 +1,72 @@ +# - Try to find the XINE library +# Once done this will define +# +# XINE_FOUND - system has the XINE library +# XINE_VERSION - XINE version +# XINE_BUGFIX_VERSION - the XINE bugfix version +# XINE_INCLUDE_DIR - the XINE include directory +# XINE_LIBRARY - The libraries needed to use XINE +# XINE_XCB_FOUND - libxine can use XCB for video output + +# Copyright (c) 2006,2007 Laurent Montel, +# Copyright (c) 2006, Matthias Kretz, +# +# Redistribution and use is allowed according to the terms of the BSD license. +# For details see the accompanying COPYING-CMAKE-SCRIPTS file. + +if (XINE_INCLUDE_DIR AND XINE_LIBRARY) + # Already in cache, be silent + set(Xine_FIND_QUIETLY TRUE) +endif (XINE_INCLUDE_DIR AND XINE_LIBRARY) + IF (NOT WIN32) + INCLUDE(UsePkgConfig) + PKGCONFIG(libxine _LibXineIncDir _LibXineLinkDir _LibXineLinkFlags _LibXineCflags) + EXEC_PROGRAM(${PKGCONFIG_EXECUTABLE} ARGS "--variable=prefix libxine" OUTPUT_VARIABLE _LibXinePrefix) + ENDIF (NOT WIN32) +FIND_PATH(XINE_INCLUDE_DIR NAMES xine.h + PATHS + ${_LibXineIncDir} + NO_DEFAULT_PATH) + +FIND_LIBRARY(XINE_LIBRARY NAMES xine + PATHS + ${_LibXineLinkDir} + NO_DEFAULT_PATH +) + +FIND_PROGRAM(XINECONFIG_EXECUTABLE NAMES xine-config PATHS + ${_LibXinePrefix}/bin +) + +if (XINE_INCLUDE_DIR AND XINE_LIBRARY AND XINECONFIG_EXECUTABLE) + EXEC_PROGRAM(${XINECONFIG_EXECUTABLE} ARGS --version RETURN_VALUE _return_VALUE OUTPUT_VARIABLE XINE_VERSION) + macro_ensure_version(1.1.1 ${XINE_VERSION} XINE_VERSION_OK) + if (XINE_VERSION_OK) + set(XINE_FOUND TRUE) + string(REGEX REPLACE "[0-9].[0-9]." "" XINE_BUGFIX_VERSION ${XINE_VERSION}) + endif (XINE_VERSION_OK) +endif (XINE_INCLUDE_DIR AND XINE_LIBRARY AND XINECONFIG_EXECUTABLE) + + +if( XINE_FOUND ) + INCLUDE(CheckCSourceCompiles) + SET(CMAKE_REQUIRED_INCLUDES ${XINE_INCLUDE_DIR}) + SET(CMAKE_REQUIRED_LIBRARIES ${XINE_LIBRARY}) + CHECK_C_SOURCE_COMPILES("#include \nint main()\n{\n xine_open_video_driver(xine_new(), \"auto\", XINE_VISUAL_TYPE_XCB, NULL);\n return 0;\n}\n" XINE_XCB_FOUND) +endif(XINE_FOUND) + +if (XINE_FOUND) + if (NOT Xine_FIND_QUIETLY) + message(STATUS "Found XINE: ${XINE_LIBRARY}") + endif (NOT Xine_FIND_QUIETLY) + # if(XINECONFIG_EXECUTABLE) + # EXEC_PROGRAM(${XINECONFIG_EXECUTABLE} ARGS --plugindir RETURN_VALUE _return_VALUE OUTPUT_VARIABLE XINEPLUGINSDIR) + # MESSAGE(STATUS "XINEPLUGINSDIR :<${XINEPLUGINSDIR}>") + # endif(XINECONFIG_EXECUTABLE) +else (XINE_FOUND) + if (Xine_FIND_REQUIRED) + message(FATAL_ERROR "Could NOT find XINE 1.1.1 or greater") + endif (Xine_FIND_REQUIRED) +endif (XINE_FOUND) + +MARK_AS_ADVANCED(XINE_INCLUDE_DIR XINE_LIBRARY) -- cgit v1.2.1 From 9beb25385bf8600c71db7afd793890a45ac11fa7 Mon Sep 17 00:00:00 2001 From: Alex Merry Date: Fri, 22 Aug 2008 15:00:50 +0000 Subject: Give an accurate hint - if Strigi can't be found, CMAKE_PREFIX_PATH, not CMAKE_FIND_PREFIX_PATH, should be set for CMake 2.6 svn path=/trunk/KDE/kdelibs/; revision=850927 --- modules/FindStrigi.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/FindStrigi.cmake b/modules/FindStrigi.cmake index 8fc521c7..c9c5b671 100644 --- a/modules/FindStrigi.cmake +++ b/modules/FindStrigi.cmake @@ -117,7 +117,7 @@ endif (NOT WIN32 AND NOT HAVE_STRIGI_VERSION) include(FindPackageHandleStandardArgs) find_package_handle_standard_args(Strigi - "Couldn't find Strigi streams and streamanalyzer libraries. Set the environment variable STRIGI_HOME (or CMAKE_FIND_PREFIX_PATH if using CMake >=2.5) to the strigi install dir." + "Couldn't find Strigi streams and streamanalyzer libraries. Set the environment variable STRIGI_HOME (or CMAKE_PREFIX_PATH if using CMake >=2.6) to the strigi install dir." STRIGI_STREAMS_LIBRARY STRIGI_STREAMANALYZER_LIBRARY STRIGI_INCLUDE_DIR) if(WIN32) -- cgit v1.2.1 From 315b8d02548d83b37ce6f910e51aea8df2ef758f Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Sun, 24 Aug 2008 19:12:40 +0000 Subject: patch from Alex: - reduce link dependencies even further Further comment fixes. svn path=/trunk/KDE/kdelibs/; revision=851860 --- modules/KDE4Macros.cmake | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/modules/KDE4Macros.cmake b/modules/KDE4Macros.cmake index 7c57e6a4..c99a4960 100644 --- a/modules/KDE4Macros.cmake +++ b/modules/KDE4Macros.cmake @@ -880,14 +880,14 @@ macro (KDE4_ADD_LIBRARY _target_NAME _lib_TYPE) set(_symbol "MAKE_${_symbol}_LIB") set_target_properties(${_target_NAME} PROPERTIES DEFINE_SYMBOL ${_symbol}) - # if that option is enabled, by default don't add any linked libraries to the "exported" - # link interfaces, so that executables linking against this library won't get additional - # indirect dependencies. This makes work easier for packagers and should make application - # startup somewhat faster, if I understood Dirk correctly. + # by default don't add any linked libraries to the "exported" + # link interfaces, so that executables linking against this library + # will not automatically add implicit dependencies to their link list. + # + # This reduces inter-package dependencies and makes it easier to remove + # dependencies of shared libraries without breaking binary compatibility. if(NOT "${_add_lib_param}" STREQUAL "STATIC") - if(KDE4_ENABLE_EXPERIMENTAL_LIB_EXPORT AND UNIX )# AND NOT APPLE) - set_target_properties(${_target_NAME} PROPERTIES LINK_INTERFACE_LIBRARIES "" ) - endif(KDE4_ENABLE_EXPERIMENTAL_LIB_EXPORT AND UNIX)# AND NOT APPLE) + set_target_properties(${_target_NAME} PROPERTIES ${KDE4_DISABLE_PROPERTY_}LINK_INTERFACE_LIBRARIES "" ) endif(NOT "${_add_lib_param}" STREQUAL "STATIC") endmacro (KDE4_ADD_LIBRARY _target_NAME _lib_TYPE) -- cgit v1.2.1