From 21447b43364045677e44505b84df94e705a38463 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9o=20CHASSAIGNE?= Date: Thu, 15 Sep 2016 08:23:10 +0000 Subject: [PATCH] Fixed build --- MAKE-SERVER/be-server.pro | 53 - MAKE-SERVER/be-server.udoo | 57 - deps/extra-cmake-modules/.arcconfig | 3 + deps/extra-cmake-modules/.gitignore | 1 + deps/extra-cmake-modules/.reviewboardrc | 4 + deps/extra-cmake-modules/CMakeLists.txt | 181 + .../extra-cmake-modules/COPYING-CMAKE-SCRIPTS | 22 + deps/extra-cmake-modules/ECMConfig.cmake.in | 11 + deps/extra-cmake-modules/README.rst | 96 + .../attic/modules-tests/AGG/CMakeLists.txt | 5 + .../attic/modules-tests/Blitz/CMakeLists.txt | 5 + .../attic/modules-tests/BlueZ/CMakeLists.txt | 5 + .../modules-tests/ENCHANT/CMakeLists.txt | 5 + .../attic/modules-tests/Eigen2/CMakeLists.txt | 5 + .../attic/modules-tests/FFmpeg/CMakeLists.txt | 5 + .../attic/modules-tests/Flac/CMakeLists.txt | 5 + .../attic/modules-tests/Flex/CMakeLists.txt | 5 + .../modules-tests/GObject/CMakeLists.txt | 5 + .../modules-tests/GStreamer/CMakeLists.txt | 5 + .../attic/modules-tests/LCMS/CMakeLists.txt | 5 + .../attic/modules-tests/LibArt/CMakeLists.txt | 5 + .../modules-tests/LibXslt/CMakeLists.txt | 5 + .../modules-tests/OpenEXR/CMakeLists.txt | 5 + .../attic/modules-tests/PCRE/CMakeLists.txt | 5 + .../attic/modules-tests/QCA2/CMakeLists.txt | 5 + .../modules-tests/QImageBlitz/CMakeLists.txt | 5 + .../modules-tests/RunAllModuleTests.cmake | 59 + .../attic/modules-tests/Sqlite/CMakeLists.txt | 5 + .../attic/modules-tests/Strigi/CMakeLists.txt | 17 + .../attic/modules-tests/TestFindPackage.cmake | 44 + .../attic/modules-tests/USB/CMakeLists.txt | 5 + .../attic/modules-tests/Xine/CMakeLists.txt | 5 + .../attic/modules-tests/Xmms/CMakeLists.txt | 5 + .../attic/modules-tests/readme.txt | 6 + .../attic/modules/COPYING-CMAKE-SCRIPTS | 22 + .../modules/CheckCXXSourceCompiles.cmake | 86 + .../attic/modules/CheckCXXSourceRuns.cmake | 80 + .../attic/modules/CheckPointerMember.cmake | 42 + .../attic/modules/CheckPrototypeExists.cmake | 41 + .../attic/modules/CheckStructMember.cmake | 42 + .../attic/modules/FindACL.cmake | 36 + .../attic/modules/FindAGG.cmake | 53 + .../attic/modules/FindAlsa.cmake | 69 + .../attic/modules/FindAvahi.cmake | 15 + .../attic/modules/FindBerkeleyDB.cmake | 25 + .../attic/modules/FindBlueZ.cmake | 48 + .../attic/modules/FindCarbon.cmake | 22 + .../attic/modules/FindDBusMenuQt.cmake | 94 + .../attic/modules/FindDNSSD.cmake | 48 + .../attic/modules/FindENCHANT.cmake | 44 + .../attic/modules/FindEigen.cmake | 24 + .../attic/modules/FindEigen2.cmake | 55 + .../attic/modules/FindExiv2.cmake | 80 + .../attic/modules/FindFAM.cmake | 22 + .../attic/modules/FindFFmpeg.cmake | 116 + .../attic/modules/FindFlac.cmake | 34 + .../attic/modules/FindFontconfig.cmake | 50 + .../attic/modules/FindGLIB2.cmake | 52 + .../attic/modules/FindGMP.cmake | 23 + .../attic/modules/FindGObject.cmake | 52 + .../attic/modules/FindGSSAPI.cmake | 78 + .../attic/modules/FindGStreamer.cmake | 80 + .../attic/modules/FindGphoto2.cmake | 60 + .../attic/modules/FindHUNSPELL.cmake | 25 + .../attic/modules/FindHUpnp.cmake | 31 + .../attic/modules/FindIOKit.cmake | 23 + .../attic/modules/FindKDE4Workspace.cmake | 71 + .../attic/modules/FindKDEWIN32.cmake | 26 + .../attic/modules/FindKDEWIN_Packager.cmake | 171 + .../attic/modules/FindKDEWin.cmake | 89 + .../attic/modules/FindKDevPlatform.cmake | 45 + .../attic/modules/FindKNepomuk.cmake | 39 + .../attic/modules/FindKdcraw.cmake | 124 + .../attic/modules/FindKdeMultimedia.cmake | 48 + .../attic/modules/FindKexiv2.cmake | 123 + .../attic/modules/FindKipi.cmake | 116 + .../attic/modules/FindKonto.cmake | 38 + .../attic/modules/FindKopete.cmake | 87 + .../attic/modules/FindKorundum.cmake | 20 + .../attic/modules/FindLCMS.cmake | 60 + .../attic/modules/FindLibArt.cmake | 63 + .../attic/modules/FindLibAttica.cmake | 63 + .../attic/modules/FindLibKonq.cmake | 22 + .../attic/modules/FindLibLZMA.cmake | 45 + .../attic/modules/FindLibPython.py | 13 + .../attic/modules/FindLibUSB1.cmake | 37 + .../attic/modules/FindLibintl.cmake | 46 + .../attic/modules/FindLibraryWithDebug.cmake | 113 + .../modules/FindLinuxWirelesstools.cmake | 29 + .../attic/modules/FindMusicBrainz.cmake | 32 + .../attic/modules/FindMySQL.cmake | 140 + .../attic/modules/FindNepomuk.cmake | 95 + .../attic/modules/FindNetworkManager.cmake | 42 + .../attic/modules/FindOggVorbis.cmake | 76 + .../attic/modules/FindOpenEXR.cmake | 104 + .../attic/modules/FindPCRE.cmake | 44 + .../attic/modules/FindPhonon.cmake | 37 + .../attic/modules/FindPolkitQt-1.cmake | 37 + .../attic/modules/FindPolkitQt.cmake | 94 + .../attic/modules/FindPopplerQt4.cmake | 53 + .../attic/modules/FindPulseAudio.cmake | 71 + .../attic/modules/FindPyKDE4.cmake | 184 + .../attic/modules/FindPyKDE4.py | 22 + .../attic/modules/FindPyQt.py | 48 + .../attic/modules/FindPyQt4.cmake | 71 + .../attic/modules/FindPythonLibrary.cmake | 106 + .../attic/modules/FindQCA2.cmake | 48 + .../attic/modules/FindQImageBlitz.cmake | 51 + .../attic/modules/FindQt4.cmake | 1272 +++++++ .../attic/modules/FindSIP.cmake | 60 + .../attic/modules/FindSIP.py | 15 + .../attic/modules/FindSamba.cmake | 62 + .../attic/modules/FindSane.cmake | 21 + .../attic/modules/FindSasl2.cmake | 26 + .../modules/FindSharedDesktopOntologies.cmake | 42 + .../attic/modules/FindSqlite.cmake | 50 + .../attic/modules/FindStrigi.cmake | 148 + .../attic/modules/FindTaglib.cmake | 85 + .../attic/modules/FindUDev.cmake | 19 + .../attic/modules/FindUSB.cmake | 30 + .../attic/modules/FindWcecompat.cmake | 25 + .../attic/modules/FindXKB.cmake | 15 + .../attic/modules/FindXine.cmake | 64 + .../attic/modules/FindXmms.cmake | 44 + ...ortedTargetsInCMakeRequiredLibraries.cmake | 85 + .../attic/modules/MacroAppendIf.cmake | 22 + .../attic/modules/MacroBoolTo01.cmake | 20 + .../modules/MacroEnsureOutOfSourceBuild.cmake | 20 + .../attic/modules/MacroLibrary.cmake | 19 + .../modules/NepomukAddOntologyClasses.cmake | 115 + .../attic/modules/NepomukMacros.cmake | 67 + .../attic/modules/PythonCompile.py | 4 + .../attic/modules/PythonMacros.cmake | 62 + .../modules/Qt4ConfigDependentSettings.cmake | 384 +++ .../attic/modules/Qt4Macros.cmake | 414 +++ deps/extra-cmake-modules/attic/modules/README | 19 + .../attic/modules/SIPMacros.cmake | 124 + .../attic/modules/Win32.Manifest.in | 10 + .../check_installed_exports_file.cmake | 73 + .../modules/cmake-modules-styleguide.txt | 115 + .../attic/modules/config-alsa.h.cmake | 34 + .../attic/modules/create_exe_symlink.cmake | 16 + .../modules/kde4_cmake_uninstall.cmake.in | 22 + .../attic/modules/kde4_exec_via_sh.cmake | 31 + .../cmake/FindQCollectionGenerator.cmake | 94 + .../cmake/FindSphinx.cmake | 91 + deps/extra-cmake-modules/docs/CMakeLists.txt | 153 + .../docs/find-module/FindEGL.rst | 1 + .../docs/find-module/FindKF5.rst | 1 + .../docs/find-module/FindLibGit2.rst | 1 + .../docs/find-module/FindOpenEXR.rst | 1 + .../docs/find-module/FindPng2Ico.rst | 1 + .../docs/find-module/FindPoppler.rst | 1 + .../docs/find-module/FindQtWaylandScanner.rst | 1 + .../docs/find-module/FindSharedMimeInfo.rst | 1 + .../docs/find-module/FindWayland.rst | 1 + .../docs/find-module/FindWaylandScanner.rst | 1 + .../docs/find-module/FindX11_XCB.rst | 1 + .../docs/find-module/FindXCB.rst | 1 + deps/extra-cmake-modules/docs/index.rst | 19 + .../docs/kde-module/KDECMakeSettings.rst | 1 + .../docs/kde-module/KDECompilerSettings.rst | 1 + .../KDEFrameworkCompilerSettings.rst | 1 + .../docs/kde-module/KDEInstallDirs.rst | 1 + .../kde-module/KDEPackageAppTemplates.rst | 1 + .../docs/manual/ecm-developer.7.rst | 244 ++ .../docs/manual/ecm-find-modules.7.rst | 64 + .../docs/manual/ecm-kde-modules.7.rst | 47 + .../docs/manual/ecm-modules.7.rst | 53 + .../docs/manual/ecm-toolchains.7.rst | 33 + .../extra-cmake-modules/docs/manual/ecm.7.rst | 11 + .../docs/module/ECMAddAppIcon.rst | 1 + .../docs/module/ECMAddTests.rst | 1 + .../docs/module/ECMCoverageOption.rst | 1 + .../docs/module/ECMCreateQmFromPoFiles.rst | 1 + .../docs/module/ECMEnableSanitizers.rst | 1 + .../docs/module/ECMFindModuleHelpers.rst | 1 + .../docs/module/ECMGenerateHeaders.rst | 1 + .../docs/module/ECMGeneratePkgConfigFile.rst | 1 + .../docs/module/ECMGeneratePriFile.rst | 1 + .../docs/module/ECMInstallIcons.rst | 1 + .../docs/module/ECMMarkAsTest.rst | 1 + .../docs/module/ECMMarkNonGuiExecutable.rst | 1 + .../module/ECMOptionalAddSubdirectory.rst | 1 + .../docs/module/ECMPackageConfigHelpers.rst | 1 + .../docs/module/ECMPoQmTools.rst | 1 + .../module/ECMQtDeclareLoggingCategory.rst | 1 + .../docs/module/ECMSetupVersion.rst | 1 + .../docs/module/ECMUninstallTarget.rst | 1 + .../docs/module/ECMUseFindModules.rst | 1 + .../docs/sphinx/.gitignore | 1 + .../docs/sphinx/conf.py.in | 61 + .../docs/sphinx/ecm.css.in | 8 + .../docs/sphinx/ext/ecm.py | 307 ++ .../docs/sphinx/kde-favicon.ico | Bin 0 -> 1406 bytes .../docs/toolchain/Android.rst | 1 + .../ECMFindModuleHelpersStub.cmake | 1 + .../find-modules/FindEGL.cmake | 149 + .../find-modules/FindKF5.cmake | 119 + .../find-modules/FindLibGit2.cmake | 132 + .../find-modules/FindOpenEXR.cmake | 161 + .../find-modules/FindPng2Ico.cmake | 117 + .../find-modules/FindPoppler.cmake | 151 + .../find-modules/FindQtWaylandScanner.cmake | 189 ++ .../find-modules/FindSharedMimeInfo.cmake | 114 + .../find-modules/FindWayland.cmake | 143 + .../find-modules/FindWaylandScanner.cmake | 166 + .../find-modules/FindX11_XCB.cmake | 118 + .../find-modules/FindXCB.cmake | 201 ++ .../kde-modules/KDECMakeSettings.cmake | 263 ++ .../kde-modules/KDECompilerSettings.cmake | 462 +++ .../KDEFrameworkCompilerSettings.cmake | 71 + .../kde-modules/KDEInstallDirs.cmake | 663 ++++ .../kde-modules/KDEPackageAppTemplates.cmake | 137 + .../kde-modules/appstreamtest.cmake | 27 + .../modules/ECMAddAppIcon.cmake | 244 ++ .../modules/ECMAddTests.cmake | 154 + .../modules/ECMCoverageOption.cmake | 50 + .../modules/ECMCreateQmFromPoFiles.cmake | 260 ++ .../modules/ECMEnableSanitizers.cmake | 162 + .../modules/ECMFindModuleHelpers.cmake | 297 ++ .../modules/ECMGenerateHeaders.cmake | 234 ++ .../modules/ECMGeneratePkgConfigFile.cmake | 175 + .../modules/ECMGeneratePriFile.cmake | 197 ++ .../modules/ECMInstallIcons.cmake | 296 ++ .../modules/ECMMarkAsTest.cmake | 62 + .../modules/ECMMarkNonGuiExecutable.cmake | 51 + .../modules/ECMOptionalAddSubdirectory.cmake | 72 + .../modules/ECMPackageConfigHelpers.cmake | 223 ++ .../modules/ECMPoQmTools.cmake | 226 ++ .../modules/ECMQmLoader.cpp.in | 113 + .../modules/ECMQtDeclareLoggingCategory.cmake | 134 + .../ECMQtDeclareLoggingCategory.cpp.in | 11 + .../modules/ECMQtDeclareLoggingCategory.h.in | 11 + .../modules/ECMQueryQmake.cmake | 32 + .../modules/ECMSetupVersion.cmake | 223 ++ .../modules/ECMUninstallTarget.cmake | 71 + .../modules/ECMUseFindModules.cmake | 104 + .../modules/ECMVersionHeader.h.in | 11 + .../modules/ecm_uninstall.cmake.in | 21 + deps/extra-cmake-modules/tests/CMakeLists.txt | 179 + .../ECMAddAppIconTest/128-category-name.png | Bin 0 -> 1860 bytes .../ECMAddAppIconTest/16-category-name.png | Bin 0 -> 146 bytes .../tests/ECMAddAppIconTest/CMakeLists.txt | 24 + .../ECMAddAppIconTest/check_files.cmake.in | 9 + .../tests/ECMAddTests/CMakeLists.txt | 49 + .../tests/ECMAddTests/check_files.cmake | 15 + .../ECMAddTests/multi_tests/CMakeLists.txt | 155 + .../tests/ECMAddTests/multi_tests/test1.cpp | 8 + .../tests/ECMAddTests/multi_tests/test2.cpp | 8 + .../tests/ECMAddTests/multi_tests/test3.cpp | 8 + .../tests/ECMAddTests/multi_tests/test4.cpp | 8 + .../tests/ECMAddTests/multi_tests/test5.cpp | 8 + .../tests/ECMAddTests/multi_tests/test6.cpp | 8 + .../tests/ECMAddTests/multi_tests/test7.cpp | 8 + .../tests/ECMAddTests/multi_tests/test8.cpp | 8 + .../tests/ECMAddTests/multi_tests/test9.cpp | 8 + .../ECMAddTests/single_tests/CMakeLists.txt | 122 + .../tests/ECMAddTests/single_tests/test1.cpp | 8 + .../tests/ECMAddTests/single_tests/test2.cpp | 8 + .../tests/ECMAddTests/single_tests/test3.cpp | 8 + .../tests/ECMAddTests/single_tests/test4.cpp | 8 + .../tests/ECMAddTests/single_tests/test5.cpp | 8 + .../tests/ECMAddTests/single_tests/test6.cpp | 8 + .../ECMAddTests/single_tests/test6body.cpp | 7 + .../tests/ECMAddTests/testhelper.cpp | 8 + .../tests/ECMAddTests/testhelper.h | 1 + .../ECMGenerateHeadersTest/CMakeLists.txt | 6 + .../CamelCaseHeadTest1.h | 0 .../CamelCaseHeadTest2.h | 0 .../tests/ECMGenerateHeadersTest/CommonHeader | 4 + .../headsubdir/headtest2.h | 0 .../headsubdir/headtest3.h | 0 .../tests/ECMGenerateHeadersTest/headtest1.h | 0 .../tests/ECMGenerateHeadersTest/headtest2.h | 0 .../tests/ECMGenerateHeadersTest/headtest4.h | 0 .../run_test.cmake.config | 357 ++ .../ECMGeneratePkgConfigFile/CMakeLists.txt | 6 + .../ECMGeneratePkgConfigFile/KF5CoreAddons.pc | 6 + .../run_test.cmake.config | 54 + ...ces-drive-removable-media-usb-pendrive.png | Bin 0 -> 1860 bytes .../128-emblems-emblem-mounted.png | Bin 0 -> 1860 bytes .../ECMInstallIconsTest/128-places-home.mng | Bin 0 -> 450 bytes .../ECMInstallIconsTest/16-actions-badext.txt | 1 + .../16-actions-computer.png | Bin 0 -> 146 bytes .../16-animations-loading.mng | Bin 0 -> 233 bytes .../16-categories-system-help.mng | Bin 0 -> 233 bytes .../16-emotes-face-smile.png | Bin 0 -> 146 bytes .../ECMInstallIconsTest/16-intl-something.png | Bin 0 -> 146 bytes .../16-status-user-online.png | Bin 0 -> 146 bytes .../tests/ECMInstallIconsTest/CMakeLists.txt | 106 + .../aa-actions-badsize.png | Bin 0 -> 146 bytes .../ECMInstallIconsTest/badlynamedfile.png | Bin 0 -> 146 bytes .../ECMInstallIconsTest/check_tree.cmake.in | 30 + .../hicolor/16x16/actions/badext.txt | 1 + .../hicolor/16x16/actions/old-style-name.png | Bin 0 -> 233 bytes .../hicolor/icon-theme.cache | Bin 0 -> 124 bytes .../drive-removable-media-usb-pendrive.png | Bin 0 -> 1860 bytes .../emblems/l10n/en_US/emblem-mounted.png | Bin 0 -> 1860 bytes .../128x128/places/l10n/en_US/home.mng | Bin 0 -> 450 bytes .../16x16/actions/l10n/en_US/computer.png | Bin 0 -> 146 bytes .../16x16/animations/l10n/en_US/loading.mng | Bin 0 -> 233 bytes .../hicolor/16x16/apps/l10n/en_US/cmake.png | Bin 0 -> 233 bytes .../categories/l10n/en_US/system-help.mng | Bin 0 -> 233 bytes .../16x16/emotes/l10n/en_US/face-smile.png | Bin 0 -> 146 bytes .../16x16/intl/l10n/en_US/something.png | Bin 0 -> 146 bytes .../16x16/status/l10n/en_US/user-online.png | Bin 0 -> 146 bytes .../lang-test/hicolor/icon-theme.cache | Bin 0 -> 548 bytes .../mimetypes/l10n/en_US/fonts-package.svgz | Bin 0 -> 819 bytes .../drive-removable-media-usb-pendrive.png | Bin 0 -> 1860 bytes .../128x128/emblems/emblem-mounted.png | Bin 0 -> 1860 bytes .../hicolor/128x128/places/home.mng | Bin 0 -> 450 bytes .../hicolor/16x16/actions/computer.png | Bin 0 -> 146 bytes .../hicolor/16x16/animations/loading.mng | Bin 0 -> 233 bytes .../hicolor/16x16/apps/cmake.png | Bin 0 -> 233 bytes .../hicolor/16x16/categories/system-help.mng | Bin 0 -> 233 bytes .../hicolor/16x16/emotes/face-smile.png | Bin 0 -> 146 bytes .../hicolor/16x16/intl/something.png | Bin 0 -> 146 bytes .../hicolor/16x16/status/user-online.png | Bin 0 -> 146 bytes .../multi-file-test/hicolor/icon-theme.cache | Bin 0 -> 472 bytes .../scalable/mimetypes/fonts-package.svgz | Bin 0 -> 819 bytes .../hicolor/16x16/actions/computer.png | Bin 0 -> 146 bytes .../single-file-test/hicolor/icon-theme.cache | Bin 0 -> 120 bytes .../drive-removable-media-usb-pendrive.png | Bin 0 -> 1860 bytes .../emblems/l10n/en_US/emblem-mounted.png | Bin 0 -> 1860 bytes .../oxygen/128x128/places/l10n/en_US/home.mng | Bin 0 -> 450 bytes .../16x16/actions/l10n/en_US/computer.png | Bin 0 -> 146 bytes .../16x16/animations/l10n/en_US/loading.mng | Bin 0 -> 233 bytes .../oxygen/16x16/apps/l10n/en_US/cmake.png | Bin 0 -> 233 bytes .../categories/l10n/en_US/system-help.mng | Bin 0 -> 233 bytes .../16x16/emotes/l10n/en_US/face-smile.png | Bin 0 -> 146 bytes .../16x16/intl/l10n/en_US/something.png | Bin 0 -> 146 bytes .../16x16/status/l10n/en_US/user-online.png | Bin 0 -> 146 bytes .../themed-lang-test/oxygen/icon-theme.cache | Bin 0 -> 548 bytes .../mimetypes/l10n/en_US/fonts-package.svgz | Bin 0 -> 819 bytes .../drive-removable-media-usb-pendrive.png | Bin 0 -> 1860 bytes .../128x128/emblems/emblem-mounted.png | Bin 0 -> 1860 bytes .../theme-name-2/128x128/places/home.mng | Bin 0 -> 450 bytes .../theme-name-2/16x16/actions/computer.png | Bin 0 -> 146 bytes .../theme-name-2/16x16/animations/loading.mng | Bin 0 -> 233 bytes .../theme-name-2/16x16/apps/cmake.png | Bin 0 -> 233 bytes .../16x16/categories/system-help.mng | Bin 0 -> 233 bytes .../theme-name-2/16x16/emotes/face-smile.png | Bin 0 -> 146 bytes .../theme-name-2/16x16/intl/something.png | Bin 0 -> 146 bytes .../theme-name-2/16x16/status/user-online.png | Bin 0 -> 146 bytes .../themed-test/theme-name-2/icon-theme.cache | Bin 0 -> 472 bytes .../scalable/mimetypes/fonts-package.svgz | Bin 0 -> 819 bytes .../128x128/emblems/emblem-mounted.png | Bin 0 -> 1860 bytes .../emblems/l10n/en_US/emblem-mounted.png | Bin 0 -> 1860 bytes .../v1-icons/crystalsvg/icon-theme.cache | Bin 0 -> 164 bytes .../drive-removable-media-usb-pendrive.png | Bin 0 -> 1860 bytes .../v1-icons/hicolor/128x128/places/home.mng | Bin 0 -> 450 bytes .../128x128/places/l10n/en_US/home.mng | Bin 0 -> 450 bytes .../hicolor/16x16/actions/computer.png | Bin 0 -> 146 bytes .../16x16/actions/l10n/en_US/computer.png | Bin 0 -> 146 bytes .../hicolor/16x16/animations/loading.mng | Bin 0 -> 233 bytes .../v1-icons/hicolor/16x16/apps/cmake.png | Bin 0 -> 146 bytes .../hicolor/16x16/emotes/face-smile.png | Bin 0 -> 146 bytes .../v1-icons/hicolor/16x16/intl/something.png | Bin 0 -> 146 bytes .../hicolor/16x16/status/user-online.png | Bin 0 -> 146 bytes .../v1-icons/hicolor/icon-theme.cache | Bin 0 -> 452 bytes .../scalable/mimetypes/fonts-package.svgz | Bin 0 -> 819 bytes .../mimetypes/l10n/en_US/fonts-package.svgz | Bin 0 -> 819 bytes .../categories/l10n/en_US/system-help.mng | Bin 0 -> 233 bytes .../oxygen/16x16/categories/system-help.mng | Bin 0 -> 233 bytes .../hi16-actions-old-style-name.png | Bin 0 -> 233 bytes .../sc-mimetypes-fonts-package.svgz | Bin 0 -> 819 bytes .../subdir/16-apps-cmake.png | Bin 0 -> 233 bytes .../v1-syntax-l10n/CMakeLists.txt | 1 + .../cr128-emblems-emblem-mounted.png | Bin 0 -> 1860 bytes .../v1-syntax-l10n/hi128-places-home.mng | Bin 0 -> 450 bytes .../v1-syntax-l10n/hi16-actions-computer.png | Bin 0 -> 146 bytes .../losc-mimetypes-fonts-package.svgz | Bin 0 -> 819 bytes .../ox16-categories-system-help.mng | Bin 0 -> 233 bytes .../v1-syntax-no-icons/CMakeLists.txt | 1 + .../v1-syntax/CMakeLists.txt | 1 + .../cr128-emblems-emblem-mounted.png | Bin 0 -> 1860 bytes ...ces-drive-removable-media-usb-pendrive.png | Bin 0 -> 1860 bytes .../v1-syntax/hi128-places-home.mng | Bin 0 -> 450 bytes .../v1-syntax/hi16-actions-computer.png | Bin 0 -> 233 bytes .../v1-syntax/hi16-animations-loading.mng | Bin 0 -> 233 bytes .../v1-syntax/hi16-apps-cmake.png | Bin 0 -> 233 bytes .../v1-syntax/hi16-emotes-face-smile.png | Bin 0 -> 146 bytes .../v1-syntax/hi16-intl-something.png | Bin 0 -> 146 bytes .../v1-syntax/hi16-status-user-online.png | Bin 0 -> 146 bytes .../losc-mimetypes-fonts-package.svgz | Bin 0 -> 819 bytes .../v1-syntax/ox16-categories-system-help.mng | Bin 0 -> 233 bytes .../tests/ECMPoQmToolsTest/CMakeLists.txt | 153 + .../tests/ECMPoQmToolsTest/check.cmake.in | 97 + .../ECMPoQmToolsTest/check_conf.cmake.in | 5 + .../tests/ECMPoQmToolsTest/only-process.po | 18 + .../es/custom-dir1-install-test.po | 18 + .../fr/custom-dir1-install-test.po | 18 + .../es/custom-dir2-install-test.po | 18 + .../fr/custom-dir2-install-test.po | 18 + .../ECMPoQmToolsTest/po/es/install-test.po | 18 + .../ECMPoQmToolsTest/po/fr/install-test.po | 18 + .../ECMPoQmToolsTest/po/no-po/placeholder | 0 .../po/should-not-be-installed | 0 .../ECMPoQmToolsTest/process-and-install.po | 18 + .../ECMPoQmToolsTest/subdir/CMakeLists.txt | 5 + .../ECMPoQmToolsTest/tr_test-po/de/catalog.po | 22 + .../tr_test-po/de/catalog2.po | 22 + .../ECMPoQmToolsTest/tr_test-po/en/catalog.po | 22 + .../tr_test-po/en/catalog2.po | 22 + .../tests/ECMPoQmToolsTest/tr_test.cpp | 43 + .../tests/ECMPoQmToolsTest/tr_thread_test.cpp | 96 + .../tr_thread_test_module.cpp | 39 + .../CMakeLists.txt | 42 + .../testmain.cpp | 108 + .../tests/ECMSetupVersionTest/CMakeLists.txt | 42 + .../new_explicit_header/CMakeLists.txt | 19 + .../new_explicit_header/main.c | 24 + .../CMakeLists.txt | 19 + .../new_explicit_header_abspath/main.c | 24 + .../new_explicit_simple/CMakeLists.txt | 15 + .../new_explicit_simple/main.c | 4 + .../new_explicit_soversion/CMakeLists.txt | 18 + .../new_explicit_soversion/main.c | 4 + .../new_explicit_version_file/CMakeLists.txt | 20 + .../new_explicit_version_file/main.c | 4 + .../CMakeLists.txt | 20 + .../new_explicit_version_file_abspath/main.c | 4 + .../new_project_header/CMakeLists.txt | 17 + .../new_project_header/main.c | 24 + .../new_project_header_abspath/CMakeLists.txt | 17 + .../new_project_header_abspath/main.c | 24 + .../new_project_header_prefix/CMakeLists.txt | 17 + .../new_project_header_prefix/main.c | 24 + .../new_project_simple/CMakeLists.txt | 14 + .../new_project_simple/main.c | 4 + .../new_project_simple_prefix/CMakeLists.txt | 13 + .../new_project_simple_prefix/main.c | 4 + .../new_project_soversion/CMakeLists.txt | 16 + .../new_project_soversion/main.c | 4 + .../CMakeLists.txt | 16 + .../new_project_soversion_prefix/main.c | 4 + .../new_project_version_file/CMakeLists.txt | 17 + .../new_project_version_file/main.c | 4 + .../CMakeLists.txt | 18 + .../new_project_version_file_abspath/main.c | 4 + .../old_header/CMakeLists.txt | 17 + .../ECMSetupVersionTest/old_header/main.c | 24 + .../old_header_abspath/CMakeLists.txt | 18 + .../old_header_abspath/main.c | 24 + .../old_simple/CMakeLists.txt | 13 + .../ECMSetupVersionTest/old_simple/main.c | 4 + .../old_soversion/CMakeLists.txt | 16 + .../ECMSetupVersionTest/old_soversion/main.c | 4 + .../old_version_file/CMakeLists.txt | 18 + .../old_version_file/main.c | 4 + .../old_version_file_abspath/CMakeLists.txt | 18 + .../old_version_file_abspath/main.c | 4 + .../old_version_file_anynewer/CMakeLists.txt | 18 + .../old_version_file_anynewer/main.c | 4 + .../old_version_file_exact/CMakeLists.txt | 53 + .../old_version_file_exact/main.c | 4 + .../old_version_file_samemajor/CMakeLists.txt | 53 + .../old_version_file_samemajor/main.c | 4 + .../ECMSetupVersionTest/version_helpers.cmake | 123 + .../ECMToolchainAndroidTest/CMakeLists.txt | 23 + .../tests/ECMToolchainAndroidTest/main.c | 4 + .../CMakeFiles/testtarget.dir/link.txt | 1 + .../testlinkfile/outputfake.json | 1 + .../tests/ExecuteCoreModules/CMakeLists.txt | 13 + .../tests/ExecuteCoreModules/main.c | 4 + .../tests/ExecuteKDEModules/CMakeLists.txt | 25 + .../tests/ExecuteKDEModules/main.c | 4 + .../tests/FindModules/CMakeLists.txt | 20 + .../tests/FindModules/main.c | 4 + .../not_cache_variable/CMakeLists.txt | 47 + .../not_cache_variable/main.c | 4 + .../relative_or_absolute/CMakeLists.txt | 27 + .../relative_or_absolute/main.c | 4 + .../tests/KDEInstallDirsTest/var_list.cmake | 126 + .../vars_in_sync/CMakeLists.txt | 38 + .../KDEInstallDirsTest/vars_in_sync/main.c | 4 + .../KDEPackageAppTemplatesTest/CMakeLists.txt | 12 + .../KDEPackageAppTemplatesTest/check.cmake.in | 37 + .../qml-plasmoid/CMakeLists.txt | 10 + .../qml-plasmoid/Messages.sh | 2 + .../qml-plasmoid/README | 32 + .../package/contents/images/pairs.svgz | Bin 0 -> 103064 bytes .../qml-plasmoid/package/contents/ui/main.qml | 28 + .../qml-plasmoid/package/metadata.desktop | 67 + .../qml-plasmoid/qml-plasmoid.kdevtemplate | 74 + .../qml-plasmoid/qml-plasmoid.png | Bin 0 -> 35613 bytes .../tests/UseFindModules/CMakeLists.txt | 30 + .../tests/UseFindModules/main.c | 4 + .../tests/test_helpers.cmake | 92 + .../toolchain/Android.cmake | 216 ++ .../toolchain/deployment-file.json.in | 15 + .../toolchain/specifydependencies.cmake | 45 + deps/karchive/.reviewboardrc | 4 + deps/karchive/AUTHORS | 10 + deps/karchive/CMakeLists.txt | 91 + deps/karchive/COPYING | 346 ++ deps/karchive/COPYING.LIB | 510 +++ deps/karchive/INSTALL | 23 + deps/karchive/KF5ArchiveConfig.cmake.in | 10 + deps/karchive/README.md | 22 + deps/karchive/autotests/CMakeLists.txt | 58 + .../redundantDataDescriptorsNoSignature.zip | Bin 0 -> 366 bytes .../redundantDataDescriptorsWithSignature.zip | Bin 0 -> 374 bytes deps/karchive/autotests/deprecatedtest.cpp | 72 + .../autotests/global_header_test.tar.gz | Bin 0 -> 244 bytes deps/karchive/autotests/karchivetest.cpp | 1310 ++++++++ deps/karchive/autotests/karchivetest.h | 131 + .../autotests/kcompressiondevicetest.cpp | 147 + .../autotests/kcompressiondevicetest.h | 59 + deps/karchive/autotests/kfiltertest.cpp | 430 +++ deps/karchive/autotests/kfiltertest.h | 58 + .../autotests/klimitediodevicetest.cpp | 78 + .../karchive/autotests/klimitediodevicetest.h | 52 + deps/karchive/autotests/runtime_resource.rcc | Bin 0 -> 1569 bytes .../autotests/tar_directory_forgotten.tar.gz | Bin 0 -> 12069 bytes .../autotests/tar_directory_twice.tar.gz | Bin 0 -> 353 bytes .../karchive/autotests/tar_prefix_test.tar.gz | Bin 0 -> 12053 bytes deps/karchive/autotests/tar_rootdir.tar.gz | Bin 0 -> 3133 bytes .../examples/bzip2gzip/CMakeLists.txt | 8 + deps/karchive/examples/bzip2gzip/main.cpp | 93 + .../examples/helloworld/CMakeLists.txt | 18 + .../examples/helloworld/helloworld.pro | 6 + deps/karchive/examples/helloworld/main.cpp | 86 + .../examples/tarlocalfiles/CMakeLists.txt | 8 + deps/karchive/examples/tarlocalfiles/main.cpp | 80 + .../karchive/examples/unzipper/CMakeLists.txt | 8 + deps/karchive/examples/unzipper/main.cpp | 77 + deps/karchive/metainfo.yaml | 13 + deps/karchive/src/CMakeLists.txt | 99 + deps/karchive/src/config-compression.h.cmake | 8 + deps/karchive/src/k7zip.cpp | 2965 +++++++++++++++++ deps/karchive/src/k7zip.h | 90 + deps/karchive/src/kar.cpp | 186 ++ deps/karchive/src/kar.h | 94 + deps/karchive/src/karchive.cpp | 927 ++++++ deps/karchive/src/karchive.h | 388 +++ deps/karchive/src/karchive_p.h | 56 + deps/karchive/src/karchivedirectory.h | 123 + deps/karchive/src/karchiveentry.h | 118 + deps/karchive/src/karchivefile.h | 112 + deps/karchive/src/kbzip2filter.cpp | 198 ++ deps/karchive/src/kbzip2filter.h | 64 + deps/karchive/src/kcompressiondevice.cpp | 389 +++ deps/karchive/src/kcompressiondevice.h | 127 + deps/karchive/src/kfilterbase.cpp | 93 + deps/karchive/src/kfilterbase.h | 119 + deps/karchive/src/kfilterdev.cpp | 99 + deps/karchive/src/kfilterdev.h | 154 + deps/karchive/src/kgzipfilter.cpp | 352 ++ deps/karchive/src/kgzipfilter.h | 72 + deps/karchive/src/klimitediodevice.cpp | 82 + deps/karchive/src/klimitediodevice_p.h | 67 + deps/karchive/src/knonefilter.cpp | 140 + deps/karchive/src/knonefilter.h | 61 + deps/karchive/src/krcc.cpp | 162 + deps/karchive/src/krcc.h | 96 + deps/karchive/src/ktar.cpp | 890 +++++ deps/karchive/src/ktar.h | 109 + deps/karchive/src/kxzfilter.cpp | 279 ++ deps/karchive/src/kxzfilter.h | 81 + deps/karchive/src/kzip.cpp | 1426 ++++++++ deps/karchive/src/kzip.h | 168 + deps/karchive/src/kzipfileentry.h | 81 + deps/karchive/tests/CMakeLists.txt | 23 + deps/karchive/tests/k7ziptest.cpp | 81 + deps/karchive/tests/krcctest.cpp | 70 + deps/karchive/tests/ktartest.cpp | 70 + deps/karchive/tests/kziptest.cpp | 307 ++ deps/libwatermark/stream_io/RtAudioOutput.h | 4 +- share/be-server.sh | 3 +- share/run.sh | 8 + src/be-server.pro | 50 +- 573 files changed, 35485 insertions(+), 140 deletions(-) delete mode 100644 MAKE-SERVER/be-server.pro delete mode 100644 MAKE-SERVER/be-server.udoo create mode 100644 deps/extra-cmake-modules/.arcconfig create mode 100644 deps/extra-cmake-modules/.gitignore create mode 100644 deps/extra-cmake-modules/.reviewboardrc create mode 100644 deps/extra-cmake-modules/CMakeLists.txt create mode 100644 deps/extra-cmake-modules/COPYING-CMAKE-SCRIPTS create mode 100644 deps/extra-cmake-modules/ECMConfig.cmake.in create mode 100644 deps/extra-cmake-modules/README.rst create mode 100644 deps/extra-cmake-modules/attic/modules-tests/AGG/CMakeLists.txt create mode 100644 deps/extra-cmake-modules/attic/modules-tests/Blitz/CMakeLists.txt create mode 100644 deps/extra-cmake-modules/attic/modules-tests/BlueZ/CMakeLists.txt create mode 100644 deps/extra-cmake-modules/attic/modules-tests/ENCHANT/CMakeLists.txt create mode 100644 deps/extra-cmake-modules/attic/modules-tests/Eigen2/CMakeLists.txt create mode 100644 deps/extra-cmake-modules/attic/modules-tests/FFmpeg/CMakeLists.txt create mode 100644 deps/extra-cmake-modules/attic/modules-tests/Flac/CMakeLists.txt create mode 100644 deps/extra-cmake-modules/attic/modules-tests/Flex/CMakeLists.txt create mode 100644 deps/extra-cmake-modules/attic/modules-tests/GObject/CMakeLists.txt create mode 100644 deps/extra-cmake-modules/attic/modules-tests/GStreamer/CMakeLists.txt create mode 100644 deps/extra-cmake-modules/attic/modules-tests/LCMS/CMakeLists.txt create mode 100644 deps/extra-cmake-modules/attic/modules-tests/LibArt/CMakeLists.txt create mode 100644 deps/extra-cmake-modules/attic/modules-tests/LibXslt/CMakeLists.txt create mode 100644 deps/extra-cmake-modules/attic/modules-tests/OpenEXR/CMakeLists.txt create mode 100644 deps/extra-cmake-modules/attic/modules-tests/PCRE/CMakeLists.txt create mode 100644 deps/extra-cmake-modules/attic/modules-tests/QCA2/CMakeLists.txt create mode 100644 deps/extra-cmake-modules/attic/modules-tests/QImageBlitz/CMakeLists.txt create mode 100644 deps/extra-cmake-modules/attic/modules-tests/RunAllModuleTests.cmake create mode 100644 deps/extra-cmake-modules/attic/modules-tests/Sqlite/CMakeLists.txt create mode 100644 deps/extra-cmake-modules/attic/modules-tests/Strigi/CMakeLists.txt create mode 100644 deps/extra-cmake-modules/attic/modules-tests/TestFindPackage.cmake create mode 100644 deps/extra-cmake-modules/attic/modules-tests/USB/CMakeLists.txt create mode 100644 deps/extra-cmake-modules/attic/modules-tests/Xine/CMakeLists.txt create mode 100644 deps/extra-cmake-modules/attic/modules-tests/Xmms/CMakeLists.txt create mode 100644 deps/extra-cmake-modules/attic/modules-tests/readme.txt create mode 100644 deps/extra-cmake-modules/attic/modules/COPYING-CMAKE-SCRIPTS create mode 100644 deps/extra-cmake-modules/attic/modules/CheckCXXSourceCompiles.cmake create mode 100644 deps/extra-cmake-modules/attic/modules/CheckCXXSourceRuns.cmake create mode 100644 deps/extra-cmake-modules/attic/modules/CheckPointerMember.cmake create mode 100644 deps/extra-cmake-modules/attic/modules/CheckPrototypeExists.cmake create mode 100644 deps/extra-cmake-modules/attic/modules/CheckStructMember.cmake create mode 100644 deps/extra-cmake-modules/attic/modules/FindACL.cmake create mode 100644 deps/extra-cmake-modules/attic/modules/FindAGG.cmake create mode 100644 deps/extra-cmake-modules/attic/modules/FindAlsa.cmake create mode 100644 deps/extra-cmake-modules/attic/modules/FindAvahi.cmake create mode 100644 deps/extra-cmake-modules/attic/modules/FindBerkeleyDB.cmake create mode 100644 deps/extra-cmake-modules/attic/modules/FindBlueZ.cmake create mode 100644 deps/extra-cmake-modules/attic/modules/FindCarbon.cmake create mode 100644 deps/extra-cmake-modules/attic/modules/FindDBusMenuQt.cmake create mode 100644 deps/extra-cmake-modules/attic/modules/FindDNSSD.cmake create mode 100644 deps/extra-cmake-modules/attic/modules/FindENCHANT.cmake create mode 100644 deps/extra-cmake-modules/attic/modules/FindEigen.cmake create mode 100644 deps/extra-cmake-modules/attic/modules/FindEigen2.cmake create mode 100644 deps/extra-cmake-modules/attic/modules/FindExiv2.cmake create mode 100644 deps/extra-cmake-modules/attic/modules/FindFAM.cmake create mode 100644 deps/extra-cmake-modules/attic/modules/FindFFmpeg.cmake create mode 100644 deps/extra-cmake-modules/attic/modules/FindFlac.cmake create mode 100644 deps/extra-cmake-modules/attic/modules/FindFontconfig.cmake create mode 100644 deps/extra-cmake-modules/attic/modules/FindGLIB2.cmake create mode 100644 deps/extra-cmake-modules/attic/modules/FindGMP.cmake create mode 100644 deps/extra-cmake-modules/attic/modules/FindGObject.cmake create mode 100644 deps/extra-cmake-modules/attic/modules/FindGSSAPI.cmake create mode 100644 deps/extra-cmake-modules/attic/modules/FindGStreamer.cmake create mode 100644 deps/extra-cmake-modules/attic/modules/FindGphoto2.cmake create mode 100644 deps/extra-cmake-modules/attic/modules/FindHUNSPELL.cmake create mode 100644 deps/extra-cmake-modules/attic/modules/FindHUpnp.cmake create mode 100644 deps/extra-cmake-modules/attic/modules/FindIOKit.cmake create mode 100644 deps/extra-cmake-modules/attic/modules/FindKDE4Workspace.cmake create mode 100644 deps/extra-cmake-modules/attic/modules/FindKDEWIN32.cmake create mode 100644 deps/extra-cmake-modules/attic/modules/FindKDEWIN_Packager.cmake create mode 100644 deps/extra-cmake-modules/attic/modules/FindKDEWin.cmake create mode 100644 deps/extra-cmake-modules/attic/modules/FindKDevPlatform.cmake create mode 100644 deps/extra-cmake-modules/attic/modules/FindKNepomuk.cmake create mode 100644 deps/extra-cmake-modules/attic/modules/FindKdcraw.cmake create mode 100644 deps/extra-cmake-modules/attic/modules/FindKdeMultimedia.cmake create mode 100644 deps/extra-cmake-modules/attic/modules/FindKexiv2.cmake create mode 100644 deps/extra-cmake-modules/attic/modules/FindKipi.cmake create mode 100644 deps/extra-cmake-modules/attic/modules/FindKonto.cmake create mode 100644 deps/extra-cmake-modules/attic/modules/FindKopete.cmake create mode 100644 deps/extra-cmake-modules/attic/modules/FindKorundum.cmake create mode 100644 deps/extra-cmake-modules/attic/modules/FindLCMS.cmake create mode 100644 deps/extra-cmake-modules/attic/modules/FindLibArt.cmake create mode 100644 deps/extra-cmake-modules/attic/modules/FindLibAttica.cmake create mode 100644 deps/extra-cmake-modules/attic/modules/FindLibKonq.cmake create mode 100644 deps/extra-cmake-modules/attic/modules/FindLibLZMA.cmake create mode 100644 deps/extra-cmake-modules/attic/modules/FindLibPython.py create mode 100644 deps/extra-cmake-modules/attic/modules/FindLibUSB1.cmake create mode 100644 deps/extra-cmake-modules/attic/modules/FindLibintl.cmake create mode 100644 deps/extra-cmake-modules/attic/modules/FindLibraryWithDebug.cmake create mode 100644 deps/extra-cmake-modules/attic/modules/FindLinuxWirelesstools.cmake create mode 100644 deps/extra-cmake-modules/attic/modules/FindMusicBrainz.cmake create mode 100644 deps/extra-cmake-modules/attic/modules/FindMySQL.cmake create mode 100644 deps/extra-cmake-modules/attic/modules/FindNepomuk.cmake create mode 100644 deps/extra-cmake-modules/attic/modules/FindNetworkManager.cmake create mode 100644 deps/extra-cmake-modules/attic/modules/FindOggVorbis.cmake create mode 100644 deps/extra-cmake-modules/attic/modules/FindOpenEXR.cmake create mode 100644 deps/extra-cmake-modules/attic/modules/FindPCRE.cmake create mode 100644 deps/extra-cmake-modules/attic/modules/FindPhonon.cmake create mode 100644 deps/extra-cmake-modules/attic/modules/FindPolkitQt-1.cmake create mode 100644 deps/extra-cmake-modules/attic/modules/FindPolkitQt.cmake create mode 100644 deps/extra-cmake-modules/attic/modules/FindPopplerQt4.cmake create mode 100644 deps/extra-cmake-modules/attic/modules/FindPulseAudio.cmake create mode 100644 deps/extra-cmake-modules/attic/modules/FindPyKDE4.cmake create mode 100644 deps/extra-cmake-modules/attic/modules/FindPyKDE4.py create mode 100644 deps/extra-cmake-modules/attic/modules/FindPyQt.py create mode 100644 deps/extra-cmake-modules/attic/modules/FindPyQt4.cmake create mode 100644 deps/extra-cmake-modules/attic/modules/FindPythonLibrary.cmake create mode 100644 deps/extra-cmake-modules/attic/modules/FindQCA2.cmake create mode 100644 deps/extra-cmake-modules/attic/modules/FindQImageBlitz.cmake create mode 100644 deps/extra-cmake-modules/attic/modules/FindQt4.cmake create mode 100644 deps/extra-cmake-modules/attic/modules/FindSIP.cmake create mode 100644 deps/extra-cmake-modules/attic/modules/FindSIP.py create mode 100644 deps/extra-cmake-modules/attic/modules/FindSamba.cmake create mode 100644 deps/extra-cmake-modules/attic/modules/FindSane.cmake create mode 100644 deps/extra-cmake-modules/attic/modules/FindSasl2.cmake create mode 100644 deps/extra-cmake-modules/attic/modules/FindSharedDesktopOntologies.cmake create mode 100644 deps/extra-cmake-modules/attic/modules/FindSqlite.cmake create mode 100644 deps/extra-cmake-modules/attic/modules/FindStrigi.cmake create mode 100644 deps/extra-cmake-modules/attic/modules/FindTaglib.cmake create mode 100644 deps/extra-cmake-modules/attic/modules/FindUDev.cmake create mode 100644 deps/extra-cmake-modules/attic/modules/FindUSB.cmake create mode 100644 deps/extra-cmake-modules/attic/modules/FindWcecompat.cmake create mode 100644 deps/extra-cmake-modules/attic/modules/FindXKB.cmake create mode 100644 deps/extra-cmake-modules/attic/modules/FindXine.cmake create mode 100644 deps/extra-cmake-modules/attic/modules/FindXmms.cmake create mode 100644 deps/extra-cmake-modules/attic/modules/HandleImportedTargetsInCMakeRequiredLibraries.cmake create mode 100644 deps/extra-cmake-modules/attic/modules/MacroAppendIf.cmake create mode 100644 deps/extra-cmake-modules/attic/modules/MacroBoolTo01.cmake create mode 100644 deps/extra-cmake-modules/attic/modules/MacroEnsureOutOfSourceBuild.cmake create mode 100644 deps/extra-cmake-modules/attic/modules/MacroLibrary.cmake create mode 100644 deps/extra-cmake-modules/attic/modules/NepomukAddOntologyClasses.cmake create mode 100644 deps/extra-cmake-modules/attic/modules/NepomukMacros.cmake create mode 100644 deps/extra-cmake-modules/attic/modules/PythonCompile.py create mode 100644 deps/extra-cmake-modules/attic/modules/PythonMacros.cmake create mode 100644 deps/extra-cmake-modules/attic/modules/Qt4ConfigDependentSettings.cmake create mode 100644 deps/extra-cmake-modules/attic/modules/Qt4Macros.cmake create mode 100644 deps/extra-cmake-modules/attic/modules/README create mode 100644 deps/extra-cmake-modules/attic/modules/SIPMacros.cmake create mode 100644 deps/extra-cmake-modules/attic/modules/Win32.Manifest.in create mode 100644 deps/extra-cmake-modules/attic/modules/check_installed_exports_file.cmake create mode 100644 deps/extra-cmake-modules/attic/modules/cmake-modules-styleguide.txt create mode 100644 deps/extra-cmake-modules/attic/modules/config-alsa.h.cmake create mode 100644 deps/extra-cmake-modules/attic/modules/create_exe_symlink.cmake create mode 100644 deps/extra-cmake-modules/attic/modules/kde4_cmake_uninstall.cmake.in create mode 100644 deps/extra-cmake-modules/attic/modules/kde4_exec_via_sh.cmake create mode 100644 deps/extra-cmake-modules/cmake/FindQCollectionGenerator.cmake create mode 100644 deps/extra-cmake-modules/cmake/FindSphinx.cmake create mode 100644 deps/extra-cmake-modules/docs/CMakeLists.txt create mode 100644 deps/extra-cmake-modules/docs/find-module/FindEGL.rst create mode 100644 deps/extra-cmake-modules/docs/find-module/FindKF5.rst create mode 100644 deps/extra-cmake-modules/docs/find-module/FindLibGit2.rst create mode 100644 deps/extra-cmake-modules/docs/find-module/FindOpenEXR.rst create mode 100644 deps/extra-cmake-modules/docs/find-module/FindPng2Ico.rst create mode 100644 deps/extra-cmake-modules/docs/find-module/FindPoppler.rst create mode 100644 deps/extra-cmake-modules/docs/find-module/FindQtWaylandScanner.rst create mode 100644 deps/extra-cmake-modules/docs/find-module/FindSharedMimeInfo.rst create mode 100644 deps/extra-cmake-modules/docs/find-module/FindWayland.rst create mode 100644 deps/extra-cmake-modules/docs/find-module/FindWaylandScanner.rst create mode 100644 deps/extra-cmake-modules/docs/find-module/FindX11_XCB.rst create mode 100644 deps/extra-cmake-modules/docs/find-module/FindXCB.rst create mode 100644 deps/extra-cmake-modules/docs/index.rst create mode 100644 deps/extra-cmake-modules/docs/kde-module/KDECMakeSettings.rst create mode 100644 deps/extra-cmake-modules/docs/kde-module/KDECompilerSettings.rst create mode 100644 deps/extra-cmake-modules/docs/kde-module/KDEFrameworkCompilerSettings.rst create mode 100644 deps/extra-cmake-modules/docs/kde-module/KDEInstallDirs.rst create mode 100644 deps/extra-cmake-modules/docs/kde-module/KDEPackageAppTemplates.rst create mode 100644 deps/extra-cmake-modules/docs/manual/ecm-developer.7.rst create mode 100644 deps/extra-cmake-modules/docs/manual/ecm-find-modules.7.rst create mode 100644 deps/extra-cmake-modules/docs/manual/ecm-kde-modules.7.rst create mode 100644 deps/extra-cmake-modules/docs/manual/ecm-modules.7.rst create mode 100644 deps/extra-cmake-modules/docs/manual/ecm-toolchains.7.rst create mode 100644 deps/extra-cmake-modules/docs/manual/ecm.7.rst create mode 100644 deps/extra-cmake-modules/docs/module/ECMAddAppIcon.rst create mode 100644 deps/extra-cmake-modules/docs/module/ECMAddTests.rst create mode 100644 deps/extra-cmake-modules/docs/module/ECMCoverageOption.rst create mode 100644 deps/extra-cmake-modules/docs/module/ECMCreateQmFromPoFiles.rst create mode 100644 deps/extra-cmake-modules/docs/module/ECMEnableSanitizers.rst create mode 100644 deps/extra-cmake-modules/docs/module/ECMFindModuleHelpers.rst create mode 100644 deps/extra-cmake-modules/docs/module/ECMGenerateHeaders.rst create mode 100644 deps/extra-cmake-modules/docs/module/ECMGeneratePkgConfigFile.rst create mode 100644 deps/extra-cmake-modules/docs/module/ECMGeneratePriFile.rst create mode 100644 deps/extra-cmake-modules/docs/module/ECMInstallIcons.rst create mode 100644 deps/extra-cmake-modules/docs/module/ECMMarkAsTest.rst create mode 100644 deps/extra-cmake-modules/docs/module/ECMMarkNonGuiExecutable.rst create mode 100644 deps/extra-cmake-modules/docs/module/ECMOptionalAddSubdirectory.rst create mode 100644 deps/extra-cmake-modules/docs/module/ECMPackageConfigHelpers.rst create mode 100644 deps/extra-cmake-modules/docs/module/ECMPoQmTools.rst create mode 100644 deps/extra-cmake-modules/docs/module/ECMQtDeclareLoggingCategory.rst create mode 100644 deps/extra-cmake-modules/docs/module/ECMSetupVersion.rst create mode 100644 deps/extra-cmake-modules/docs/module/ECMUninstallTarget.rst create mode 100644 deps/extra-cmake-modules/docs/module/ECMUseFindModules.rst create mode 100644 deps/extra-cmake-modules/docs/sphinx/.gitignore create mode 100644 deps/extra-cmake-modules/docs/sphinx/conf.py.in create mode 100644 deps/extra-cmake-modules/docs/sphinx/ecm.css.in create mode 100644 deps/extra-cmake-modules/docs/sphinx/ext/ecm.py create mode 100644 deps/extra-cmake-modules/docs/sphinx/kde-favicon.ico create mode 100644 deps/extra-cmake-modules/docs/toolchain/Android.rst create mode 100644 deps/extra-cmake-modules/find-modules/ECMFindModuleHelpersStub.cmake create mode 100644 deps/extra-cmake-modules/find-modules/FindEGL.cmake create mode 100644 deps/extra-cmake-modules/find-modules/FindKF5.cmake create mode 100644 deps/extra-cmake-modules/find-modules/FindLibGit2.cmake create mode 100644 deps/extra-cmake-modules/find-modules/FindOpenEXR.cmake create mode 100644 deps/extra-cmake-modules/find-modules/FindPng2Ico.cmake create mode 100644 deps/extra-cmake-modules/find-modules/FindPoppler.cmake create mode 100644 deps/extra-cmake-modules/find-modules/FindQtWaylandScanner.cmake create mode 100644 deps/extra-cmake-modules/find-modules/FindSharedMimeInfo.cmake create mode 100644 deps/extra-cmake-modules/find-modules/FindWayland.cmake create mode 100644 deps/extra-cmake-modules/find-modules/FindWaylandScanner.cmake create mode 100644 deps/extra-cmake-modules/find-modules/FindX11_XCB.cmake create mode 100644 deps/extra-cmake-modules/find-modules/FindXCB.cmake create mode 100644 deps/extra-cmake-modules/kde-modules/KDECMakeSettings.cmake create mode 100644 deps/extra-cmake-modules/kde-modules/KDECompilerSettings.cmake create mode 100644 deps/extra-cmake-modules/kde-modules/KDEFrameworkCompilerSettings.cmake create mode 100644 deps/extra-cmake-modules/kde-modules/KDEInstallDirs.cmake create mode 100644 deps/extra-cmake-modules/kde-modules/KDEPackageAppTemplates.cmake create mode 100644 deps/extra-cmake-modules/kde-modules/appstreamtest.cmake create mode 100644 deps/extra-cmake-modules/modules/ECMAddAppIcon.cmake create mode 100644 deps/extra-cmake-modules/modules/ECMAddTests.cmake create mode 100644 deps/extra-cmake-modules/modules/ECMCoverageOption.cmake create mode 100644 deps/extra-cmake-modules/modules/ECMCreateQmFromPoFiles.cmake create mode 100644 deps/extra-cmake-modules/modules/ECMEnableSanitizers.cmake create mode 100644 deps/extra-cmake-modules/modules/ECMFindModuleHelpers.cmake create mode 100644 deps/extra-cmake-modules/modules/ECMGenerateHeaders.cmake create mode 100644 deps/extra-cmake-modules/modules/ECMGeneratePkgConfigFile.cmake create mode 100644 deps/extra-cmake-modules/modules/ECMGeneratePriFile.cmake create mode 100644 deps/extra-cmake-modules/modules/ECMInstallIcons.cmake create mode 100644 deps/extra-cmake-modules/modules/ECMMarkAsTest.cmake create mode 100644 deps/extra-cmake-modules/modules/ECMMarkNonGuiExecutable.cmake create mode 100644 deps/extra-cmake-modules/modules/ECMOptionalAddSubdirectory.cmake create mode 100644 deps/extra-cmake-modules/modules/ECMPackageConfigHelpers.cmake create mode 100644 deps/extra-cmake-modules/modules/ECMPoQmTools.cmake create mode 100644 deps/extra-cmake-modules/modules/ECMQmLoader.cpp.in create mode 100644 deps/extra-cmake-modules/modules/ECMQtDeclareLoggingCategory.cmake create mode 100644 deps/extra-cmake-modules/modules/ECMQtDeclareLoggingCategory.cpp.in create mode 100644 deps/extra-cmake-modules/modules/ECMQtDeclareLoggingCategory.h.in create mode 100644 deps/extra-cmake-modules/modules/ECMQueryQmake.cmake create mode 100644 deps/extra-cmake-modules/modules/ECMSetupVersion.cmake create mode 100644 deps/extra-cmake-modules/modules/ECMUninstallTarget.cmake create mode 100644 deps/extra-cmake-modules/modules/ECMUseFindModules.cmake create mode 100644 deps/extra-cmake-modules/modules/ECMVersionHeader.h.in create mode 100644 deps/extra-cmake-modules/modules/ecm_uninstall.cmake.in create mode 100644 deps/extra-cmake-modules/tests/CMakeLists.txt create mode 100644 deps/extra-cmake-modules/tests/ECMAddAppIconTest/128-category-name.png create mode 100644 deps/extra-cmake-modules/tests/ECMAddAppIconTest/16-category-name.png create mode 100644 deps/extra-cmake-modules/tests/ECMAddAppIconTest/CMakeLists.txt create mode 100644 deps/extra-cmake-modules/tests/ECMAddAppIconTest/check_files.cmake.in create mode 100644 deps/extra-cmake-modules/tests/ECMAddTests/CMakeLists.txt create mode 100644 deps/extra-cmake-modules/tests/ECMAddTests/check_files.cmake create mode 100644 deps/extra-cmake-modules/tests/ECMAddTests/multi_tests/CMakeLists.txt create mode 100644 deps/extra-cmake-modules/tests/ECMAddTests/multi_tests/test1.cpp create mode 100644 deps/extra-cmake-modules/tests/ECMAddTests/multi_tests/test2.cpp create mode 100644 deps/extra-cmake-modules/tests/ECMAddTests/multi_tests/test3.cpp create mode 100644 deps/extra-cmake-modules/tests/ECMAddTests/multi_tests/test4.cpp create mode 100644 deps/extra-cmake-modules/tests/ECMAddTests/multi_tests/test5.cpp create mode 100644 deps/extra-cmake-modules/tests/ECMAddTests/multi_tests/test6.cpp create mode 100644 deps/extra-cmake-modules/tests/ECMAddTests/multi_tests/test7.cpp create mode 100644 deps/extra-cmake-modules/tests/ECMAddTests/multi_tests/test8.cpp create mode 100644 deps/extra-cmake-modules/tests/ECMAddTests/multi_tests/test9.cpp create mode 100644 deps/extra-cmake-modules/tests/ECMAddTests/single_tests/CMakeLists.txt create mode 100644 deps/extra-cmake-modules/tests/ECMAddTests/single_tests/test1.cpp create mode 100644 deps/extra-cmake-modules/tests/ECMAddTests/single_tests/test2.cpp create mode 100644 deps/extra-cmake-modules/tests/ECMAddTests/single_tests/test3.cpp create mode 100644 deps/extra-cmake-modules/tests/ECMAddTests/single_tests/test4.cpp create mode 100644 deps/extra-cmake-modules/tests/ECMAddTests/single_tests/test5.cpp create mode 100644 deps/extra-cmake-modules/tests/ECMAddTests/single_tests/test6.cpp create mode 100644 deps/extra-cmake-modules/tests/ECMAddTests/single_tests/test6body.cpp create mode 100644 deps/extra-cmake-modules/tests/ECMAddTests/testhelper.cpp create mode 100644 deps/extra-cmake-modules/tests/ECMAddTests/testhelper.h create mode 100644 deps/extra-cmake-modules/tests/ECMGenerateHeadersTest/CMakeLists.txt create mode 100644 deps/extra-cmake-modules/tests/ECMGenerateHeadersTest/CamelCaseHeadTest1.h create mode 100644 deps/extra-cmake-modules/tests/ECMGenerateHeadersTest/CamelCaseHeadTest2.h create mode 100644 deps/extra-cmake-modules/tests/ECMGenerateHeadersTest/CommonHeader create mode 100644 deps/extra-cmake-modules/tests/ECMGenerateHeadersTest/headsubdir/headtest2.h create mode 100644 deps/extra-cmake-modules/tests/ECMGenerateHeadersTest/headsubdir/headtest3.h create mode 100644 deps/extra-cmake-modules/tests/ECMGenerateHeadersTest/headtest1.h create mode 100644 deps/extra-cmake-modules/tests/ECMGenerateHeadersTest/headtest2.h create mode 100644 deps/extra-cmake-modules/tests/ECMGenerateHeadersTest/headtest4.h create mode 100644 deps/extra-cmake-modules/tests/ECMGenerateHeadersTest/run_test.cmake.config create mode 100644 deps/extra-cmake-modules/tests/ECMGeneratePkgConfigFile/CMakeLists.txt create mode 100644 deps/extra-cmake-modules/tests/ECMGeneratePkgConfigFile/KF5CoreAddons.pc create mode 100644 deps/extra-cmake-modules/tests/ECMGeneratePkgConfigFile/run_test.cmake.config create mode 100644 deps/extra-cmake-modules/tests/ECMInstallIconsTest/128-devices-drive-removable-media-usb-pendrive.png create mode 100644 deps/extra-cmake-modules/tests/ECMInstallIconsTest/128-emblems-emblem-mounted.png create mode 100644 deps/extra-cmake-modules/tests/ECMInstallIconsTest/128-places-home.mng create mode 100644 deps/extra-cmake-modules/tests/ECMInstallIconsTest/16-actions-badext.txt create mode 100644 deps/extra-cmake-modules/tests/ECMInstallIconsTest/16-actions-computer.png create mode 100644 deps/extra-cmake-modules/tests/ECMInstallIconsTest/16-animations-loading.mng create mode 100644 deps/extra-cmake-modules/tests/ECMInstallIconsTest/16-categories-system-help.mng create mode 100644 deps/extra-cmake-modules/tests/ECMInstallIconsTest/16-emotes-face-smile.png create mode 100644 deps/extra-cmake-modules/tests/ECMInstallIconsTest/16-intl-something.png create mode 100644 deps/extra-cmake-modules/tests/ECMInstallIconsTest/16-status-user-online.png create mode 100644 deps/extra-cmake-modules/tests/ECMInstallIconsTest/CMakeLists.txt create mode 100644 deps/extra-cmake-modules/tests/ECMInstallIconsTest/aa-actions-badsize.png create mode 100644 deps/extra-cmake-modules/tests/ECMInstallIconsTest/badlynamedfile.png create mode 100644 deps/extra-cmake-modules/tests/ECMInstallIconsTest/check_tree.cmake.in create mode 100644 deps/extra-cmake-modules/tests/ECMInstallIconsTest/expected-tree/badly-named-files-test/hicolor/16x16/actions/badext.txt create mode 100644 deps/extra-cmake-modules/tests/ECMInstallIconsTest/expected-tree/badly-named-files-test/hicolor/16x16/actions/old-style-name.png create mode 100644 deps/extra-cmake-modules/tests/ECMInstallIconsTest/expected-tree/badly-named-files-test/hicolor/icon-theme.cache create mode 100644 deps/extra-cmake-modules/tests/ECMInstallIconsTest/expected-tree/lang-test/hicolor/128x128/devices/l10n/en_US/drive-removable-media-usb-pendrive.png create mode 100644 deps/extra-cmake-modules/tests/ECMInstallIconsTest/expected-tree/lang-test/hicolor/128x128/emblems/l10n/en_US/emblem-mounted.png create mode 100644 deps/extra-cmake-modules/tests/ECMInstallIconsTest/expected-tree/lang-test/hicolor/128x128/places/l10n/en_US/home.mng create mode 100644 deps/extra-cmake-modules/tests/ECMInstallIconsTest/expected-tree/lang-test/hicolor/16x16/actions/l10n/en_US/computer.png create mode 100644 deps/extra-cmake-modules/tests/ECMInstallIconsTest/expected-tree/lang-test/hicolor/16x16/animations/l10n/en_US/loading.mng create mode 100644 deps/extra-cmake-modules/tests/ECMInstallIconsTest/expected-tree/lang-test/hicolor/16x16/apps/l10n/en_US/cmake.png create mode 100644 deps/extra-cmake-modules/tests/ECMInstallIconsTest/expected-tree/lang-test/hicolor/16x16/categories/l10n/en_US/system-help.mng create mode 100644 deps/extra-cmake-modules/tests/ECMInstallIconsTest/expected-tree/lang-test/hicolor/16x16/emotes/l10n/en_US/face-smile.png create mode 100644 deps/extra-cmake-modules/tests/ECMInstallIconsTest/expected-tree/lang-test/hicolor/16x16/intl/l10n/en_US/something.png create mode 100644 deps/extra-cmake-modules/tests/ECMInstallIconsTest/expected-tree/lang-test/hicolor/16x16/status/l10n/en_US/user-online.png create mode 100644 deps/extra-cmake-modules/tests/ECMInstallIconsTest/expected-tree/lang-test/hicolor/icon-theme.cache create mode 100644 deps/extra-cmake-modules/tests/ECMInstallIconsTest/expected-tree/lang-test/hicolor/scalable/mimetypes/l10n/en_US/fonts-package.svgz create mode 100644 deps/extra-cmake-modules/tests/ECMInstallIconsTest/expected-tree/multi-file-test/hicolor/128x128/devices/drive-removable-media-usb-pendrive.png create mode 100644 deps/extra-cmake-modules/tests/ECMInstallIconsTest/expected-tree/multi-file-test/hicolor/128x128/emblems/emblem-mounted.png create mode 100644 deps/extra-cmake-modules/tests/ECMInstallIconsTest/expected-tree/multi-file-test/hicolor/128x128/places/home.mng create mode 100644 deps/extra-cmake-modules/tests/ECMInstallIconsTest/expected-tree/multi-file-test/hicolor/16x16/actions/computer.png create mode 100644 deps/extra-cmake-modules/tests/ECMInstallIconsTest/expected-tree/multi-file-test/hicolor/16x16/animations/loading.mng create mode 100644 deps/extra-cmake-modules/tests/ECMInstallIconsTest/expected-tree/multi-file-test/hicolor/16x16/apps/cmake.png create mode 100644 deps/extra-cmake-modules/tests/ECMInstallIconsTest/expected-tree/multi-file-test/hicolor/16x16/categories/system-help.mng create mode 100644 deps/extra-cmake-modules/tests/ECMInstallIconsTest/expected-tree/multi-file-test/hicolor/16x16/emotes/face-smile.png create mode 100644 deps/extra-cmake-modules/tests/ECMInstallIconsTest/expected-tree/multi-file-test/hicolor/16x16/intl/something.png create mode 100644 deps/extra-cmake-modules/tests/ECMInstallIconsTest/expected-tree/multi-file-test/hicolor/16x16/status/user-online.png create mode 100644 deps/extra-cmake-modules/tests/ECMInstallIconsTest/expected-tree/multi-file-test/hicolor/icon-theme.cache create mode 100644 deps/extra-cmake-modules/tests/ECMInstallIconsTest/expected-tree/multi-file-test/hicolor/scalable/mimetypes/fonts-package.svgz create mode 100644 deps/extra-cmake-modules/tests/ECMInstallIconsTest/expected-tree/single-file-test/hicolor/16x16/actions/computer.png create mode 100644 deps/extra-cmake-modules/tests/ECMInstallIconsTest/expected-tree/single-file-test/hicolor/icon-theme.cache create mode 100644 deps/extra-cmake-modules/tests/ECMInstallIconsTest/expected-tree/themed-lang-test/oxygen/128x128/devices/l10n/en_US/drive-removable-media-usb-pendrive.png create mode 100644 deps/extra-cmake-modules/tests/ECMInstallIconsTest/expected-tree/themed-lang-test/oxygen/128x128/emblems/l10n/en_US/emblem-mounted.png create mode 100644 deps/extra-cmake-modules/tests/ECMInstallIconsTest/expected-tree/themed-lang-test/oxygen/128x128/places/l10n/en_US/home.mng create mode 100644 deps/extra-cmake-modules/tests/ECMInstallIconsTest/expected-tree/themed-lang-test/oxygen/16x16/actions/l10n/en_US/computer.png create mode 100644 deps/extra-cmake-modules/tests/ECMInstallIconsTest/expected-tree/themed-lang-test/oxygen/16x16/animations/l10n/en_US/loading.mng create mode 100644 deps/extra-cmake-modules/tests/ECMInstallIconsTest/expected-tree/themed-lang-test/oxygen/16x16/apps/l10n/en_US/cmake.png create mode 100644 deps/extra-cmake-modules/tests/ECMInstallIconsTest/expected-tree/themed-lang-test/oxygen/16x16/categories/l10n/en_US/system-help.mng create mode 100644 deps/extra-cmake-modules/tests/ECMInstallIconsTest/expected-tree/themed-lang-test/oxygen/16x16/emotes/l10n/en_US/face-smile.png create mode 100644 deps/extra-cmake-modules/tests/ECMInstallIconsTest/expected-tree/themed-lang-test/oxygen/16x16/intl/l10n/en_US/something.png create mode 100644 deps/extra-cmake-modules/tests/ECMInstallIconsTest/expected-tree/themed-lang-test/oxygen/16x16/status/l10n/en_US/user-online.png create mode 100644 deps/extra-cmake-modules/tests/ECMInstallIconsTest/expected-tree/themed-lang-test/oxygen/icon-theme.cache create mode 100644 deps/extra-cmake-modules/tests/ECMInstallIconsTest/expected-tree/themed-lang-test/oxygen/scalable/mimetypes/l10n/en_US/fonts-package.svgz create mode 100644 deps/extra-cmake-modules/tests/ECMInstallIconsTest/expected-tree/themed-test/theme-name-2/128x128/devices/drive-removable-media-usb-pendrive.png create mode 100644 deps/extra-cmake-modules/tests/ECMInstallIconsTest/expected-tree/themed-test/theme-name-2/128x128/emblems/emblem-mounted.png create mode 100644 deps/extra-cmake-modules/tests/ECMInstallIconsTest/expected-tree/themed-test/theme-name-2/128x128/places/home.mng create mode 100644 deps/extra-cmake-modules/tests/ECMInstallIconsTest/expected-tree/themed-test/theme-name-2/16x16/actions/computer.png create mode 100644 deps/extra-cmake-modules/tests/ECMInstallIconsTest/expected-tree/themed-test/theme-name-2/16x16/animations/loading.mng create mode 100644 deps/extra-cmake-modules/tests/ECMInstallIconsTest/expected-tree/themed-test/theme-name-2/16x16/apps/cmake.png create mode 100644 deps/extra-cmake-modules/tests/ECMInstallIconsTest/expected-tree/themed-test/theme-name-2/16x16/categories/system-help.mng create mode 100644 deps/extra-cmake-modules/tests/ECMInstallIconsTest/expected-tree/themed-test/theme-name-2/16x16/emotes/face-smile.png create mode 100644 deps/extra-cmake-modules/tests/ECMInstallIconsTest/expected-tree/themed-test/theme-name-2/16x16/intl/something.png create mode 100644 deps/extra-cmake-modules/tests/ECMInstallIconsTest/expected-tree/themed-test/theme-name-2/16x16/status/user-online.png create mode 100644 deps/extra-cmake-modules/tests/ECMInstallIconsTest/expected-tree/themed-test/theme-name-2/icon-theme.cache create mode 100644 deps/extra-cmake-modules/tests/ECMInstallIconsTest/expected-tree/themed-test/theme-name-2/scalable/mimetypes/fonts-package.svgz create mode 100644 deps/extra-cmake-modules/tests/ECMInstallIconsTest/expected-tree/v1-icons/crystalsvg/128x128/emblems/emblem-mounted.png create mode 100644 deps/extra-cmake-modules/tests/ECMInstallIconsTest/expected-tree/v1-icons/crystalsvg/128x128/emblems/l10n/en_US/emblem-mounted.png create mode 100644 deps/extra-cmake-modules/tests/ECMInstallIconsTest/expected-tree/v1-icons/crystalsvg/icon-theme.cache create mode 100644 deps/extra-cmake-modules/tests/ECMInstallIconsTest/expected-tree/v1-icons/hicolor/128x128/devices/drive-removable-media-usb-pendrive.png create mode 100644 deps/extra-cmake-modules/tests/ECMInstallIconsTest/expected-tree/v1-icons/hicolor/128x128/places/home.mng create mode 100644 deps/extra-cmake-modules/tests/ECMInstallIconsTest/expected-tree/v1-icons/hicolor/128x128/places/l10n/en_US/home.mng create mode 100644 deps/extra-cmake-modules/tests/ECMInstallIconsTest/expected-tree/v1-icons/hicolor/16x16/actions/computer.png create mode 100644 deps/extra-cmake-modules/tests/ECMInstallIconsTest/expected-tree/v1-icons/hicolor/16x16/actions/l10n/en_US/computer.png create mode 100644 deps/extra-cmake-modules/tests/ECMInstallIconsTest/expected-tree/v1-icons/hicolor/16x16/animations/loading.mng create mode 100644 deps/extra-cmake-modules/tests/ECMInstallIconsTest/expected-tree/v1-icons/hicolor/16x16/apps/cmake.png create mode 100644 deps/extra-cmake-modules/tests/ECMInstallIconsTest/expected-tree/v1-icons/hicolor/16x16/emotes/face-smile.png create mode 100644 deps/extra-cmake-modules/tests/ECMInstallIconsTest/expected-tree/v1-icons/hicolor/16x16/intl/something.png create mode 100644 deps/extra-cmake-modules/tests/ECMInstallIconsTest/expected-tree/v1-icons/hicolor/16x16/status/user-online.png create mode 100644 deps/extra-cmake-modules/tests/ECMInstallIconsTest/expected-tree/v1-icons/hicolor/icon-theme.cache create mode 100644 deps/extra-cmake-modules/tests/ECMInstallIconsTest/expected-tree/v1-icons/locolor/scalable/mimetypes/fonts-package.svgz create mode 100644 deps/extra-cmake-modules/tests/ECMInstallIconsTest/expected-tree/v1-icons/locolor/scalable/mimetypes/l10n/en_US/fonts-package.svgz create mode 100644 deps/extra-cmake-modules/tests/ECMInstallIconsTest/expected-tree/v1-icons/oxygen/16x16/categories/l10n/en_US/system-help.mng create mode 100644 deps/extra-cmake-modules/tests/ECMInstallIconsTest/expected-tree/v1-icons/oxygen/16x16/categories/system-help.mng create mode 100644 deps/extra-cmake-modules/tests/ECMInstallIconsTest/hi16-actions-old-style-name.png create mode 100644 deps/extra-cmake-modules/tests/ECMInstallIconsTest/sc-mimetypes-fonts-package.svgz create mode 100644 deps/extra-cmake-modules/tests/ECMInstallIconsTest/subdir/16-apps-cmake.png create mode 100644 deps/extra-cmake-modules/tests/ECMInstallIconsTest/v1-syntax-l10n/CMakeLists.txt create mode 100644 deps/extra-cmake-modules/tests/ECMInstallIconsTest/v1-syntax-l10n/cr128-emblems-emblem-mounted.png create mode 100644 deps/extra-cmake-modules/tests/ECMInstallIconsTest/v1-syntax-l10n/hi128-places-home.mng create mode 100644 deps/extra-cmake-modules/tests/ECMInstallIconsTest/v1-syntax-l10n/hi16-actions-computer.png create mode 100644 deps/extra-cmake-modules/tests/ECMInstallIconsTest/v1-syntax-l10n/losc-mimetypes-fonts-package.svgz create mode 100644 deps/extra-cmake-modules/tests/ECMInstallIconsTest/v1-syntax-l10n/ox16-categories-system-help.mng create mode 100644 deps/extra-cmake-modules/tests/ECMInstallIconsTest/v1-syntax-no-icons/CMakeLists.txt create mode 100644 deps/extra-cmake-modules/tests/ECMInstallIconsTest/v1-syntax/CMakeLists.txt create mode 100644 deps/extra-cmake-modules/tests/ECMInstallIconsTest/v1-syntax/cr128-emblems-emblem-mounted.png create mode 100644 deps/extra-cmake-modules/tests/ECMInstallIconsTest/v1-syntax/hi128-devices-drive-removable-media-usb-pendrive.png create mode 100644 deps/extra-cmake-modules/tests/ECMInstallIconsTest/v1-syntax/hi128-places-home.mng create mode 100644 deps/extra-cmake-modules/tests/ECMInstallIconsTest/v1-syntax/hi16-actions-computer.png create mode 100644 deps/extra-cmake-modules/tests/ECMInstallIconsTest/v1-syntax/hi16-animations-loading.mng create mode 100644 deps/extra-cmake-modules/tests/ECMInstallIconsTest/v1-syntax/hi16-apps-cmake.png create mode 100644 deps/extra-cmake-modules/tests/ECMInstallIconsTest/v1-syntax/hi16-emotes-face-smile.png create mode 100644 deps/extra-cmake-modules/tests/ECMInstallIconsTest/v1-syntax/hi16-intl-something.png create mode 100644 deps/extra-cmake-modules/tests/ECMInstallIconsTest/v1-syntax/hi16-status-user-online.png create mode 100644 deps/extra-cmake-modules/tests/ECMInstallIconsTest/v1-syntax/losc-mimetypes-fonts-package.svgz create mode 100644 deps/extra-cmake-modules/tests/ECMInstallIconsTest/v1-syntax/ox16-categories-system-help.mng create mode 100644 deps/extra-cmake-modules/tests/ECMPoQmToolsTest/CMakeLists.txt create mode 100644 deps/extra-cmake-modules/tests/ECMPoQmToolsTest/check.cmake.in create mode 100644 deps/extra-cmake-modules/tests/ECMPoQmToolsTest/check_conf.cmake.in create mode 100644 deps/extra-cmake-modules/tests/ECMPoQmToolsTest/only-process.po create mode 100644 deps/extra-cmake-modules/tests/ECMPoQmToolsTest/po-custom-dir1/es/custom-dir1-install-test.po create mode 100644 deps/extra-cmake-modules/tests/ECMPoQmToolsTest/po-custom-dir1/fr/custom-dir1-install-test.po create mode 100644 deps/extra-cmake-modules/tests/ECMPoQmToolsTest/po-custom-dir2/es/custom-dir2-install-test.po create mode 100644 deps/extra-cmake-modules/tests/ECMPoQmToolsTest/po-custom-dir2/fr/custom-dir2-install-test.po create mode 100644 deps/extra-cmake-modules/tests/ECMPoQmToolsTest/po/es/install-test.po create mode 100644 deps/extra-cmake-modules/tests/ECMPoQmToolsTest/po/fr/install-test.po create mode 100644 deps/extra-cmake-modules/tests/ECMPoQmToolsTest/po/no-po/placeholder create mode 100644 deps/extra-cmake-modules/tests/ECMPoQmToolsTest/po/should-not-be-installed create mode 100644 deps/extra-cmake-modules/tests/ECMPoQmToolsTest/process-and-install.po create mode 100644 deps/extra-cmake-modules/tests/ECMPoQmToolsTest/subdir/CMakeLists.txt create mode 100644 deps/extra-cmake-modules/tests/ECMPoQmToolsTest/tr_test-po/de/catalog.po create mode 100644 deps/extra-cmake-modules/tests/ECMPoQmToolsTest/tr_test-po/de/catalog2.po create mode 100644 deps/extra-cmake-modules/tests/ECMPoQmToolsTest/tr_test-po/en/catalog.po create mode 100644 deps/extra-cmake-modules/tests/ECMPoQmToolsTest/tr_test-po/en/catalog2.po create mode 100644 deps/extra-cmake-modules/tests/ECMPoQmToolsTest/tr_test.cpp create mode 100644 deps/extra-cmake-modules/tests/ECMPoQmToolsTest/tr_thread_test.cpp create mode 100644 deps/extra-cmake-modules/tests/ECMPoQmToolsTest/tr_thread_test_module.cpp create mode 100644 deps/extra-cmake-modules/tests/ECMQtDeclareLoggingCategoryTest/CMakeLists.txt create mode 100644 deps/extra-cmake-modules/tests/ECMQtDeclareLoggingCategoryTest/testmain.cpp create mode 100644 deps/extra-cmake-modules/tests/ECMSetupVersionTest/CMakeLists.txt create mode 100644 deps/extra-cmake-modules/tests/ECMSetupVersionTest/new_explicit_header/CMakeLists.txt create mode 100644 deps/extra-cmake-modules/tests/ECMSetupVersionTest/new_explicit_header/main.c create mode 100644 deps/extra-cmake-modules/tests/ECMSetupVersionTest/new_explicit_header_abspath/CMakeLists.txt create mode 100644 deps/extra-cmake-modules/tests/ECMSetupVersionTest/new_explicit_header_abspath/main.c create mode 100644 deps/extra-cmake-modules/tests/ECMSetupVersionTest/new_explicit_simple/CMakeLists.txt create mode 100644 deps/extra-cmake-modules/tests/ECMSetupVersionTest/new_explicit_simple/main.c create mode 100644 deps/extra-cmake-modules/tests/ECMSetupVersionTest/new_explicit_soversion/CMakeLists.txt create mode 100644 deps/extra-cmake-modules/tests/ECMSetupVersionTest/new_explicit_soversion/main.c create mode 100644 deps/extra-cmake-modules/tests/ECMSetupVersionTest/new_explicit_version_file/CMakeLists.txt create mode 100644 deps/extra-cmake-modules/tests/ECMSetupVersionTest/new_explicit_version_file/main.c create mode 100644 deps/extra-cmake-modules/tests/ECMSetupVersionTest/new_explicit_version_file_abspath/CMakeLists.txt create mode 100644 deps/extra-cmake-modules/tests/ECMSetupVersionTest/new_explicit_version_file_abspath/main.c create mode 100644 deps/extra-cmake-modules/tests/ECMSetupVersionTest/new_project_header/CMakeLists.txt create mode 100644 deps/extra-cmake-modules/tests/ECMSetupVersionTest/new_project_header/main.c create mode 100644 deps/extra-cmake-modules/tests/ECMSetupVersionTest/new_project_header_abspath/CMakeLists.txt create mode 100644 deps/extra-cmake-modules/tests/ECMSetupVersionTest/new_project_header_abspath/main.c create mode 100644 deps/extra-cmake-modules/tests/ECMSetupVersionTest/new_project_header_prefix/CMakeLists.txt create mode 100644 deps/extra-cmake-modules/tests/ECMSetupVersionTest/new_project_header_prefix/main.c create mode 100644 deps/extra-cmake-modules/tests/ECMSetupVersionTest/new_project_simple/CMakeLists.txt create mode 100644 deps/extra-cmake-modules/tests/ECMSetupVersionTest/new_project_simple/main.c create mode 100644 deps/extra-cmake-modules/tests/ECMSetupVersionTest/new_project_simple_prefix/CMakeLists.txt create mode 100644 deps/extra-cmake-modules/tests/ECMSetupVersionTest/new_project_simple_prefix/main.c create mode 100644 deps/extra-cmake-modules/tests/ECMSetupVersionTest/new_project_soversion/CMakeLists.txt create mode 100644 deps/extra-cmake-modules/tests/ECMSetupVersionTest/new_project_soversion/main.c create mode 100644 deps/extra-cmake-modules/tests/ECMSetupVersionTest/new_project_soversion_prefix/CMakeLists.txt create mode 100644 deps/extra-cmake-modules/tests/ECMSetupVersionTest/new_project_soversion_prefix/main.c create mode 100644 deps/extra-cmake-modules/tests/ECMSetupVersionTest/new_project_version_file/CMakeLists.txt create mode 100644 deps/extra-cmake-modules/tests/ECMSetupVersionTest/new_project_version_file/main.c create mode 100644 deps/extra-cmake-modules/tests/ECMSetupVersionTest/new_project_version_file_abspath/CMakeLists.txt create mode 100644 deps/extra-cmake-modules/tests/ECMSetupVersionTest/new_project_version_file_abspath/main.c create mode 100644 deps/extra-cmake-modules/tests/ECMSetupVersionTest/old_header/CMakeLists.txt create mode 100644 deps/extra-cmake-modules/tests/ECMSetupVersionTest/old_header/main.c create mode 100644 deps/extra-cmake-modules/tests/ECMSetupVersionTest/old_header_abspath/CMakeLists.txt create mode 100644 deps/extra-cmake-modules/tests/ECMSetupVersionTest/old_header_abspath/main.c create mode 100644 deps/extra-cmake-modules/tests/ECMSetupVersionTest/old_simple/CMakeLists.txt create mode 100644 deps/extra-cmake-modules/tests/ECMSetupVersionTest/old_simple/main.c create mode 100644 deps/extra-cmake-modules/tests/ECMSetupVersionTest/old_soversion/CMakeLists.txt create mode 100644 deps/extra-cmake-modules/tests/ECMSetupVersionTest/old_soversion/main.c create mode 100644 deps/extra-cmake-modules/tests/ECMSetupVersionTest/old_version_file/CMakeLists.txt create mode 100644 deps/extra-cmake-modules/tests/ECMSetupVersionTest/old_version_file/main.c create mode 100644 deps/extra-cmake-modules/tests/ECMSetupVersionTest/old_version_file_abspath/CMakeLists.txt create mode 100644 deps/extra-cmake-modules/tests/ECMSetupVersionTest/old_version_file_abspath/main.c create mode 100644 deps/extra-cmake-modules/tests/ECMSetupVersionTest/old_version_file_anynewer/CMakeLists.txt create mode 100644 deps/extra-cmake-modules/tests/ECMSetupVersionTest/old_version_file_anynewer/main.c create mode 100644 deps/extra-cmake-modules/tests/ECMSetupVersionTest/old_version_file_exact/CMakeLists.txt create mode 100644 deps/extra-cmake-modules/tests/ECMSetupVersionTest/old_version_file_exact/main.c create mode 100644 deps/extra-cmake-modules/tests/ECMSetupVersionTest/old_version_file_samemajor/CMakeLists.txt create mode 100644 deps/extra-cmake-modules/tests/ECMSetupVersionTest/old_version_file_samemajor/main.c create mode 100644 deps/extra-cmake-modules/tests/ECMSetupVersionTest/version_helpers.cmake create mode 100644 deps/extra-cmake-modules/tests/ECMToolchainAndroidTest/CMakeLists.txt create mode 100644 deps/extra-cmake-modules/tests/ECMToolchainAndroidTest/main.c create mode 100644 deps/extra-cmake-modules/tests/ECMToolchainAndroidTest/testlinkfile/CMakeFiles/testtarget.dir/link.txt create mode 100644 deps/extra-cmake-modules/tests/ECMToolchainAndroidTest/testlinkfile/outputfake.json create mode 100644 deps/extra-cmake-modules/tests/ExecuteCoreModules/CMakeLists.txt create mode 100644 deps/extra-cmake-modules/tests/ExecuteCoreModules/main.c create mode 100644 deps/extra-cmake-modules/tests/ExecuteKDEModules/CMakeLists.txt create mode 100644 deps/extra-cmake-modules/tests/ExecuteKDEModules/main.c create mode 100644 deps/extra-cmake-modules/tests/FindModules/CMakeLists.txt create mode 100644 deps/extra-cmake-modules/tests/FindModules/main.c create mode 100644 deps/extra-cmake-modules/tests/KDEInstallDirsTest/not_cache_variable/CMakeLists.txt create mode 100644 deps/extra-cmake-modules/tests/KDEInstallDirsTest/not_cache_variable/main.c create mode 100644 deps/extra-cmake-modules/tests/KDEInstallDirsTest/relative_or_absolute/CMakeLists.txt create mode 100644 deps/extra-cmake-modules/tests/KDEInstallDirsTest/relative_or_absolute/main.c create mode 100644 deps/extra-cmake-modules/tests/KDEInstallDirsTest/var_list.cmake create mode 100644 deps/extra-cmake-modules/tests/KDEInstallDirsTest/vars_in_sync/CMakeLists.txt create mode 100644 deps/extra-cmake-modules/tests/KDEInstallDirsTest/vars_in_sync/main.c create mode 100644 deps/extra-cmake-modules/tests/KDEPackageAppTemplatesTest/CMakeLists.txt create mode 100644 deps/extra-cmake-modules/tests/KDEPackageAppTemplatesTest/check.cmake.in create mode 100644 deps/extra-cmake-modules/tests/KDEPackageAppTemplatesTest/qml-plasmoid/CMakeLists.txt create mode 100644 deps/extra-cmake-modules/tests/KDEPackageAppTemplatesTest/qml-plasmoid/Messages.sh create mode 100644 deps/extra-cmake-modules/tests/KDEPackageAppTemplatesTest/qml-plasmoid/README create mode 100644 deps/extra-cmake-modules/tests/KDEPackageAppTemplatesTest/qml-plasmoid/package/contents/images/pairs.svgz create mode 100644 deps/extra-cmake-modules/tests/KDEPackageAppTemplatesTest/qml-plasmoid/package/contents/ui/main.qml create mode 100644 deps/extra-cmake-modules/tests/KDEPackageAppTemplatesTest/qml-plasmoid/package/metadata.desktop create mode 100644 deps/extra-cmake-modules/tests/KDEPackageAppTemplatesTest/qml-plasmoid/qml-plasmoid.kdevtemplate create mode 100644 deps/extra-cmake-modules/tests/KDEPackageAppTemplatesTest/qml-plasmoid/qml-plasmoid.png create mode 100644 deps/extra-cmake-modules/tests/UseFindModules/CMakeLists.txt create mode 100644 deps/extra-cmake-modules/tests/UseFindModules/main.c create mode 100644 deps/extra-cmake-modules/tests/test_helpers.cmake create mode 100644 deps/extra-cmake-modules/toolchain/Android.cmake create mode 100644 deps/extra-cmake-modules/toolchain/deployment-file.json.in create mode 100644 deps/extra-cmake-modules/toolchain/specifydependencies.cmake create mode 100644 deps/karchive/.reviewboardrc create mode 100644 deps/karchive/AUTHORS create mode 100644 deps/karchive/CMakeLists.txt create mode 100644 deps/karchive/COPYING create mode 100644 deps/karchive/COPYING.LIB create mode 100644 deps/karchive/INSTALL create mode 100644 deps/karchive/KF5ArchiveConfig.cmake.in create mode 100644 deps/karchive/README.md create mode 100644 deps/karchive/autotests/CMakeLists.txt create mode 100644 deps/karchive/autotests/data/redundantDataDescriptorsNoSignature.zip create mode 100644 deps/karchive/autotests/data/redundantDataDescriptorsWithSignature.zip create mode 100644 deps/karchive/autotests/deprecatedtest.cpp create mode 100644 deps/karchive/autotests/global_header_test.tar.gz create mode 100644 deps/karchive/autotests/karchivetest.cpp create mode 100644 deps/karchive/autotests/karchivetest.h create mode 100644 deps/karchive/autotests/kcompressiondevicetest.cpp create mode 100644 deps/karchive/autotests/kcompressiondevicetest.h create mode 100644 deps/karchive/autotests/kfiltertest.cpp create mode 100644 deps/karchive/autotests/kfiltertest.h create mode 100644 deps/karchive/autotests/klimitediodevicetest.cpp create mode 100644 deps/karchive/autotests/klimitediodevicetest.h create mode 100644 deps/karchive/autotests/runtime_resource.rcc create mode 100644 deps/karchive/autotests/tar_directory_forgotten.tar.gz create mode 100644 deps/karchive/autotests/tar_directory_twice.tar.gz create mode 100644 deps/karchive/autotests/tar_prefix_test.tar.gz create mode 100644 deps/karchive/autotests/tar_rootdir.tar.gz create mode 100644 deps/karchive/examples/bzip2gzip/CMakeLists.txt create mode 100644 deps/karchive/examples/bzip2gzip/main.cpp create mode 100644 deps/karchive/examples/helloworld/CMakeLists.txt create mode 100644 deps/karchive/examples/helloworld/helloworld.pro create mode 100644 deps/karchive/examples/helloworld/main.cpp create mode 100644 deps/karchive/examples/tarlocalfiles/CMakeLists.txt create mode 100644 deps/karchive/examples/tarlocalfiles/main.cpp create mode 100644 deps/karchive/examples/unzipper/CMakeLists.txt create mode 100644 deps/karchive/examples/unzipper/main.cpp create mode 100644 deps/karchive/metainfo.yaml create mode 100644 deps/karchive/src/CMakeLists.txt create mode 100644 deps/karchive/src/config-compression.h.cmake create mode 100644 deps/karchive/src/k7zip.cpp create mode 100644 deps/karchive/src/k7zip.h create mode 100644 deps/karchive/src/kar.cpp create mode 100644 deps/karchive/src/kar.h create mode 100644 deps/karchive/src/karchive.cpp create mode 100644 deps/karchive/src/karchive.h create mode 100644 deps/karchive/src/karchive_p.h create mode 100644 deps/karchive/src/karchivedirectory.h create mode 100644 deps/karchive/src/karchiveentry.h create mode 100644 deps/karchive/src/karchivefile.h create mode 100644 deps/karchive/src/kbzip2filter.cpp create mode 100644 deps/karchive/src/kbzip2filter.h create mode 100644 deps/karchive/src/kcompressiondevice.cpp create mode 100644 deps/karchive/src/kcompressiondevice.h create mode 100644 deps/karchive/src/kfilterbase.cpp create mode 100644 deps/karchive/src/kfilterbase.h create mode 100644 deps/karchive/src/kfilterdev.cpp create mode 100644 deps/karchive/src/kfilterdev.h create mode 100644 deps/karchive/src/kgzipfilter.cpp create mode 100644 deps/karchive/src/kgzipfilter.h create mode 100644 deps/karchive/src/klimitediodevice.cpp create mode 100644 deps/karchive/src/klimitediodevice_p.h create mode 100644 deps/karchive/src/knonefilter.cpp create mode 100644 deps/karchive/src/knonefilter.h create mode 100644 deps/karchive/src/krcc.cpp create mode 100644 deps/karchive/src/krcc.h create mode 100644 deps/karchive/src/ktar.cpp create mode 100644 deps/karchive/src/ktar.h create mode 100644 deps/karchive/src/kxzfilter.cpp create mode 100644 deps/karchive/src/kxzfilter.h create mode 100644 deps/karchive/src/kzip.cpp create mode 100644 deps/karchive/src/kzip.h create mode 100644 deps/karchive/src/kzipfileentry.h create mode 100644 deps/karchive/tests/CMakeLists.txt create mode 100644 deps/karchive/tests/k7ziptest.cpp create mode 100644 deps/karchive/tests/krcctest.cpp create mode 100644 deps/karchive/tests/ktartest.cpp create mode 100644 deps/karchive/tests/kziptest.cpp create mode 100644 share/run.sh diff --git a/MAKE-SERVER/be-server.pro b/MAKE-SERVER/be-server.pro deleted file mode 100644 index a3ae05c..0000000 --- a/MAKE-SERVER/be-server.pro +++ /dev/null @@ -1,53 +0,0 @@ -QT += core serialport -QT -= gui - -greaterThan(QT_MAJOR_VERSION, 4): QT += serialport - -TARGET = be-server -TEMPLATE = app - -QMAKE_CXXFLAGS += -std=c++1y - -QMAKE_CXXFLAGS_RELEASE -= -O2 -QMAKE_CXXFLAGS_RELEASE += -Ofast -march=armv6 -flto -fopenmp -QMAKE_LFLAGS_RELEASE -= -Wl,-O1 -QMAKE_LFLAGS_RELEASE += -Wl,-O3 -Wl,-flto - -QMAKE_CXXFLAGS_DEBUG -= -O1 -QMAKE_CXXFLAGS_DEBUG -= -O2 -QMAKE_CXXFLAGS_DEBUG += -O0 -Wno-unknown-pragmas - -SOURCES += main.cpp\ - Server.cpp \ - Track.cpp \ - PlayThread.cpp \ - SaveManager.cpp \ - SerialManager.cpp - -HEADERS += Server.h \ - Track.h \ - PlayThread.h \ - SongData.h \ - SaveManager.h \ - SerialManager.h - -INCLUDEPATH += $$PWD/../deps/libwatermark -DEPENDPATH += $$PWD/../deps/libwatermark - -INCLUDEPATH += /usr/include/oscpack/ /home/pi/boiteselec-interfaceqt/deps/rtaudio-4.1.2/ - - -LIBS+= -lgomp -lsndfile -LIBS+= -lrtaudio -LIBS+= -lasound -LIBS+= -loscpack -LIBS+= -lwiringPi - -LIBS+= -L$$PWD/../deps/karchive-5.17.0/src -L$$PWD/../deps/karchive-5.17.0/build/src -lKF5Archive -INCLUDEPATH += $$PWD/../deps/karchive-5.17.0/src $$PWD/../deps/karchive-5.17.0/build/src -DEPENDPATH += $$PWD/../deps/karchive-5.17.0/src $$PWD/../deps/karchive-5.17.0/build/src -PRE_TARGETDEPS += $$PWD/../deps/karchive-5.17.0/build/src/libKF5Archive.so.5 - -RESOURCES += - -OTHER_FILES += diff --git a/MAKE-SERVER/be-server.udoo b/MAKE-SERVER/be-server.udoo deleted file mode 100644 index 5a49b29..0000000 --- a/MAKE-SERVER/be-server.udoo +++ /dev/null @@ -1,57 +0,0 @@ -QT += core gui serialport - -greaterThan(QT_MAJOR_VERSION, 4): QT += widgets serialport - -TARGET = be-server -TEMPLATE = app - -QMAKE_CXXFLAGS += -std=c++1y - -QMAKE_CXXFLAGS_RELEASE -= -O2 -QMAKE_CXXFLAGS_RELEASE += -Ofast -march=native -flto -fopenmp -QMAKE_LFLAGS_RELEASE -= -Wl,-O1 -QMAKE_LFLAGS_RELEASE += -Wl,-O3 -Wl,-flto - -QMAKE_CXXFLAGS_DEBUG -= -O1 -QMAKE_CXXFLAGS_DEBUG -= -O2 -QMAKE_CXXFLAGS_DEBUG += -O0 -Wno-unknown-pragmas - -SOURCES += main.cpp\ - Server.cpp \ - Track.cpp \ - PlayThread.cpp \ - SaveManager.cpp \ - SerialManager.cpp - -HEADERS += Server.h \ - Track.h \ - PlayThread.h \ - SongData.h \ - SaveManager.h \ - SerialManager.h - -FORMS += - -INCLUDEPATH += $$PWD/../../watermarking/src/libwatermark -DEPENDPATH += $$PWD/../../watermarking/src/libwatermark - -LIBS+= -lgomp -lsndfile -lrtaudio # -lavcodec -lavformat -lavutil -#LIBS+= -lgcov - - -INCLUDEPATH += /usr/local/include/KF5/KArchive -LIBS += -lKF5Archive - -RESOURCES += - -OTHER_FILES += - - -#### Libraries #### - ## Oscpack ## -unix:!macx: LIBS += -L$$PWD/../../../git/oscpack/build/ -loscpack - -INCLUDEPATH += $$PWD/../../../git/oscpack/src -DEPENDPATH += $$PWD/../../../git/oscpack/src - -unix:!macx: PRE_TARGETDEPS += $$PWD/../../../git/oscpack/build/liboscpack.a diff --git a/deps/extra-cmake-modules/.arcconfig b/deps/extra-cmake-modules/.arcconfig new file mode 100644 index 0000000..30ec20e --- /dev/null +++ b/deps/extra-cmake-modules/.arcconfig @@ -0,0 +1,3 @@ +{ + "phabricator.uri" : "https://phabricator.kde.org/project/view/90/" +} diff --git a/deps/extra-cmake-modules/.gitignore b/deps/extra-cmake-modules/.gitignore new file mode 100644 index 0000000..796b96d --- /dev/null +++ b/deps/extra-cmake-modules/.gitignore @@ -0,0 +1 @@ +/build diff --git a/deps/extra-cmake-modules/.reviewboardrc b/deps/extra-cmake-modules/.reviewboardrc new file mode 100644 index 0000000..613de47 --- /dev/null +++ b/deps/extra-cmake-modules/.reviewboardrc @@ -0,0 +1,4 @@ +REVIEWBOARD_URL = "https://git.reviewboard.kde.org" +REPOSITORY = 'git://anongit.kde.org/extra-cmake-modules' +BRANCH = 'master' +TARGET_GROUPS = 'extracmakemodules' diff --git a/deps/extra-cmake-modules/CMakeLists.txt b/deps/extra-cmake-modules/CMakeLists.txt new file mode 100644 index 0000000..220979e --- /dev/null +++ b/deps/extra-cmake-modules/CMakeLists.txt @@ -0,0 +1,181 @@ +#============================================================================= +# Copyright 2006-2013 Alex Neundorf +# Copyright 2014-2015 Alex Merry +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# 1. Redistributions of source code must retain the copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. 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. +#============================================================================= + +cmake_minimum_required(VERSION 2.8.12 FATAL_ERROR) + +# +# Preliminary setup +# + +set(VERSION "5.27.0") # handled by release scripts + +if (POLICY CMP0048) + cmake_policy(SET CMP0048 NEW) + project(ECM + VERSION "${VERSION}" + LANGUAGES NONE + ) +else() + project(ECM NONE) + include("${CMAKE_SOURCE_DIR}/modules/ECMSetupVersion.cmake") + ecm_setup_version( + "${VERSION}" + VARIABLE_PREFIX ECM + ) +endif() + + +# +# Includes +# + +set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake") + +include(FeatureSummary) + + +# +# Installation paths +# + +set(SHARE_INSTALL_DIR share + CACHE + PATH + "read-only architecture-independent data" +) + +set(CMAKECONFIG_INSTALL_DIR ${SHARE_INSTALL_DIR}/ECM/cmake/) + +set(FIND_MODULES_INSTALL_DIR ${SHARE_INSTALL_DIR}/ECM/find-modules/) +set(KDE_MODULES_INSTALL_DIR ${SHARE_INSTALL_DIR}/ECM/kde-modules/) +set(MODULES_INSTALL_DIR ${SHARE_INSTALL_DIR}/ECM/modules/) +set(TOOLCHAIN_MODULES_INSTALL_DIR ${SHARE_INSTALL_DIR}/ECM/toolchain/) + +set(DOC_INSTALL_DIR ${SHARE_INSTALL_DIR}/doc/ECM + CACHE + PATH + "HTML and QtHelp documentation" +) +set(MAN_INSTALL_DIR ${SHARE_INSTALL_DIR}/man + CACHE + PATH + "man pages" +) + + +# +# Documentation +# + +add_subdirectory(docs) + + +# +# Tests +# + +option(BUILD_TESTING "Build automated tests." ON) +add_feature_info(BUILD_TESTING BUILD_TESTING "Build automated tests.") +if(BUILD_TESTING) + enable_testing() + add_subdirectory(tests) +endif() + + +# +# Install modules +# + +file(GLOB installModuleFiles ${CMAKE_SOURCE_DIR}/modules/*[^~]) +install(FILES ${installModuleFiles} DESTINATION ${MODULES_INSTALL_DIR}) + +file(GLOB installKdeModuleFiles ${CMAKE_SOURCE_DIR}/kde-modules/*[^~]) +install(FILES ${installKdeModuleFiles} DESTINATION ${KDE_MODULES_INSTALL_DIR}) + +file(GLOB installFindModuleFiles ${CMAKE_SOURCE_DIR}/find-modules/*[^~]) +install(FILES ${installFindModuleFiles} DESTINATION ${FIND_MODULES_INSTALL_DIR}) + +file(GLOB installToolchainModuleFiles ${CMAKE_SOURCE_DIR}/toolchain/*[^~]) +install(FILES ${installToolchainModuleFiles} DESTINATION ${TOOLCHAIN_MODULES_INSTALL_DIR}) + + +# +# Config.cmake file +# + +include(CMakePackageConfigHelpers) + +configure_package_config_file( + ECMConfig.cmake.in + ${CMAKE_CURRENT_BINARY_DIR}/ECMConfig.cmake + INSTALL_DESTINATION + ${CMAKECONFIG_INSTALL_DIR} + PATH_VARS + FIND_MODULES_INSTALL_DIR + KDE_MODULES_INSTALL_DIR + MODULES_INSTALL_DIR +) + +write_basic_package_version_file( + ${CMAKE_CURRENT_BINARY_DIR}/ECMConfigVersion.cmake + VERSION + "${PROJECT_VERSION}" + COMPATIBILITY + AnyNewerVersion +) + +install( + FILES + ${CMAKE_CURRENT_BINARY_DIR}/ECMConfig.cmake + ${CMAKE_CURRENT_BINARY_DIR}/ECMConfigVersion.cmake + DESTINATION + ${CMAKECONFIG_INSTALL_DIR} +) + + +# +# Packaging +# + +set(CPACK_PACKAGE_NAME extra-cmake-modules) +set(CPACK_PACKAGE_VERSION ${PROJECT_VERSION}) +set(CPACK_SYSTEM_NAME "generic") +set(CPACK_GENERATOR "TGZ") +set(CPACK_SET_DESTDIR FALSE) + +include(CPack) + + +# +# Feature summary +# + +feature_summary( + FATAL_ON_MISSING_REQUIRED_PACKAGES + WHAT ALL +) diff --git a/deps/extra-cmake-modules/COPYING-CMAKE-SCRIPTS b/deps/extra-cmake-modules/COPYING-CMAKE-SCRIPTS new file mode 100644 index 0000000..4b41776 --- /dev/null +++ b/deps/extra-cmake-modules/COPYING-CMAKE-SCRIPTS @@ -0,0 +1,22 @@ +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + +1. Redistributions of source code must retain the copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. +3. 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. diff --git a/deps/extra-cmake-modules/ECMConfig.cmake.in b/deps/extra-cmake-modules/ECMConfig.cmake.in new file mode 100644 index 0000000..f373cdc --- /dev/null +++ b/deps/extra-cmake-modules/ECMConfig.cmake.in @@ -0,0 +1,11 @@ +@PACKAGE_INIT@ + +set(ECM_FIND_MODULE_DIR "@PACKAGE_FIND_MODULES_INSTALL_DIR@") + +set(ECM_MODULE_DIR "@PACKAGE_MODULES_INSTALL_DIR@") + +set(ECM_KDE_MODULE_DIR "@PACKAGE_KDE_MODULES_INSTALL_DIR@") + +set(ECM_MODULE_PATH "${ECM_MODULE_DIR}" "${ECM_FIND_MODULE_DIR}" "${ECM_KDE_MODULE_DIR}") + +include("${ECM_MODULE_DIR}/ECMUseFindModules.cmake") diff --git a/deps/extra-cmake-modules/README.rst b/deps/extra-cmake-modules/README.rst new file mode 100644 index 0000000..f3e98aa --- /dev/null +++ b/deps/extra-cmake-modules/README.rst @@ -0,0 +1,96 @@ +Extra CMake Modules +******************* + +Introduction +============ + +The Extra CMake Modules package, or ECM, adds to the modules provided by CMake, +including ones used by ``find_package()`` to find common software, ones that +can be used directly in ``CMakeLists.txt`` files to perform common tasks and +toolchain files that must be specified on the commandline by the user. + +In addition, it provides common build settings used in software produced by the +KDE community. + +While the driving force of this module is to reduce duplication in CMake scripts +across KDE software, it is intended to be useful for any software that uses the +CMake build system. + + +Usage +===== + +To use ECM, add the following to your ``CMakeLists.txt``: + +.. code-block:: cmake + + find_package(ECM REQUIRED NO_MODULE) + set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH}) + +(note that you may want to append ``${ECM_MODULE_PATH}`` to +``CMAKE_MODULE_PATH`` rather than discarding the existing value). You can then +just include the modules you require, or use ``find_package()`` as needed. For +example: + +.. code-block:: cmake + + include(ECMInstallIcons) + +Developers of KDE software will often want to use the KDE standard settings +provided by ECM; they can do the following: + +.. code-block:: cmake + + find_package(ECM REQUIRED NO_MODULE) + set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH}) + include(KDEInstallDirs) + include(KDECompilerSettings) + include(KDECMakeSettings) + +Note that any combination of the above includes can be used if you only want +some of the settings. Some of the functionality of +:kde-module:`KDECMakeSettings` can also be selectively disabled. + + +Organization +------------ + +ECM provides four different types of modules. + +* Core modules provide helpful macros for use in project CMake scripts. + See :manual:`ecm-modules(7)` for more information. +* Find modules extend the functionality of CMake's ``find_package()`` command. + See :manual:`ecm-find-modules(7)` for more information. +* KDE modules provide common settings for software produced by KDE; much of this + may also be useful to other projects. See :manual:`ecm-kde-modules(7)` for + more information. +* Toolchain files change the build tools and targets used by CMake. See + :manual:`ecm-toolchains(7)` for more information. + +The ``${ECM_MODULE_DIR}``, ``${ECM_FIND_MODULE_DIR}`` and +``${ECM_KDE_MODULE_DIR}`` variables may be used instead of +``${ECM_MODULE_PATH}`` if you only need some of this functionality. + + +Development +=========== + +The :manual:`ecm-developer(7)` manual contains more information about +developing for Extra CMake Modules. + + +License +======= + +All code is licensed under the `BSD 3-Clause license`_. + +.. _BSD 3-Clause license: http://opensource.org/licenses/BSD-3-Clause + + +Links +===== + +* Home page: https://projects.kde.org/projects/kdesupport/extra-cmake-modules +* Mailing list: https://mail.kde.org/mailman/listinfo/kde-buildsystem +* IRC channel: #kde-devel on Freenode +* Git repository: https://quickgit.kde.org/?p=extra-cmake-modules.git diff --git a/deps/extra-cmake-modules/attic/modules-tests/AGG/CMakeLists.txt b/deps/extra-cmake-modules/attic/modules-tests/AGG/CMakeLists.txt new file mode 100644 index 0000000..3d0e7b9 --- /dev/null +++ b/deps/extra-cmake-modules/attic/modules-tests/AGG/CMakeLists.txt @@ -0,0 +1,5 @@ +include("${CMAKE_CURRENT_SOURCE_DIR}/../TestFindPackage.cmake") + +set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../../modules" ) + +test_find_package(AGG AGG INCLUDE_DIR LIBRARIES DEFINITIONS) diff --git a/deps/extra-cmake-modules/attic/modules-tests/Blitz/CMakeLists.txt b/deps/extra-cmake-modules/attic/modules-tests/Blitz/CMakeLists.txt new file mode 100644 index 0000000..ef81e4d --- /dev/null +++ b/deps/extra-cmake-modules/attic/modules-tests/Blitz/CMakeLists.txt @@ -0,0 +1,5 @@ +include("${CMAKE_CURRENT_SOURCE_DIR}/../TestFindPackage.cmake") + +set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../../modules" ) + +test_find_package(Blitz BLITZ INCLUDES LIBRARIES) diff --git a/deps/extra-cmake-modules/attic/modules-tests/BlueZ/CMakeLists.txt b/deps/extra-cmake-modules/attic/modules-tests/BlueZ/CMakeLists.txt new file mode 100644 index 0000000..bfc1770 --- /dev/null +++ b/deps/extra-cmake-modules/attic/modules-tests/BlueZ/CMakeLists.txt @@ -0,0 +1,5 @@ +include("${CMAKE_CURRENT_SOURCE_DIR}/../TestFindPackage.cmake") + +set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../../modules" ) + +test_find_package(BlueZ BLUEZ INCLUDE_DIR LIBRARIES DEFINITIONS) diff --git a/deps/extra-cmake-modules/attic/modules-tests/ENCHANT/CMakeLists.txt b/deps/extra-cmake-modules/attic/modules-tests/ENCHANT/CMakeLists.txt new file mode 100644 index 0000000..6ed9e51 --- /dev/null +++ b/deps/extra-cmake-modules/attic/modules-tests/ENCHANT/CMakeLists.txt @@ -0,0 +1,5 @@ +include("${CMAKE_CURRENT_SOURCE_DIR}/../TestFindPackage.cmake") + +set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../../modules" ) + +test_find_package(ENCHANT ENCHANT INCLUDE_DIR LIBRARIES DEFINITIONS) diff --git a/deps/extra-cmake-modules/attic/modules-tests/Eigen2/CMakeLists.txt b/deps/extra-cmake-modules/attic/modules-tests/Eigen2/CMakeLists.txt new file mode 100644 index 0000000..b2ae0d3 --- /dev/null +++ b/deps/extra-cmake-modules/attic/modules-tests/Eigen2/CMakeLists.txt @@ -0,0 +1,5 @@ +include("${CMAKE_CURRENT_SOURCE_DIR}/../TestFindPackage.cmake") + +set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../../modules" ) + +test_find_package(Eigen2 EIGEN2 INCLUDE_DIR ) diff --git a/deps/extra-cmake-modules/attic/modules-tests/FFmpeg/CMakeLists.txt b/deps/extra-cmake-modules/attic/modules-tests/FFmpeg/CMakeLists.txt new file mode 100644 index 0000000..4c93079 --- /dev/null +++ b/deps/extra-cmake-modules/attic/modules-tests/FFmpeg/CMakeLists.txt @@ -0,0 +1,5 @@ +include("${CMAKE_CURRENT_SOURCE_DIR}/../TestFindPackage.cmake") + +set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../../modules" ) + +test_find_package(FFmpeg FFMPEG INCLUDE_DIR LIBRARIES DEFINITIONS) diff --git a/deps/extra-cmake-modules/attic/modules-tests/Flac/CMakeLists.txt b/deps/extra-cmake-modules/attic/modules-tests/Flac/CMakeLists.txt new file mode 100644 index 0000000..604f2dd --- /dev/null +++ b/deps/extra-cmake-modules/attic/modules-tests/Flac/CMakeLists.txt @@ -0,0 +1,5 @@ +include("${CMAKE_CURRENT_SOURCE_DIR}/../TestFindPackage.cmake") + +set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../../modules" ) + +test_find_package(Flac FLAC INCLUDE_DIR LIBRARIES OGGFLAC_LIBRARIES) diff --git a/deps/extra-cmake-modules/attic/modules-tests/Flex/CMakeLists.txt b/deps/extra-cmake-modules/attic/modules-tests/Flex/CMakeLists.txt new file mode 100644 index 0000000..38b6656 --- /dev/null +++ b/deps/extra-cmake-modules/attic/modules-tests/Flex/CMakeLists.txt @@ -0,0 +1,5 @@ +include("${CMAKE_CURRENT_SOURCE_DIR}/../TestFindPackage.cmake") + +set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../../modules" ) + +test_find_package(Flex FLEX VERSION EXECUTABLE) diff --git a/deps/extra-cmake-modules/attic/modules-tests/GObject/CMakeLists.txt b/deps/extra-cmake-modules/attic/modules-tests/GObject/CMakeLists.txt new file mode 100644 index 0000000..971a20b --- /dev/null +++ b/deps/extra-cmake-modules/attic/modules-tests/GObject/CMakeLists.txt @@ -0,0 +1,5 @@ +include("${CMAKE_CURRENT_SOURCE_DIR}/../TestFindPackage.cmake") + +set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../../modules" ) + +test_find_package(GObject GOBJECT INCLUDE_DIR LIBRARIES DEFINITIONS) diff --git a/deps/extra-cmake-modules/attic/modules-tests/GStreamer/CMakeLists.txt b/deps/extra-cmake-modules/attic/modules-tests/GStreamer/CMakeLists.txt new file mode 100644 index 0000000..896a853 --- /dev/null +++ b/deps/extra-cmake-modules/attic/modules-tests/GStreamer/CMakeLists.txt @@ -0,0 +1,5 @@ +include("${CMAKE_CURRENT_SOURCE_DIR}/../TestFindPackage.cmake") + +set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../../modules" ) + +test_find_package(GStreamer GSTREAMER INCLUDE_DIR LIBRARIES DEFINITIONS) diff --git a/deps/extra-cmake-modules/attic/modules-tests/LCMS/CMakeLists.txt b/deps/extra-cmake-modules/attic/modules-tests/LCMS/CMakeLists.txt new file mode 100644 index 0000000..43a9042 --- /dev/null +++ b/deps/extra-cmake-modules/attic/modules-tests/LCMS/CMakeLists.txt @@ -0,0 +1,5 @@ +include("${CMAKE_CURRENT_SOURCE_DIR}/../TestFindPackage.cmake") + +set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../../modules" ) + +test_find_package(LCMS LCMS INCLUDE_DIR LIBRARIES VERSION) diff --git a/deps/extra-cmake-modules/attic/modules-tests/LibArt/CMakeLists.txt b/deps/extra-cmake-modules/attic/modules-tests/LibArt/CMakeLists.txt new file mode 100644 index 0000000..e64d231 --- /dev/null +++ b/deps/extra-cmake-modules/attic/modules-tests/LibArt/CMakeLists.txt @@ -0,0 +1,5 @@ +include("${CMAKE_CURRENT_SOURCE_DIR}/../TestFindPackage.cmake") + +set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../../modules" ) + +test_find_package(LibArt LIBART INCLUDE_DIR LIBRARIES) diff --git a/deps/extra-cmake-modules/attic/modules-tests/LibXslt/CMakeLists.txt b/deps/extra-cmake-modules/attic/modules-tests/LibXslt/CMakeLists.txt new file mode 100644 index 0000000..561a693 --- /dev/null +++ b/deps/extra-cmake-modules/attic/modules-tests/LibXslt/CMakeLists.txt @@ -0,0 +1,5 @@ +include("${CMAKE_CURRENT_SOURCE_DIR}/../TestFindPackage.cmake") + +set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../../modules" ) + +test_find_package(LibXslt LIBXSLT INCLUDE_DIR LIBRARIES DEFINITIONS XSLTPROC_EXECUTABLE) diff --git a/deps/extra-cmake-modules/attic/modules-tests/OpenEXR/CMakeLists.txt b/deps/extra-cmake-modules/attic/modules-tests/OpenEXR/CMakeLists.txt new file mode 100644 index 0000000..dd33dab --- /dev/null +++ b/deps/extra-cmake-modules/attic/modules-tests/OpenEXR/CMakeLists.txt @@ -0,0 +1,5 @@ +include("${CMAKE_CURRENT_SOURCE_DIR}/../TestFindPackage.cmake") + +set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../../modules" ) + +test_find_package(OpenEXR OPENEXR INCLUDE_DIR LIBRARIES DEFINITIONS) diff --git a/deps/extra-cmake-modules/attic/modules-tests/PCRE/CMakeLists.txt b/deps/extra-cmake-modules/attic/modules-tests/PCRE/CMakeLists.txt new file mode 100644 index 0000000..928806d --- /dev/null +++ b/deps/extra-cmake-modules/attic/modules-tests/PCRE/CMakeLists.txt @@ -0,0 +1,5 @@ +include("${CMAKE_CURRENT_SOURCE_DIR}/../TestFindPackage.cmake") + +set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../../modules" ) + +test_find_package(PCRE PCRE INCLUDE_DIR LIBRARIES) diff --git a/deps/extra-cmake-modules/attic/modules-tests/QCA2/CMakeLists.txt b/deps/extra-cmake-modules/attic/modules-tests/QCA2/CMakeLists.txt new file mode 100644 index 0000000..46f617e --- /dev/null +++ b/deps/extra-cmake-modules/attic/modules-tests/QCA2/CMakeLists.txt @@ -0,0 +1,5 @@ +include("${CMAKE_CURRENT_SOURCE_DIR}/../TestFindPackage.cmake") + +set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../../modules" ) + +test_find_package(QCA2 QCA2 INCLUDE_DIR LIBRARIES DEFINITIONS) diff --git a/deps/extra-cmake-modules/attic/modules-tests/QImageBlitz/CMakeLists.txt b/deps/extra-cmake-modules/attic/modules-tests/QImageBlitz/CMakeLists.txt new file mode 100644 index 0000000..12edb3f --- /dev/null +++ b/deps/extra-cmake-modules/attic/modules-tests/QImageBlitz/CMakeLists.txt @@ -0,0 +1,5 @@ +include("${CMAKE_CURRENT_SOURCE_DIR}/../TestFindPackage.cmake") + +set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../../modules" ) + +test_find_package(QImageBlitz QIMAGEBLITZ INCLUDES LIBRARIES) diff --git a/deps/extra-cmake-modules/attic/modules-tests/RunAllModuleTests.cmake b/deps/extra-cmake-modules/attic/modules-tests/RunAllModuleTests.cmake new file mode 100644 index 0000000..a9b387d --- /dev/null +++ b/deps/extra-cmake-modules/attic/modules-tests/RunAllModuleTests.cmake @@ -0,0 +1,59 @@ +# Run this script via "cmake -P RunAllModuletests.cmake" to +# execute all module tests in one go. +# Run this script with "cmake -DMODULE=foo -P RunAllModuletests.cmake" to +# test only the one specified module. +# To see only the results and not the other cmake output, +# you can grep for "::". +# To have it delete the previous test build dirs, run it with -DCLEAN_DIRS=TRUE + +get_filename_component(currentDir "${CMAKE_CURRENT_LIST_FILE}" PATH) + +function(execute_one_test name) + set(workingDir "${currentDir}/${name}/build") + if(CLEAN_DIRS) + file(REMOVE_RECURSE "${workingDir}") + endif() + file(MAKE_DIRECTORY "${workingDir}") + execute_process(COMMAND ${CMAKE_COMMAND} "${currentDir}/${name}" + WORKING_DIRECTORY "${workingDir}") + # now the same with pkg-config disabled + set(workingDir "${currentDir}/${name}/build-no-pkgconfig") + if(CLEAN_DIRS) + file(REMOVE_RECURSE "${workingDir}") + endif() + file(MAKE_DIRECTORY "${workingDir}") + execute_process(COMMAND ${CMAKE_COMMAND} -DPKG_CONFIG_EXECUTABLE=echo "${currentDir}/${name}" + WORKING_DIRECTORY "${workingDir}") +endfunction(execute_one_test) + +if(DEFINED MODULE) + set(modulesToTest ${MODULE}) +else() + set(modulesToTest AGG + Blitz + BlueZ + ENCHANT + Eigen2 + FFmpeg + Flac + Flex + GObject + GStreamer + LCMS + LibArt + LibXslt + OpenEXR + PCRE + QCA2 + QImageBlitz + Sqlite + Strigi + USB + Xine + Xmms) +endif() + +foreach(currentModule ${modulesToTest}) + execute_one_test(${currentModule}) +endforeach(currentModule ${modulesToTest}) + diff --git a/deps/extra-cmake-modules/attic/modules-tests/Sqlite/CMakeLists.txt b/deps/extra-cmake-modules/attic/modules-tests/Sqlite/CMakeLists.txt new file mode 100644 index 0000000..000be42 --- /dev/null +++ b/deps/extra-cmake-modules/attic/modules-tests/Sqlite/CMakeLists.txt @@ -0,0 +1,5 @@ +include("${CMAKE_CURRENT_SOURCE_DIR}/../TestFindPackage.cmake") + +set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../../modules" ) + +test_find_package(Sqlite SQLITE INCLUDE_DIR LIBRARIES DEFINITIONS) diff --git a/deps/extra-cmake-modules/attic/modules-tests/Strigi/CMakeLists.txt b/deps/extra-cmake-modules/attic/modules-tests/Strigi/CMakeLists.txt new file mode 100644 index 0000000..bbe1e23 --- /dev/null +++ b/deps/extra-cmake-modules/attic/modules-tests/Strigi/CMakeLists.txt @@ -0,0 +1,17 @@ +include("${CMAKE_CURRENT_SOURCE_DIR}/../TestFindPackage.cmake") + +set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../../modules" ) + +set(STRIGI_MIN_VERSION 0.6.0) + +#find_package(Strigi 1.2.3) + +test_find_package(Strigi STRIGI VERSION + INCLUDE_DIR + STREAMANALYZER_LIBRARY + STREAMS_LIBRARY + STRIGIQTDBUSCLIENT_LIBRARY + NEEDS_SIGNED_CHAR + NEEDS_CHAR + LINE_ANALYZER_PREFIX + THROUGH_ANALYZER_PREFIX ) diff --git a/deps/extra-cmake-modules/attic/modules-tests/TestFindPackage.cmake b/deps/extra-cmake-modules/attic/modules-tests/TestFindPackage.cmake new file mode 100644 index 0000000..24e70f5 --- /dev/null +++ b/deps/extra-cmake-modules/attic/modules-tests/TestFindPackage.cmake @@ -0,0 +1,44 @@ +# This module provides the macro TEST_FIND_PACKAGE() +# +# TEST_FIND_PACKAGE(package prefix var1 .. varN ) +# It can be used to test a CMake Find-module. +# It executes FIND_PACKAGE() and then prints some results. +# is the same as for FIND_PACKAGE() and +# prefix should be the prefix which is used in that module for +# all variables. +# It checks _FOUND to decide whether the module was successful or not. +# +# Example: +# test_find_package(Xine XINE VERSION INCLUDE_DIR LIBRARY) +# +# This will check XINE_FOUND and then print the variables XINE_VERSION, XINE_INCLUDE_DIR and XINE_LIBRARY. + +cmake_minimum_required(VERSION 2.6.2) +cmake_policy(SET CMP0000 OLD) + +macro(TEST_FIND_PACKAGE package prefix ) + # if PKG_CONFIG_EXECUTABLE is set to "echo", FindPkgConfig.cmake + # will not search again for the real pkg-config, as it would if it was set to NOTFOUND + # and still the execute_process(${PKG_CONFIG_EXECUTABLE} ) calls will work + # but never return success. + if("${PKG_CONFIG_EXECUTABLE}" STREQUAL "echo") + message(STATUS ":: ***** Testing Find${package}.cmake, with pkg-config disabled *****") + else() + message(STATUS ":: ***** Testing Find${package}.cmake *****") + endif() + + find_package(${package}) + message(STATUS ":: ***** Results from Find${package}.cmake *****") + + if ( ${prefix}_FOUND) + message(STATUS ":: Find${package}.cmake: ${package} has been found") + else ( ${prefix}_FOUND) + message(STATUS ":: Find${package}.cmake: ${package} has NOT been found !") + endif ( ${prefix}_FOUND) + + message(STATUS ":: ${prefix}_FOUND: \"${${prefix}_FOUND}\"") + foreach(var ${ARGN}) + message(STATUS ":: ${prefix}_${var}: \"${${prefix}_${var}}\"") + endforeach(var) + message(STATUS "::") +endmacro(TEST_FIND_PACKAGE package) diff --git a/deps/extra-cmake-modules/attic/modules-tests/USB/CMakeLists.txt b/deps/extra-cmake-modules/attic/modules-tests/USB/CMakeLists.txt new file mode 100644 index 0000000..37f9dd2 --- /dev/null +++ b/deps/extra-cmake-modules/attic/modules-tests/USB/CMakeLists.txt @@ -0,0 +1,5 @@ +include("${CMAKE_CURRENT_SOURCE_DIR}/../TestFindPackage.cmake") + +set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../../modules" ) + +test_find_package(USB LIBUSB INCLUDE_DIR LIBRARIES) diff --git a/deps/extra-cmake-modules/attic/modules-tests/Xine/CMakeLists.txt b/deps/extra-cmake-modules/attic/modules-tests/Xine/CMakeLists.txt new file mode 100644 index 0000000..8c2ac6e --- /dev/null +++ b/deps/extra-cmake-modules/attic/modules-tests/Xine/CMakeLists.txt @@ -0,0 +1,5 @@ +include("${CMAKE_CURRENT_SOURCE_DIR}/../TestFindPackage.cmake") + +set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../../modules" ) + +test_find_package(Xine XINE VERSION BUGFIX_VERSION INCLUDE_DIR LIBRARY XCB_FOUND) diff --git a/deps/extra-cmake-modules/attic/modules-tests/Xmms/CMakeLists.txt b/deps/extra-cmake-modules/attic/modules-tests/Xmms/CMakeLists.txt new file mode 100644 index 0000000..c55e6a4 --- /dev/null +++ b/deps/extra-cmake-modules/attic/modules-tests/Xmms/CMakeLists.txt @@ -0,0 +1,5 @@ +include("${CMAKE_CURRENT_SOURCE_DIR}/../TestFindPackage.cmake") + +set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../../modules" ) + +test_find_package(Xmms XMMS INCLUDE_DIR LIBRARIES ) diff --git a/deps/extra-cmake-modules/attic/modules-tests/readme.txt b/deps/extra-cmake-modules/attic/modules-tests/readme.txt new file mode 100644 index 0000000..2fabc9b --- /dev/null +++ b/deps/extra-cmake-modules/attic/modules-tests/readme.txt @@ -0,0 +1,6 @@ +in each of the subdirs here is a simple CMakeLists.txt which does a very +basic test for one of the cmake modules in the modules/ directory. +To run them, create a build directory, run cmake and check the output. +(yes, this can of course be enhanced, but it's better than nothing). + +Alex diff --git a/deps/extra-cmake-modules/attic/modules/COPYING-CMAKE-SCRIPTS b/deps/extra-cmake-modules/attic/modules/COPYING-CMAKE-SCRIPTS new file mode 100644 index 0000000..4b41776 --- /dev/null +++ b/deps/extra-cmake-modules/attic/modules/COPYING-CMAKE-SCRIPTS @@ -0,0 +1,22 @@ +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + +1. Redistributions of source code must retain the copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. +3. 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. diff --git a/deps/extra-cmake-modules/attic/modules/CheckCXXSourceCompiles.cmake b/deps/extra-cmake-modules/attic/modules/CheckCXXSourceCompiles.cmake new file mode 100644 index 0000000..d2ba293 --- /dev/null +++ b/deps/extra-cmake-modules/attic/modules/CheckCXXSourceCompiles.cmake @@ -0,0 +1,86 @@ +# - Check if given C++ source compiles and links into an executable +# CHECK_CXX_SOURCE_COMPILES( [FAIL_REGEX ]) +# - source code to try to compile, must define 'main' +# - variable to store whether the source code compiled +# - fail if test output matches this regex +# The following variables may be set before calling this macro to +# modify the way the check is run: +# +# CMAKE_REQUIRED_FLAGS = string of compile command line flags +# CMAKE_REQUIRED_DEFINITIONS = list of macros to define (-DFOO=bar) +# CMAKE_REQUIRED_INCLUDES = list of include directories +# CMAKE_REQUIRED_LIBRARIES = list of libraries to link + +GET_FILENAME_COMPONENT(_CHECK_CXX_SOURCE_COMPILES_DIR ${CMAKE_CURRENT_LIST_FILE} PATH) +INCLUDE(${_CHECK_CXX_SOURCE_COMPILES_DIR}/HandleImportedTargetsInCMakeRequiredLibraries.cmake) + + +MACRO(CHECK_CXX_SOURCE_COMPILES SOURCE VAR) + IF("${VAR}" MATCHES "^${VAR}$") + SET(_FAIL_REGEX) + SET(_key) + FOREACH(arg ${ARGN}) + IF("${arg}" MATCHES "^(FAIL_REGEX)$") + SET(_key "${arg}") + ELSEIF(_key) + LIST(APPEND _${_key} "${arg}") + ELSE() + MESSAGE(FATAL_ERROR "Unknown argument:\n ${arg}\n") + ENDIF() + ENDFOREACH() + + SET(MACRO_CHECK_FUNCTION_DEFINITIONS + "-D${VAR} ${CMAKE_REQUIRED_FLAGS}") + IF(CMAKE_REQUIRED_LIBRARIES) + # this one translates potentially used imported library targets to their files on disk + HANDLE_IMPORTED_TARGETS_IN_CMAKE_REQUIRED_LIBRARIES(_CHECK_CXX_SOURCE_COMPILES_CMAKE_REQUIRED_LIBRARES) + + SET(CHECK_CXX_SOURCE_COMPILES_ADD_LIBRARIES + "-DLINK_LIBRARIES:STRING=${_CHECK_CXX_SOURCE_COMPILES_CMAKE_REQUIRED_LIBRARES}") +# "-DLINK_LIBRARIES:STRING=${CMAKE_REQUIRED_LIBRARIES}") + ELSE(CMAKE_REQUIRED_LIBRARIES) + SET(CHECK_CXX_SOURCE_COMPILES_ADD_LIBRARIES) + ENDIF(CMAKE_REQUIRED_LIBRARIES) + IF(CMAKE_REQUIRED_INCLUDES) + SET(CHECK_CXX_SOURCE_COMPILES_ADD_INCLUDES + "-DINCLUDE_DIRECTORIES:STRING=${CMAKE_REQUIRED_INCLUDES}") + ELSE(CMAKE_REQUIRED_INCLUDES) + SET(CHECK_CXX_SOURCE_COMPILES_ADD_INCLUDES) + ENDIF(CMAKE_REQUIRED_INCLUDES) + FILE(WRITE "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/src.cxx" + "${SOURCE}\n") + + MESSAGE(STATUS "Performing Test ${VAR}") + TRY_COMPILE(${VAR} + ${CMAKE_BINARY_DIR} + ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/src.cxx + COMPILE_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS} + CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=${MACRO_CHECK_FUNCTION_DEFINITIONS} + "${CHECK_CXX_SOURCE_COMPILES_ADD_LIBRARIES}" + "${CHECK_CXX_SOURCE_COMPILES_ADD_INCLUDES}" + OUTPUT_VARIABLE OUTPUT) + + FOREACH(_regex ${_FAIL_REGEX}) + IF("${OUTPUT}" MATCHES "${_regex}") + SET(${VAR} 0) + ENDIF() + ENDFOREACH() + + IF(${VAR}) + SET(${VAR} 1 CACHE INTERNAL "Test ${VAR}") + MESSAGE(STATUS "Performing Test ${VAR} - Success") + FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log + "Performing C++ SOURCE FILE Test ${VAR} succeded with the following output:\n" + "${OUTPUT}\n" + "Source file was:\n${SOURCE}\n") + ELSE(${VAR}) + MESSAGE(STATUS "Performing Test ${VAR} - Failed") + SET(${VAR} "" CACHE INTERNAL "Test ${VAR}") + FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log + "Performing C++ SOURCE FILE Test ${VAR} failed with the following output:\n" + "${OUTPUT}\n" + "Source file was:\n${SOURCE}\n") + ENDIF(${VAR}) + ENDIF("${VAR}" MATCHES "^${VAR}$") +ENDMACRO(CHECK_CXX_SOURCE_COMPILES) + diff --git a/deps/extra-cmake-modules/attic/modules/CheckCXXSourceRuns.cmake b/deps/extra-cmake-modules/attic/modules/CheckCXXSourceRuns.cmake new file mode 100644 index 0000000..b8f2344 --- /dev/null +++ b/deps/extra-cmake-modules/attic/modules/CheckCXXSourceRuns.cmake @@ -0,0 +1,80 @@ +# - Check if the given C++ source code compiles and runs. +# CHECK_CXX_SOURCE_RUNS( ) +# - source code to try to compile +# - variable to store the result +# (1 for success, empty for failure) +# The following variables may be set before calling this macro to +# modify the way the check is run: +# +# CMAKE_REQUIRED_FLAGS = string of compile command line flags +# CMAKE_REQUIRED_DEFINITIONS = list of macros to define (-DFOO=bar) +# CMAKE_REQUIRED_INCLUDES = list of include directories +# CMAKE_REQUIRED_LIBRARIES = list of libraries to link + +GET_FILENAME_COMPONENT(_CHECK_CXX_SOURCE_RUNS_DIR ${CMAKE_CURRENT_LIST_FILE} PATH) +INCLUDE(${_CHECK_CXX_SOURCE_RUNS_DIR}/HandleImportedTargetsInCMakeRequiredLibraries.cmake) + +MACRO(CHECK_CXX_SOURCE_RUNS SOURCE VAR) + IF("${VAR}" MATCHES "^${VAR}$") + SET(MACRO_CHECK_FUNCTION_DEFINITIONS + "-D${VAR} ${CMAKE_REQUIRED_FLAGS}") + IF(CMAKE_REQUIRED_LIBRARIES) + # this one translates potentially used imported library targets to their files on disk + HANDLE_IMPORTED_TARGETS_IN_CMAKE_REQUIRED_LIBRARIES(_CHECK_CXX_SOURCE_RUNS_CMAKE_REQUIRED_LIBRARES) + + SET(CHECK_CXX_SOURCE_COMPILES_ADD_LIBRARIES + "-DLINK_LIBRARIES:STRING=${_CHECK_CXX_SOURCE_RUNS_CMAKE_REQUIRED_LIBRARES}") +# "-DLINK_LIBRARIES:STRING=${CMAKE_REQUIRED_LIBRARIES}") + ELSE(CMAKE_REQUIRED_LIBRARIES) + SET(CHECK_CXX_SOURCE_COMPILES_ADD_LIBRARIES) + ENDIF(CMAKE_REQUIRED_LIBRARIES) + IF(CMAKE_REQUIRED_INCLUDES) + SET(CHECK_CXX_SOURCE_COMPILES_ADD_INCLUDES + "-DINCLUDE_DIRECTORIES:STRING=${CMAKE_REQUIRED_INCLUDES}") + ELSE(CMAKE_REQUIRED_INCLUDES) + SET(CHECK_CXX_SOURCE_COMPILES_ADD_INCLUDES) + ENDIF(CMAKE_REQUIRED_INCLUDES) + FILE(WRITE "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/src.cxx" + "${SOURCE}\n") + + MESSAGE(STATUS "Performing Test ${VAR}") + TRY_RUN(${VAR}_EXITCODE ${VAR}_COMPILED + ${CMAKE_BINARY_DIR} + ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/src.cxx + COMPILE_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS} + CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=${MACRO_CHECK_FUNCTION_DEFINITIONS} + -DCMAKE_SKIP_RPATH:BOOL=${CMAKE_SKIP_RPATH} + "${CHECK_CXX_SOURCE_COMPILES_ADD_LIBRARIES}" + "${CHECK_CXX_SOURCE_COMPILES_ADD_INCLUDES}" + COMPILE_OUTPUT_VARIABLE OUTPUT) + + # if it did not compile make the return value fail code of 1 + IF(NOT ${VAR}_COMPILED) + SET(${VAR}_EXITCODE 1) + ENDIF(NOT ${VAR}_COMPILED) + # if the return value was 0 then it worked + IF("${${VAR}_EXITCODE}" EQUAL 0) + SET(${VAR} 1 CACHE INTERNAL "Test ${VAR}") + MESSAGE(STATUS "Performing Test ${VAR} - Success") + FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log + "Performing C++ SOURCE FILE Test ${VAR} succeded with the following output:\n" + "${OUTPUT}\n" + "Return value: ${${VAR}}\n" + "Source file was:\n${SOURCE}\n") + ELSE("${${VAR}_EXITCODE}" EQUAL 0) + IF(CMAKE_CROSSCOMPILING AND "${${VAR}_EXITCODE}" MATCHES "FAILED_TO_RUN") + SET(${VAR} "${${VAR}_EXITCODE}") + ELSE(CMAKE_CROSSCOMPILING AND "${${VAR}_EXITCODE}" MATCHES "FAILED_TO_RUN") + SET(${VAR} "" CACHE INTERNAL "Test ${VAR}") + ENDIF(CMAKE_CROSSCOMPILING AND "${${VAR}_EXITCODE}" MATCHES "FAILED_TO_RUN") + + MESSAGE(STATUS "Performing Test ${VAR} - Failed") + FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log + "Performing C++ SOURCE FILE Test ${VAR} failed with the following output:\n" + "${OUTPUT}\n" + "Return value: ${${VAR}_EXITCODE}\n" + "Source file was:\n${SOURCE}\n") + ENDIF("${${VAR}_EXITCODE}" EQUAL 0) + ENDIF("${VAR}" MATCHES "^${VAR}$") +ENDMACRO(CHECK_CXX_SOURCE_RUNS) + diff --git a/deps/extra-cmake-modules/attic/modules/CheckPointerMember.cmake b/deps/extra-cmake-modules/attic/modules/CheckPointerMember.cmake new file mode 100644 index 0000000..b6ea544 --- /dev/null +++ b/deps/extra-cmake-modules/attic/modules/CheckPointerMember.cmake @@ -0,0 +1,42 @@ +# - Check if the given struct or class has the specified member variable +# CHECK_POINTER_MEMBER (POINTER MEMBER HEADER VARIABLE) +# +# POINTER - the name of the struct or class you are interested in +# MEMBER - the member which existence you want to check +# HEADER - the header(s) where the prototype should be declared +# VARIABLE - variable to store the result +# +# The following variables may be set before calling this macro to +# modify the way the check is run: +# +# CMAKE_REQUIRED_FLAGS = string of compile command line flags +# CMAKE_REQUIRED_DEFINITIONS = list of macros to define (-DFOO=bar) +# CMAKE_REQUIRED_INCLUDES = list of include directories + +# Copyright (c) 2006, Alexander Neundorf, +# +# Redistribution and use is allowed according to the terms of the BSD license. +# For details see the accompanying COPYING-CMAKE-SCRIPTS file. + + +INCLUDE(CheckCXXSourceCompiles) + +MACRO (CHECK_POINTER_MEMBER _STRUCT _MEMBER _HEADER _RESULT) + SET(_INCLUDE_FILES) + FOREACH (it ${_HEADER}) + SET(_INCLUDE_FILES "${_INCLUDE_FILES}#include <${it}>\n") + ENDFOREACH (it) + + SET(_CHECK_POINTER_MEMBER_SOURCE_CODE " +${_INCLUDE_FILES} +int main() +{ + ${_STRUCT} tmp; + tmp->${_MEMBER}; + return 0; +} +") + CHECK_CXX_SOURCE_COMPILES("${_CHECK_POINTER_MEMBER_SOURCE_CODE}" ${_RESULT}) + +ENDMACRO (CHECK_POINTER_MEMBER) + diff --git a/deps/extra-cmake-modules/attic/modules/CheckPrototypeExists.cmake b/deps/extra-cmake-modules/attic/modules/CheckPrototypeExists.cmake new file mode 100644 index 0000000..811d648 --- /dev/null +++ b/deps/extra-cmake-modules/attic/modules/CheckPrototypeExists.cmake @@ -0,0 +1,41 @@ +# - Check if the prototype for a function exists. +# CHECK_PROTOTYPE_EXISTS (FUNCTION HEADER VARIABLE) +# +# FUNCTION - the name of the function you are looking for +# HEADER - the header(s) where the prototype should be declared +# VARIABLE - variable to store the result +# +# The following variables may be set before calling this macro to +# modify the way the check is run: +# +# CMAKE_REQUIRED_FLAGS = string of compile command line flags +# CMAKE_REQUIRED_DEFINITIONS = list of macros to define (-DFOO=bar) +# CMAKE_REQUIRED_INCLUDES = list of include directories + +# Copyright (c) 2006, Alexander Neundorf, +# +# Redistribution and use is allowed according to the terms of the BSD license. +# For details see the accompanying COPYING-CMAKE-SCRIPTS file. + + +INCLUDE(CheckCXXSourceCompiles) + +MACRO (CHECK_PROTOTYPE_EXISTS _SYMBOL _HEADER _RESULT) + SET(_INCLUDE_FILES) + FOREACH (it ${_HEADER}) + SET(_INCLUDE_FILES "${_INCLUDE_FILES}#include <${it}>\n") + ENDFOREACH (it) + + SET(_CHECK_PROTO_EXISTS_SOURCE_CODE " +${_INCLUDE_FILES} +int main() +{ +#ifndef ${_SYMBOL} + int i = sizeof(&${_SYMBOL}); +#endif + return 0; +} +") + CHECK_CXX_SOURCE_COMPILES("${_CHECK_PROTO_EXISTS_SOURCE_CODE}" ${_RESULT}) +ENDMACRO (CHECK_PROTOTYPE_EXISTS _SYMBOL _HEADER _RESULT) + diff --git a/deps/extra-cmake-modules/attic/modules/CheckStructMember.cmake b/deps/extra-cmake-modules/attic/modules/CheckStructMember.cmake new file mode 100644 index 0000000..eeb1b65 --- /dev/null +++ b/deps/extra-cmake-modules/attic/modules/CheckStructMember.cmake @@ -0,0 +1,42 @@ +# - Check if the given struct or class has the specified member variable +# CHECK_STRUCT_MEMBER (STRUCT MEMBER HEADER VARIABLE) +# +# STRUCT - the name of the struct or class you are interested in +# MEMBER - the member which existence you want to check +# HEADER - the header(s) where the prototype should be declared +# VARIABLE - variable to store the result +# +# The following variables may be set before calling this macro to +# modify the way the check is run: +# +# CMAKE_REQUIRED_FLAGS = string of compile command line flags +# CMAKE_REQUIRED_DEFINITIONS = list of macros to define (-DFOO=bar) +# CMAKE_REQUIRED_INCLUDES = list of include directories + +# Copyright (c) 2006, Alexander Neundorf, +# +# Redistribution and use is allowed according to the terms of the BSD license. +# For details see the accompanying COPYING-CMAKE-SCRIPTS file. + + +INCLUDE(CheckCXXSourceCompiles) + +MACRO (CHECK_STRUCT_MEMBER _STRUCT _MEMBER _HEADER _RESULT) + SET(_INCLUDE_FILES) + FOREACH (it ${_HEADER}) + SET(_INCLUDE_FILES "${_INCLUDE_FILES}#include <${it}>\n") + ENDFOREACH (it) + + SET(_CHECK_STRUCT_MEMBER_SOURCE_CODE " +${_INCLUDE_FILES} +int main() +{ + ${_STRUCT}* tmp; + tmp->${_MEMBER}; + return 0; +} +") + CHECK_CXX_SOURCE_COMPILES("${_CHECK_STRUCT_MEMBER_SOURCE_CODE}" ${_RESULT}) + +ENDMACRO (CHECK_STRUCT_MEMBER) + diff --git a/deps/extra-cmake-modules/attic/modules/FindACL.cmake b/deps/extra-cmake-modules/attic/modules/FindACL.cmake new file mode 100644 index 0000000..7d3fa14 --- /dev/null +++ b/deps/extra-cmake-modules/attic/modules/FindACL.cmake @@ -0,0 +1,36 @@ +# - Try to find the ACL library +# Once done this will define +# +# ACL_FOUND - system has the ACL library +# ACL_LIBS - The libraries needed to use ACL + +# Copyright (c) 2006, Pino Toscano, +# +# Redistribution and use is allowed according to the terms of the BSD license. +# For details see the accompanying COPYING-CMAKE-SCRIPTS file. + +include(CheckIncludeFiles) + +check_include_files(attr/libattr.h HAVE_ATTR_LIBATTR_H) +check_include_files(sys/xattr.h HAVE_SYS_XATTR_H) +check_include_files(sys/acl.h HAVE_SYS_ACL_H) +check_include_files(acl/libacl.h HAVE_ACL_LIBACL_H) + +if (HAVE_ATTR_LIBATTR_H AND HAVE_SYS_XATTR_H AND HAVE_SYS_ACL_H AND HAVE_ACL_LIBACL_H) + set(ACL_HEADERS_FOUND TRUE) +endif (HAVE_ATTR_LIBATTR_H AND HAVE_SYS_XATTR_H AND HAVE_SYS_ACL_H AND HAVE_ACL_LIBACL_H) + +if (ACL_HEADERS_FOUND) + find_library(ACL_LIBS NAMES acl ) + + find_library(ATTR_LIBS NAMES attr ) +endif (ACL_HEADERS_FOUND) + +if (ACL_HEADERS_FOUND AND ACL_LIBS AND ATTR_LIBS) + set(ACL_FOUND TRUE) + set(ACL_LIBS ${ACL_LIBS} ${ATTR_LIBS}) + message(STATUS "Found ACL support: ${ACL_LIBS}") +endif (ACL_HEADERS_FOUND AND ACL_LIBS AND ATTR_LIBS) + +mark_as_advanced(ACL_LIBS ATTR_LIBS) + diff --git a/deps/extra-cmake-modules/attic/modules/FindAGG.cmake b/deps/extra-cmake-modules/attic/modules/FindAGG.cmake new file mode 100644 index 0000000..86d5618 --- /dev/null +++ b/deps/extra-cmake-modules/attic/modules/FindAGG.cmake @@ -0,0 +1,53 @@ +# - Try to find the AGG graphics library +# Once done this will define +# +# AGG_FOUND - system has AGG +# AGG_INCLUDE_DIR - the AGG include directory +# AGG_LIBRARIES - Link these to use AGG +# AGG_DEFINITIONS - Compiler switches required for using AGG + +# Copyright (c) 2006, Alexander Neundorf, +# +# Redistribution and use is allowed according to the terms of the BSD license. +# For details see the accompanying COPYING-CMAKE-SCRIPTS file. + +if (AGG_INCLUDE_DIR AND AGG_LIBRARIES) + + # in cache already + set(AGG_FOUND TRUE) + +else (AGG_INCLUDE_DIR AND AGG_LIBRARIES) + if (NOT WIN32) + # use pkg-config to get the directories and then use these values + # in the FIND_PATH() and FIND_LIBRARY() calls + find_package(PkgConfig) + pkg_check_modules(PC_AGG QUIET libagg) + + set(AGG_DEFINITIONS ${PC_AGG_CFLAGS_OTHER}) + endif (NOT WIN32) + + find_path(AGG_INCLUDE_DIR agg2/agg_pixfmt_gray.h + PATHS ${PC_AGG_INCLUDEDIR} ${PC_AGG_INCLUDE_DIRS} + ) + + find_library(AGG_LIBRARIES NAMES agg + PATHS ${PC_AGG_LIBDIR} ${PC_AGG_LIBRARY_DIRS} + ) + + if (AGG_INCLUDE_DIR AND AGG_LIBRARIES) + set(AGG_FOUND TRUE) + endif (AGG_INCLUDE_DIR AND AGG_LIBRARIES) + + if (AGG_FOUND) + if (NOT AGG_FIND_QUIETLY) + message(STATUS "Found AGG: ${AGG_LIBRARIES}") + endif (NOT AGG_FIND_QUIETLY) + else (AGG_FOUND) + if (AGG_FIND_REQUIRED) + message(FATAL_ERROR "Could NOT find AGG") + endif (AGG_FIND_REQUIRED) + endif (AGG_FOUND) + + mark_as_advanced(AGG_INCLUDE_DIR AGG_LIBRARIES) + +endif (AGG_INCLUDE_DIR AND AGG_LIBRARIES) diff --git a/deps/extra-cmake-modules/attic/modules/FindAlsa.cmake b/deps/extra-cmake-modules/attic/modules/FindAlsa.cmake new file mode 100644 index 0000000..e0aa4e2 --- /dev/null +++ b/deps/extra-cmake-modules/attic/modules/FindAlsa.cmake @@ -0,0 +1,69 @@ +# Alsa check, based on libkmid/configure.in.in. +# Only the support for Alsa >= 0.9.x was included; 0.5.x was dropped (but feel free to re-add it if you need it) +# It defines ... +# It offers the following macros: +# ALSA_CONFIGURE_FILE(config_header) - generate a config.h, typical usage: +# ALSA_CONFIGURE_FILE(${CMAKE_BINARY_DIR}/config-alsa.h) +# ALSA_VERSION_STRING(version_string) looks for alsa/version.h and reads the version string into +# the first argument passed to the macro + +# Copyright (c) 2006, David Faure, +# Copyright (c) 2007, Matthias Kretz +# +# Redistribution and use is allowed according to the terms of the BSD license. +# For details see the accompanying COPYING-CMAKE-SCRIPTS file. + +include(CheckIncludeFiles) +include(CheckIncludeFileCXX) +include(CheckLibraryExists) + +# Already done by toplevel +find_library(ASOUND_LIBRARY asound) +set(ASOUND_LIBRARY_DIR "") +if(ASOUND_LIBRARY) + get_filename_component(ASOUND_LIBRARY_DIR ${ASOUND_LIBRARY} PATH) +endif() + +check_library_exists(asound snd_seq_create_simple_port "${ASOUND_LIBRARY_DIR}" HAVE_LIBASOUND2) +if(HAVE_LIBASOUND2) + message(STATUS "Found ALSA: ${ASOUND_LIBRARY}") +else() + message(STATUS "ALSA not found") +endif() +set(ALSA_FOUND ${HAVE_LIBASOUND2}) + +find_path(ALSA_INCLUDES alsa/version.h) + +macro(ALSA_VERSION_STRING _result) + # check for version in alsa/version.h + if(ALSA_INCLUDES) + file(READ "${ALSA_INCLUDES}/alsa/version.h" _ALSA_VERSION_CONTENT) + string(REGEX REPLACE ".*SND_LIB_VERSION_STR.*\"(.*)\".*" "\\1" ${_result} "${_ALSA_VERSION_CONTENT}") + else() + message(STATUS "ALSA version not known. ALSA output will probably not work correctly.") + endif() +endmacro(ALSA_VERSION_STRING _result) + + +get_filename_component(_FIND_ALSA_MODULE_DIR ${CMAKE_CURRENT_LIST_FILE} PATH) +macro(ALSA_CONFIGURE_FILE _destFile) + check_include_files(sys/soundcard.h HAVE_SYS_SOUNDCARD_H) + check_include_files(machine/soundcard.h HAVE_MACHINE_SOUNDCARD_H) + + check_include_files(linux/awe_voice.h HAVE_LINUX_AWE_VOICE_H) + check_include_files(awe_voice.h HAVE_AWE_VOICE_H) + check_include_files(/usr/src/sys/i386/isa/sound/awe_voice.h HAVE__USR_SRC_SYS_I386_ISA_SOUND_AWE_VOICE_H) + check_include_files(/usr/src/sys/gnu/i386/isa/sound/awe_voice.h HAVE__USR_SRC_SYS_GNU_I386_ISA_SOUND_AWE_VOICE_H) + + check_include_file_cxx(sys/asoundlib.h HAVE_SYS_ASOUNDLIB_H) + check_include_file_cxx(alsa/asoundlib.h HAVE_ALSA_ASOUNDLIB_H) + + check_library_exists(asound snd_pcm_resume "${ASOUND_LIBRARY_DIR}" ASOUND_HAS_SND_PCM_RESUME) + if(ASOUND_HAS_SND_PCM_RESUME) + set(HAVE_SND_PCM_RESUME 1) + endif() + + configure_file(${_FIND_ALSA_MODULE_DIR}/config-alsa.h.cmake ${_destFile}) +endmacro(ALSA_CONFIGURE_FILE _destFile) + +mark_as_advanced(ALSA_INCLUDES ASOUND_LIBRARY) diff --git a/deps/extra-cmake-modules/attic/modules/FindAvahi.cmake b/deps/extra-cmake-modules/attic/modules/FindAvahi.cmake new file mode 100644 index 0000000..c6e055f --- /dev/null +++ b/deps/extra-cmake-modules/attic/modules/FindAvahi.cmake @@ -0,0 +1,15 @@ +# Find Avahi. Only avahi-common/defs.h is really needed + +# Copyright (c) 2007, Jakub Stachowski, +# +# Redistribution and use is allowed according to the terms of the BSD license. +# For details see the accompanying COPYING-CMAKE-SCRIPTS file. + + +find_path(AVAHI_INCLUDE_DIR avahi-common/defs.h) +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(Avahi DEFAULT_MSG + AVAHI_INCLUDE_DIR) + +mark_as_advanced(AVAHI_INCLUDE_DIR) + diff --git a/deps/extra-cmake-modules/attic/modules/FindBerkeleyDB.cmake b/deps/extra-cmake-modules/attic/modules/FindBerkeleyDB.cmake new file mode 100644 index 0000000..021d942 --- /dev/null +++ b/deps/extra-cmake-modules/attic/modules/FindBerkeleyDB.cmake @@ -0,0 +1,25 @@ +# - Try to find Berkeley DB +# Once done this will define +# +# BERKELEY_DB_FOUND - system has Berkeley DB +# BERKELEY_DB_INCLUDE_DIR - the Berkeley DB include directory +# BERKELEY_DB_LIBRARIES - Link these to use Berkeley DB +# BERKELEY_DB_DEFINITIONS - Compiler switches required for using Berkeley DB + +# Copyright (c) 2006, Alexander Dymo, +# +# Redistribution and use is allowed according to the terms of the BSD license. +# For details see the accompanying COPYING-CMAKE-SCRIPTS file. + +find_path(BERKELEY_DB_INCLUDE_DIR db.h + /usr/include/db4 + /usr/local/include/db4 +) + +find_library(BERKELEY_DB_LIBRARIES NAMES db ) + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(Berkeley "Could not find Berkeley DB >= 4.1" BERKELEY_DB_INCLUDE_DIR BERKELEY_DB_LIBRARIES) +# show the BERKELEY_DB_INCLUDE_DIR and BERKELEY_DB_LIBRARIES variables only in the advanced view +mark_as_advanced(BERKELEY_DB_INCLUDE_DIR BERKELEY_DB_LIBRARIES ) + diff --git a/deps/extra-cmake-modules/attic/modules/FindBlueZ.cmake b/deps/extra-cmake-modules/attic/modules/FindBlueZ.cmake new file mode 100644 index 0000000..3cfdc08 --- /dev/null +++ b/deps/extra-cmake-modules/attic/modules/FindBlueZ.cmake @@ -0,0 +1,48 @@ +# - Try to find BlueZ bluetooth library. +# Once done this will define +# +# BLUEZ_FOUND - system has BlueZ +# BLUEZ_INCLUDE_DIR - the BlueZ include directory +# BLUEZ_LIBRARIES - Link these to use BlueZ +# BLUEZ_DEFINITIONS - Compiler switches required for using BlueZ +# Redistribution and use is allowed according to the terms of the BSD license. +# For details see the accompanying COPYING-CMAKE-SCRIPTS file. +# + +# Copyright (c) 2008, Daniel Gollub, +# +# Redistribution and use is allowed according to the terms of the BSD license. +# For details see the accompanying COPYING-CMAKE-SCRIPTS file. + + +# use pkg-config to get the directories and then use these values +# in the FIND_PATH() and FIND_LIBRARY() calls +find_package(PkgConfig) +pkg_check_modules(PC_BLUEZ QUIET bluez) + +set(BLUEZ_DEFINITIONS ${PC_BLUEZ_CFLAGS_OTHER}) + +find_path(BLUEZ_INCLUDE_DIR NAMES bluetooth/bluetooth.h + PATHS + ${PC_BLUEZ_INCLUDEDIR} + ${PC_BLUEZ_INCLUDE_DIRS} + /usr/X11/include +) + +find_library(BLUEZ_LIBRARY NAMES bluetooth + PATHS + ${PC_BLUEZ_LIBDIR} + ${PC_BLUEZ_LIBRARY_DIRS} +) + +set(BLUEZ_LIBRARIES ${BLUEZ_LIBRARY}) + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(BlueZ DEFAULT_MSG BLUEZ_LIBRARY BLUEZ_INCLUDE_DIR) + +include(FeatureSummary) +set_package_properties(BlueZ PROPERTIES URL http://www.bluez.org/ + DESCRIPTION "Official Linux Bluetooth protocol stack") + +# show the BLUEZ_INCLUDE_DIR and BLUEZ_LIBRARY variables only in the advanced view +mark_as_advanced(BLUEZ_INCLUDE_DIR BLUEZ_LIBRARY) diff --git a/deps/extra-cmake-modules/attic/modules/FindCarbon.cmake b/deps/extra-cmake-modules/attic/modules/FindCarbon.cmake new file mode 100644 index 0000000..2b0d979 --- /dev/null +++ b/deps/extra-cmake-modules/attic/modules/FindCarbon.cmake @@ -0,0 +1,22 @@ +# - Find Carbon on Mac +# +# CARBON_LIBRARY - the library to use Carbon +# CARBON_FOUND - true if Carbon has been found + +# Copyright (c) 2006, Benjamin Reed, +# +# Redistribution and use is allowed according to the terms of the BSD license. +# For details see the accompanying COPYING-CMAKE-SCRIPTS file. + +include(CMakeFindFrameworks) + +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) + diff --git a/deps/extra-cmake-modules/attic/modules/FindDBusMenuQt.cmake b/deps/extra-cmake-modules/attic/modules/FindDBusMenuQt.cmake new file mode 100644 index 0000000..10e14dc --- /dev/null +++ b/deps/extra-cmake-modules/attic/modules/FindDBusMenuQt.cmake @@ -0,0 +1,94 @@ +# - Try to find dbusmenu-qt +# This module helps finding an installation of the DBusMenuQt library (see https://launchpad.net/libdbusmenu-qt/) +# Once done this will define +# +# DBUSMENUQT_FOUND - system has dbusmenu-qt +# DBUSMENUQT_INCLUDE_DIR - the dbusmenu-qt include directory +# DBUSMENUQT_LIBRARIES - the libraries needed to use dbusmenu-qt +# DBUSMENUQT_DEFINITIONS - Compiler switches required for using dbusmenu-qt +# +# The minimum required version of DBusMenuQt can be specified using the +# standard syntax, e.g. find_package(DBusMenuQt 0.6) +# +# WARNING: versions below 0.4.0 cannot be checked for. +# So if you want to have a version check, require at least 0.4.0 of dbusmenuqt. + +# Copyright (c) 2009, Canonical Ltd. +# - Author: Aurélien Gâteau +# +# Based on FindQCA2.cmake +# Copyright (c) 2006, Michael Larouche, +# +# Redistribution and use is allowed according to the terms of the BSD license. +# For details see the accompanying COPYING-CMAKE-SCRIPTS file. + +include(FindPackageHandleStandardArgs) + +find_package(PkgConfig) +pkg_check_modules(PC_DBUSMENUQT QUIET dbusmenu-qt) + + +set(DBUSMENUQT_DEFINITIONS ${PC_DBUSMENUQT_CFLAGS_OTHER}) + +find_library(DBUSMENUQT_LIBRARIES + NAMES dbusmenu-qt dbusmenu-qtd + HINTS ${PC_DBUSMENUQT_LIBDIR} ${PC_DBUSMENUQT_LIBRARY_DIRS} + ) + +find_path(DBUSMENUQT_INCLUDE_DIR dbusmenuexporter.h + HINTS ${PC_DBUSMENUQT_INCLUDEDIR} ${PC_DBUSMENUQT_INCLUDE_DIRS} + PATH_SUFFIXES dbusmenu-qt + ) + + +# dbusmenu_version.h is installed since 0.4.0, fail if a version below this is required: +if ((DBusMenuQt_FIND_VERSION) AND ("${DBusMenuQt_FIND_VERSION}" VERSION_LESS "0.4.0")) + message(FATAL_ERROR "Cannot check reliably for a DBusMenuQt version below 0.4.0 (${DBusMenuQt_FIND_VERSION} was requested)") +endif ((DBusMenuQt_FIND_VERSION) AND ("${DBusMenuQt_FIND_VERSION}" VERSION_LESS "0.4.0")) + + +# find the version number from dbusmenu_version.h and store it in the cache +if(DBUSMENUQT_INCLUDE_DIR AND NOT DBUSMENUQT_VERSION) + # parse the version number out from dbusmenu_version: + if(EXISTS ${DBUSMENUQT_INCLUDE_DIR}/dbusmenu_version.h) + file(READ "${DBUSMENUQT_INCLUDE_DIR}/dbusmenu_version.h" DBUSMENUQT_VERSION_CONTENT) + + if ("${DBUSMENUQT_VERSION_CONTENT}" MATCHES "DBUSMENUQT_VERSION_MAJOR") # introduced after 0.6.4, makes this code here more robust + + string(REGEX MATCH "#define +DBUSMENUQT_VERSION_MAJOR +([0-9]+)" _dummy "${DBUSMENUQT_VERSION_CONTENT}") + set(DBUSMENUQT_VERSION_MAJOR "${CMAKE_MATCH_1}") + + string(REGEX MATCH "#define +DBUSMENUQT_VERSION_MINOR +([0-9]+)" _dummy "${DBUSMENUQT_VERSION_CONTENT}") + set(DBUSMENUQT_VERSION_MINOR "${CMAKE_MATCH_1}") + + string(REGEX MATCH "#define +DBUSMENUQT_VERSION_PATCH +([0-9]+)" _dummy "${DBUSMENUQT_VERSION_CONTENT}") + set(DBUSMENUQT_VERSION_PATCH "${CMAKE_MATCH_1}") + + else() + # In versions up to 0.6.4, the code for setting the version number in the header looked like + # shopw below. This made version checking quite un-obvious: + # #define DBUSMENUQT_VERSION \ + # ((0 << 16) \ + # |(6 << 8) \ + # |4) + + string(REGEX MATCH "\\(\\( *([0-9]+) *<<" _dummy "${DBUSMENUQT_VERSION_CONTENT}") + set(DBUSMENUQT_VERSION_MAJOR "${CMAKE_MATCH_1}") + + string(REGEX MATCH "\\|\\( *([0-9]+) *<<" _dummy "${DBUSMENUQT_VERSION_CONTENT}") + set(DBUSMENUQT_VERSION_MINOR "${CMAKE_MATCH_1}") + + string(REGEX MATCH "\\| *([0-9]+) *\\)" _dummy "${DBUSMENUQT_VERSION_CONTENT}") + set(DBUSMENUQT_VERSION_PATCH "${CMAKE_MATCH_1}") + endif() + endif() + + set(DBUSMENUQT_VERSION "${DBUSMENUQT_VERSION_MAJOR}.${DBUSMENUQT_VERSION_MINOR}.${DBUSMENUQT_VERSION_PATCH}" CACHE STRING "Version number of DBusMenuQt" FORCE) +endif() + + +find_package_handle_standard_args(DBusMenuQt REQUIRED_VARS DBUSMENUQT_LIBRARIES DBUSMENUQT_INCLUDE_DIR + VERSION_VAR DBUSMENUQT_VERSION) +#"Could not find dbusmenu-qt; available at https://launchpad.net/libdbusmenu-qt/" DBUSMENUQT_LIBRARIES DBUSMENUQT_INCLUDE_DIR) + +mark_as_advanced(DBUSMENUQT_INCLUDE_DIR DBUSMENUQT_LIBRARIES DBUSMENUQT_VERSION) diff --git a/deps/extra-cmake-modules/attic/modules/FindDNSSD.cmake b/deps/extra-cmake-modules/attic/modules/FindDNSSD.cmake new file mode 100644 index 0000000..8604bd5 --- /dev/null +++ b/deps/extra-cmake-modules/attic/modules/FindDNSSD.cmake @@ -0,0 +1,48 @@ +# - Try to find DNSSD +# Once done this will define +# +# DNSSD_FOUND - system has DNSSD +# DNSSD_INCLUDE_DIR - the DNSSD include directory +# DNSSD_LIBRARIES - Link these to use dnssd +# DNSSD_DEFINITIONS - Compiler switches required for using DNSSD +# +# need more test: look at into dnssd/configure.in.in + +# Copyright (c) 2006, Laurent Montel, +# +# Redistribution and use is allowed according to the terms of the BSD license. +# For details see the accompanying COPYING-CMAKE-SCRIPTS file. + +FIND_PATH(DNSSD_INCLUDE_DIR dns_sd.h + /usr/include/avahi-compat-libdns_sd/ +) + +if (DNSSD_INCLUDE_DIR) + if (APPLE) + set(DNSSD_LIBRARIES "/usr/lib/libSystem.dylib") + else (APPLE) + FIND_LIBRARY(DNSSD_LIBRARIES NAMES dns_sd ) + endif (APPLE) + + MACRO_PUSH_REQUIRED_VARS() + set(CMAKE_REQUIRED_INCLUDES ${DNSSD_INCLUDE_DIR}) + set(CMAKE_REQUIRED_LIBRARIES ${DNSSD_LIBRARIES}) + CHECK_FUNCTION_EXISTS(DNSServiceRefDeallocate DNSSD_FUNCTION_FOUND) + MACRO_POP_REQUIRED_VARS() + + if (DNSSD_INCLUDE_DIR AND DNSSD_LIBRARIES AND DNSSD_FUNCTION_FOUND) + set(DNSSD_FOUND TRUE) + endif (DNSSD_INCLUDE_DIR AND DNSSD_LIBRARIES AND DNSSD_FUNCTION_FOUND) +endif (DNSSD_INCLUDE_DIR) + +if (DNSSD_FOUND) + if (NOT DNSSD_FIND_QUIETLY) + message(STATUS "Found DNSSD: ${DNSSD_LIBRARIES}") + endif (NOT DNSSD_FIND_QUIETLY) +else (DNSSD_FOUND) + if (DNSSD_FIND_REQUIRED) + message(FATAL_ERROR "Could NOT find DNSSD") + endif (DNSSD_FIND_REQUIRED) +endif (DNSSD_FOUND) + +MARK_AS_ADVANCED(DNSSD_INCLUDE_DIR DNSSD_LIBRARIES) diff --git a/deps/extra-cmake-modules/attic/modules/FindENCHANT.cmake b/deps/extra-cmake-modules/attic/modules/FindENCHANT.cmake new file mode 100644 index 0000000..9c13c48 --- /dev/null +++ b/deps/extra-cmake-modules/attic/modules/FindENCHANT.cmake @@ -0,0 +1,44 @@ +# - Try to find the Enchant spell checker +# Once done this will define +# +# ENCHANT_FOUND - system has ENCHANT +# ENCHANT_INCLUDE_DIR - the ENCHANT include directory +# ENCHANT_LIBRARIES - Link these to use ENCHANT +# ENCHANT_DEFINITIONS - Compiler switches required for using ENCHANT + +# Copyright (c) 2006, Zack Rusin, +# +# Redistribution and use is allowed according to the terms of the BSD license. +# For details see the accompanying COPYING-CMAKE-SCRIPTS file. + + +if (ENCHANT_INCLUDE_DIR AND ENCHANT_LIBRARIES) + + # in cache already + set(ENCHANT_FOUND TRUE) + +else (ENCHANT_INCLUDE_DIR AND ENCHANT_LIBRARIES) + if (NOT WIN32) + # use pkg-config to get the directories and then use these values + # in the FIND_PATH() and FIND_LIBRARY() calls + find_package(PkgConfig) + pkg_check_modules(PC_ENCHANT QUIET enchant) + set(ENCHANT_DEFINITIONS ${PC_ENCHANT_CFLAGS_OTHER}) + endif (NOT WIN32) + + find_path(ENCHANT_INCLUDE_DIR + NAMES enchant++.h + HINTS ${PC_ENCHANT_INCLUDEDIR} + ${PC_ENCHANT_INCLUDE_DIRS} + PATH_SUFFIXES enchant ) + + find_library(ENCHANT_LIBRARIES NAMES enchant + HINTS ${PC_ENCHANT_LIBDIR} + ${PC_ENCHANT_LIBRARY_DIRS} ) + + include(FindPackageHandleStandardArgs) + find_package_handle_standard_args(ENCHANT DEFAULT_MSG ENCHANT_INCLUDE_DIR ENCHANT_LIBRARIES ) + + mark_as_advanced(ENCHANT_INCLUDE_DIR ENCHANT_LIBRARIES) + +endif (ENCHANT_INCLUDE_DIR AND ENCHANT_LIBRARIES) diff --git a/deps/extra-cmake-modules/attic/modules/FindEigen.cmake b/deps/extra-cmake-modules/attic/modules/FindEigen.cmake new file mode 100644 index 0000000..805deb2 --- /dev/null +++ b/deps/extra-cmake-modules/attic/modules/FindEigen.cmake @@ -0,0 +1,24 @@ +# Note that Eigen1 is deprecated in favor of Eigen2. So this file is deprecated +# in favor of FindEigen2.cmake. It is kept only for compatibility. +# +# - Try to find Eigen1 library +# Once done this will define +# +# EIGEN_FOUND - system has eigen lib +# EIGEN_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. + +find_path(EIGEN_INCLUDE_DIR NAMES eigen/matrix.h + PATHS + ${INCLUDE_INSTALL_DIR} + ) + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(Eigen DEFAULT_MSG EIGEN_INCLUDE_DIR ) + +mark_as_advanced(EIGEN_INCLUDE_DIR) + + diff --git a/deps/extra-cmake-modules/attic/modules/FindEigen2.cmake b/deps/extra-cmake-modules/attic/modules/FindEigen2.cmake new file mode 100644 index 0000000..721dbce --- /dev/null +++ b/deps/extra-cmake-modules/attic/modules/FindEigen2.cmake @@ -0,0 +1,55 @@ +# - Try to find Eigen2 lib +# +# This module supports requiring a minimum version, e.g. you can do +# find_package(Eigen2 2.0.3) +# to require version 2.0.3 to newer of Eigen2. +# +# Once done this will define +# +# EIGEN2_FOUND - system has eigen lib with correct version +# EIGEN2_INCLUDE_DIR - the eigen include directory +# EIGEN2_VERSION - eigen version + +# Copyright (c) 2006, 2007 Montel Laurent, +# Copyright (c) 2008, 2009 Gael Guennebaud, +# Redistribution and use is allowed according to the terms of the BSD license. + +if(NOT Eigen2_FIND_VERSION) + set(Eigen2_FIND_VERSION_MAJOR 2) + set(Eigen2_FIND_VERSION_MINOR 0) + set(Eigen2_FIND_VERSION_PATCH 0) + + set(Eigen2_FIND_VERSION "${Eigen2_FIND_VERSION_MAJOR}.${Eigen2_FIND_VERSION_MINOR}.${Eigen2_FIND_VERSION_PATCH}") +endif() + +macro(_eigen2_get_version) + file(READ "${EIGEN2_INCLUDE_DIR}/Eigen/src/Core/util/Macros.h" _eigen2_version_header LIMIT 5000 OFFSET 1000) + + string(REGEX MATCH "define *EIGEN_WORLD_VERSION ([0-9]*)" _eigen2_world_version_match "${_eigen2_version_header}") + set(EIGEN2_WORLD_VERSION "${CMAKE_MATCH_1}") + string(REGEX MATCH "define *EIGEN_MAJOR_VERSION ([0-9]*)" _eigen2_major_version_match "${_eigen2_version_header}") + set(EIGEN2_MAJOR_VERSION "${CMAKE_MATCH_1}") + string(REGEX MATCH "define *EIGEN_MINOR_VERSION ([0-9]*)" _eigen2_minor_version_match "${_eigen2_version_header}") + set(EIGEN2_MINOR_VERSION "${CMAKE_MATCH_1}") + + set(EIGEN2_VERSION ${EIGEN2_WORLD_VERSION}.${EIGEN2_MAJOR_VERSION}.${EIGEN2_MINOR_VERSION}) +endmacro(_eigen2_get_version) + +find_path(EIGEN2_INCLUDE_DIR NAMES Eigen/Core + PATHS + ${INCLUDE_INSTALL_DIR} + ${KDE4_INCLUDE_DIR} + PATH_SUFFIXES eigen2 + ) + +if(EIGEN2_INCLUDE_DIR) + _eigen2_get_version() +endif() + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(Eigen2 REQUIRED_VARS EIGEN2_INCLUDE_DIR + VERSION_VAR EIGEN2_VERSION) + +mark_as_advanced(EIGEN2_INCLUDE_DIR) + + diff --git a/deps/extra-cmake-modules/attic/modules/FindExiv2.cmake b/deps/extra-cmake-modules/attic/modules/FindExiv2.cmake new file mode 100644 index 0000000..770b3c6 --- /dev/null +++ b/deps/extra-cmake-modules/attic/modules/FindExiv2.cmake @@ -0,0 +1,80 @@ +# - 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 +# EXIV2_INCLUDE_DIR - the libexiv2 include directory +# EXIV2_LIBRARIES - Link these to use libexiv2 +# EXIV2_DEFINITIONS - Compiler switches required for using libexiv2 +# +# The minimum required version of Exiv2 can be specified using the +# standard syntax, e.g. find_package(Exiv2 0.17) +# +# For compatiblity, also the variable EXIV2_MIN_VERSION can be set to the minimum version +# you need before doing FIND_PACKAGE(Exiv2). The default is 0.12. + +# Copyright (c) 2010, Alexander Neundorf, +# Copyright (c) 2008, Gilles Caulier, +# +# Redistribution and use is allowed according to the terms of the BSD license. +# For details see the accompanying COPYING-CMAKE-SCRIPTS file. + +# Support EXIV2_MIN_VERSION for compatibility: +if(NOT Exiv2_FIND_VERSION) + set(Exiv2_FIND_VERSION "${EXIV2_MIN_VERSION}") +endif() + +# the minimum version of exiv2 we require +if(NOT Exiv2_FIND_VERSION) + set(Exiv2_FIND_VERSION "0.12") +endif() + + +if (NOT WIN32) + # use pkg-config to get the directories and then use these values + # in the FIND_PATH() and FIND_LIBRARY() calls + find_package(PkgConfig) + pkg_check_modules(PC_EXIV2 QUIET exiv2) + set(EXIV2_DEFINITIONS ${PC_EXIV2_CFLAGS_OTHER}) +endif (NOT WIN32) + + +find_path(EXIV2_INCLUDE_DIR NAMES exiv2/exif.hpp + HINTS + ${PC_EXIV2_INCLUDEDIR} + ${PC_EXIV2_INCLUDE_DIRS} + ) + +find_library(EXIV2_LIBRARY NAMES exiv2 libexiv2 + HINTS + ${PC_EXIV2_LIBDIR} + ${PC_EXIV2_LIBRARY_DIRS} + ) + + +# Get the version number from exiv2/version.hpp and store it in the cache: +if(EXIV2_INCLUDE_DIR AND NOT EXIV2_VERSION) + file(READ ${EXIV2_INCLUDE_DIR}/exiv2/version.hpp EXIV2_VERSION_CONTENT) + string(REGEX MATCH "#define EXIV2_MAJOR_VERSION +\\( *([0-9]+) *\\)" _dummy "${EXIV2_VERSION_CONTENT}") + set(EXIV2_VERSION_MAJOR "${CMAKE_MATCH_1}") + + string(REGEX MATCH "#define EXIV2_MINOR_VERSION +\\( *([0-9]+) *\\)" _dummy "${EXIV2_VERSION_CONTENT}") + set(EXIV2_VERSION_MINOR "${CMAKE_MATCH_1}") + + string(REGEX MATCH "#define EXIV2_PATCH_VERSION +\\( *([0-9]+) *\\)" _dummy "${EXIV2_VERSION_CONTENT}") + set(EXIV2_VERSION_PATCH "${CMAKE_MATCH_1}") + + set(EXIV2_VERSION "${EXIV2_VERSION_MAJOR}.${EXIV2_VERSION_MINOR}.${EXIV2_VERSION_PATCH}" CACHE STRING "Version number of Exiv2" FORCE) +endif() + +set(EXIV2_LIBRARIES "${EXIV2_LIBRARY}") + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(Exiv2 REQUIRED_VARS EXIV2_LIBRARY EXIV2_INCLUDE_DIR + VERSION_VAR EXIV2_VERSION) + +mark_as_advanced(EXIV2_INCLUDE_DIR EXIV2_LIBRARY) + diff --git a/deps/extra-cmake-modules/attic/modules/FindFAM.cmake b/deps/extra-cmake-modules/attic/modules/FindFAM.cmake new file mode 100644 index 0000000..7a598fd --- /dev/null +++ b/deps/extra-cmake-modules/attic/modules/FindFAM.cmake @@ -0,0 +1,22 @@ +# - Try to find the FAM directory notification library +# Once done this will define +# +# FAM_FOUND - system has FAM +# FAM_INCLUDE_DIR - the FAM include directory +# FAM_LIBRARIES - The libraries needed to use FAM + +# Copyright (c) 2006, Alexander Neundorf, +# +# Redistribution and use is allowed according to the terms of the BSD license. +# For details see the accompanying COPYING-CMAKE-SCRIPTS file. + + +FIND_PATH(FAM_INCLUDE_DIR fam.h) + +FIND_LIBRARY(FAM_LIBRARIES NAMES fam ) + +INCLUDE(FindPackageHandleStandardArgs) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(FAM DEFAULT_MSG FAM_INCLUDE_DIR FAM_LIBRARIES ) + +MARK_AS_ADVANCED(FAM_INCLUDE_DIR FAM_LIBRARIES) + diff --git a/deps/extra-cmake-modules/attic/modules/FindFFmpeg.cmake b/deps/extra-cmake-modules/attic/modules/FindFFmpeg.cmake new file mode 100644 index 0000000..d6259b0 --- /dev/null +++ b/deps/extra-cmake-modules/attic/modules/FindFFmpeg.cmake @@ -0,0 +1,116 @@ +# - Try to find ffmpeg +# Once done this will define +# +# FFMPEG_FOUND - system has ffmpeg +# FFMPEG_INCLUDE_DIR - Include directory necessary for using the ffmpeg headers +# FFMPEG_LIBRARIES - Link these to use ffmpeg +# FFMPEG_DEFINITIONS - Compiler switches required for using ffmpeg + +# Copyright (c) 2006, Matthias Kretz, +# Copyright (c) 2008, Alexander Neundorf, +# +# Redistribution and use is allowed according to the terms of the BSD license. +# For details see the accompanying COPYING-CMAKE-SCRIPTS file. + + +if (FFMPEG_LIBRARIES) + + # in cache already + set(FFMPEG_FOUND TRUE) + +else (FFMPEG_LIBRARIES) + +if (NOT WIN32) + # use pkg-config to get the directories and then use these values + # in the FIND_PATH() and FIND_LIBRARY() calls + find_package(PkgConfig) + pkg_check_modules(PC_LIBAVCODEC libavcodec) + set(FFMPEG_DEFINITIONS ${PC_LIBAVCODEC_CFLAGS_OTHER}) + +endif (NOT WIN32) + + # + # #include is the new style for FFMPEG headers + # This has been verified at least since 0.4.9 + # Please do not change to the old format, since this will break for + # people who are using newer versions. Instead, upgrade your ffmpeg + # installation. + # + find_path(FFMPEG_INCLUDE_DIR libavcodec/avcodec.h + HINTS + ${PC_LIBAVCODEC_INCLUDEDIR} + ${PC_LIBAVCODEC_INCLUDE_DIRS} + ) + + # 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 + HINTS + ${PC_LIBAVCODEC_INCLUDEDIR} + ${PC_LIBAVCODEC_INCLUDE_DIRS} + ) + + find_library(AVCODEC_LIBRARIES NAMES avcodec + HINTS + ${PC_LIBAVCODEC_LIBDIR} + ${PC_LIBAVCODEC_LIBRARY_DIRS} + ) + + find_library(AVFORMAT_LIBRARIES NAMES avformat + HINTS + ${PC_LIBAVCODEC_LIBDIR} + ${PC_LIBAVCODEC_LIBRARY_DIRS} + ) + + find_library(AVUTIL_LIBRARIES NAMES avutil + HINTS + ${PC_LIBAVCODEC_LIBDIR} + ${PC_LIBAVCODEC_LIBRARY_DIRS} + ) + + + + set(FFMPEG_LIBRARIES ) + if (AVCODEC_LIBRARIES) + set(FFMPEG_LIBRARIES ${FFMPEG_LIBRARIES} ${AVCODEC_LIBRARIES}) + endif (AVCODEC_LIBRARIES) + + if (AVFORMAT_LIBRARIES) + set(FFMPEG_LIBRARIES ${FFMPEG_LIBRARIES} ${AVFORMAT_LIBRARIES}) + endif (AVFORMAT_LIBRARIES) + + if (AVUTIL_LIBRARIES) + set(FFMPEG_LIBRARIES ${FFMPEG_LIBRARIES} ${AVUTIL_LIBRARIES}) + endif (AVUTIL_LIBRARIES) + + if (FFMPEG_LIBRARIES AND FFMPEG_INCLUDE_DIR) + set(FFMPEG_FOUND TRUE) + 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(AVCODEC_LIBRARIES + AVFORMAT_LIBRARIES + AVUTIL_LIBRARIES + FFMPEG_INCLUDE_DIR + FFMPEG_INCLUDE_DIR_OLD_STYLE) + +endif (FFMPEG_LIBRARIES)# AND FFMPEG_DEFINITIONS) diff --git a/deps/extra-cmake-modules/attic/modules/FindFlac.cmake b/deps/extra-cmake-modules/attic/modules/FindFlac.cmake new file mode 100644 index 0000000..208e3fc --- /dev/null +++ b/deps/extra-cmake-modules/attic/modules/FindFlac.cmake @@ -0,0 +1,34 @@ +# - Try to find Flac, the Free Lossless Audio Codec +# Once done this will define +# +# FLAC_FOUND - system has Flac +# FLAC_INCLUDE_DIR - the Flac include directory +# FLAC_LIBRARIES - Link these to use Flac +# FLAC_OGGFLAC_LIBRARIES - Link these to use OggFlac +# +# No version checking is done - use FLAC_API_VERSION_CURRENT to +# conditionally compile version-dependent code + +# Copyright (c) 2006, Laurent Montel, +# Copyright (c) 2006, Alexander Neundorf, +# +# Redistribution and use is allowed according to the terms of the BSD license. +# For details see the accompanying COPYING-CMAKE-SCRIPTS file. + +FIND_PATH(FLAC_INCLUDE_DIR FLAC/metadata.h) + +FIND_LIBRARY(FLAC_LIBRARIES NAMES FLAC ) + +FIND_LIBRARY(FLAC_OGG_LIBRARY NAMES OggFLAC) + + +IF(FLAC_LIBRARIES AND FLAC_OGG_LIBRARY) + SET(FLAC_OGGFLAC_LIBRARIES ${FLAC_OGG_LIBRARY} ${FLAC_LIBRARIES}) +ENDIF(FLAC_LIBRARIES AND FLAC_OGG_LIBRARY) + +INCLUDE(FindPackageHandleStandardArgs) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(Flac REQUIRED_VARS FLAC_LIBRARIES FLAC_INCLUDE_DIR) + +# show the FLAC_INCLUDE_DIR and FLAC_LIBRARIES variables only in the advanced view +MARK_AS_ADVANCED(FLAC_INCLUDE_DIR FLAC_LIBRARIES FLAC_OGG_LIBRARY) + diff --git a/deps/extra-cmake-modules/attic/modules/FindFontconfig.cmake b/deps/extra-cmake-modules/attic/modules/FindFontconfig.cmake new file mode 100644 index 0000000..d95e46b --- /dev/null +++ b/deps/extra-cmake-modules/attic/modules/FindFontconfig.cmake @@ -0,0 +1,50 @@ +# - Try to find the Fontconfig +# Once done this will define +# +# FONTCONFIG_FOUND - system has Fontconfig +# FONTCONFIG_INCLUDE_DIR - The include directory to use for the fontconfig headers +# FONTCONFIG_LIBRARIES - Link these to use FONTCONFIG +# FONTCONFIG_DEFINITIONS - Compiler switches required for using FONTCONFIG + +# Copyright (c) 2006,2007 Laurent Montel, +# +# Redistribution and use is allowed according to the terms of the BSD license. +# For details see the accompanying COPYING-CMAKE-SCRIPTS file. + + +if (FONTCONFIG_LIBRARIES AND FONTCONFIG_INCLUDE_DIR) + + # in cache already + set(FONTCONFIG_FOUND TRUE) + +else (FONTCONFIG_LIBRARIES AND FONTCONFIG_INCLUDE_DIR) + + if (NOT WIN32) + # use pkg-config to get the directories and then use these values + # in the FIND_PATH() and FIND_LIBRARY() calls + find_package(PkgConfig) + pkg_check_modules(PC_FONTCONFIG QUIET fontconfig) + + set(FONTCONFIG_DEFINITIONS ${PC_FONTCONFIG_CFLAGS_OTHER}) + endif (NOT WIN32) + + find_path(FONTCONFIG_INCLUDE_DIR fontconfig/fontconfig.h + PATHS + ${PC_FONTCONFIG_INCLUDEDIR} + ${PC_FONTCONFIG_INCLUDE_DIRS} + /usr/X11/include + ) + + find_library(FONTCONFIG_LIBRARIES NAMES fontconfig + PATHS + ${PC_FONTCONFIG_LIBDIR} + ${PC_FONTCONFIG_LIBRARY_DIRS} + ) + + include(FindPackageHandleStandardArgs) + find_package_handle_standard_args(Fontconfig DEFAULT_MSG FONTCONFIG_LIBRARIES FONTCONFIG_INCLUDE_DIR ) + + mark_as_advanced(FONTCONFIG_LIBRARIES FONTCONFIG_INCLUDE_DIR) + +endif (FONTCONFIG_LIBRARIES AND FONTCONFIG_INCLUDE_DIR) + diff --git a/deps/extra-cmake-modules/attic/modules/FindGLIB2.cmake b/deps/extra-cmake-modules/attic/modules/FindGLIB2.cmake new file mode 100644 index 0000000..0f55722 --- /dev/null +++ b/deps/extra-cmake-modules/attic/modules/FindGLIB2.cmake @@ -0,0 +1,52 @@ +# - Try to find the GLIB2 libraries +# Once done this will define +# +# GLIB2_FOUND - system has glib2 +# GLIB2_INCLUDE_DIR - the glib2 include directory +# GLIB2_LIBRARIES - glib2 library + +# Copyright (c) 2008 Laurent Montel, +# +# Redistribution and use is allowed according to the terms of the BSD license. +# For details see the accompanying COPYING-CMAKE-SCRIPTS file. + + +if(GLIB2_INCLUDE_DIR AND GLIB2_LIBRARIES) + # Already in cache, be silent + set(GLIB2_FIND_QUIETLY TRUE) +endif() + +find_package(PkgConfig) +pkg_check_modules(PC_LibGLIB2 QUIET glib-2.0) + +find_path(GLIB2_MAIN_INCLUDE_DIR + NAMES glib.h + HINTS ${PC_LibGLIB2_INCLUDEDIR} + PATH_SUFFIXES glib-2.0) + +find_library(GLIB2_LIBRARY + NAMES glib-2.0 + HINTS ${PC_LibGLIB2_LIBDIR} +) + +set(GLIB2_LIBRARIES ${GLIB2_LIBRARY}) + +# search the glibconfig.h include dir under the same root where the library is found +get_filename_component(glib2LibDir "${GLIB2_LIBRARIES}" PATH) + +find_path(GLIB2_INTERNAL_INCLUDE_DIR glibconfig.h + PATH_SUFFIXES glib-2.0/include + HINTS ${PC_LibGLIB2_INCLUDEDIR} "${glib2LibDir}" ${CMAKE_SYSTEM_LIBRARY_PATH}) + +set(GLIB2_INCLUDE_DIR "${GLIB2_MAIN_INCLUDE_DIR}") + +# not sure if this include dir is optional or required +# for now it is optional +if(GLIB2_INTERNAL_INCLUDE_DIR) + set(GLIB2_INCLUDE_DIR ${GLIB2_INCLUDE_DIR} "${GLIB2_INTERNAL_INCLUDE_DIR}") +endif() + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(GLIB2 DEFAULT_MSG GLIB2_LIBRARIES GLIB2_MAIN_INCLUDE_DIR) + +mark_as_advanced(GLIB2_INCLUDE_DIR GLIB2_LIBRARIES) diff --git a/deps/extra-cmake-modules/attic/modules/FindGMP.cmake b/deps/extra-cmake-modules/attic/modules/FindGMP.cmake new file mode 100644 index 0000000..17d175c --- /dev/null +++ b/deps/extra-cmake-modules/attic/modules/FindGMP.cmake @@ -0,0 +1,23 @@ +# Try to find the GMP librairies +# GMP_FOUND - system has GMP lib +# GMP_INCLUDE_DIR - the GMP include directory +# GMP_LIBRARIES - Libraries needed to use GMP + +# Copyright (c) 2006, Laurent Montel, +# +# Redistribution and use is allowed according to the terms of the BSD license. +# For details see the accompanying COPYING-CMAKE-SCRIPTS file. + + +if (GMP_INCLUDE_DIR AND GMP_LIBRARIES) + # Already in cache, be silent + set(GMP_FIND_QUIETLY TRUE) +endif (GMP_INCLUDE_DIR AND GMP_LIBRARIES) + +find_path(GMP_INCLUDE_DIR NAMES gmp.h ) +find_library(GMP_LIBRARIES NAMES gmp libgmp) + +include(FindPackageHandleStandardArgs) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(GMP DEFAULT_MSG GMP_INCLUDE_DIR GMP_LIBRARIES) + +mark_as_advanced(GMP_INCLUDE_DIR GMP_LIBRARIES) diff --git a/deps/extra-cmake-modules/attic/modules/FindGObject.cmake b/deps/extra-cmake-modules/attic/modules/FindGObject.cmake new file mode 100644 index 0000000..af0c9f7 --- /dev/null +++ b/deps/extra-cmake-modules/attic/modules/FindGObject.cmake @@ -0,0 +1,52 @@ +# - Try to find GObject +# Once done this will define +# +# GOBJECT_FOUND - system has GObject +# GOBJECT_INCLUDE_DIR - the GObject include directory +# GOBJECT_LIBRARIES - the libraries needed to use GObject +# GOBJECT_DEFINITIONS - Compiler switches required for using GObject + +# Copyright (c) 2011, Raphael Kubo da Costa +# Copyright (c) 2006, Tim Beaulen +# +# Redistribution and use is allowed according to the terms of the BSD license. +# For details see the accompanying COPYING-CMAKE-SCRIPTS file. + +FIND_PACKAGE(PkgConfig) +PKG_CHECK_MODULES(PC_GOBJECT gobject-2.0) +SET(GOBJECT_DEFINITIONS ${PC_GOBJECT_CFLAGS_OTHER}) + +FIND_PATH(GOBJECT_INCLUDE_DIR gobject.h + HINTS + ${PC_GOBJECT_INCLUDEDIR} + ${PC_GOBJECT_INCLUDE_DIRS} + PATH_SUFFIXES glib-2.0/gobject/ + ) + +FIND_LIBRARY(_GObjectLibs NAMES gobject-2.0 + HINTS + ${PC_GOBJECT_LIBDIR} + ${PC_GOBJECT_LIBRARY_DIRS} + ) +FIND_LIBRARY(_GModuleLibs NAMES gmodule-2.0 + HINTS + ${PC_GOBJECT_LIBDIR} + ${PC_GOBJECT_LIBRARY_DIRS} + ) +FIND_LIBRARY(_GThreadLibs NAMES gthread-2.0 + HINTS + ${PC_GOBJECT_LIBDIR} + ${PC_GOBJECT_LIBRARY_DIRS} + ) +FIND_LIBRARY(_GLibs NAMES glib-2.0 + HINTS + ${PC_GOBJECT_LIBDIR} + ${PC_GOBJECT_LIBRARY_DIRS} + ) + +SET( GOBJECT_LIBRARIES ${_GObjectLibs} ${_GModuleLibs} ${_GThreadLibs} ${_GLibs} ) + +INCLUDE(FindPackageHandleStandardArgs) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(GOBJECT DEFAULT_MSG GOBJECT_LIBRARIES GOBJECT_INCLUDE_DIR) + +MARK_AS_ADVANCED(GOBJECT_INCLUDE_DIR _GObjectLibs _GModuleLibs _GThreadLibs _GLibs) diff --git a/deps/extra-cmake-modules/attic/modules/FindGSSAPI.cmake b/deps/extra-cmake-modules/attic/modules/FindGSSAPI.cmake new file mode 100644 index 0000000..942cf55 --- /dev/null +++ b/deps/extra-cmake-modules/attic/modules/FindGSSAPI.cmake @@ -0,0 +1,78 @@ +# - Try to detect the GSSAPI support +# Once done this will define +# +# GSSAPI_FOUND - system supports GSSAPI +# GSSAPI_INCS - the GSSAPI include directory +# GSSAPI_LIBS - the libraries needed to use GSSAPI +# GSSAPI_FLAVOR - the type of API - MIT or HEIMDAL + +# Copyright (c) 2006, Pino Toscano, +# +# Redistribution and use is allowed according to the terms of the BSD license. +# For details see the accompanying COPYING-CMAKE-SCRIPTS file. + + +if(GSSAPI_LIBS AND GSSAPI_FLAVOR) + + # in cache already + set(GSSAPI_FOUND TRUE) + +else() + + find_program(KRB5_CONFIG NAMES krb5-config PATHS + /opt/local/bin + ONLY_CMAKE_FIND_ROOT_PATH # this is required when cross compiling with cmake 2.6 and ignored with cmake 2.4, Alex + ) + mark_as_advanced(KRB5_CONFIG) + + #reset vars + set(GSSAPI_INCS) + set(GSSAPI_LIBS) + set(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() + + 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) + set(GSSAPI_FLAVOR_MIT) + if(gssapi_flavor_tmp MATCHES ".*Massachusetts.*") + set(GSSAPI_FLAVOR "MIT") + else() + set(GSSAPI_FLAVOR "HEIMDAL") + endif() + + 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() + message(WARNING "${KRB5_CONFIG} failed unexpectedly.") + endif() + endif() + + if(GSSAPI_LIBS) # GSSAPI_INCS can be also empty, so don't rely on that + set(GSSAPI_FOUND TRUE) + message(STATUS "Found GSSAPI: ${GSSAPI_LIBS}") + + set(GSSAPI_INCS ${GSSAPI_INCS}) + set(GSSAPI_LIBS ${GSSAPI_LIBS}) + set(GSSAPI_FLAVOR ${GSSAPI_FLAVOR}) + + mark_as_advanced(GSSAPI_INCS GSSAPI_LIBS GSSAPI_FLAVOR) + + endif() + + endif() + +endif() diff --git a/deps/extra-cmake-modules/attic/modules/FindGStreamer.cmake b/deps/extra-cmake-modules/attic/modules/FindGStreamer.cmake new file mode 100644 index 0000000..4379371 --- /dev/null +++ b/deps/extra-cmake-modules/attic/modules/FindGStreamer.cmake @@ -0,0 +1,80 @@ +# - Try to find GStreamer +# Once done this will define +# +# GSTREAMER_FOUND - system has GStreamer +# GSTREAMER_INCLUDE_DIR - the GStreamer include directory +# GSTREAMER_LIBRARIES - the libraries needed to use GStreamer +# GSTREAMER_DEFINITIONS - Compiler switches required for using GStreamer + +# Copyright (c) 2006, Tim Beaulen +# +# Redistribution and use is allowed according to the terms of the BSD license. +# For details see the accompanying COPYING-CMAKE-SCRIPTS file. + +# TODO: Other versions --> GSTREAMER_X_Y_FOUND (Example: GSTREAMER_0_8_FOUND and GSTREAMER_0_10_FOUND etc) + +IF (GSTREAMER_INCLUDE_DIR AND GSTREAMER_LIBRARIES AND GSTREAMER_BASE_LIBRARY AND GSTREAMER_INTERFACE_LIBRARY) + # in cache already + SET(GStreamer_FIND_QUIETLY TRUE) +ELSE (GSTREAMER_INCLUDE_DIR AND GSTREAMER_LIBRARIES AND GSTREAMER_BASE_LIBRARY AND GSTREAMER_INTERFACE_LIBRARY) + SET(GStreamer_FIND_QUIETLY FALSE) +ENDIF (GSTREAMER_INCLUDE_DIR AND GSTREAMER_LIBRARIES AND GSTREAMER_BASE_LIBRARY AND GSTREAMER_INTERFACE_LIBRARY) + +IF (NOT WIN32) + # use pkg-config to get the directories and then use these values + # in the FIND_PATH() and FIND_LIBRARY() calls + FIND_PACKAGE(PkgConfig) + PKG_CHECK_MODULES(PC_GSTREAMER QUIET gstreamer-0.10) + #MESSAGE(STATUS "DEBUG: GStreamer include directory = ${GSTREAMER_INCLUDE_DIRS}") + #MESSAGE(STATUS "DEBUG: GStreamer link directory = ${GSTREAMER_LIBRARY_DIRS}") + #MESSAGE(STATUS "DEBUG: GStreamer CFlags = ${GSTREAMER_CFLAGS_OTHER}") + SET(GSTREAMER_DEFINITIONS ${PC_GSTREAMER_CFLAGS_OTHER}) +ENDIF (NOT WIN32) + +FIND_PATH(GSTREAMER_INCLUDE_DIR gst/gst.h + PATHS + ${PC_GSTREAMER_INCLUDEDIR} + ${PC_GSTREAMER_INCLUDE_DIRS} + #PATH_SUFFIXES gst + ) + +FIND_LIBRARY(GSTREAMER_LIBRARIES NAMES gstreamer-0.10 + PATHS + ${PC_GSTREAMER_LIBDIR} + ${PC_GSTREAMER_LIBRARY_DIRS} + ) + +FIND_LIBRARY(GSTREAMER_BASE_LIBRARY NAMES gstbase-0.10 + PATHS + ${PC_GSTREAMER_LIBDIR} + ${PC_GSTREAMER_LIBRARY_DIRS} + ) + +FIND_LIBRARY(GSTREAMER_INTERFACE_LIBRARY NAMES gstinterfaces-0.10 + PATHS + ${PC_GSTREAMER_LIBDIR} + ${PC_GSTREAMER_LIBRARY_DIRS} + ) + +IF (GSTREAMER_INCLUDE_DIR) + #MESSAGE(STATUS "DEBUG: Found GStreamer include dir: ${GSTREAMER_INCLUDE_DIR}") +ELSE (GSTREAMER_INCLUDE_DIR) + MESSAGE(STATUS "GStreamer: WARNING: include dir not found") +ENDIF (GSTREAMER_INCLUDE_DIR) + +IF (GSTREAMER_LIBRARIES) + #MESSAGE(STATUS "DEBUG: Found GStreamer library: ${GSTREAMER_LIBRARIES}") +ELSE (GSTREAMER_LIBRARIES) + MESSAGE(STATUS "GStreamer: WARNING: library not found") +ENDIF (GSTREAMER_LIBRARIES) + +IF (GSTREAMER_INTERFACE_LIBRARY) + #MESSAGE(STATUS "DEBUG: Found GStreamer interface library: ${GSTREAMER_INTERFACE_LIBRARY}") +ELSE (GSTREAMER_INTERFACE_LIBRARY) + MESSAGE(STATUS "GStreamer: WARNING: interface library not found") +ENDIF (GSTREAMER_INTERFACE_LIBRARY) + +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/deps/extra-cmake-modules/attic/modules/FindGphoto2.cmake b/deps/extra-cmake-modules/attic/modules/FindGphoto2.cmake new file mode 100644 index 0000000..7143611 --- /dev/null +++ b/deps/extra-cmake-modules/attic/modules/FindGphoto2.cmake @@ -0,0 +1,60 @@ +# cmake macro to test if we use gphoto2 +# GPHOTO2_FOUND - system has the GPHOTO2 library +# GPHOTO2_INCLUDE_DIR - the GPHOTO2 include directory +# GPHOTO2_LIBRARIES - The libraries needed to use GPHOTO2 + +# Copyright (c) 2006, 2007 Laurent Montel, +# +# Redistribution and use is allowed according to the terms of the BSD license. +# For details see the accompanying COPYING-CMAKE-SCRIPTS file. + + +option(KDE4_GPHOTO2 "do not build kamera (gphoto2 required)" ON) +if (KDE4_GPHOTO2 ) + IF (GPHOTO2_LIBRARIES AND GPHOTO2_INCLUDE_DIR) + # in cache already + SET(GPHOTO2_FOUND TRUE) + ELSE (GPHOTO2_LIBRARIES AND GPHOTO2_INCLUDE_DIR) + + FIND_PROGRAM(GHOTO2CONFIG_EXECUTABLE NAMES gphoto2-config + ) + + FIND_PROGRAM(GHOTO2PORTCONFIG_EXECUTABLE NAMES gphoto2-port-config + ) + set(GPHOTO2_LIBRARIES) + set(GPHOTO2_INCLUDE_DIRS) + # if gphoto2-port-config and gphoto2-config have been found + IF (GHOTO2PORTCONFIG_EXECUTABLE AND GHOTO2CONFIG_EXECUTABLE) + EXEC_PROGRAM(${GHOTO2PORTCONFIG_EXECUTABLE} ARGS --libs RETURN_VALUE _return_VALUE OUTPUT_VARIABLE GPHOTO2PORT_LIBRARY) + EXEC_PROGRAM(${GHOTO2CONFIG_EXECUTABLE} ARGS --libs RETURN_VALUE _return_VALUE OUTPUT_VARIABLE GPHOTO2_LIBRARY) + + EXEC_PROGRAM(${GHOTO2PORTCONFIG_EXECUTABLE} ARGS --cflags RETURN_VALUE _return_VALUE OUTPUT_VARIABLE _GPHOTO2PORT_RESULT_INCLUDE_DIR) + EXEC_PROGRAM(${GHOTO2CONFIG_EXECUTABLE} ARGS --cflags RETURN_VALUE _return_VALUE OUTPUT_VARIABLE _GPHOTO2_RESULT_INCLUDE_DIR) + + set(GPHOTO2_LIBRARIES ${GPHOTO2PORT_LIBRARY} ${GPHOTO2_LIBRARY}) + # the cflags for poppler-qt4 can contain more than one include path + separate_arguments(_GPHOTO2_RESULT_INCLUDE_DIR) + foreach(_includedir ${_GPHOTO2_RESULT_INCLUDE_DIR}) + string(REGEX REPLACE "-I(.+)" "\\1" _includedir "${_includedir}") + set(GPHOTO2_INCLUDE_DIR ${GPHOTO2_INCLUDE_DIR} ${_includedir}) + endforeach(_includedir) + separate_arguments(_GPHOTO2PORT_RESULT_INCLUDE_DIR) + foreach(_includedir ${_GPHOTO2PORT_RESULT_INCLUDE_DIR}) + string(REGEX REPLACE "-I(.+)" "\\1" _includedir "${_includedir}") + set(GPHOTO2PORT_INCLUDE_DIR ${GPHOTO2PORT_INCLUDE_DIR} ${_includedir}) + endforeach(_includedir) + + + + set(GPHOTO2_INCLUDE_DIRS ${GPHOTO2PORT_INCLUDE_DIR} ${GPHOTO2_INCLUDE_DIR} ) + endif() + + IF (GPHOTO2_LIBRARIES AND GPHOTO2_INCLUDE_DIRS) + SET(GPHOTO2_FOUND TRUE) + message(STATUS "Found gphoto2: ${GPHOTO2_LIBRARIES}") + ENDIF (GPHOTO2_LIBRARIES AND GPHOTO2_INCLUDE_DIRS) + ENDIF (GPHOTO2_LIBRARIES AND GPHOTO2_INCLUDE_DIR) + MARK_AS_ADVANCED(GPHOTO2_LIBRARIES GPHOTO2_INCLUDE_DIRS) + +endif() + diff --git a/deps/extra-cmake-modules/attic/modules/FindHUNSPELL.cmake b/deps/extra-cmake-modules/attic/modules/FindHUNSPELL.cmake new file mode 100644 index 0000000..26942b5 --- /dev/null +++ b/deps/extra-cmake-modules/attic/modules/FindHUNSPELL.cmake @@ -0,0 +1,25 @@ +# - Try to find HUNSPELL +# Once done this will define +# +# HUNSPELL_FOUND - system has HUNSPELL +# HUNSPELL_INCLUDE_DIR - the HUNSPELL include directory +# HUNSPELL_LIBRARIES - The libraries needed to use HUNSPELL +# HUNSPELL_DEFINITIONS - Compiler switches required for using HUNSPELL + + +IF (HUNSPELL_INCLUDE_DIR AND HUNSPELL_LIBRARIES) + # Already in cache, be silent + SET(HUNSPELL_FIND_QUIETLY TRUE) +ENDIF (HUNSPELL_INCLUDE_DIR AND HUNSPELL_LIBRARIES) + +FIND_PATH(HUNSPELL_INCLUDE_DIR hunspell/hunspell.hxx ) + +FIND_LIBRARY(HUNSPELL_LIBRARIES NAMES hunspell-1.3 hunspell-1.2) + +# handle the QUIETLY and REQUIRED arguments and set HUNSPELL_FOUND to TRUE if +# all listed variables are TRUE +INCLUDE(FindPackageHandleStandardArgs) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(HUNSPELL DEFAULT_MSG HUNSPELL_LIBRARIES HUNSPELL_INCLUDE_DIR) + + +MARK_AS_ADVANCED(HUNSPELL_INCLUDE_DIR HUNSPELL_LIBRARIES) diff --git a/deps/extra-cmake-modules/attic/modules/FindHUpnp.cmake b/deps/extra-cmake-modules/attic/modules/FindHUpnp.cmake new file mode 100644 index 0000000..85c8030 --- /dev/null +++ b/deps/extra-cmake-modules/attic/modules/FindHUpnp.cmake @@ -0,0 +1,31 @@ +# - Try to find HUPnP library +# Once done this will define +# +# HUPNP_FOUND - system has HUPnP +# HUPNP_INCLUDE_DIR - the LIBHUpnp include directory +# HUPNP_LIBS - the LIBHUpnp libraries +# HUPNP_VERSION_STRING - The version of HUpnp +# HUPNP_VERSION_MAJOR - The major version of HUpnp +# HUPNP_VERSION_MINOR - The minor version of HUpnp +# HUPNP_VERSION_PATCH - The patch version of HUpnp +# +# Copyright (c) 2010, Paulo Romulo Alves Barros + +find_path( HUPNP_INCLUDE_DIR HUpnpCore/HUpnp ) + +find_library( HUPNP_LIBS HUpnp ) + +if( HUPNP_INCLUDE_DIR AND EXISTS "${HUPNP_INCLUDE_DIR}/HUpnpCore/public/hupnpinfo.h" ) + file( STRINGS "${HUPNP_INCLUDE_DIR}/HUpnpCore/public/hupnpinfo.h" HUPNP_INFO_H REGEX "^#define HUPNP_CORE_.*_VERSION .*$" ) + string( REGEX REPLACE ".*HUPNP_CORE_MAJOR_VERSION ([0-9]+).*" "\\1" HUPNP_VERSION_MAJOR "${HUPNP_INFO_H}" ) + string( REGEX REPLACE ".*HUPNP_CORE_MINOR_VERSION ([0-9]+).*" "\\1" HUPNP_VERSION_MINOR "${HUPNP_INFO_H}" ) + string( REGEX REPLACE ".*HUPNP_CORE_PATCH_VERSION ([0-9]+).*" "\\1" HUPNP_VERSION_PATCH "${HUPNP_INFO_H}" ) + + set( HUPNP_VERSION_STRING "${HUPNP_VERSION_MAJOR}.${HUPNP_VERSION_MINOR}.${HUPNP_VERSION_PATCH}" ) +endif() + +include( FindPackageHandleStandardArgs ) + +find_package_handle_standard_args( HUpnp DEFAULT_MSG HUPNP_INCLUDE_DIR HUPNP_LIBS ) + +mark_as_advanced( HUPNP_INCLUDE_DIR HUPNP_LIBS ) diff --git a/deps/extra-cmake-modules/attic/modules/FindIOKit.cmake b/deps/extra-cmake-modules/attic/modules/FindIOKit.cmake new file mode 100644 index 0000000..f3e3ecb --- /dev/null +++ b/deps/extra-cmake-modules/attic/modules/FindIOKit.cmake @@ -0,0 +1,23 @@ +# - Find IOKit on Mac +# +# IOKIT_LIBRARY - the library to use IOKit +# IOKIT_FOUND - true if IOKit has been found + +# Copyright (c) 2009, Harald Fernengel +# +# Redistribution and use is allowed according to the terms of the BSD license. +# For details see the accompanying COPYING-CMAKE-SCRIPTS file. + +include(CMakeFindFrameworks) + +cmake_find_frameworks(IOKit) +cmake_find_frameworks(CoreFoundation) + +if (IOKit_FRAMEWORKS) + set(IOKIT_LIBRARY "-framework IOKit -framework CoreFoundation" CACHE FILEPATH "IOKit framework" FORCE) + set(IOKIT_FOUND 1) +endif (IOKit_FRAMEWORKS) + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(IOKit DEFAULT_MSG IOKIT_LIBRARY) + diff --git a/deps/extra-cmake-modules/attic/modules/FindKDE4Workspace.cmake b/deps/extra-cmake-modules/attic/modules/FindKDE4Workspace.cmake new file mode 100644 index 0000000..660c7b8 --- /dev/null +++ b/deps/extra-cmake-modules/attic/modules/FindKDE4Workspace.cmake @@ -0,0 +1,71 @@ +# Find if we installed kdebase/workspaces. +# Once done this will define +# +# KDE4WORKSPACE_FOUND - system has KDE workspace installed +# KDE4WORKSPACE_INCLUDE_DIR - the KDE workspace include directory +# +# It also sets variables for the following libraries: +# KDE4WORKSPACE_TASKMANAGER_LIBRARY, KDE4WORKSPACE_TASKMANAGER_LIBS +# KDE4WORKSPACE_KWORKSPACE_LIBRARY, KDE4WORKSPACE_KWORKSPACE_LIBS +# KDE4WORKSPACE_SOLIDCONTROLIFACES_LIBRARY, KDE4WORKSPACE_SOLIDCONTROLIFACES_LIBS +# KDE4WORKSPACE_SOLIDCONTROL_LIBRARY, KDE4WORKSPACE_SOLIDCONTROL_LIBS +# KDE4WORKSPACE_PROCESSUI_LIBRARY, KDE4WORKSPACE_PROCESSUI_LIBS +# KDE4WORKSPACE_LSOFUI_LIBRARY, KDE4WORKSPACE_LSOFUI_LIBS +# KDE4WORKSPACE_PLASMACLOCK_LIBRARY, KDE4WORKSPACE_PLASMACLOCK_LIBS +# KDE4WORKSPACE_NEPOMUKQUERYCLIENT_LIBRARY, KDE4WORKSPACE_NEPOMUKQUERYCLIENT_LIBS +# KDE4WORKSPACE_NEPOMUKQUERY_LIBRARY, KDE4WORKSPACE_NEPOMUKQUERY_LIBS +# KDE4WORKSPACE_KSCREENSAVER_LIBRARY, KDE4WORKSPACE_KSCREENSAVER_LIBS +# KDE4WORKSPACE_WEATHERION_LIBRARY, KDE4WORKSPACE_WEATHERION_LIBS +# KDE4WORKSPACE_KWINEFFECTS_LIBRARY, KDE4WORKSPACE_KWINEFFECTS_LIBS +# KDE4WORKSPACE_KDECORATIONS_LIBRARY, KDE4WORKSPACE_KDECORATIONS_LIBS +# KDE4WORKSPACE_KSGRD_LIBRARY, KDE4WORKSPACE_KSGRD_LIBS +# KDE4WORKSPACE_KEPHAL_LIBRARY, KDE4WORKSPACE_KEPHAL_LIBS +# +# And the following locations: +# KDE4WORKSPACE_LIB_DIR +# KDE4WORKSPACE_LIBEXEC_DIR +# KDE4WORKSPACE_INCLUDE_DIR +# KDE4WORKSPACE_BIN_DIR +# KDE4WORKSPACE_SBIN_DIR +# KDE4WORKSPACE_DATA_DIR +# KDE4WORKSPACE_HTML_DIR +# KDE4WORKSPACE_CONFIG_DIR +# KDE4WORKSPACE_ICON_DIR +# KDE4WORKSPACE_KCFG_DIR +# KDE4WORKSPACE_LOCALE_DIR +# KDE4WORKSPACE_MIME_DIR +# KDE4WORKSPACE_SOUND_DIR +# KDE4WORKSPACE_TEMPLATES_DIR +# KDE4WORKSPACE_WALLPAPER_DIR +# KDE4WORKSPACE_KCONF_UPDATE_DIR +# KDE4WORKSPACE_AUTOSTART_DIR +# KDE4WORKSPACE_XDG_APPS_DIR +# KDE4WORKSPACE_XDG_DIRECTORY_DIR +# KDE4WORKSPACE_SYSCONF_DIR +# KDE4WORKSPACE_MAN_DIR +# KDE4WORKSPACE_INFO_DIR +# KDE4WORKSPACE_DBUS_INTERFACES_DIR +# KDE4WORKSPACE_DBUS_SERVICES_DIR +# KDE4WORKSPACE_SERVICES_DIR +# KDE4WORKSPACE_SERVICETYPES_DIR + +# Copyright (c) 2008, Alexander Neundorf, +# +# Redistribution and use is allowed according to the terms of the BSD license. +# For details see the accompanying COPYING-CMAKE-SCRIPTS file. + +# The find_package() call below loads the file KDE4WorkspaceConfig.cmake file. +# This file is created and installed by kdebase/workspace/CMakeLists.txt +# It contains settings for all install location of kdebase/workspace, as e.g. +# KDE4WORKSPACE_INCLUDE_DIR, and also variables for all libraries. +# See kdebase/workspace/CMakeLists.txt and kdebase/workspace/KDE4WorkspaceConfig.cmake.in +# for details. Alex + + +set(_KDE4Workspace_FIND_QUIETLY ${KDE4Workspace_FIND_QUIETLY}) +find_package(KDE4Workspace QUIET NO_MODULE PATHS ${KDE4_LIB_DIR}/KDE4Workspace/cmake ) +set(KDE4Workspace_FIND_QUIETLY ${_KDE4Workspace_FIND_QUIETLY}) + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(KDE4Workspace DEFAULT_MSG KDE4Workspace_CONFIG ) + diff --git a/deps/extra-cmake-modules/attic/modules/FindKDEWIN32.cmake b/deps/extra-cmake-modules/attic/modules/FindKDEWIN32.cmake new file mode 100644 index 0000000..1f78055 --- /dev/null +++ b/deps/extra-cmake-modules/attic/modules/FindKDEWIN32.cmake @@ -0,0 +1,26 @@ +# - Try to find the KDEWIN32 library +# - Try to find the KDEWIN32 library - deprecated +# +# Once done this will define +# +# KDEWIN32_FOUND - system has KDEWIN32 +# KDEWIN32_INCLUDES - the KDEWIN32 include directories +# KDEWIN32_LIBRARIES - The libraries needed to use KDEWIN32 + +# Copyright (c) 2006, Alexander Neundorf, +# Copyright (c) 2007-2009, Ralf Habacker, +# +# Redistribution and use is allowed according to the terms of the BSD license. +# For details see the accompanying COPYING-CMAKE-SCRIPTS file. + + +if (WIN32) + message(STATUS "The kdewin32 cmake module is deprecated, use kdewin instead") + find_package(KDEWIN) + + if (KDEWIN_FOUND) + set(KDEWIN32_FOUND ${KDEWIN_FOUND}) + set(KDEWIN32_INCLUDES ${KDEWIN_INCLUDES}) + set(KDEWIN32_LIBRARIES ${KDEWIN_LIBRARIES}) + endif (KDEWIN_FOUND) +endif (WIN32) diff --git a/deps/extra-cmake-modules/attic/modules/FindKDEWIN_Packager.cmake b/deps/extra-cmake-modules/attic/modules/FindKDEWIN_Packager.cmake new file mode 100644 index 0000000..c587deb --- /dev/null +++ b/deps/extra-cmake-modules/attic/modules/FindKDEWIN_Packager.cmake @@ -0,0 +1,171 @@ +# +# KDEWIN packager http://www.winkde.org/pub/kde/ports/win32/installer +# +# The kdewin packager is searched in the following pathes and order +# +# path specified by the environment dir KDEWIN_PACKAGER_DIR +# /kdewin-packager +# /kdewin-installer +# +# The macro KDEWIN_PACKAGER provides package building support and should be +# added to the top level CMakeLists.txt as shown below +# +# if (KDEWIN_PACKAGER_FOUND) +# KDEWIN_PACKAGER( +# "projectname" +# "version" +# "description" +# "additional options" +# ) +# endif (KDEWIN_PACKAGER_FOUND) + +# The macro KDEWIN_PACKAGER adds three additional makefile targets, which could be +# called using the regular make tool +# +# kdewin_package +# - build kdewin package with currently used compiler and build type +# kdewin_package_debug_and_release +# - build kdewin debug and release package with currently used compiler +# kdewin_package_debug_and_release_mingw_and_msvc +# - build kdewin debug and release package with mingw and msvc compiler +# +# +# +# Copyright (c) 2006-2007, Ralf Habacker +# +# Redistribution and use is allowed according to the terms of the BSD license. +# + +if (WIN32) + if(NOT KDEWIN_PACKAGER_DIR) + # check for enviroment variable + file(TO_CMAKE_PATH "$ENV{KDEWIN_PACKAGER_DIR}" KDEWIN_PACKAGER_DIR) + if(NOT KDEWIN_PACKAGER_DIR) + # search in the default program install folder + file(TO_CMAKE_PATH "$ENV{PROGRAMFILES}" _progFiles) + find_file(KDEWIN_PACKAGER_DIR_tmp kdewin-packager kdewin-installer + PATHS + "${_progFiles}" + ) + set(KDEWIN_PACKAGER_DIR ${KDEWIN_PACKAGER_DIR_tmp}) + endif() + endif() + + if (KDEWIN_PACKAGER_DIR) + + find_program(KDEWIN_PACKAGER_EXECUTABLE kdewin-packager + PATHS + ${KDEWIN_PACKAGER_DIR}/bin + ${CMAKE_INSTALL_PREFIX}/bin + ) + + set(KDEWIN_PACKAGER_FOUND TRUE) + else (KDEWIN_PACKAGER_DIR) + set(KDEWIN_PACKAGER_FOUND) + endif (KDEWIN_PACKAGER_DIR) + + if (KDEWIN_PACKAGER_FOUND) + if (NOT KDEWIN_Packager_FIND_QUIETLY) + message(STATUS "Found KDEWIN Packager: ${KDEWIN_PACKAGER_DIR}") + endif (NOT KDEWIN_Packager_FIND_QUIETLY) + else (KDEWIN_PACKAGER_FOUND) + if (KDEWIN_Packager_FIND_REQUIRED) + message(FATAL_ERROR "Could NOT find KDEWIN PAckager") + endif (KDEWIN_Packager_FIND_REQUIRED) + endif (KDEWIN_PACKAGER_FOUND) + +endif (WIN32) + +MACRO (KDEWIN_PACKAGER _name _version _notes _options) + if (KDEWIN_PACKAGER_FOUND) + if (MSVC) + set (type "msvc") + else (MSVC) + set (type "mingw") + endif (MSVC) + + add_custom_target(kdewin_package + COMMAND ${CMAKE_COMMAND} + -DCMAKE_INSTALL_PREFIX=${CMAKE_BINARY_DIR}/temp -P ${CMAKE_BINARY_DIR}/cmake_install.cmake + COMMAND ${KDEWIN_PACKAGER_EXECUTABLE} + -name ${_name} + -root ${CMAKE_BINARY_DIR}/temp + -srcroot ${CMAKE_SOURCE_DIR} + -version ${_version} + -notes "${_notes}" + -type ${type} + ${_options} + # FIXME: cleanup does not work + #COMMAND rmdir /Q /S ${CMAKE_BINARY_DIR}\temp + ) + # prelimary target + add_custom_target(kdewin_package_without_compiler + COMMAND ${CMAKE_COMMAND} + -DCMAKE_INSTALL_PREFIX=${CMAKE_BINARY_DIR}/temp -P ${CMAKE_BINARY_DIR}/cmake_install.cmake + COMMAND ${KDEWIN_PACKAGER_EXECUTABLE} + -name ${_name} + -root ${CMAKE_BINARY_DIR}/temp + -srcroot ${CMAKE_SOURCE_DIR} + -version ${_version} + -notes "${_notes}" + ${_options} + # FIXME: cleanup does not work + #COMMAND rmdir /Q /S ${CMAKE_BINARY_DIR}\temp + ) + add_custom_target(kdewin_package_debug_and_release + COMMAND ${CMAKE_COMMAND} + -H$(CMAKE_SOURCE_DIR) + -B$(CMAKE_BINARY_DIR) + -DCMAKE_BUILD_TYPE=Debug + COMMAND ${CMAKE_MAKE_PROGRAM} + clean + COMMAND ${CMAKE_MAKE_PROGRAM} + install/local + COMMAND ${CMAKE_COMMAND} + -H$(CMAKE_SOURCE_DIR) + -B$(CMAKE_BINARY_DIR) + -DCMAKE_BUILD_TYPE=Release + COMMAND ${CMAKE_MAKE_PROGRAM} + clean + COMMAND ${CMAKE_MAKE_PROGRAM} + install/local + COMMAND ${KDEWIN_PACKAGER_EXECUTABLE} + -name ${_name} + -root ${CMAKE_BINARY_DIR}/temp + -srcroot ${CMAKE_SOURCE_DIR} + -version ${_version} + -notes "${_notes}" + -type ${type} + ${_options} + # FIXME: cleanup does not work + #COMMAND rmdir /Q /S ${CMAKE_BINARY_DIR}\temp + ) +set (CONTENT " +if \"%1\" == \"package_only\" goto package_only + +del CMakeCache.txt +rmdir /Q /S ${CMAKE_BINARY_DIR}/temp +${CMAKE_COMMAND} ${CMAKE_SOURCE_DIR} -G \"MinGW Makefiles\" -DCMAKE_BUILD_TYPE=Debug +mingw32-make +${CMAKE_COMMAND} -DCMAKE_INSTALL_PREFIX=${CMAKE_BINARY_DIR}/temp -P cmake_install.cmake +${CMAKE_COMMAND} ${CMAKE_SOURCE_DIR} -G \"MinGW Makefiles\" -DCMAKE_BUILD_TYPE=Release +mingw32-make +${CMAKE_COMMAND} -DCMAKE_INSTALL_PREFIX=${CMAKE_BINARY_DIR}/temp -P cmake_install.cmake +del CMakeCache.txt +${CMAKE_COMMAND} ${CMAKE_SOURCE_DIR} -G \"NMake Makefiles\" -DCMAKE_BUILD_TYPE=Debug +nmake +${CMAKE_COMMAND} -DCMAKE_INSTALL_PREFIX=${CMAKE_BINARY_DIR}/temp -P cmake_install.cmake +${CMAKE_COMMAND} ${CMAKE_SOURCE_DIR} -G \"NMake Makefiles\" -DCMAKE_BUILD_TYPE=Release +nmake +${CMAKE_COMMAND} -DCMAKE_INSTALL_PREFIX=${CMAKE_BINARY_DIR}/temp -P cmake_install.cmake +:package_only +${KDEWIN_PACKAGER_EXECUTABLE} -name ${_name} -root ${CMAKE_BINARY_DIR}/temp -srcroot ${CMAKE_SOURCE_DIR} -version ${_version} -notes \"${_notes}\" ${_options} +" +) + write_file(${CMAKE_BINARY_DIR}/kdewin_package_debug_and_release_mingw_and_msvc.bat "${CONTENT}") + add_custom_target(kdewin_package_debug_and_release_mingw_and_msvc + COMMAND ${CMAKE_BINARY_DIR}/kdewin_package_debug_and_release_mingw_and_msvc.bat + ) + endif (KDEWIN_PACKAGER_FOUND) +ENDMACRO (KDEWIN_PACKAGER) + diff --git a/deps/extra-cmake-modules/attic/modules/FindKDEWin.cmake b/deps/extra-cmake-modules/attic/modules/FindKDEWin.cmake new file mode 100644 index 0000000..8f69073 --- /dev/null +++ b/deps/extra-cmake-modules/attic/modules/FindKDEWin.cmake @@ -0,0 +1,89 @@ +# - Try to find the KDEWIN library +# +# Once done this will define +# +# KDEWIN_FOUND - system has KDEWIN +# KDEWIN_INCLUDES - the KDEWIN include directories +# KDEWIN_LIBRARIES - The libraries needed to use KDEWIN + +# Copyright (c) 2006, Alexander Neundorf, +# Copyright (c) 2007-2009, Ralf Habacker, +# +# Redistribution and use is allowed according to the terms of the BSD license. +# For details see the accompanying COPYING-CMAKE-SCRIPTS file. + + +if (WIN32) + + if(WINCE) + FIND_PACKAGE(WCECOMPAT REQUIRED) + endif() + + if (NOT KDEWIN_LIBRARY) + + + find_path(KDEWIN_INCLUDE_DIR kdewin_export.h + ${KDE4_INCLUDE_DIR} + ${CMAKE_INCLUDE_PATH} + ${CMAKE_INSTALL_PREFIX}/include + ) + + # search for kdewin in the default install directory for applications (default of (n)make install) + FILE(TO_CMAKE_PATH "${CMAKE_LIBRARY_PATH}" _cmakeLibraryPathCmakeStyle) + + string(TOLOWER "${CMAKE_BUILD_TYPE}" CMAKE_BUILD_TYPE_TOLOWER) + if (CMAKE_BUILD_TYPE_TOLOWER MATCHES debug) + set (LIBRARY_NAME kdewind) + else() + set (LIBRARY_NAME kdewin) + endif (CMAKE_BUILD_TYPE_TOLOWER MATCHES debug) + + find_library(KDEWIN_LIBRARY + NAMES ${LIBRARY_NAME} + PATHS + ${KDE4_LIB_DIR} + ${_cmakeLibraryPathCmakeStyle} + ${CMAKE_INSTALL_PREFIX}/lib + NO_SYSTEM_ENVIRONMENT_PATH + ) + endif (NOT KDEWIN_LIBRARY) + + if (KDEWIN_LIBRARY AND KDEWIN_INCLUDE_DIR) + set(KDEWIN_FOUND TRUE) + # add needed system libs + if(NOT WINCE) + set(KDEWIN_LIBRARIES ${KDEWIN_LIBRARY} user32 shell32 ws2_32 netapi32 userenv) + else() + set(KDEWIN_LIBRARIES ${KDEWIN_LIBRARY} ws2 ${WCECOMPAT_LIBRARIES}) + endif() + + if (MINGW) + #mingw compiler + set(KDEWIN_INCLUDES ${KDEWIN_INCLUDE_DIR} ${KDEWIN_INCLUDE_DIR}/mingw ${QT_INCLUDES}) + else (MINGW) + # msvc compiler + # add the MS SDK include directory if available + file(TO_CMAKE_PATH "$ENV{MSSDK}" MSSDK_DIR) + if (WINCE) + set(KDEWIN_INCLUDES ${KDEWIN_INCLUDE_DIR} ${KDEWIN_INCLUDE_DIR}/msvc ${WCECOMPAT_INCLUDE_DIR} ${QT_INCLUDES} ${MSSDK_DIR}) + else() + set(KDEWIN_INCLUDES ${KDEWIN_INCLUDE_DIR} ${KDEWIN_INCLUDE_DIR}/msvc ${QT_INCLUDES} ${MSSDK_DIR}) + endif() + endif (MINGW) + + endif (KDEWIN_LIBRARY AND KDEWIN_INCLUDE_DIR) + # required for configure + set(CMAKE_REQUIRED_INCLUDES ${CMAKE_REQUIRED_INCLUDES} ${KDEWIN_INCLUDES}) + set(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} ${KDEWIN_LIBRARIES}) + + if (KDEWIN_FOUND) + if (NOT KDEWin_FIND_QUIETLY) + message(STATUS "Found KDEWin library: ${KDEWIN_LIBRARY}") + endif (NOT KDEWin_FIND_QUIETLY) + + else (KDEWIN_FOUND) + if (KDEWin_FIND_REQUIRED) + message(FATAL_ERROR "Could NOT find KDEWin library\nPlease install it first") + endif (KDEWin_FIND_REQUIRED) + endif (KDEWIN_FOUND) +endif (WIN32) diff --git a/deps/extra-cmake-modules/attic/modules/FindKDevPlatform.cmake b/deps/extra-cmake-modules/attic/modules/FindKDevPlatform.cmake new file mode 100644 index 0000000..a458a2d --- /dev/null +++ b/deps/extra-cmake-modules/attic/modules/FindKDevPlatform.cmake @@ -0,0 +1,45 @@ +# +# Find the KDevelop Platform modules and sets various variables accordingly +# +# Example usage of this module: +# find_package(KDevPlatform 1.0.0 REQUIRED) +# +# The version number and REQUIRED flag are optional. You can set CMAKE_PREFIX_PATH +# variable to help it find the required files and directories + +# KDEVPLATFORM_FOUND - set to TRUE if the platform was found and the version is compatible FALSE otherwise +# +# KDEVPLATFORM_VERSION - The version number of kdevplatform +# KDEVPLATFORM_VERSION_MAJOR - The major version number of kdevplatform +# KDEVPLATFORM_VERSION_MINOR - The minor version number of kdevplatform +# KDEVPLATFORM_VERSION_PATCH - The patch version number of kdevplatform +# KDEVPLATFORM_INCLUDE_DIR - include dir of the platform, for example /usr/include/kdevplatform +# KDEVPLATFORM_INTERFACES_LIBRARIES - interfaces module library +# KDEVPLATFORM_LANGUAGE_LIBRARIES - language module library +# KDEVPLATFORM_OUTPUTVIEW_LIBRARIES - outputview module library +# KDEVPLATFORM_PROJECT_LIBRARIES - project module library +# KDEVPLATFORM_SUBLIME_LIBRARIES - sublime module library +# KDEVPLATFORM_SHELL_LIBRARIES - shell module library +# KDEVPLATFORM_TESTS_LIBRARIES - library to write tests for plugins, +# contains some useful tools and a way to replace parts of Core +# classes with custom implementations +# KDEVPLATFORM_UTIL_LIBRARIES - util module library +# KDEVPLATFORM_VCS_LIBRARIES - vcs module library +# KDEVPLATFORM_DEBUGGER_LIBRARIES - debugger module library +# +# The following macros are added (from KDevPlatformMacros.cmake): +# +# KDEVPLATFORM_ADD_APP_TEMPLATES( template1 ... templateN ) +# Use this to get packaged template archives for the given templates. +# Parameters should be the directories containing the templates. +# +# Copyright 2007 Andreas Pakulat +# Redistribution and use is allowed according to the terms of the BSD license. + +set(_KDevPlatform_FIND_QUIETLY ${KDevPlatform_FIND_QUIETLY}) +find_package( KDevPlatform ${KDevPlatform_FIND_VERSION} NO_MODULE ) +set(KDevPlatform_FIND_QUIETLY ${_KDevPlatform_FIND_QUIETLY}) + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(KDevPlatform DEFAULT_MSG KDevPlatform_CONFIG ) + diff --git a/deps/extra-cmake-modules/attic/modules/FindKNepomuk.cmake b/deps/extra-cmake-modules/attic/modules/FindKNepomuk.cmake new file mode 100644 index 0000000..071a894 --- /dev/null +++ b/deps/extra-cmake-modules/attic/modules/FindKNepomuk.cmake @@ -0,0 +1,39 @@ +# Once done this will define +# +# KNEPOMUK_FOUND - system has the Nepomuk-KDE backbone lib KNep +# KNEPOMUK_INCLUDES - the libKNep include directory +# KNEPOMUK_LIBRARIES - Link these to use libKNep +# + +# Copyright (c) 2008, Sebastian Trueg, +# +# Redistribution and use is allowed according to the terms of the BSD license. +# For details see the accompanying COPYING-CMAKE-SCRIPTS file. + + +if(KNEPOMUK_INCLUDES AND KNEPOMUK_LIBRARIES) + set(KNepomuk_FIND_QUIETLY TRUE) +endif() + +FIND_PATH(KNEPOMUK_INCLUDES + NAMES + knepomuk/knepomuk.h + PATHS + ${KDE4_INCLUDE_DIR} + ${INCLUDE_INSTALL_DIR} +) + +FIND_LIBRARY(KNEPOMUK_LIBRARIES + NAMES + knepomuk + PATHS + ${KDE4_LIB_DIR} + ${LIB_INSTALL_DIR} +) + +include(FindPackageHandleStandardArgs) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(KNepomuk DEFAULT_MSG KNEPOMUK_INCLUDES KNEPOMUK_LIBRARIES ) + + +MARK_AS_ADVANCED(KNEPOMUK_INCLUDES KNEPOMUK_LIBRARIES) + diff --git a/deps/extra-cmake-modules/attic/modules/FindKdcraw.cmake b/deps/extra-cmake-modules/attic/modules/FindKdcraw.cmake new file mode 100644 index 0000000..c19c70c --- /dev/null +++ b/deps/extra-cmake-modules/attic/modules/FindKdcraw.cmake @@ -0,0 +1,124 @@ +# - Try to find the Kdcraw library +# +# If you have put a local version of libkdcraw into your source tree, +# set KDCRAW_LOCAL_DIR to the relative path to the local directory. +# +# Once done this will define +# +# KDCRAW_FOUND - system has libkdcraw +# KDCRAW_INCLUDE_DIR - the libkdcraw include directory +# KDCRAW_LIBRARIES - Link these to use libkdcraw +# KDCRAW_DEFINITIONS - Compiler switches required for using libkdcraw +# + +# Copyright (c) 2008, Gilles Caulier, +# +# Redistribution and use is allowed according to the terms of the BSD license. +# For details see the accompanying COPYING-CMAKE-SCRIPTS file. + + +if (KDCRAW_INCLUDE_DIR AND KDCRAW_LIBRARIES AND KDCRAW_DEFINITIONS) + + message(STATUS "Found Kdcraw library in cache: ${KDCRAW_LIBRARIES}") + + # in cache already + set(KDCRAW_FOUND TRUE) + +else (KDCRAW_INCLUDE_DIR AND KDCRAW_LIBRARIES AND KDCRAW_DEFINITIONS) + + message(STATUS "Check Kdcraw library in local sub-folder...") + + # Check if library is not in local sub-folder + + if (KDCRAW_LOCAL_DIR) + set (KDCRAW_LOCAL_FOUND TRUE) + else (KDCRAW_LOCAL_DIR) + find_file(KDCRAW_LOCAL_FOUND libkdcraw/kdcraw.h ${CMAKE_SOURCE_DIR}/libkdcraw ${CMAKE_SOURCE_DIR}/libs/libkdcraw NO_DEFAULT_PATH) + + if (KDCRAW_LOCAL_FOUND) + # Was it found in libkdcraw/ or in libs/libkdcraw? + find_file(KDCRAW_LOCAL_FOUND_IN_LIBS libkdcraw/kdcraw.h ${CMAKE_SOURCE_DIR}/libs/libkdcraw NO_DEFAULT_PATH) + if (KDCRAW_LOCAL_FOUND_IN_LIBS) + set(KDCRAW_LOCAL_DIR libs/libkdcraw) + else (KDCRAW_LOCAL_FOUND_IN_LIBS) + set(KDCRAW_LOCAL_DIR libkdcraw) + endif (KDCRAW_LOCAL_FOUND_IN_LIBS) + endif (KDCRAW_LOCAL_FOUND) + endif (KDCRAW_LOCAL_DIR) + + if (KDCRAW_LOCAL_FOUND) + + # we need two include directories: because the version.h file is put into the build directory + # TODO KDCRAW_INCLUDE_DIR sounds like it should contain only one directory... + set(KDCRAW_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/${KDCRAW_LOCAL_DIR} ${CMAKE_BINARY_DIR}/${KDCRAW_LOCAL_DIR}) + set(KDCRAW_DEFINITIONS "-I${CMAKE_SOURCE_DIR}/${KDCRAW_LOCAL_DIR}" "-I${CMAKE_BINARY_DIR}/${KDCRAW_LOCAL_DIR}") + set(KDCRAW_LIBRARIES kdcraw) + message(STATUS "Found Kdcraw library in local sub-folder: ${CMAKE_SOURCE_DIR}/${KDCRAW_LOCAL_DIR}") + set(KDCRAW_FOUND TRUE) + mark_as_advanced(KDCRAW_INCLUDE_DIR KDCRAW_LIBRARIES KDCRAW_DEFINITIONS) + + else() + + message(STATUS "Check Kdcraw library using pkg-config...") + 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) + + PKGCONFIG(libkdcraw _KDCRAWIncDir _KDCRAWLinkDir _KDCRAWLinkFlags _KDCRAWCflags) + + if (_KDCRAWLinkFlags) + # query pkg-config asking for a libkdcraw >= 0.2.0 + exec_program(${PKGCONFIG_EXECUTABLE} ARGS --atleast-version=0.2.0 libkdcraw RETURN_VALUE _return_VALUE OUTPUT_VARIABLE _pkgconfigDevNull ) + if (_return_VALUE STREQUAL "0") + message(STATUS "Found libkdcraw release >= 0.2.0") + set(KDCRAW_VERSION_GOOD_FOUND TRUE) + else (_return_VALUE STREQUAL "0") + message(STATUS "Found libkdcaw release < 0.2.0, too old") + set(KDCRAW_VERSION_GOOD_FOUND FALSE) + set(KDCRAW_FOUND FALSE) + endif (_return_VALUE STREQUAL "0") + else (_KDCRAWLinkFlags) + set(KDCRAW_VERSION_GOOD_FOUND FALSE) + set(KDCRAW_FOUND FALSE) + endif (_KDCRAWLinkFlags) + else (NOT WIN32) + set(KDCRAW_VERSION_GOOD_FOUND TRUE) + endif (NOT WIN32) + + if (KDCRAW_VERSION_GOOD_FOUND) + set(KDCRAW_DEFINITIONS "${_KDCRAWCflags}") + + find_path(KDCRAW_INCLUDE_DIR libkdcraw/version.h + ${_KDCRAWIncDir} + ) + + find_library(KDCRAW_LIBRARIES NAMES kdcraw + PATHS + ${_KDCRAWLinkDir} + ) + + if (KDCRAW_INCLUDE_DIR AND KDCRAW_LIBRARIES) + set(KDCRAW_FOUND TRUE) + endif (KDCRAW_INCLUDE_DIR AND KDCRAW_LIBRARIES) + endif (KDCRAW_VERSION_GOOD_FOUND) + if (KDCRAW_FOUND) + if (NOT Kdcraw_FIND_QUIETLY) + message(STATUS "Found libkdcraw: ${KDCRAW_LIBRARIES}") + endif (NOT Kdcraw_FIND_QUIETLY) + else (KDCRAW_FOUND) + if (Kdcraw_FIND_REQUIRED) + if (NOT KDCRAW_INCLUDE_DIR) + message(FATAL_ERROR "Could NOT find libkdcraw header files") + endif (NOT KDCRAW_INCLUDE_DIR) + if (NOT KDCRAW_LIBRARIES) + message(FATAL_ERROR "Could NOT find libkdcraw library") + endif (NOT KDCRAW_LIBRARIES) + endif (Kdcraw_FIND_REQUIRED) + endif (KDCRAW_FOUND) + + mark_as_advanced(KDCRAW_INCLUDE_DIR KDCRAW_LIBRARIES KDCRAW_DEFINITIONS) + + endif() + +endif (KDCRAW_INCLUDE_DIR AND KDCRAW_LIBRARIES AND KDCRAW_DEFINITIONS) diff --git a/deps/extra-cmake-modules/attic/modules/FindKdeMultimedia.cmake b/deps/extra-cmake-modules/attic/modules/FindKdeMultimedia.cmake new file mode 100644 index 0000000..c885029 --- /dev/null +++ b/deps/extra-cmake-modules/attic/modules/FindKdeMultimedia.cmake @@ -0,0 +1,48 @@ +# Module to see if we have KDE4 kdemultimedia installed +# +# This module defines +# KDEMULTIMEDIA_INCLUDE_DIR - the include dir +# KCDDB_LIBRARY - the kcddb library +# KCOMPACTDISC_LIBRARY - the kcompactdisk library +# KDEMULTIMEDIA_LIBRARIES - all of the KDE multimedia libraries together +# KDEMULTIMEDIA_FOUND - true if the above have been found + +# KDEMULTIMEDIA_INCLUDE_DIR +# KDEMULTIMEDIA_FOUND +# Copyright (C) 2007 Laurent Montel +# Copyright (C) 2007 Gerd Fleischer +# +# Redistribution and use is allowed according to the terms of the BSD license. +# For details see the accompanying COPYING-CMAKE-SCRIPTS file. + + +if (KDEMULTIMEDIA_INCLUDE_DIR) + # Already in cache, be silent + set(KDEMULTIMEDIA_FOUND TRUE) +endif (KDEMULTIMEDIA_INCLUDE_DIR) + + +find_path(KDEMULTIMEDIA_INCLUDE_DIR NAMES libkcddb/kcddb.h libkcompactdisc/kcompactdisc.h + PATHS + ${INCLUDE_INSTALL_DIR} +) + +find_library(KCDDB_LIBRARY NAMES kcddb + PATHS + ${LIB_INSTALL_DIR} +) + +find_library(KCOMPACTDISC_LIBRARY NAMES kcompactdisc + PATHS + ${LIB_INSTALL_DIR} +) + +# audioencoder, audiocdplugins? + +set(KDEMULTIMEDIA_LIBRARIES ${KCDDB_LIBRARY} ${KCOMPACTDISC_LIBRARY}) + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(KdeMultimedia DEFAULT_MSG KDEMULTIMEDIA_LIBRARIES KDEMULTIMEDIA_INCLUDE_DIR ) + +mark_as_advanced(KDEMULTIMEDIA_INCLUDE_DIR KDEMULTIMEDIA_LIBRARIES) + diff --git a/deps/extra-cmake-modules/attic/modules/FindKexiv2.cmake b/deps/extra-cmake-modules/attic/modules/FindKexiv2.cmake new file mode 100644 index 0000000..3fdc6c1 --- /dev/null +++ b/deps/extra-cmake-modules/attic/modules/FindKexiv2.cmake @@ -0,0 +1,123 @@ +# - Try to find the KExiv2 library +# +# If you have put a local version of libkexiv2 into your source tree, +# set KEXIV2_LOCAL_DIR to the relative path to the local directory. +# +# Once done this will define +# +# KEXIV2_FOUND - system has libkexiv2 +# KEXIV2_INCLUDE_DIR - the libkexiv2 include directory +# KEXIV2_LIBRARIES - Link these to use libkexiv2 +# KEXIV2_DEFINITIONS - Compiler switches required for using libkexiv2 +# + +# Copyright (c) 2008, Gilles Caulier, +# +# Redistribution and use is allowed according to the terms of the BSD license. +# For details see the accompanying COPYING-CMAKE-SCRIPTS file. + +if (KEXIV2_INCLUDE_DIR AND KEXIV2_LIBRARIES AND KEXIV2_DEFINITIONS) + + message(STATUS "Found Kexiv2 library in cache: ${KEXIV2_LIBRARIES}") + + # in cache already + set(KEXIV2_FOUND TRUE) + +else (KEXIV2_INCLUDE_DIR AND KEXIV2_LIBRARIES AND KEXIV2_DEFINITIONS) + + message(STATUS "Check Kexiv2 library in local sub-folder...") + + # Check if library is not in local sub-folder + + if (KEXIV2_LOCAL_DIR) + set(KEXIV2_LOCAL_FOUND TRUE) + else (KEXIV2_LOCAL_DIR) + find_file(KEXIV2_LOCAL_FOUND libkexiv2/version.h.cmake ${CMAKE_SOURCE_DIR}/libkexiv2 ${CMAKE_SOURCE_DIR}/libs/libkexiv2 NO_DEFAULT_PATH) + + if (KEXIV2_LOCAL_FOUND) + # Was it found in libkexiv2/ or in libs/libkexiv2? + find_file(KEXIV2_LOCAL_FOUND_IN_LIBS libkexiv2/version.h.cmake ${CMAKE_SOURCE_DIR}/libs/libkexiv2 NO_DEFAULT_PATH) + if (KEXIV2_LOCAL_FOUND_IN_LIBS) + set(KEXIV2_LOCAL_DIR libs/libkexiv2) + else (KEXIV2_LOCAL_FOUND_IN_LIBS) + set(KEXIV2_LOCAL_DIR libkexiv2) + endif (KEXIV2_LOCAL_FOUND_IN_LIBS) + endif (KEXIV2_LOCAL_FOUND) + + endif (KEXIV2_LOCAL_DIR) + + if (KEXIV2_LOCAL_FOUND) + # we need two include directories: because the version.h file is put into the build directory + # TODO KEXIV2_INCLUDE_DIR sounds like it should contain only one directory... + set(KEXIV2_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/${KEXIV2_LOCAL_DIR} ${CMAKE_BINARY_DIR}/${KEXIV2_LOCAL_DIR}) + set(KEXIV2_DEFINITIONS "-I${CMAKE_SOURCE_DIR}/${KEXIV2_LOCAL_DIR}" "-I${CMAKE_BINARY_DIR}/${KEXIV2_LOCAL_DIR}") + set(KEXIV2_LIBRARIES kexiv2) + message(STATUS "Found Kexiv2 library in local sub-folder: ${CMAKE_SOURCE_DIR}/${KEXIV2_LOCAL_DIR}") + set(KEXIV2_FOUND TRUE) + mark_as_advanced(KEXIV2_INCLUDE_DIR KEXIV2_LIBRARIES KEXIV2_DEFINITIONS) + + else() + if(NOT WIN32) + message(STATUS "Check Kexiv2 library using pkg-config...") + + # use pkg-config to get the directories and then use these values + # in the FIND_PATH() and FIND_LIBRARY() calls + include(UsePkgConfig) + + PKGCONFIG(libkexiv2 _KEXIV2IncDir _KEXIV2LinkDir _KEXIV2LinkFlags _KEXIV2Cflags) + + if(_KEXIV2LinkFlags) + # query pkg-config asking for a libkexiv2 >= 0.2.0 + exec_program(${PKGCONFIG_EXECUTABLE} ARGS --atleast-version=0.2.0 libkexiv2 RETURN_VALUE _return_VALUE OUTPUT_VARIABLE _pkgconfigDevNull ) + if(_return_VALUE STREQUAL "0") + message(STATUS "Found libkexiv2 release >= 0.2.0") + set(KEXIV2_VERSION_GOOD_FOUND TRUE) + else() + message(STATUS "Found libkexiv2 release < 0.2.0, too old") + set(KEXIV2_VERSION_GOOD_FOUND FALSE) + set(KEXIV2_FOUND FALSE) + endif() + else() + set(KEXIV2_VERSION_GOOD_FOUND FALSE) + set(KEXIV2_FOUND FALSE) + endif() + else() + set(KEXIV2_VERSION_GOOD_FOUND TRUE) + endif() + + if(KEXIV2_VERSION_GOOD_FOUND) + set(KEXIV2_DEFINITIONS "${_KEXIV2Cflags}") + + find_path(KEXIV2_INCLUDE_DIR libkexiv2/version.h + ${_KEXIV2IncDir} + ) + + find_library(KEXIV2_LIBRARIES NAMES kexiv2 + PATHS + ${_KEXIV2LinkDir} + ) + + if (KEXIV2_INCLUDE_DIR AND KEXIV2_LIBRARIES) + set(KEXIV2_FOUND TRUE) + endif (KEXIV2_INCLUDE_DIR AND KEXIV2_LIBRARIES) + endif() + if (KEXIV2_FOUND) + if (NOT Kexiv2_FIND_QUIETLY) + message(STATUS "Found libkexiv2: ${KEXIV2_LIBRARIES}") + endif (NOT Kexiv2_FIND_QUIETLY) + else (KEXIV2_FOUND) + if (Kexiv2_FIND_REQUIRED) + if (NOT KEXIV2_INCLUDE_DIR) + message(FATAL_ERROR "Could NOT find libkexiv2 header files") + endif (NOT KEXIV2_INCLUDE_DIR) + if (NOT KEXIV2_LIBRARIES) + message(FATAL_ERROR "Could NOT find libkexiv2 library") + endif (NOT KEXIV2_LIBRARIES) + endif (Kexiv2_FIND_REQUIRED) + endif (KEXIV2_FOUND) + + mark_as_advanced(KEXIV2_INCLUDE_DIR KEXIV2_LIBRARIES KEXIV2_DEFINITIONS) + + endif() + +endif (KEXIV2_INCLUDE_DIR AND KEXIV2_LIBRARIES AND KEXIV2_DEFINITIONS) diff --git a/deps/extra-cmake-modules/attic/modules/FindKipi.cmake b/deps/extra-cmake-modules/attic/modules/FindKipi.cmake new file mode 100644 index 0000000..13521e5 --- /dev/null +++ b/deps/extra-cmake-modules/attic/modules/FindKipi.cmake @@ -0,0 +1,116 @@ +# - Try to find the Kipi library +# +# If you have put a local version of libkipi into your source tree, +# set KIPI_LOCAL_DIR to the relative path to the local directory. +# +# Once done this will define +# +# KIPI_FOUND - system has libkipi +# KIPI_INCLUDE_DIR - the libkipi include directory +# KIPI_LIBRARIES - Link these to use libkipi +# KIPI_DEFINITIONS - Compiler switches required for using libkipi +# + +# Copyright (c) 2008, Gilles Caulier, +# +# Redistribution and use is allowed according to the terms of the BSD license. +# For details see the accompanying COPYING-CMAKE-SCRIPTS file. + +if (KIPI_INCLUDE_DIR AND KIPI_LIBRARIES AND KIPI_DEFINITIONS) + + message(STATUS "Found Kipi library in cache: ${KIPI_LIBRARIES}") + + # in cache already + set(KIPI_FOUND TRUE) + +else (KIPI_INCLUDE_DIR AND KIPI_LIBRARIES AND KIPI_DEFINITIONS) + + message(STATUS "Check Kipi library in local sub-folder...") + + # Check if library is not in local sub-folder + + if (KIPI_LOCAL_DIR) + set (KIPI_LOCAL_FOUND TRUE) + else (KIPI_LOCAL_DIR) + find_file(KIPI_LOCAL_FOUND libkipi/kipi.h ${CMAKE_SOURCE_DIR}/libkipi ${CMAKE_SOURCE_DIR}/libs/libkipi NO_DEFAULT_PATH) + + if (KIPI_LOCAL_FOUND) + # Was it found in libkdcraw/ or in libs/libkdcraw? + find_file(KIPI_LOCAL_FOUND_IN_LIBS libkipi/kipi.h ${CMAKE_SOURCE_DIR}/libs/libkipi NO_DEFAULT_PATH) + if (KIPI_LOCAL_FOUND_IN_LIBS) + set(KIPI_LOCAL_DIR libs/libkipi) + else (KIPI_LOCAL_FOUND_IN_LIBS) + set(KIPI_LOCAL_DIR libkipi) + endif (KIPI_LOCAL_FOUND_IN_LIBS) + endif (KIPI_LOCAL_FOUND) + endif (KIPI_LOCAL_DIR) + + if (KIPI_LOCAL_FOUND) + # we need two include directories: because the version.h file is put into the build directory + # TODO KIPI_INCLUDE_DIR sounds like it should contain only one directory... + set(KIPI_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/${KIPI_LOCAL_DIR} ${CMAKE_BINARY_DIR}/${KIPI_LOCAL_DIR}) + set(KIPI_DEFINITIONS "-I${CMAKE_SOURCE_DIR}/${KIPI_LOCAL_DIR}" "-I${CMAKE_BINARY_DIR}/${KIPI_LOCAL_DIR}") + set(KIPI_LIBRARIES kipi) + message(STATUS "Found Kipi library in local sub-folder: ${CMAKE_SOURCE_DIR}/${KIPI_LOCAL_DIR}") + set(KIPI_FOUND TRUE) + mark_as_advanced(KIPI_INCLUDE_DIR KIPI_LIBRARIES KIPI_DEFINITIONS) + + else (KIPI_LOCAL_FOUND) + + if (NOT WIN32) + message(STATUS "Check Kipi library using pkg-config...") + + # use pkg-config to get the directories and then use these values + # in the FIND_PATH() and FIND_LIBRARY() calls + include(UsePkgConfig) + + PKGCONFIG(libkipi _KIPIIncDir _KIPILinkDir _KIPILinkFlags _KIPICflags) + + if (_KIPILinkFlags) + # query pkg-config asking for a libkipi >= 0.2.0 + exec_program(${PKGCONFIG_EXECUTABLE} ARGS --atleast-version=0.2.0 libkipi RETURN_VALUE _return_VALUE OUTPUT_VARIABLE _pkgconfigDevNull ) + if (_return_VALUE STREQUAL "0") + message(STATUS "Found libkipi release >= 0.2.0") + set(KIPI_VERSION_GOOD_FOUND TRUE) + else (_return_VALUE STREQUAL "0") + message(STATUS "Found libkipi release < 0.2.0, too old") + set(KIPI_VERSION_GOOD_FOUND FALSE) + set(KIPI_FOUND FALSE) + endif (_return_VALUE STREQUAL "0") + else (_KIPILinkFlags) + set(KIPI_VERSION_GOOD_FOUND FALSE) + set(KIPI_FOUND FALSE) + endif (_KIPILinkFlags) + else (NOT WIN32) + set(KIPI_VERSION_GOOD_FOUND TRUE) + endif (NOT WIN32) + if (KIPI_VERSION_GOOD_FOUND) + set(KIPI_DEFINITIONS ${_KIPICflags}) + + find_path(KIPI_INCLUDE_DIR NAMES libkipi/version.h PATHS ${KDE4_INCLUDE_DIR} ${_KIPIIncDir}) + find_library(KIPI_LIBRARIES NAMES kipi PATHS ${KDE4_LIB_DIR} ${_KIPILinkDir}) + + if (KIPI_INCLUDE_DIR AND KIPI_LIBRARIES) + set(KIPI_FOUND TRUE) + endif (KIPI_INCLUDE_DIR AND KIPI_LIBRARIES) + endif (KIPI_VERSION_GOOD_FOUND) + if (KIPI_FOUND) + if (NOT Kipi_FIND_QUIETLY) + message(STATUS "Found libkipi: ${KIPI_LIBRARIES}") + endif (NOT Kipi_FIND_QUIETLY) + else (KIPI_FOUND) + if (Kipi_FIND_REQUIRED) + if (NOT KIPI_INCLUDE_DIR) + message(FATAL_ERROR "Could NOT find libkipi header files") + endif (NOT KIPI_INCLUDE_DIR) + if (NOT KIPI_LIBRARIES) + message(FATAL_ERROR "Could NOT find libkipi library") + endif (NOT KIPI_LIBRARIES) + endif (Kipi_FIND_REQUIRED) + endif (KIPI_FOUND) + + mark_as_advanced(KIPI_INCLUDE_DIR KIPI_LIBRARIES KIPI_DEFINITIONS) + + endif (KIPI_LOCAL_FOUND) + +endif (KIPI_INCLUDE_DIR AND KIPI_LIBRARIES AND KIPI_DEFINITIONS) diff --git a/deps/extra-cmake-modules/attic/modules/FindKonto.cmake b/deps/extra-cmake-modules/attic/modules/FindKonto.cmake new file mode 100644 index 0000000..d3c3458 --- /dev/null +++ b/deps/extra-cmake-modules/attic/modules/FindKonto.cmake @@ -0,0 +1,38 @@ +# Once done this will define +# +# KONTO_FOUND - system has the Nepomuk-KDE backbone lib Konto +# KONTO_INCLUDES - the libKonto include directory +# KONTO_LIBRARIES - Link these to use libKonto +# + +# Copyright (c) 2008, Sebastian Trueg, +# +# Redistribution and use is allowed according to the terms of the BSD license. +# For details see the accompanying COPYING-CMAKE-SCRIPTS file. + + +if(KONTO_INCLUDES AND KONTO_LIBRARIES) + # Already in cache, be silent + set(Konto_FIND_QUIETLY TRUE) +endif(KONTO_INCLUDES AND KONTO_LIBRARIES + + +FIND_PATH(KONTO_INCLUDES + NAMES + konto/class.h + PATHS + ${KDE4_INCLUDE_DIR} + ${INCLUDE_INSTALL_DIR} +) + +FIND_LIBRARY(KONTO_LIBRARIES + NAMES + konto + PATHS + ${KDE4_LIB_DIR} + ${LIB_INSTALL_DIR} +) + +include(FindPackageHandleStandardArgs) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(Kondo DEFAULT_MSG KONTO_INCLUDES KONTO_LIBRARIES) + diff --git a/deps/extra-cmake-modules/attic/modules/FindKopete.cmake b/deps/extra-cmake-modules/attic/modules/FindKopete.cmake new file mode 100644 index 0000000..0bb98ee --- /dev/null +++ b/deps/extra-cmake-modules/attic/modules/FindKopete.cmake @@ -0,0 +1,87 @@ +# - Try to find the Kopete library +# Once done this will define +# +# Kopete_FOUND - system has kopete +# KOPETE_INCLUDE_DIR - the kopete include directory +# KOPETE_LIBRARIES - Link these to use kopete + +# Copyright (c) 2007 Charles Connell +# +# Redistribution and use is allowed according to the terms of the BSD license. +# For details see the accompanying COPYING-CMAKE-SCRIPTS file. + +if(KOPETE_INCLUDE_DIR AND KOPETE_LIBRARIES) + + # read from cache + set(Kopete_FOUND TRUE) + +else() + + FIND_PATH(KOPETE_INCLUDE_DIR + NAMES + kopete/kopete_export.h + PATHS + ${KDE4_INCLUDE_DIR} + ${INCLUDE_INSTALL_DIR} + ) + + FIND_LIBRARY(KOPETE_LIBRARIES + NAMES + kopete + PATHS + ${KDE4_LIB_DIR} + ${LIB_INSTALL_DIR} + ) + if(KOPETE_INCLUDE_DIR AND KOPETE_LIBRARIES) + set(Kopete_FOUND TRUE) + endif() + + if(MSVC) + FIND_LIBRARY(KOPETE_LIBRARIES_DEBUG + NAMES + kopeted + PATHS + ${KDE4_LIB_DIR} + ${LIB_INSTALL_DIR} + ) + if(NOT KOPETE_LIBRARIES_DEBUG) + set(Kopete_FOUND FALSE) + endif() + + if(MSVC_IDE) + if( NOT KOPETE_LIBRARIES_DEBUG OR NOT KOPETE_LIBRARIES) + message(FATAL_ERROR "\nCould NOT find the debug AND release version of the Kopete library.\nYou need to have both to use MSVC projects.\nPlease build and install both kopete libraries first.\n") + endif() + else() + string(TOLOWER ${CMAKE_BUILD_TYPE} CMAKE_BUILD_TYPE_TOLOWER) + if(CMAKE_BUILD_TYPE_TOLOWER MATCHES debug) + set(KOPETE_LIBRARIES ${KOPETE_LIBRARIES_DEBUG}) + else() + set(KOPETE_LIBRARIES ${KOPETE_LIBRARIES}) + endif() + endif() + endif() + + if(Kopete_FOUND) + if(NOT Kopete_FIND_QUIETLY) + message(STATUS "Found Kopete: ${KOPETE_LIBRARIES}") + endif() + else() + if(Kopete_FIND_REQUIRED) + if(NOT KOPETE_INCLUDE_DIR) + message(FATAL_ERROR "Could not find Kopete includes.") + endif() + if(NOT KOPETE_LIBRARIES) + message(FATAL_ERROR "Could not find Kopete library.") + endif() + else() + if(NOT KOPETE_INCLUDE_DIR) + message(STATUS "Could not find Kopete includes.") + endif() + if(NOT KOPETE_LIBRARIES) + message(STATUS "Could not find Kopete library.") + endif() + endif() + endif() + +endif() diff --git a/deps/extra-cmake-modules/attic/modules/FindKorundum.cmake b/deps/extra-cmake-modules/attic/modules/FindKorundum.cmake new file mode 100644 index 0000000..d921f61 --- /dev/null +++ b/deps/extra-cmake-modules/attic/modules/FindKorundum.cmake @@ -0,0 +1,20 @@ +# - Find Korundum - the KDE Ruby bindings +# +# This module finds if Korundum is installed. +# It defines the following variables: +# KORUNDUM_PATH - the path to the korundum ruby file +# KORUNDUM_FOUND - true if it has been found + +# Copyright (c) 2006, Egon Willighagen, +# +# Redistribution and use is allowed according to the terms of the BSD license. +# For details see the accompanying COPYING-CMAKE-SCRIPTS file. + +find_path(KORUNDUM_PATH Korundum.rb /usr/lib/ruby/1.8) + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(Korundum DEFAULT_MSG KORUNDUM_PATH) + +# just for compat.: +set(Korumdum_PATH ${KORUNDUM_PATH}) +set(Korumdum_FOUND ${KORUNDUM_FOUND}) diff --git a/deps/extra-cmake-modules/attic/modules/FindLCMS.cmake b/deps/extra-cmake-modules/attic/modules/FindLCMS.cmake new file mode 100644 index 0000000..ba8890f --- /dev/null +++ b/deps/extra-cmake-modules/attic/modules/FindLCMS.cmake @@ -0,0 +1,60 @@ +# - Find LCMS +# Find the LCMS (Little Color Management System) library and includes and +# This module defines +# LCMS_INCLUDE_DIR, where to find lcms.h +# LCMS_LIBRARIES, the libraries needed to use LCMS. +# LCMS_DOT_VERSION, The version number of the LCMS library, e.g. "1.19" +# LCMS_VERSION, Similar to LCMS_DOT_VERSION, but without the dots, e.g. "119" +# LCMS_FOUND, If false, do not try to use LCMS. +# +# The minimum required version of LCMS can be specified using the +# standard syntax, e.g. find_package(LCMS 1.10) + +# Copyright (c) 2008, Adrian Page, +# Copyright (c) 2009, Cyrille Berger, +# +# Redistribution and use is allowed according to the terms of the BSD license. +# For details see the accompanying COPYING-CMAKE-SCRIPTS file. + + +# use pkg-config to get the directories and then use these values +# in the FIND_PATH() and FIND_LIBRARY() calls +if(NOT WIN32) + find_package(PkgConfig) + pkg_check_modules(PC_LCMS lcms) + set(LCMS_DEFINITIONS ${PC_LCMS_CFLAGS_OTHER}) +endif() + +find_path(LCMS_INCLUDE_DIR lcms.h + HINTS + ${PC_LCMS_INCLUDEDIR} + ${PC_LCMS_INCLUDE_DIRS} + PATH_SUFFIXES lcms liblcms1 +) + +find_library(LCMS_LIBRARIES NAMES lcms liblcms lcms-1 liblcms-1 + HINTS + ${PC_LCMS_LIBDIR} + ${PC_LCMS_LIBRARY_DIRS} + PATH_SUFFIXES lcms +) + +# Store the LCMS version number in the cache, so we don't have to search everytime again +if(LCMS_INCLUDE_DIR AND NOT LCMS_VERSION) + file(READ ${LCMS_INCLUDE_DIR}/lcms.h LCMS_VERSION_CONTENT) + string(REGEX MATCH "#define LCMS_VERSION[ ]*[0-9]*\n" LCMS_VERSION_MATCH ${LCMS_VERSION_CONTENT}) + if(LCMS_VERSION_MATCH) + string(REGEX REPLACE "#define LCMS_VERSION[ ]*([0-9]*)\n" "\\1" _LCMS_VERSION ${LCMS_VERSION_MATCH}) + string(SUBSTRING ${_LCMS_VERSION} 0 1 LCMS_MAJOR_VERSION) + string(SUBSTRING ${_LCMS_VERSION} 1 2 LCMS_MINOR_VERSION) + endif() + set(LCMS_VERSION "${LCMS_MAJOR_VERSION}${LCMS_MINOR_VERSION}" CACHE STRING "Version number of lcms" FORCE) + set(LCMS_DOT_VERSION "${LCMS_MAJOR_VERSION}.${LCMS_MINOR_VERSION}" CACHE STRING "Version number of lcms split into components" FORCE) +endif() + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(LCMS REQUIRED_VARS LCMS_LIBRARIES LCMS_INCLUDE_DIR + VERSION_VAR LCMS_DOT_VERSION ) + +mark_as_advanced(LCMS_INCLUDE_DIR LCMS_LIBRARIES LCMS_VERSION) + diff --git a/deps/extra-cmake-modules/attic/modules/FindLibArt.cmake b/deps/extra-cmake-modules/attic/modules/FindLibArt.cmake new file mode 100644 index 0000000..b14cd9d --- /dev/null +++ b/deps/extra-cmake-modules/attic/modules/FindLibArt.cmake @@ -0,0 +1,63 @@ +# - Try to find the LibArt 2D graphics library +# Once done this will define +# +# LIBART_FOUND - system has the LibArt +# LIBART_INCLUDE_DIR - the LibArt include directory +# LIBART_LIBRARIES - The libraries needed to use LibArt + +# Copyright (c) 2006, Alexander Neundorf, +# +# Redistribution and use is allowed according to the terms of the BSD license. +# For details see the accompanying COPYING-CMAKE-SCRIPTS file. + + +if (LIBART_INCLUDE_DIR AND LIBART_LIBRARIES) + + # in cache already + SET(LIBART_FOUND TRUE) + +else (LIBART_INCLUDE_DIR AND LIBART_LIBRARIES) + + IF (NOT WIN32) + find_package(PkgConfig) + + # use pkg-config to get the directories and then use these values + # in the FIND_PATH() and FIND_LIBRARY() calls + pkg_check_modules(PC_LIBART QUIET libart-2.0) + + ######### ?? where is this used ?? ############### + set(LIBART_DEFINITIONS ${PC_LIBART_CFLAGS_OTHER}) + ENDIF (NOT WIN32) + + FIND_PATH(LIBART_INCLUDE_DIR NAMES libart_lgpl/libart.h + PATHS + ${PC_LIBART_INCLUDEDIR} + ${PC_LIBART_INCLUDE_DIRS} + PATH_SUFFIXES libart-2.0 + ) + + FIND_LIBRARY(LIBART_LIBRARIES NAMES art_lgpl_2 + PATHS + ${PC_LIBART_LIBDIR} + ${PC_LIBART_LIBRARY_DIRS} + ) + + + if (LIBART_INCLUDE_DIR AND LIBART_LIBRARIES) + set(LIBART_FOUND TRUE) + endif (LIBART_INCLUDE_DIR AND LIBART_LIBRARIES) + + + if (LIBART_FOUND) + if (NOT LibArt_FIND_QUIETLY) + message(STATUS "Found libart: ${LIBART_LIBRARIES}") + endif (NOT LibArt_FIND_QUIETLY) + else (LIBART_FOUND) + if (LibArt_FIND_REQUIRED) + message(FATAL_ERROR "Could NOT find libart") + endif (LibArt_FIND_REQUIRED) + endif (LIBART_FOUND) + + MARK_AS_ADVANCED(LIBART_INCLUDE_DIR LIBART_LIBRARIES) + +endif (LIBART_INCLUDE_DIR AND LIBART_LIBRARIES) diff --git a/deps/extra-cmake-modules/attic/modules/FindLibAttica.cmake b/deps/extra-cmake-modules/attic/modules/FindLibAttica.cmake new file mode 100644 index 0000000..bb919da --- /dev/null +++ b/deps/extra-cmake-modules/attic/modules/FindLibAttica.cmake @@ -0,0 +1,63 @@ +# Try to find the Attica library +# Once done this will define +# +# LIBATTICA_FOUND Indicates that Attica was found +# LIBATTICA_LIBRARIES Libraries needed to use Attica +# LIBATTICA_LIBRARY_DIRS Paths needed for linking against Attica +# LIBATTICA_INCLUDE_DIR Path needed for finding Attica include files +# +# The minimum required version of LibAttica can be specified using the +# standard syntax, e.g. find_package(LibAttica 0.20) + +# Copyright (c) 2009 Frederik Gladhorn +# +# Redistribution and use is allowed according to the terms of the BSD license. + +# Support LIBATTICA_MIN_VERSION for compatibility: +IF(NOT LibAttica_FIND_VERSION) + SET(LibAttica_FIND_VERSION "${LIBATTICA_MIN_VERSION}") +ENDIF(NOT LibAttica_FIND_VERSION) + +# the minimum version of LibAttica we require +IF(NOT LibAttica_FIND_VERSION) + SET(LibAttica_FIND_VERSION "0.1.0") +ENDIF(NOT LibAttica_FIND_VERSION) + + +IF (NOT WIN32) + # use pkg-config to get the directories and then use these values + # in the FIND_PATH() and FIND_LIBRARY() calls + FIND_PACKAGE(PkgConfig) + PKG_CHECK_MODULES(PC_LIBATTICA QUIET libattica) + SET(LIBATTICA_DEFINITIONS ${PC_ATTICA_CFLAGS_OTHER}) +ENDIF (NOT WIN32) + +FIND_PATH(LIBATTICA_INCLUDE_DIR attica/provider.h + HINTS + ${PC_LIBATTICA_INCLUDEDIR} + ${PC_LIBATTICA_INCLUDE_DIRS} + PATH_SUFFIXES attica + ) + +# Store the version number in the cache, so we don't have to search everytime: +IF(LIBATTICA_INCLUDE_DIR AND NOT LIBATTICA_VERSION) + FILE(READ ${LIBATTICA_INCLUDE_DIR}/attica/version.h LIBATTICA_VERSION_CONTENT) + STRING (REGEX MATCH "LIBATTICA_VERSION_STRING \".*\"\n" LIBATTICA_VERSION_MATCH "${LIBATTICA_VERSION_CONTENT}") + IF(LIBATTICA_VERSION_MATCH) + STRING(REGEX REPLACE "LIBATTICA_VERSION_STRING \"(.*)\"\n" "\\1" _LIBATTICA_VERSION ${LIBATTICA_VERSION_MATCH}) + ENDIF(LIBATTICA_VERSION_MATCH) + SET(LIBATTICA_VERSION "${_LIBATTICA_VERSION}" CACHE STRING "Version number of LibAttica" FORCE) +ENDIF(LIBATTICA_INCLUDE_DIR AND NOT LIBATTICA_VERSION) + + +FIND_LIBRARY(LIBATTICA_LIBRARIES NAMES attica libattica + HINTS + ${PC_LIBATTICA_LIBDIR} + ${PC_LIBATTICA_LIBRARY_DIRS} + ) + +INCLUDE(FindPackageHandleStandardArgs) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(LibAttica REQUIRED_VARS LIBATTICA_LIBRARIES LIBATTICA_INCLUDE_DIR + VERSION_VAR LIBATTICA_VERSION) + +MARK_AS_ADVANCED(LIBATTICA_INCLUDE_DIR LIBATTICA_LIBRARIES) diff --git a/deps/extra-cmake-modules/attic/modules/FindLibKonq.cmake b/deps/extra-cmake-modules/attic/modules/FindLibKonq.cmake new file mode 100644 index 0000000..eaf4c08 --- /dev/null +++ b/deps/extra-cmake-modules/attic/modules/FindLibKonq.cmake @@ -0,0 +1,22 @@ +# - Try to find konqueror library +# Once done this will define +# +# LIBKONQ_FOUND - system has libkonq library +# LIBKONQ_INCLUDE_DIR - the LIBKONQ include directory +# LIBKONQ_LIBRARY - the libkonq library + +# Original file: FindMarbleWidget.cmake (found in digikam-0.10.0-beta2) +# copyright 2008 by Patrick Spendrin +# Copyright (c) 2009, Alexander Neundorf, +# use this file as you like +# +# Modifications to find libkonq by Joachim Eibl 2008 + +find_path(LIBKONQ_INCLUDE_DIR konq_popupmenuplugin.h ) + +find_library(LIBKONQ_LIBRARY konq) + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(LIBKONQ DEFAULT_MSG LIBKONQ_INCLUDE_DIR LIBKONQ_LIBRARY ) + +mark_as_advanced(LIBKONQ_INCLUDE_DIR LIBKONQ_LIBRARY) diff --git a/deps/extra-cmake-modules/attic/modules/FindLibLZMA.cmake b/deps/extra-cmake-modules/attic/modules/FindLibLZMA.cmake new file mode 100644 index 0000000..1a341b2 --- /dev/null +++ b/deps/extra-cmake-modules/attic/modules/FindLibLZMA.cmake @@ -0,0 +1,45 @@ +# - Find LibLZMA +# Find LibLZMA headers and library +# +# LIBLZMA_FOUND - True if liblzma is found. +# LIBLZMA_INCLUDE_DIRS - Directory where liblzma headers are located. +# LIBLZMA_LIBRARIES - Lzma libraries to link against. +# LIBLZMA_HAS_AUTO_DECODER - True if lzma_auto_decoder() is found (required). +# LIBLZMA_HAS_EASY_ENCODER - True if lzma_easy_encoder() is found (required). +# LIBLZMA_HAS_LZMA_PRESET - True if lzma_lzma_preset() is found (required). + + +# Copyright (c) 2008, Per Øyvind Karlsen, +# Copyright (c) 2009, Alexander Neundorf, +# Copyright (c) 2009, Helio Chissini de Castro, +# +# Redistribution and use is allowed according to the terms of the BSD license. +# For details see the accompanying COPYING-CMAKE-SCRIPTS file. + + +FIND_PATH(LIBLZMA_INCLUDE_DIR lzma.h ) +FIND_LIBRARY(LIBLZMA_LIBRARY lzma) + +SET(LIBLZMA_LIBRARIES ${LIBLZMA_LIBRARY}) +SET(LIBLZMA_INCLUDE_DIRS ${LIBLZMA_INCLUDE_DIR}) + + +# We're using new code known now as XZ, even library still been called LZMA +# it can be found in http://tukaani.org/xz/ +# Avoid using old codebase +IF (LIBLZMA_LIBRARIES) + INCLUDE(CheckLibraryExists) + CHECK_LIBRARY_EXISTS(${LIBLZMA_LIBRARIES} lzma_auto_decoder "" LIBLZMA_HAS_AUTO_DECODER) + CHECK_LIBRARY_EXISTS(${LIBLZMA_LIBRARIES} lzma_easy_encoder "" LIBLZMA_HAS_EASY_ENCODER) + CHECK_LIBRARY_EXISTS(${LIBLZMA_LIBRARIES} lzma_lzma_preset "" LIBLZMA_HAS_LZMA_PRESET) +ENDIF (LIBLZMA_LIBRARIES) + +INCLUDE(FindPackageHandleStandardArgs) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(LIBLZMA DEFAULT_MSG LIBLZMA_INCLUDE_DIR + LIBLZMA_LIBRARY + LIBLZMA_HAS_AUTO_DECODER + LIBLZMA_HAS_EASY_ENCODER + LIBLZMA_HAS_LZMA_PRESET + ) + +MARK_AS_ADVANCED( LIBLZMA_INCLUDE_DIR LIBLZMA_LIBRARY ) diff --git a/deps/extra-cmake-modules/attic/modules/FindLibPython.py b/deps/extra-cmake-modules/attic/modules/FindLibPython.py new file mode 100644 index 0000000..ec21b33 --- /dev/null +++ b/deps/extra-cmake-modules/attic/modules/FindLibPython.py @@ -0,0 +1,13 @@ + +# Copyright (c) 2007, Simon Edwards +# Redistribution and use is allowed according to the terms of the BSD license. +# For details see the accompanying COPYING-CMAKE-SCRIPTS file. + +import sys +import distutils.sysconfig + +print("exec_prefix:%s" % sys.exec_prefix) +print("short_version:%s" % sys.version[:3]) +print("long_version:%s" % sys.version.split()[0]) +print("py_inc_dir:%s" % distutils.sysconfig.get_python_inc()) +print("site_packages_dir:%s" % distutils.sysconfig.get_python_lib(plat_specific=1)) diff --git a/deps/extra-cmake-modules/attic/modules/FindLibUSB1.cmake b/deps/extra-cmake-modules/attic/modules/FindLibUSB1.cmake new file mode 100644 index 0000000..eba4711 --- /dev/null +++ b/deps/extra-cmake-modules/attic/modules/FindLibUSB1.cmake @@ -0,0 +1,37 @@ +# - Try to find the libusb-1.0 library +# Once done this defines +# +# LIBUSB1_FOUND - system has libusb-1.0 +# LibUSB1_INCLUDE_DIRS - the libusb-1.0 include directory +# LibUSB1_LIBRARIES - Link these to use libusb-1.0 + +# Copyright (c) 2011, 2013 Yury Kudryashov, +# Based on FindUSB.cmake which is: +# Copyright (c) 2006, 2008 Laurent Montel, +# +# Redistribution and use is allowed according to the terms of the BSD license. +# For details see the accompanying COPYING-CMAKE-SCRIPTS file. + +# use pkg-config to get the directories and then use these values +# in the FIND_PATH() and FIND_LIBRARY() calls +find_package(PkgConfig) +pkg_check_modules(PC_LibUSB1 QUIET libusb-1.0) + +find_path(LibUSB1_TOP_INCLUDE_DIR libusb-1.0/libusb.h + HINTS ${PC_LibUSB1_INCLUDEDIR}) + +set(LibUSB1_INCLUDE_DIRS ${LibUSB1_TOP_INCLUDE_DIR}/libusb-1.0) + +find_library(LibUSB1_LIBRARY NAMES usb-1.0 + HINTS ${PC_LibUSB1_LIBDIR} ${PC_LibUSB1_LIBRARY_DIRS}) + +set(LibUSB1_LIBRARIES ${LibUSB1_LIBRARY}) + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(LibUSB1 DEFAULT_MSG LibUSB1_LIBRARIES LibUSB1_INCLUDE_DIRS) + +include(FeatureSummary) +set_package_properties(LibUSB1 PROPERTIES URL http://www.libusb.org/ + DESCRIPTION "A library that provides uniform API to access USB devices on many OSes") + +mark_as_advanced(LibUSB1_TOP_INCLUDE_DIR LibUSB1_LIBRARY) diff --git a/deps/extra-cmake-modules/attic/modules/FindLibintl.cmake b/deps/extra-cmake-modules/attic/modules/FindLibintl.cmake new file mode 100644 index 0000000..c7cbc96 --- /dev/null +++ b/deps/extra-cmake-modules/attic/modules/FindLibintl.cmake @@ -0,0 +1,46 @@ +# Try to find Libintl functionality +# Once done this will define +# +# LIBINTL_FOUND - system has Libintl +# LIBINTL_INCLUDE_DIR - Libintl include directory +# LIBINTL_LIBRARIES - Libraries needed to use Libintl +# +# TODO: This will enable translations only if Gettext functionality is +# present in libc. Must have more robust system for release, where Gettext +# functionality can also reside in standalone Gettext library, or the one +# embedded within kdelibs (cf. gettext.m4 from Gettext source). + +# Copyright (c) 2006, Chusslove Illich, +# Copyright (c) 2007, Alexander Neundorf, +# +# Redistribution and use is allowed according to the terms of the BSD license. +# For details see the accompanying COPYING-CMAKE-SCRIPTS file. + +if(LIBINTL_INCLUDE_DIR AND LIBINTL_LIB_FOUND) + set(Libintl_FIND_QUIETLY TRUE) +endif() + +find_path(LIBINTL_INCLUDE_DIR libintl.h) + +set(LIBINTL_LIB_FOUND FALSE) + +if(LIBINTL_INCLUDE_DIR) + include(CheckFunctionExists) + check_function_exists(dgettext LIBINTL_LIBC_HAS_DGETTEXT) + + if (LIBINTL_LIBC_HAS_DGETTEXT) + set(LIBINTL_LIBRARIES) + set(LIBINTL_LIB_FOUND TRUE) + else (LIBINTL_LIBC_HAS_DGETTEXT) + find_library(LIBINTL_LIBRARIES NAMES intl libintl ) + if(LIBINTL_LIBRARIES) + set(LIBINTL_LIB_FOUND TRUE) + endif() + endif (LIBINTL_LIBC_HAS_DGETTEXT) + +endif() + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(Libintl DEFAULT_MSG LIBINTL_INCLUDE_DIR LIBINTL_LIB_FOUND) + +mark_as_advanced(LIBINTL_INCLUDE_DIR LIBINTL_LIBRARIES LIBINTL_LIBC_HAS_DGETTEXT LIBINTL_LIB_FOUND) diff --git a/deps/extra-cmake-modules/attic/modules/FindLibraryWithDebug.cmake b/deps/extra-cmake-modules/attic/modules/FindLibraryWithDebug.cmake new file mode 100644 index 0000000..58cd730 --- /dev/null +++ b/deps/extra-cmake-modules/attic/modules/FindLibraryWithDebug.cmake @@ -0,0 +1,113 @@ +# +# FIND_LIBRARY_WITH_DEBUG +# -> enhanced FIND_LIBRARY to allow the search for an +# optional debug library with a WIN32_DEBUG_POSTFIX similar +# to CMAKE_DEBUG_POSTFIX when creating a shared lib +# it has to be the second and third argument + +# Copyright (c) 2007, Christian Ehrlicher, +# Redistribution and use is allowed according to the terms of the BSD license. +# For details see the accompanying COPYING-CMAKE-SCRIPTS file. + +MACRO(FIND_LIBRARY_WITH_DEBUG var_name win32_dbg_postfix_name dgb_postfix libname) + + IF(NOT "${win32_dbg_postfix_name}" STREQUAL "WIN32_DEBUG_POSTFIX") + + # no WIN32_DEBUG_POSTFIX -> simply pass all arguments to FIND_LIBRARY + FIND_LIBRARY(${var_name} + ${win32_dbg_postfix_name} + ${dgb_postfix} + ${libname} + ${ARGN} + ) + + ELSE(NOT "${win32_dbg_postfix_name}" STREQUAL "WIN32_DEBUG_POSTFIX") + + IF(NOT WIN32) + # on non-win32 we don't need to take care about WIN32_DEBUG_POSTFIX + + FIND_LIBRARY(${var_name} ${libname} ${ARGN}) + + ELSE(NOT WIN32) + + # 1. get all possible libnames + SET(args ${ARGN}) + SET(newargs "") + SET(libnames_release "") + SET(libnames_debug "") + + LIST(LENGTH args listCount) + + IF("${libname}" STREQUAL "NAMES") + SET(append_rest 0) + LIST(APPEND args " ") + + FOREACH(i RANGE ${listCount}) + LIST(GET args ${i} val) + + IF(append_rest) + LIST(APPEND newargs ${val}) + ELSE(append_rest) + IF("${val}" STREQUAL "PATHS") + LIST(APPEND newargs ${val}) + SET(append_rest 1) + ELSE("${val}" STREQUAL "PATHS") + LIST(APPEND libnames_release "${val}") + LIST(APPEND libnames_debug "${val}${dgb_postfix}") + ENDIF("${val}" STREQUAL "PATHS") + ENDIF(append_rest) + + ENDFOREACH(i) + + ELSE("${libname}" STREQUAL "NAMES") + + # just one name + LIST(APPEND libnames_release "${libname}") + LIST(APPEND libnames_debug "${libname}${dgb_postfix}") + + SET(newargs ${args}) + + ENDIF("${libname}" STREQUAL "NAMES") + + # search the release lib + FIND_LIBRARY(${var_name}_RELEASE + NAMES ${libnames_release} + ${newargs} + ) + + # search the debug lib + FIND_LIBRARY(${var_name}_DEBUG + NAMES ${libnames_debug} + ${newargs} + ) + + IF(${var_name}_RELEASE AND ${var_name}_DEBUG) + + # both libs found + SET(${var_name} optimized ${${var_name}_RELEASE} + debug ${${var_name}_DEBUG}) + + ELSE(${var_name}_RELEASE AND ${var_name}_DEBUG) + + IF(${var_name}_RELEASE) + + # only release found + SET(${var_name} ${${var_name}_RELEASE}) + + ELSE(${var_name}_RELEASE) + + # only debug (or nothing) found + SET(${var_name} ${${var_name}_DEBUG}) + + ENDIF(${var_name}_RELEASE) + + ENDIF(${var_name}_RELEASE AND ${var_name}_DEBUG) + + MARK_AS_ADVANCED(${var_name}_RELEASE) + MARK_AS_ADVANCED(${var_name}_DEBUG) + + ENDIF(NOT WIN32) + + ENDIF(NOT "${win32_dbg_postfix_name}" STREQUAL "WIN32_DEBUG_POSTFIX") + +ENDMACRO(FIND_LIBRARY_WITH_DEBUG) diff --git a/deps/extra-cmake-modules/attic/modules/FindLinuxWirelesstools.cmake b/deps/extra-cmake-modules/attic/modules/FindLinuxWirelesstools.cmake new file mode 100644 index 0000000..794bba7 --- /dev/null +++ b/deps/extra-cmake-modules/attic/modules/FindLinuxWirelesstools.cmake @@ -0,0 +1,29 @@ +# - Try to find wireless extensions support libraries +# Once done this will define +# +# IW_FOUND - system has IW +# IW_INCLUDE_DIR - the IW include directory +# IW_LIBRARIES - Link to these to use IW + +# Copyright (c) 2006, Thorsten Roeder, +# +# Redistribution and use is allowed according to the terms of the BSD license. +# For details see the accompanying COPYING-CMAKE-SCRIPTS file. + + +IF (IW_INCLUDE_DIR) + # Already in cache, be silent + SET(LinuxWirelesstools_FIND_QUIETLY TRUE) +ENDIF (IW_INCLUDE_DIR) + +FIND_PATH(IW_INCLUDE_DIR iwlib.h) + +FIND_LIBRARY(IW_LIBRARIES NAMES iw) + +include(FindPackageHandleStandardArgs) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(IW "Could not find Linux Wirelesstools (libIW)" IW_INCLUDE_DIR IW_LIBRARIES ) + + +# show the IW_INCLUDE_DIR and IW_LIBRARIES variables only in the advanced view +MARK_AS_ADVANCED(IW_INCLUDE_DIR IW_LIBRARIES ) + diff --git a/deps/extra-cmake-modules/attic/modules/FindMusicBrainz.cmake b/deps/extra-cmake-modules/attic/modules/FindMusicBrainz.cmake new file mode 100644 index 0000000..92d14f0 --- /dev/null +++ b/deps/extra-cmake-modules/attic/modules/FindMusicBrainz.cmake @@ -0,0 +1,32 @@ +# Module to find the musicbrainz library +# +# It defines +# MUSICBRAINZ_INCLUDE_DIR - the include dir +# MUSICBRAINZ_LIBRARIES - the required libraries +# MUSICBRAINZ_FOUND - true if both of the above have been found + +# Copyright (c) 2006,2007 Laurent Montel, +# +# Redistribution and use is allowed according to the terms of the BSD license. +# For details see the accompanying COPYING-CMAKE-SCRIPTS file. + +if(MUSICBRAINZ_INCLUDE_DIR AND MUSICBRAINZ_LIBRARIES) + set(MUSICBRAINZ_FIND_QUIETLY TRUE) +endif() + +FIND_PATH(MUSICBRAINZ_INCLUDE_DIR musicbrainz/musicbrainz.h) + +FIND_LIBRARY( MUSICBRAINZ_LIBRARIES NAMES musicbrainz) + +# We need version 2, version 3 is source-incompatible +FIND_PATH(MUSICBRAINZ3_INCLUDE_DIR musicbrainz3/musicbrainz.h) +if(MUSICBRAINZ3_INCLUDE_DIR AND NOT MUSICBRAINZ_INCLUDE_DIR) + message(STATUS "\nIncompatible version 3.x of the musicbrainz includes detected. Version 2.x is needed.\n") +endif() + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args( MusicBrainz DEFAULT_MSG + MUSICBRAINZ_INCLUDE_DIR MUSICBRAINZ_LIBRARIES) + +MARK_AS_ADVANCED(MUSICBRAINZ_INCLUDE_DIR MUSICBRAINZ_LIBRARIES) + diff --git a/deps/extra-cmake-modules/attic/modules/FindMySQL.cmake b/deps/extra-cmake-modules/attic/modules/FindMySQL.cmake new file mode 100644 index 0000000..c0ef879 --- /dev/null +++ b/deps/extra-cmake-modules/attic/modules/FindMySQL.cmake @@ -0,0 +1,140 @@ +# - Try to find MySQL / MySQL Embedded library +# Find the MySQL includes and client library +# This module defines +# MYSQL_INCLUDE_DIR, where to find mysql.h +# MYSQL_LIBRARIES, the libraries needed to use MySQL. +# MYSQL_LIB_DIR, path to the MYSQL_LIBRARIES +# MYSQL_EMBEDDED_LIBRARIES, the libraries needed to use MySQL Embedded. +# MYSQL_EMBEDDED_LIB_DIR, path to the MYSQL_EMBEDDED_LIBRARIES +# MYSQL_FOUND, If false, do not try to use MySQL. +# MYSQL_EMBEDDED_FOUND, If false, do not try to use MySQL Embedded. + +# Copyright (c) 2006-2008, Jarosław Staniek +# +# Redistribution and use is allowed according to the terms of the BSD license. +# For details see the accompanying COPYING-CMAKE-SCRIPTS file. + +include(CheckCXXSourceCompiles) +include(MacroPushRequiredVars) + +if(WIN32) + find_path(MYSQL_INCLUDE_DIR mysql.h + PATHS + $ENV{MYSQL_INCLUDE_DIR} + $ENV{MYSQL_DIR}/include + $ENV{ProgramFiles}/MySQL/*/include + $ENV{SystemDrive}/MySQL/*/include + ) +else() + find_path(MYSQL_INCLUDE_DIR mysql.h + PATHS + $ENV{MYSQL_INCLUDE_DIR} + $ENV{MYSQL_DIR}/include + /usr/local/mysql/include + /opt/mysql/mysql/include + PATH_SUFFIXES + mysql + ) +endif() + +if(WIN32) + string(TOLOWER ${CMAKE_BUILD_TYPE} CMAKE_BUILD_TYPE_TOLOWER) + + # path suffix for debug/release mode + # binary_dist: mysql binary distribution + # build_dist: custom build + if(CMAKE_BUILD_TYPE_TOLOWER MATCHES "debug") + set(binary_dist debug) + set(build_dist Debug) + else() + ADD_DEFINITIONS(-DDBUG_OFF) + set(binary_dist opt) + set(build_dist Release) + endif() + +# find_library(MYSQL_LIBRARIES NAMES mysqlclient + find_library(MYSQL_LIBRARIES NAMES libmysql + PATHS + $ENV{MYSQL_DIR}/lib/${binary_dist} + $ENV{MYSQL_DIR}/libmysql/${build_dist} + $ENV{MYSQL_DIR}/client/${build_dist} + $ENV{ProgramFiles}/MySQL/*/lib/${binary_dist} + $ENV{SystemDrive}/MySQL/*/lib/${binary_dist} + ) +else() +# find_library(MYSQL_LIBRARIES NAMES mysqlclient + find_library(MYSQL_LIBRARIES NAMES libmysql + PATHS + $ENV{MYSQL_DIR}/libmysql_r/.libs + $ENV{MYSQL_DIR}/lib + $ENV{MYSQL_DIR}/lib/mysql + /usr/local/mysql/lib + /opt/mysql/mysql/lib + PATH_SUFFIXES + mysql + ) +endif() + +if(WIN32) + set(MYSQL_LIB_PATHS + $ENV{MYSQL_DIR}/lib/opt + $ENV{MYSQL_DIR}/client/release + $ENV{ProgramFiles}/MySQL/*/lib/opt + $ENV{SystemDrive}/MySQL/*/lib/opt + ) + find_library(MYSQL_LIBRARIES NAMES mysqlclient + PATHS + ${MYSQL_LIB_PATHS} + ) +else() + set(MYSQL_LIB_PATHS + $ENV{MYSQL_DIR}/libmysql_r/.libs + $ENV{MYSQL_DIR}/lib + $ENV{MYSQL_DIR}/lib/mysql + /usr/local/mysql/lib + /opt/mysql/mysql/lib + PATH_SUFFIXES + mysql + ) + find_library(MYSQL_LIBRARIES NAMES mysqlclient + PATHS + ${MYSQL_LIB_PATHS} + ) +endif() + +find_library(MYSQL_EMBEDDED_LIBRARIES NAMES mysqld + PATHS + ${MYSQL_LIB_PATHS} +) + +if(MYSQL_LIBRARIES) + get_filename_component(MYSQL_LIB_DIR ${MYSQL_LIBRARIES} PATH) +endif() + +if(MYSQL_EMBEDDED_LIBRARIES) + get_filename_component(MYSQL_EMBEDDED_LIB_DIR ${MYSQL_EMBEDDED_LIBRARIES} PATH) +endif() + +macro_push_required_vars() +set( CMAKE_REQUIRED_INCLUDES ${MYSQL_INCLUDE_DIR} ) +set( CMAKE_REQUIRED_LIBRARIES ${MYSQL_EMBEDDED_LIBRARIES} ) +check_cxx_source_compiles( "#include \nint main() { int i = MYSQL_OPT_USE_EMBEDDED_CONNECTION; }" HAVE_MYSQL_OPT_EMBEDDED_CONNECTION ) +macro_pop_required_vars() + +if(MYSQL_INCLUDE_DIR AND MYSQL_LIBRARIES) + set(MYSQL_FOUND TRUE) + message(STATUS "Found MySQL: ${MYSQL_INCLUDE_DIR}, ${MYSQL_LIBRARIES}") +else() + set(MYSQL_FOUND FALSE) + message(STATUS "MySQL not found.") +endif() + +if(MYSQL_INCLUDE_DIR AND MYSQL_EMBEDDED_LIBRARIES AND HAVE_MYSQL_OPT_EMBEDDED_CONNECTION) + set(MYSQL_EMBEDDED_FOUND TRUE) + message(STATUS "Found MySQL Embedded: ${MYSQL_INCLUDE_DIR}, ${MYSQL_EMBEDDED_LIBRARIES}") +else() + set(MYSQL_EMBEDDED_FOUND FALSE) + message(STATUS "MySQL Embedded not found.") +endif() + +mark_as_advanced(MYSQL_INCLUDE_DIR MYSQL_LIBRARIES MYSQL_EMBEDDED_LIBRARIES) diff --git a/deps/extra-cmake-modules/attic/modules/FindNepomuk.cmake b/deps/extra-cmake-modules/attic/modules/FindNepomuk.cmake new file mode 100644 index 0000000..3b09734 --- /dev/null +++ b/deps/extra-cmake-modules/attic/modules/FindNepomuk.cmake @@ -0,0 +1,95 @@ +# Once done this will define +# +# NEPOMUK_FOUND - system has Nepomuk +# NEPOMUK_INCLUDE_DIR - the Nepomuk include directory +# NEPOMUK_LIBRARIES - Link these to use Nepomuk +# NEPOMUK_QUERY_LIBRARIES - Link these to use Nepomuk query +# NEPOMUK_UTILS_LIBRARIES - Link these to use Nepomuk utils +# NEPOMUK_DEFINITIONS - Compiler switches required for using Nepomuk +# +# Nepomuk requires Soprano, so this module checks for Soprano too. +# + + +# Copyright (c) 2008-2009, Sebastian Trueg, +# +# Redistribution and use is allowed according to the terms of the BSD license. +# For details see the accompanying COPYING-CMAKE-SCRIPTS file. + + +if (NOT DEFINED Soprano_FOUND) + find_package(Soprano ${SOPRANO_MIN_VERSION}) + include(MacroLogFeature) + macro_log_feature(Soprano_FOUND "Soprano" "Support for the Nepomuk semantic desktop system" "http://soprano.sourceforge.net" FALSE "" "") +endif (NOT DEFINED Soprano_FOUND) + +if (NOT DEFINED SHAREDDESKTOPONTOLOGIES_FOUND) + find_package(SharedDesktopOntologies) + include(MacroLogFeature) + macro_log_feature(SHAREDDESKTOPONTOLOGIES_FOUND "Shared desktop ontologies" "Support for the Nepomuk semantic desktop system" "http://oscaf.sourceforge.net" FALSE "" "") +endif (NOT DEFINED SHAREDDESKTOPONTOLOGIES_FOUND) + +# Check for the following stuff independent from whether soprano has been found +# or not. This will give a better error message at the end. +find_path(NEPOMUK_INCLUDE_DIR + NAMES + nepomuk/resource.h + HINTS + ${KDE4_INCLUDE_DIR} + ${INCLUDE_INSTALL_DIR} + ) + +find_library(NEPOMUK_LIBRARIES + NAMES + nepomuk + HINTS + ${KDE4_LIB_DIR} + ${LIB_INSTALL_DIR} + ) + +find_library(NEPOMUK_QUERY_LIBRARIES + NAMES + nepomukquery + HINTS + ${KDE4_LIB_DIR} + ${LIB_INSTALL_DIR} + ) + +find_library(NEPOMUK_UTILS_LIBRARIES + NAMES + nepomukutils + HINTS + ${KDE4_LIB_DIR} + ${LIB_INSTALL_DIR} +) + +find_file(NEPOMUK_ADDONTOLOGYCLASSES_FILE NepomukAddOntologyClasses.cmake + HINTS ${KDE4_DATA_INSTALL_DIR}/cmake/modules/ + PATH_SUFFIXES share/apps/cmake/modules/ + ) + +include("${NEPOMUK_ADDONTOLOGYCLASSES_FILE}" OPTIONAL) + +mark_as_advanced(NEPOMUK_INCLUDE_DIR NEPOMUK_LIBRARIES NEPOMUK_QUERY_LIBRARIES NEPOMUK_UTILS_LIBRARIES NEPOMUK_ADDONTOLOGIES_FILE) + +include(FindPackageHandleStandardArgs) +# List all nepomuk and also all necessary soprano variables here, to make it +# easier for the user to see what was missing: +if(NOT WINCE) +find_package_handle_standard_args(Nepomuk DEFAULT_MSG + NEPOMUK_LIBRARIES NEPOMUK_INCLUDE_DIR NEPOMUK_ADDONTOLOGYCLASSES_FILE + Soprano_FOUND SOPRANO_PLUGIN_RAPTORPARSER_FOUND SOPRANO_PLUGIN_REDLANDBACKEND_FOUND + SHAREDDESKTOPONTOLOGIES_FOUND + ) +else() +#FIXME: There are no backends at this time +find_package_handle_standard_args(Nepomuk DEFAULT_MSG + NEPOMUK_LIBRARIES NEPOMUK_INCLUDE_DIR NEPOMUK_ADDONTOLOGYCLASSES_FILE + Soprano_FOUND + SHAREDDESKTOPONTOLOGIES_FOUND + ) +endif() + +#to retain backward compatibility +set (Nepomuk_FOUND ${NEPOMUK_FOUND}) + diff --git a/deps/extra-cmake-modules/attic/modules/FindNetworkManager.cmake b/deps/extra-cmake-modules/attic/modules/FindNetworkManager.cmake new file mode 100644 index 0000000..ced2017 --- /dev/null +++ b/deps/extra-cmake-modules/attic/modules/FindNetworkManager.cmake @@ -0,0 +1,42 @@ +# - Try to find NetworkManager +# Once done this will define +# +# NETWORKMANAGER_FOUND - system has NetworkManager +# NETWORKMANAGER_INCLUDE_DIRS - the NetworkManager include directories +# NETWORKMANAGER_LIBRARIES - the libraries needed to use NetworkManager +# NETWORKMANAGER_CFLAGS - Compiler switches required for using NetworkManager +# NETWORKMANAGER_VERSION - version number of NetworkManager + +# Copyright (c) 2006, Alexander Neundorf, +# Copyright (c) 2007, Will Stephenson, +# +# Redistribution and use is allowed according to the terms of the BSD license. +# For details see the accompanying COPYING-CMAKE-SCRIPTS file. + + +IF (NETWORKMANAGER_INCLUDE_DIRS AND NM-UTIL_INCLUDE_DIRS) + # in cache already + SET(NetworkManager_FIND_QUIETLY TRUE) +ENDIF (NETWORKMANAGER_INCLUDE_DIRS AND NM-UTIL_INCLUDE_DIRS) + +IF (NOT WIN32) + # use pkg-config to get the directories and then use these values + # in the FIND_PATH() and FIND_LIBRARY() calls + find_package(PkgConfig) + PKG_SEARCH_MODULE( NETWORKMANAGER NetworkManager ) + PKG_SEARCH_MODULE( NM-UTIL libnm-util ) +ENDIF (NOT WIN32) + +IF (NETWORKMANAGER_FOUND AND NM-UTIL_FOUND) + IF (NOT NetworkManager_FIND_QUIETLY) + MESSAGE(STATUS "Found NetworkManager ${NETWORKMANAGER_VERSION}: ${NETWORKMANAGER_LIBRARY_DIRS}") + MESSAGE(STATUS "Found libnm-util: ${NM-UTIL_LIBRARY_DIRS}") + ENDIF (NOT NetworkManager_FIND_QUIETLY) +ELSE (NETWORKMANAGER_FOUND AND NM-UTIL_FOUND) + IF (NetworkManager_FIND_REQUIRED) + MESSAGE(FATAL_ERROR "Could NOT find NetworkManager or libnm-util, check FindPkgConfig output above!") + ENDIF (NetworkManager_FIND_REQUIRED) +ENDIF (NETWORKMANAGER_FOUND AND NM-UTIL_FOUND) + +MARK_AS_ADVANCED(NETWORKMANAGER_INCLUDE_DIRS NM-UTIL_INCLUDE_DIRS) + diff --git a/deps/extra-cmake-modules/attic/modules/FindOggVorbis.cmake b/deps/extra-cmake-modules/attic/modules/FindOggVorbis.cmake new file mode 100644 index 0000000..28575d3 --- /dev/null +++ b/deps/extra-cmake-modules/attic/modules/FindOggVorbis.cmake @@ -0,0 +1,76 @@ +# - Try to find the OggVorbis libraries +# Once done this will define +# +# OGGVORBIS_FOUND - system has OggVorbis +# OGGVORBIS_VERSION - set either to 1 or 2 +# OGGVORBIS_INCLUDE_DIR - the OggVorbis include directory +# OGGVORBIS_LIBRARIES - The libraries needed to use OggVorbis +# OGG_LIBRARY - The Ogg library +# VORBIS_LIBRARY - The Vorbis library +# VORBISFILE_LIBRARY - The VorbisFile library +# VORBISENC_LIBRARY - The VorbisEnc library + +# Copyright (c) 2006, Richard Laerkaeng, +# +# Redistribution and use is allowed according to the terms of the BSD license. +# For details see the accompanying COPYING-CMAKE-SCRIPTS file. + + +include (CheckLibraryExists) + +find_path(VORBIS_INCLUDE_DIR vorbis/vorbisfile.h) +find_path(OGG_INCLUDE_DIR ogg/ogg.h) + +find_library(OGG_LIBRARY NAMES ogg) +find_library(VORBIS_LIBRARY NAMES vorbis) +find_library(VORBISFILE_LIBRARY NAMES vorbisfile) +find_library(VORBISENC_LIBRARY NAMES vorbisenc) + +mark_as_advanced(VORBIS_INCLUDE_DIR OGG_INCLUDE_DIR + OGG_LIBRARY VORBIS_LIBRARY VORBISFILE_LIBRARY VORBISENC_LIBRARY) + + +if (VORBIS_INCLUDE_DIR AND VORBIS_LIBRARY AND VORBISFILE_LIBRARY AND VORBISENC_LIBRARY) + + set(OGGVORBIS_LIBRARIES ${OGG_LIBRARY} ${VORBIS_LIBRARY} ${VORBISFILE_LIBRARY} ${VORBISENC_LIBRARY}) + + set(_CMAKE_REQUIRED_LIBRARIES_TMP ${CMAKE_REQUIRED_LIBRARIES}) + set(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} ${OGGVORBIS_LIBRARIES}) + check_library_exists(vorbis vorbis_bitrate_addblock "" HAVE_LIBVORBISENC2) + set(CMAKE_REQUIRED_LIBRARIES ${_CMAKE_REQUIRED_LIBRARIES_TMP}) + + if (HAVE_LIBVORBISENC2) + set (OGGVORBIS_VERSION 2) + else (HAVE_LIBVORBISENC2) + set (OGGVORBIS_VERSION 1) + endif (HAVE_LIBVORBISENC2) + +endif (VORBIS_INCLUDE_DIR AND VORBIS_LIBRARY AND VORBISFILE_LIBRARY AND VORBISENC_LIBRARY) + + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(OggVorbis REQUIRED_VARS VORBIS_LIBRARY OGG_LIBRARY VORBISFILE_LIBRARY VORBISENC_LIBRARY + VORBIS_INCLUDE_DIR OGG_INCLUDE_DIR) + +#check_include_files(vorbis/vorbisfile.h HAVE_VORBISFILE_H) +#check_library_exists(ogg ogg_page_version "" HAVE_LIBOGG) +#check_library_exists(vorbis vorbis_info_init "" HAVE_LIBVORBIS) +#check_library_exists(vorbisfile ov_open "" HAVE_LIBVORBISFILE) +#check_library_exists(vorbisenc vorbis_info_clear "" HAVE_LIBVORBISENC) +#check_library_exists(vorbis vorbis_bitrate_addblock "" HAVE_LIBVORBISENC2) + +#if (HAVE_LIBOGG AND HAVE_VORBISFILE_H AND HAVE_LIBVORBIS AND HAVE_LIBVORBISFILE AND HAVE_LIBVORBISENC) +# message(STATUS "Ogg/Vorbis found") +# set (VORBIS_LIBS "-lvorbis -logg") +# set (VORBISFILE_LIBS "-lvorbisfile") +# set (VORBISENC_LIBS "-lvorbisenc") +# set (OGGVORBIS_FOUND TRUE) +# if (HAVE_LIBVORBISENC2) +# set (HAVE_VORBIS 2) +# else (HAVE_LIBVORBISENC2) +# set (HAVE_VORBIS 1) +# endif (HAVE_LIBVORBISENC2) +#else (HAVE_LIBOGG AND HAVE_VORBISFILE_H AND HAVE_LIBVORBIS AND HAVE_LIBVORBISFILE AND HAVE_LIBVORBISENC) +# message(STATUS "Ogg/Vorbis not found") +#endif (HAVE_LIBOGG AND HAVE_VORBISFILE_H AND HAVE_LIBVORBIS AND HAVE_LIBVORBISFILE AND HAVE_LIBVORBISENC) + diff --git a/deps/extra-cmake-modules/attic/modules/FindOpenEXR.cmake b/deps/extra-cmake-modules/attic/modules/FindOpenEXR.cmake new file mode 100644 index 0000000..405b892 --- /dev/null +++ b/deps/extra-cmake-modules/attic/modules/FindOpenEXR.cmake @@ -0,0 +1,104 @@ +# Try to find the OpenEXR libraries +# This check defines: +# +# OPENEXR_FOUND - system has OpenEXR +# OPENEXR_INCLUDE_DIR - OpenEXR include directory +# OPENEXR_LIBRARIES - Libraries needed to use OpenEXR +# OPENEXR_DEFINITIONS - definitions required to use OpenEXR + +# Copyright (c) 2006, Alexander Neundorf, +# +# Redistribution and use is allowed according to the terms of the BSD license. +# For details see the accompanying COPYING-CMAKE-SCRIPTS file. + + +if (OPENEXR_INCLUDE_DIR AND OPENEXR_LIBRARIES) + # in cache already + set(OPENEXR_FOUND TRUE) + +else (OPENEXR_INCLUDE_DIR AND OPENEXR_LIBRARIES) + + # use pkg-config to get the directories and then use these values + # in the FIND_PATH() and FIND_LIBRARY() calls + find_package(PkgConfig) + pkg_check_modules(PC_OPENEXR QUIET OpenEXR) + + FIND_PATH(OPENEXR_INCLUDE_DIR ImfRgbaFile.h + HINTS + ${PC_OPENEXR_INCLUDEDIR} + ${PC_OPENEXR_INCLUDE_DIRS} + PATH_SUFFIXES OpenEXR + ) + + FIND_LIBRARY(OPENEXR_HALF_LIBRARY NAMES Half + HINTS + ${PC_OPENEXR_LIBDIR} + ${PC_OPENEXR_LIBRARY_DIRS} + ) + + + FIND_LIBRARY(OPENEXR_IEX_LIBRARY NAMES Iex + PATHS + ${PC_OPENEXR_LIBDIR} + ${PC_OPENEXR_LIBRARY_DIRS} + ) + + FIND_LIBRARY(OPENEXR_IMATH_LIBRARY NAMES Imath + HINTS + ${PC_OPENEXR_LIBDIR} + ${PC_OPENEXR_LIBRARY_DIRS} + NO_DEFAULT_PATH + ) + + FIND_LIBRARY(OPENEXR_ILMIMF_LIBRARY NAMES IlmImf + HINTS + ${PC_OPENEXR_LIBDIR} + ${PC_OPENEXR_LIBRARY_DIRS} + ) + + FIND_LIBRARY(OPENEXR_ILMTHREAD_LIBRARY NAMES IlmThread + HINTS + ${PC_OPENEXR_LIBDIR} + ${PC_OPENEXR_LIBRARY_DIRS} + ) + + if (OPENEXR_INCLUDE_DIR AND OPENEXR_IMATH_LIBRARY AND OPENEXR_ILMIMF_LIBRARY AND OPENEXR_IEX_LIBRARY AND OPENEXR_HALF_LIBRARY) + set(OPENEXR_FOUND TRUE) + if (OPENEXR_ILMTHREAD_LIBRARY) + set(OPENEXR_LIBRARIES ${OPENEXR_IMATH_LIBRARY} ${OPENEXR_ILMIMF_LIBRARY} ${OPENEXR_IEX_LIBRARY} ${OPENEXR_HALF_LIBRARY} ${OPENEXR_ILMTHREAD_LIBRARY} ) + else (OPENEXR_ILMTHREAD_LIBRARY) + set(OPENEXR_LIBRARIES ${OPENEXR_IMATH_LIBRARY} ${OPENEXR_ILMIMF_LIBRARY} ${OPENEXR_IEX_LIBRARY} ${OPENEXR_HALF_LIBRARY} ) + endif (OPENEXR_ILMTHREAD_LIBRARY) + + if (WIN32) + set(_OPENEXR_DEFINITIONS -DOPENEXR_DLL) + else (WIN32) + set(_OPENEXR_DEFINITIONS) + endif (WIN32) + + set(OPENEXR_DEFINITIONS ${_OPENEXR_DEFINITIONS}) + + endif (OPENEXR_INCLUDE_DIR AND OPENEXR_IMATH_LIBRARY AND OPENEXR_ILMIMF_LIBRARY AND OPENEXR_IEX_LIBRARY AND OPENEXR_HALF_LIBRARY) + + + if (OPENEXR_FOUND) + if (NOT OpenEXR_FIND_QUIETLY) + message(STATUS "Found OPENEXR: ${OPENEXR_LIBRARIES}") + endif (NOT OpenEXR_FIND_QUIETLY) + else (OPENEXR_FOUND) + if (OpenEXR_FIND_REQUIRED) + message(FATAL_ERROR "Could NOT find OPENEXR") + endif (OpenEXR_FIND_REQUIRED) + endif (OPENEXR_FOUND) + + mark_as_advanced( + OPENEXR_INCLUDE_DIR + OPENEXR_LIBRARIES + OPENEXR_ILMIMF_LIBRARY + OPENEXR_ILMTHREAD_LIBRARY + OPENEXR_IMATH_LIBRARY + OPENEXR_IEX_LIBRARY + OPENEXR_HALF_LIBRARY + OPENEXR_DEFINITIONS ) + +endif (OPENEXR_INCLUDE_DIR AND OPENEXR_LIBRARIES) diff --git a/deps/extra-cmake-modules/attic/modules/FindPCRE.cmake b/deps/extra-cmake-modules/attic/modules/FindPCRE.cmake new file mode 100644 index 0000000..0fe3210 --- /dev/null +++ b/deps/extra-cmake-modules/attic/modules/FindPCRE.cmake @@ -0,0 +1,44 @@ +# - Try to find the PCRE regular expression library +# Once done this will define +# +# PCRE_FOUND - system has the PCRE library +# PCRE_INCLUDE_DIR - the PCRE include directory +# PCRE_LIBRARIES - The libraries needed to use PCRE + +# Copyright (c) 2006, Alexander Neundorf, +# +# Redistribution and use is allowed according to the terms of the BSD license. +# For details see the accompanying COPYING-CMAKE-SCRIPTS file. + + +if (PCRE_INCLUDE_DIR AND PCRE_PCREPOSIX_LIBRARY AND PCRE_PCRE_LIBRARY) + # Already in cache, be silent + set(PCRE_FIND_QUIETLY TRUE) +endif (PCRE_INCLUDE_DIR AND PCRE_PCREPOSIX_LIBRARY AND PCRE_PCRE_LIBRARY) + + +if (NOT WIN32) + # use pkg-config to get the directories and then use these values + # in the FIND_PATH() and FIND_LIBRARY() calls + find_package(PkgConfig) + + pkg_check_modules(PC_PCRE QUIET libpcre) + + set(PCRE_DEFINITIONS ${PC_PCRE_CFLAGS_OTHER}) + +endif (NOT WIN32) + +find_path(PCRE_INCLUDE_DIR pcre.h + HINTS ${PC_PCRE_INCLUDEDIR} ${PC_PCRE_INCLUDE_DIRS} + PATH_SUFFIXES pcre) + +find_library(PCRE_PCRE_LIBRARY NAMES pcre pcred HINTS ${PC_PCRE_LIBDIR} ${PC_PCRE_LIBRARY_DIRS}) + +find_library(PCRE_PCREPOSIX_LIBRARY NAMES pcreposix pcreposixd HINTS ${PC_PCRE_LIBDIR} ${PC_PCRE_LIBRARY_DIRS}) + +include(FindPackageHandleStandardArgs) +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) diff --git a/deps/extra-cmake-modules/attic/modules/FindPhonon.cmake b/deps/extra-cmake-modules/attic/modules/FindPhonon.cmake new file mode 100644 index 0000000..197f47f --- /dev/null +++ b/deps/extra-cmake-modules/attic/modules/FindPhonon.cmake @@ -0,0 +1,37 @@ +# Find libphonon +# Once done this will define +# +# PHONON_FOUND - system has Phonon Library +# PHONON_INCLUDES - the Phonon include directory +# PHONON_LIBS - link these to use Phonon +# PHONON_VERSION - the version of the Phonon Library + +# Copyright (c) 2008, Matthias Kretz +# +# Redistribution and use is allowed according to the terms of the BSD license. +# For details see the accompanying COPYING-CMAKE-SCRIPTS file. + +macro(_phonon_find_version) + set(_phonon_namespace_header_file "${PHONON_INCLUDE_DIR}/phonon/phononnamespace.h") + if (APPLE AND EXISTS "${PHONON_INCLUDE_DIR}/Headers/phononnamespace.h") + set(_phonon_namespace_header_file "${PHONON_INCLUDE_DIR}/Headers/phononnamespace.h") + endif (APPLE AND EXISTS "${PHONON_INCLUDE_DIR}/Headers/phononnamespace.h") + file(READ ${_phonon_namespace_header_file} _phonon_header LIMIT 5000 OFFSET 1000) + string(REGEX MATCH "define PHONON_VERSION_STR \"(4\\.[0-9]+\\.[0-9a-z]+)\"" _phonon_version_match "${_phonon_header}") + set(PHONON_VERSION "${CMAKE_MATCH_1}") +endmacro(_phonon_find_version) + +# the dirs listed with HINTS are searched before the default sets of dirs +find_library(PHONON_LIBRARY NAMES phonon HINTS ${KDE4_LIB_INSTALL_DIR} ${QT_LIBRARY_DIR}) +find_path(PHONON_INCLUDE_DIR NAMES phonon/phonon_export.h HINTS ${KDE4_INCLUDE_INSTALL_DIR} ${QT_INCLUDE_DIR} ${INCLUDE_INSTALL_DIR} ${QT_LIBRARY_DIR}) + +if(PHONON_INCLUDE_DIR AND PHONON_LIBRARY) + set(PHONON_LIBS ${phonon_LIB_DEPENDS} ${PHONON_LIBRARY}) + set(PHONON_INCLUDES ${PHONON_INCLUDE_DIR}/KDE ${PHONON_INCLUDE_DIR}) + _phonon_find_version() +endif() + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(Phonon DEFAULT_MSG PHONON_INCLUDE_DIR PHONON_LIBRARY) + +mark_as_advanced(PHONON_INCLUDE_DIR PHONON_LIBRARY) diff --git a/deps/extra-cmake-modules/attic/modules/FindPolkitQt-1.cmake b/deps/extra-cmake-modules/attic/modules/FindPolkitQt-1.cmake new file mode 100644 index 0000000..4e90537 --- /dev/null +++ b/deps/extra-cmake-modules/attic/modules/FindPolkitQt-1.cmake @@ -0,0 +1,37 @@ +# - Try to find PolkitQt-1 +# Once done this will define +# +# POLKITQT-1_FOUND - system has Polkit-qt +# POLKITQT-1_INCLUDE_DIR - the Polkit-qt include directory +# POLKITQT-1_LIBRARIES - Link these to use all Polkit-qt libs +# POLKITQT-1_CORE_LIBRARY - Link this to use the polkit-qt-core library only +# POLKITQT-1_GUI_LIBRARY - Link this to use GUI elements in polkit-qt (polkit-qt-gui) +# POLKITQT-1_AGENT_LIBRARY - Link this to use the agent wrapper in polkit-qt +# POLKITQT-1_DEFINITIONS - Compiler switches required for using Polkit-qt +# +# The minimum required version of PolkitQt-1 can be specified using the +# standard syntax, e.g. find_package(PolkitQt-1 1.0) + +# Copyright (c) 2009, Dario Freddi, +# +# Redistribution and use is allowed according to the terms of the BSD license. +# For details see the accompanying COPYING-CMAKE-SCRIPTS file. + +# Support POLKITQT-1_MIN_VERSION for compatibility: +if ( NOT PolkitQt-1_FIND_VERSION AND POLKITQT-1_MIN_VERSION ) + set ( PolkitQt-1_FIND_VERSION ${POLKITQT-1_MIN_VERSION} ) +endif ( NOT PolkitQt-1_FIND_VERSION AND POLKITQT-1_MIN_VERSION ) + +set( _PolkitQt-1_FIND_QUIETLY ${PolkitQt-1_FIND_QUIETLY} ) +find_package( PolkitQt-1 ${PolkitQt-1_FIND_VERSION} QUIET NO_MODULE PATHS ${LIB_INSTALL_DIR}/PolkitQt-1/cmake ) +set( PolkitQt-1_FIND_QUIETLY ${_PolkitQt-1_FIND_QUIETLY} ) + +include( FindPackageHandleStandardArgs ) +find_package_handle_standard_args( PolkitQt-1 DEFAULT_MSG PolkitQt-1_CONFIG ) + +if (POLKITQT-1_FOUND) + if (NOT POLKITQT-1_INSTALL_DIR STREQUAL CMAKE_INSTALL_PREFIX) + message("WARNING: Installation prefix does not match PolicyKit install prefixes. You probably will need to move files installed " + "in POLICY_FILES_INSTALL_DIR and by dbus_add_activation_system_service to the ${PC_POLKITQT-1_PREFIX} prefix") + endif (NOT POLKITQT-1_INSTALL_DIR STREQUAL CMAKE_INSTALL_PREFIX) +endif (POLKITQT-1_FOUND) diff --git a/deps/extra-cmake-modules/attic/modules/FindPolkitQt.cmake b/deps/extra-cmake-modules/attic/modules/FindPolkitQt.cmake new file mode 100644 index 0000000..21285f7 --- /dev/null +++ b/deps/extra-cmake-modules/attic/modules/FindPolkitQt.cmake @@ -0,0 +1,94 @@ +# - Try to find Polkit-qt +# Once done this will define +# +# POLKITQT_FOUND - system has Polkit-qt +# POLKITQT_INCLUDE_DIR - the Polkit-qt include directory +# POLKITQT_LIBRARIES - Link these to use all Polkit-qt libs +# POLKITQT_CORE_LIBRARY - Link this to use the polkit-qt-core library only +# POLKITQT_GUI_LIBRARY - Link this to use GUI elements in polkit-qt (polkit-qt-gui) +# POLKITQT_DEFINITIONS - Compiler switches required for using Polkit-qt +# POLKITQT_POLICY_FILES_INSTALL_DIR - The directory where policy files should be installed to. +# +# The minimum required version of PolkitQt can be specified using the +# standard syntax, e.g. find_package(PolkitQt 1.0) +# For compatiblity, this can also be done by setting the POLKITQT_MIN_VERSION variable. + +# Copyright (c) 2009, Daniel Nicoletti, +# Copyright (c) 2009, Dario Freddi, +# Copyright (c) 2009, Michal Malek, +# Copyright (c) 2009, Alexander Neundorf, +# +# Redistribution and use is allowed according to the terms of the BSD license. +# For details see the accompanying COPYING-CMAKE-SCRIPTS file. + + +# Support POLKITQT_MIN_VERSION for compatibility: +if(NOT PolkitQt_FIND_VERSION) + set(PolkitQt_FIND_VERSION "${POLKITQT_MIN_VERSION}") +endif() + +# the minimum version of PolkitQt we require +if(NOT PolkitQt_FIND_VERSION) + set(PolkitQt_FIND_VERSION "0.9.3") +endif() + +if (NOT WIN32) + # use pkg-config to get the directories and then use these values + # in the FIND_PATH() and FIND_LIBRARY() calls + find_package(PkgConfig) + pkg_check_modules(PC_POLKITQT QUIET polkit-qt) + set(POLKITQT_DEFINITIONS ${PC_POLKITQT_CFLAGS_OTHER}) +endif (NOT WIN32) + +find_path( POLKITQT_INCLUDE_DIR + NAMES polkit-qt/auth.h + PATH_SUFFIXES PolicyKit +) + +find_file( POLKITQT_VERSION_FILE + polkit-qt/polkitqtversion.h + HINTS ${POLKITQT_INCLUDE_DIR} +) + +if(POLKITQT_VERSION_FILE AND NOT POLKITQT_VERSION) + file(READ ${POLKITQT_VERSION_FILE} POLKITQT_VERSION_CONTENT) + string (REGEX MATCH "POLKITQT_VERSION_STRING \".*\"\n" POLKITQT_VERSION_MATCH "${POLKITQT_VERSION_CONTENT}") + + if(POLKITQT_VERSION_MATCH) + string(REGEX REPLACE "POLKITQT_VERSION_STRING \"(.*)\"\n" "\\1" _POLKITQT_VERSION ${POLKITQT_VERSION_MATCH}) + endif() + set(POLKITQT_VERSION "${_POLKITQT_VERSION}" CACHE STRING "Version number of PolkitQt" FORCE) +endif() + +find_library( POLKITQT_CORE_LIBRARY + NAMES polkit-qt-core + HINTS ${PC_POLKITQT_LIBDIR} +) +find_library( POLKITQT_GUI_LIBRARY + NAMES polkit-qt-gui + HINTS ${PC_POLKITQT_LIBDIR} +) +set(POLKITQT_LIBRARIES ${POLKITQT_GUI_LIBRARY} ${POLKITQT_CORE_LIBRARY}) + +include(FindPackageHandleStandardArgs) +# Use the extended (new) syntax for FPHSA(): +find_package_handle_standard_args(PolkitQt REQUIRED_VARS POLKITQT_GUI_LIBRARY POLKITQT_CORE_LIBRARY POLKITQT_INCLUDE_DIR + VERSION_VAR POLKITQT_VERSION) + +mark_as_advanced(POLKITQT_INCLUDE_DIR + POLKITQT_CORE_LIBRARY + POLKITQT_GUI_LIBRARY + POLKITQT_VERSION_FILE + ) + +set(POLKITQT_POLICY_FILES_INSTALL_DIR share/PolicyKit/policy/) + +if(POLKITQT_FOUND) + get_filename_component(_POLKITQT_INSTALL_PREFIX "${POLKITQT_CORE_LIBRARY}" PATH) + get_filename_component(_POLKITQT_INSTALL_PREFIX "${_POLKITQT_INSTALL_PREFIX}" PATH) + if ( NOT _POLKITQT_INSTALL_PREFIX STREQUAL CMAKE_INSTALL_PREFIX ) + message("WARNING: Installation prefix does not match PolicyKit install prefixes. You probably will need to move files installed " + "in ${CMAKE_INSTALL_PREFIX}/${POLKITQT_POLICY_FILES_INSTALL_DIR} and by dbus_add_activation_system_service to the ${_POLKITQT_INSTALL_PREFIX}/${POLKITQT_POLICY_FILES_INSTALL_DIR} prefix") + endif (NOT _POLKITQT_INSTALL_PREFIX STREQUAL CMAKE_INSTALL_PREFIX) +endif() + diff --git a/deps/extra-cmake-modules/attic/modules/FindPopplerQt4.cmake b/deps/extra-cmake-modules/attic/modules/FindPopplerQt4.cmake new file mode 100644 index 0000000..f2a59b8 --- /dev/null +++ b/deps/extra-cmake-modules/attic/modules/FindPopplerQt4.cmake @@ -0,0 +1,53 @@ +# - Try to find the Qt4 binding of the Poppler library +# Once done this will define +# +# POPPLER_QT4_FOUND - system has poppler-qt4 +# POPPLER_QT4_INCLUDE_DIR - the poppler-qt4 include directory +# POPPLER_QT4_LIBRARIES - Link these to use poppler-qt4 +# POPPLER_QT4_DEFINITIONS - Compiler switches required for using poppler-qt4 +# + +# use pkg-config to get the directories and then use these values +# in the FIND_PATH() and FIND_LIBRARY() calls + +# Copyright (c) 2006, Wilfried Huss, +# +# Redistribution and use is allowed according to the terms of the BSD license. +# For details see the accompanying COPYING-CMAKE-SCRIPTS file. + + +find_package(PkgConfig) +pkg_check_modules(PC_POPPLERQT4 QUIET poppler-qt4) + +set(POPPLER_QT4_DEFINITIONS ${PC_POPPLERQT4_CFLAGS_OTHER}) + +find_path(POPPLER_QT4_INCLUDE_DIR + NAMES poppler-qt4.h + HINTS ${PC_POPPLERQT4_INCLUDEDIR} + PATH_SUFFIXES poppler/qt4 poppler +) + +find_library(POPPLER_QT4_LIBRARY + NAMES poppler-qt4 + HINTS ${PC_POPPLERQT4_LIBDIR} +) + +set(POPPLER_QT4_LIBRARIES ${POPPLER_QT4_LIBRARY}) + +if (POPPLER_QT4_INCLUDE_DIR AND POPPLER_QT4_LIBRARIES) + set(POPPLER_QT4_FOUND TRUE) +else (POPPLER_QT4_INCLUDE_DIR AND POPPLER_QT4_LIBRARIES) + set(POPPLER_QT4_FOUND FALSE) +endif (POPPLER_QT4_INCLUDE_DIR AND POPPLER_QT4_LIBRARIES) + +if (POPPLER_QT4_FOUND) + if (NOT PopplerQt4_FIND_QUIETLY) + message(STATUS "Found poppler-qt4: library: ${POPPLER_QT4_LIBRARIES}, include path: ${POPPLER_QT4_INCLUDE_DIR}") + endif (NOT PopplerQt4_FIND_QUIETLY) +else (POPPLER_QT4_FOUND) + if (PopplerQt4_FIND_REQUIRED) + message(FATAL_ERROR "Could NOT find poppler-qt4") + endif (PopplerQt4_FIND_REQUIRED) +endif (POPPLER_QT4_FOUND) + +mark_as_advanced(POPPLER_QT4_INCLUDE_DIR POPPLER_QT4_LIBRARIES) diff --git a/deps/extra-cmake-modules/attic/modules/FindPulseAudio.cmake b/deps/extra-cmake-modules/attic/modules/FindPulseAudio.cmake new file mode 100644 index 0000000..b04d174 --- /dev/null +++ b/deps/extra-cmake-modules/attic/modules/FindPulseAudio.cmake @@ -0,0 +1,71 @@ +# Try to find the PulseAudio library +# +# Once done this will define: +# +# PULSEAUDIO_FOUND - system has the PulseAudio library +# PULSEAUDIO_INCLUDE_DIR - the PulseAudio include directory +# PULSEAUDIO_LIBRARY - the libraries needed to use PulseAudio +# PULSEAUDIO_MAINLOOP_LIBRARY - the libraries needed to use PulsAudio Mainloop +# +# The minimum required version of PulseAudio can be specified using the +# standard syntax, e.g. find_package(PulseAudio 1.0) + +# Copyright (c) 2008, Matthias Kretz, +# Copyright (c) 2009, Marcus Hufgard, +# +# Redistribution and use is allowed according to the terms of the BSD license. +# For details see the accompanying COPYING-CMAKE-SCRIPTS file. + +# Support PULSEAUDIO_MINIMUM_VERSION for compatibility: +if(NOT PulseAudio_FIND_VERSION) + set(PulseAudio_FIND_VERSION "${PULSEAUDIO_MINIMUM_VERSION}") +endif() + +# the minimum version of PulseAudio we require +if(NOT PulseAudio_FIND_VERSION) + set(PulseAudio_FIND_VERSION "0.9.9") +endif() + +if (NOT WIN32) + include(FindPkgConfig) + pkg_check_modules(PC_PULSEAUDIO QUIET libpulse>=${PulseAudio_FIND_VERSION}) + pkg_check_modules(PC_PULSEAUDIO_MAINLOOP QUIET libpulse-mainloop-glib) +endif (NOT WIN32) + +find_path(PULSEAUDIO_INCLUDE_DIR pulse/pulseaudio.h + HINTS + ${PC_PULSEAUDIO_INCLUDEDIR} + ${PC_PULSEAUDIO_INCLUDE_DIRS} + ) + +find_library(PULSEAUDIO_LIBRARY NAMES pulse libpulse + HINTS + ${PC_PULSEAUDIO_LIBDIR} + ${PC_PULSEAUDIO_LIBRARY_DIRS} + ) + +find_library(PULSEAUDIO_MAINLOOP_LIBRARY NAMES pulse-mainloop pulse-mainloop-glib libpulse-mainloop-glib + HINTS + ${PC_PULSEAUDIO_LIBDIR} + ${PC_PULSEAUDIO_LIBRARY_DIRS} + ) + +# Store the version number in the cache, so we don't have to search every time again: +if (PULSEAUDIO_INCLUDE_DIR AND NOT PULSEAUDIO_VERSION) + + # get PulseAudio's version from its version.h, and compare it with our minimum version + file(STRINGS "${PULSEAUDIO_INCLUDE_DIR}/pulse/version.h" pulse_version_h + REGEX ".*pa_get_headers_version\\(\\).*" + ) + string(REGEX REPLACE ".*pa_get_headers_version\\(\\)\ \\(\"([0-9]+\\.[0-9]+\\.[0-9]+)[^\"]*\"\\).*" "\\1" + _PULSEAUDIO_VERSION "${pulse_version_h}") + + set(PULSEAUDIO_VERSION "${_PULSEAUDIO_VERSION}" CACHE STRING "Version number of PulseAudio" FORCE) +endif (PULSEAUDIO_INCLUDE_DIR AND NOT PULSEAUDIO_VERSION) + +# Use the new extended syntax of find_package_handle_standard_args(), which also handles version checking: +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(PulseAudio REQUIRED_VARS PULSEAUDIO_LIBRARY PULSEAUDIO_INCLUDE_DIR + VERSION_VAR PULSEAUDIO_VERSION ) + +mark_as_advanced(PULSEAUDIO_INCLUDE_DIR PULSEAUDIO_LIBRARY PULSEAUDIO_MAINLOOP_LIBRARY) diff --git a/deps/extra-cmake-modules/attic/modules/FindPyKDE4.cmake b/deps/extra-cmake-modules/attic/modules/FindPyKDE4.cmake new file mode 100644 index 0000000..b062912 --- /dev/null +++ b/deps/extra-cmake-modules/attic/modules/FindPyKDE4.cmake @@ -0,0 +1,184 @@ +# FindPyKDE4 +# +# Checks that Python and PyKDE4 are installed and defines a couple macros: +# * PYKDE4_INSTALL_PYTHON_FILES +# * PYKDE4_ADD_UI_FILES +# * PYKDE4_ADD_EXECUTABLE + +# By Simon Edwards +# This file is in the public domain. + +INCLUDE(FindPythonInterp) + +SET(PYKDE4_FOUND FALSE) + +get_filename_component( current_module_dir ${CMAKE_CURRENT_LIST_FILE} PATH) + +IF(PYTHONINTERP_FOUND) + EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} ${current_module_dir}/FindPyKDE4.py OUTPUT_VARIABLE pykde_config) + IF(NOT pykde_config) + # Failure to run + SET(PYKDE4_FOUND FALSE) + ELSE(NOT pykde_config) + + STRING(REGEX REPLACE ".*\npykde_version:([^\n]+).*$" "\\1" PYKDE4_VERSION ${pykde_config}) + STRING(REGEX REPLACE ".*\npykde_version_str:([^\n]+).*$" "\\1" PYKDE4_VERSION_STR ${pykde_config}) + STRING(REGEX REPLACE ".*\npykde_kde_sip_flags:([^\n]+).*$" "\\1" PYKDE4_SIP_FLAGS ${pykde_config}) + STRING(REGEX REPLACE ".*\npykde_sip_dir:([^\n]+).*$" "\\1" PYKDE4_SIP_DIR ${pykde_config}) + MESSAGE(STATUS "Found PyKDE4 version ${PYKDE4_VERSION_STR} ${PYKDE4_SIP_DIR}") + + SET(PYKDE4_FOUND TRUE) + + # PyKDE4 doesn't install pykdeuic4 when installing via CMake. + # Fortunately pykdeuic4 isn't needed by pate. + # + ## FIND_PROGRAM(PYKDE4_PYKDEUIC_EXE pykdeuic4 PATHS)# ${PYKDE4_BIN_DIR}) + ## IF(NOT PYKDE4_PYKDEUIC_EXE) + ## MESSAGE(FATAL_ERROR "ERROR: Could not find pykdeuic4 (part of PyKDE4)") + ## ENDIF(NOT PYKDE4_PYKDEUIC_EXE) + + ########################################################################### + # This comes mostly from KDE's FindKDE4Internal.cmake + + macro(_SET_FANCY _var _value _comment) + set(predefinedvalue "${_value}") + if ("${CMAKE_INSTALL_PREFIX}" STREQUAL "${KDE4_INSTALL_DIR}" AND DEFINED KDE4_${_var}) + set(predefinedvalue "${KDE4_${_var}}") + endif ("${CMAKE_INSTALL_PREFIX}" STREQUAL "${KDE4_INSTALL_DIR}" AND DEFINED KDE4_${_var}) + + if (NOT DEFINED ${_var}) + set(${_var} ${predefinedvalue}) + else (NOT DEFINED ${_var}) + set(${_var} "${${_var}}" CACHE PATH "${_comment}") + endif (NOT DEFINED ${_var}) + endmacro(_SET_FANCY) + + if (WIN32) + # use relative install prefix to avoid hardcoded install pathes in cmake_install.cmake files + _set_fancy(EXEC_INSTALL_PREFIX "" "Base directory for executables and libraries") + _set_fancy(SHARE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}/share" "Base directory for files which go to share/") + _set_fancy(BIN_INSTALL_DIR "bin" "The install dir for executables (default ${EXEC_INSTALL_PREFIX}/bin)") + _set_fancy(SBIN_INSTALL_DIR "sbin" "The install dir for system executables (default ${EXEC_INSTALL_PREFIX}/sbin)") + else (WIN32) + _set_fancy(EXEC_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}" "Base directory for executables and libraries") + _set_fancy(SHARE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}/share" "Base directory for files which go to share/") + _set_fancy(BIN_INSTALL_DIR "${EXEC_INSTALL_PREFIX}/bin" "The install dir for executables (default ${EXEC_INSTALL_PREFIX}/bin)") + _set_fancy(SBIN_INSTALL_DIR "${EXEC_INSTALL_PREFIX}/sbin" "The install dir for system executables (default ${EXEC_INSTALL_PREFIX}/sbin)") + endif (WIN32) + + _set_fancy(PLUGIN_INSTALL_DIR "${LIB_INSTALL_DIR}/kde4" "The subdirectory relative to the install prefix where plugins will be installed (default is ${LIB_INSTALL_DIR}/kde4)") + _set_fancy(CONFIG_INSTALL_DIR "${SHARE_INSTALL_PREFIX}/config" "The config file install dir") + _set_fancy(DATA_INSTALL_DIR "${SHARE_INSTALL_PREFIX}/apps" "The parent directory where applications can install their data") + _set_fancy(HTML_INSTALL_DIR "${SHARE_INSTALL_PREFIX}/doc/HTML" "The HTML install dir for documentation") + _set_fancy(ICON_INSTALL_DIR "${SHARE_INSTALL_PREFIX}/icons" "The icon install dir (default ${SHARE_INSTALL_PREFIX}/share/icons/)") + _set_fancy(KCFG_INSTALL_DIR "${SHARE_INSTALL_PREFIX}/config.kcfg" "The install dir for kconfig files") + _set_fancy(LOCALE_INSTALL_DIR "${SHARE_INSTALL_PREFIX}/locale" "The install dir for translations") + _set_fancy(MIME_INSTALL_DIR "${SHARE_INSTALL_PREFIX}/mimelnk" "The install dir for the mimetype desktop files") + _set_fancy(SERVICES_INSTALL_DIR "${SHARE_INSTALL_PREFIX}/kde4/services" "The install dir for service (desktop, protocol, ...) files") + _set_fancy(SERVICETYPES_INSTALL_DIR "${SHARE_INSTALL_PREFIX}/kde4/servicetypes" "The install dir for servicestypes desktop files") + _set_fancy(SOUND_INSTALL_DIR "${SHARE_INSTALL_PREFIX}/sounds" "The install dir for sound files") + _set_fancy(TEMPLATES_INSTALL_DIR "${SHARE_INSTALL_PREFIX}/templates" "The install dir for templates (Create new file...)") + _set_fancy(WALLPAPER_INSTALL_DIR "${SHARE_INSTALL_PREFIX}/wallpapers" "The install dir for wallpapers") + _set_fancy(KCONF_UPDATE_INSTALL_DIR "${DATA_INSTALL_DIR}/kconf_update" "The kconf_update install dir") + # this one shouldn't be used anymore + _set_fancy(APPLNK_INSTALL_DIR "${SHARE_INSTALL_PREFIX}/applnk" "Is this still used ?") + _set_fancy(AUTOSTART_INSTALL_DIR "${SHARE_INSTALL_PREFIX}/autostart" "The install dir for autostart files") + + _set_fancy(XDG_APPS_INSTALL_DIR "${SHARE_INSTALL_PREFIX}/applications/kde4" "The XDG apps dir") + _set_fancy(XDG_DIRECTORY_INSTALL_DIR "${SHARE_INSTALL_PREFIX}/desktop-directories" "The XDG directory") + _set_fancy(XDG_MIME_INSTALL_DIR "${SHARE_INSTALL_PREFIX}/mime/packages" "The install dir for the xdg mimetypes") + + _set_fancy(SYSCONF_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/etc" "The kde sysconfig install dir (default /etc)") + _set_fancy(MAN_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/man" "The kde man install dir (default ${CMAKE_INSTALL_PREFIX}/man/)") + _set_fancy(INFO_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/info" "The kde info install dir (default ${CMAKE_INSTALL_PREFIX}/info)") + _set_fancy(DBUS_INTERFACES_INSTALL_DIR "${SHARE_INSTALL_PREFIX}/dbus-1/interfaces" "The kde dbus interfaces install dir (default ${SHARE_INSTALL_PREFIX}/dbus-1/interfaces)") + _set_fancy(DBUS_SERVICES_INSTALL_DIR "${SHARE_INSTALL_PREFIX}/dbus-1/services" "The kde dbus services install dir (default ${SHARE_INSTALL_PREFIX}/dbus-1/services)") + + ENDIF(NOT pykde_config) +ENDIF(PYTHONINTERP_FOUND) + +########################################################################### +# PYKDE4_INSTALL_PYTHON_FILES(file_name...) +# +# Installs and bytes compiles Python files into the data directory for this +# project.. +# +MACRO(PYKDE4_INSTALL_PYTHON_FILES) + + ADD_CUSTOM_TARGET(pysupport ALL) + FOREACH (_current_file ${ARGN}) + + # Install the source file. + INSTALL(FILES ${_current_file} DESTINATION ${DATA_INSTALL_DIR}/${PROJECT_NAME}) + + # Byte compile and install the .pyc file. + GET_FILENAME_COMPONENT(_absfilename ${_current_file} ABSOLUTE) + GET_FILENAME_COMPONENT(_filename ${_current_file} NAME) + GET_FILENAME_COMPONENT(_filenamebase ${_current_file} NAME_WE) + GET_FILENAME_COMPONENT(_basepath ${_current_file} PATH) + SET(_bin_py ${CMAKE_BINARY_DIR}/${_basepath}/${_filename}) + SET(_bin_pyc ${CMAKE_BINARY_DIR}/${_basepath}/${_filenamebase}.pyc) + + FILE(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${_basepath}) + + SET(_message "-DMESSAGE=Byte-compiling ${_bin_py}") + + GET_FILENAME_COMPONENT(_abs_bin_py ${_bin_py} ABSOLUTE) + IF(_abs_bin_py STREQUAL ${_absfilename}) # Don't copy the file onto itself. + ADD_CUSTOM_COMMAND( + TARGET pysupport + COMMAND ${CMAKE_COMMAND} -E echo ${message} + COMMAND ${PYTHON_EXECUTABLE} ${current_module_dir}/PythonCompile.py ${_bin_py} + DEPENDS ${_absfilename} + ) + ELSE(_abs_bin_py STREQUAL ${_absfilename}) + ADD_CUSTOM_COMMAND( + TARGET pysupport + COMMAND ${CMAKE_COMMAND} -E echo ${message} + COMMAND ${CMAKE_COMMAND} -E copy ${_absfilename} ${_bin_py} + COMMAND ${PYTHON_EXECUTABLE} ${current_module_dir}/PythonCompile.py ${_bin_py} + DEPENDS ${_absfilename} + ) + ENDIF(_abs_bin_py STREQUAL ${_absfilename}) + + INSTALL(FILES ${_bin_pyc} DESTINATION ${DATA_INSTALL_DIR}/${PROJECT_NAME}) + + ENDFOREACH (_current_file) +ENDMACRO(PYKDE4_INSTALL_PYTHON_FILES) + + +########################################################################### +# PYKDE4_ADD_EXECUTABLE(py_name exe_name) +# +# Creates a smybolic link with name exe_name at install time from the +# install bin directory to the Python file. The Python file is also make +# executable. +# +MACRO(PYKDE4_ADD_EXECUTABLE _pyname _exename) + if(NOT PROJECT_NAME) + MESSAGE(STATUS "Project name is necessary to create symlink against python program!!! It will fail.") + endif() + if(WIN32) + # we generate a batch file instead of a symlink. A windows link would only + # work if the file extension .py is associated with python - but that is + # not guaranteed. + # What if python.exe is not in PATH or points to a wrong python version? + # The python app should check for compatible versions at startup. + # TODO: we cannot attach an icon to a bat file. So we might have to write a + # C program which then calls python + FILE(TO_CMAKE_PATH "${BIN_INSTALL_DIR}/${_exename}.bat" LINK_NAME) + FILE(TO_CMAKE_PATH "${DATA_INSTALL_DIR}/${PROJECT_NAME}/${_pyname}" TARGET) + GET_FILENAME_COMPONENT(abs_link_name $ENV{DESTDIR}/${LINK_NAME} ABSOLUTE) + GET_FILENAME_COMPONENT(link_path $ENV{DESTDIR}/${LINK_NAME} PATH) + GET_FILENAME_COMPONENT(abs_link_path ${link_path} ABSOLUTE) + FILE(MAKE_DIRECTORY ${abs_link_path}) + + FILE(TO_NATIVE_PATH "../${TARGET}" rel_target) + FILE(WRITE ${abs_link_name} "rem this file has been generated by PYKDE4_ADD_EXECUTABLE\n") + FILE(APPEND ${abs_link_name} "python ${rel_target}\n") + INSTALL(PROGRAMS ${LINK_NAME} DESTINATION $ENV{DESTDIR}/${BIN_INSTALL_DIR}) + else() + INSTALL(CODE "EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND} -DTARGET=${DATA_INSTALL_DIR}/${PROJECT_NAME}/${_pyname} -DLINK_NAME=${BIN_INSTALL_DIR}/${_exename} -P ${current_module_dir}/create_exe_symlink.cmake)" ) + endif() +ENDMACRO(PYKDE4_ADD_EXECUTABLE) + diff --git a/deps/extra-cmake-modules/attic/modules/FindPyKDE4.py b/deps/extra-cmake-modules/attic/modules/FindPyKDE4.py new file mode 100644 index 0000000..7916aa6 --- /dev/null +++ b/deps/extra-cmake-modules/attic/modules/FindPyKDE4.py @@ -0,0 +1,22 @@ +# Copyright (c) 2014, Raphael Kubo da Costa +# Redistribution and use is allowed according to the terms of the BSD license. +# For details see the accompanying COPYING-CMAKE-SCRIPTS file. + +import PyKDE4.kdecore + +if __name__ == '__main__': + try: + import PyKDE4.pykdeconfig + pykdecfg = PyKDE4.pykdeconfig.Configuration() + sip_dir = pykdecfg.pykde_sip_dir + sip_flags = pykdecfg.pykde_kde_sip_flags + except ImportError: + # PyQt4 >= 4.10.0 was built with configure-ng.py instead of + # configure.py, so pyqtconfig.py and pykdeconfig.py are not installed. + sip_dir = PyKDE4.kdecore.PYKDE_CONFIGURATION['sip_dir'] + sip_flags = PyKDE4.kdecore.PYKDE_CONFIGURATION['sip_flags'] + + print('pykde_version:%06.x' % PyKDE4.kdecore.version()) + print('pykde_version_str:%s' % PyKDE4.kdecore.versionString()) + print('pykde_sip_dir:%s' % sip_dir) + print('pykde_sip_flags:%s' % sip_flags) diff --git a/deps/extra-cmake-modules/attic/modules/FindPyQt.py b/deps/extra-cmake-modules/attic/modules/FindPyQt.py new file mode 100644 index 0000000..6c1c759 --- /dev/null +++ b/deps/extra-cmake-modules/attic/modules/FindPyQt.py @@ -0,0 +1,48 @@ +# Copyright (c) 2007, Simon Edwards +# Copyright (c) 2014, Raphael Kubo da Costa +# Redistribution and use is allowed according to the terms of the BSD license. +# For details see the accompanying COPYING-CMAKE-SCRIPTS file. + +import PyQt4.QtCore +import os +import sys + +def get_default_sip_dir(): + # This is based on QScintilla's configure.py, and only works for the + # default case where installation paths have not been changed in PyQt's + # configuration process. + if sys.platform == 'win32': + pyqt_sip_dir = os.path.join(sys.prefix, 'sip', 'PyQt4') + else: + pyqt_sip_dir = os.path.join(sys.prefix, 'share', 'sip', 'PyQt4') + return pyqt_sip_dir + +def get_qt4_tag(sip_flags): + in_t = False + for item in sip_flags.split(' '): + if item == '-t': + in_t = True + elif in_t: + if item.startswith('Qt_4'): + return item + else: + in_t = False + raise ValueError('Cannot find Qt\'s tag in PyQt4\'s SIP flags.') + +if __name__ == '__main__': + try: + import PyQt4.pyqtconfig + pyqtcfg = PyQt4.pyqtconfig.Configuration() + sip_dir = pyqtcfg.pyqt_sip_dir + sip_flags = pyqtcfg.pyqt_sip_flags + except ImportError: + # PyQt4 >= 4.10.0 was built with configure-ng.py instead of + # configure.py, so pyqtconfig.py is not installed. + sip_dir = get_default_sip_dir() + sip_flags = PyQt4.QtCore.PYQT_CONFIGURATION['sip_flags'] + + print('pyqt_version:%06.x' % PyQt4.QtCore.PYQT_VERSION) + print('pyqt_version_str:%s' % PyQt4.QtCore.PYQT_VERSION_STR) + print('pyqt_version_tag:%s' % get_qt4_tag(sip_flags)) + print('pyqt_sip_dir:%s' % sip_dir) + print('pyqt_sip_flags:%s' % sip_flags) diff --git a/deps/extra-cmake-modules/attic/modules/FindPyQt4.cmake b/deps/extra-cmake-modules/attic/modules/FindPyQt4.cmake new file mode 100644 index 0000000..3c7d288 --- /dev/null +++ b/deps/extra-cmake-modules/attic/modules/FindPyQt4.cmake @@ -0,0 +1,71 @@ +# Find PyQt4 +# ~~~~~~~~~~ +# Copyright (c) 2007-2008, Simon Edwards +# Redistribution and use is allowed according to the terms of the BSD license. +# For details see the accompanying COPYING-CMAKE-SCRIPTS file. +# +# PyQt4 website: http://www.riverbankcomputing.co.uk/pyqt/index.php +# +# Find the installed version of PyQt4. FindPyQt4 should only be called after +# Python has been found. +# +# This file defines the following variables, which can also be overriden by +# users: +# +# PYQT4_VERSION - The version of PyQt4 found expressed as a 6 digit hex number +# suitable for comparison as a string +# +# PYQT4_VERSION_STR - The version of PyQt4 as a human readable string. +# +# PYQT4_VERSION_TAG - The Qt4 version tag used by PyQt's sip files. +# +# PYQT4_SIP_DIR - The directory holding the PyQt4 .sip files. This can be unset +# if PyQt4 was built using its new build system and pyqtconfig.py is not +# present on the system, as in this case its value cannot be determined +# automatically. +# +# PYQT4_SIP_FLAGS - The SIP flags used to build PyQt. + +IF(EXISTS PYQT4_VERSION) + # Already in cache, be silent + SET(PYQT4_FOUND TRUE) +ELSE(EXISTS PYQT4_VERSION) + + FIND_FILE(_find_pyqt_py FindPyQt.py PATHS ${CMAKE_MODULE_PATH}) + + EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} ${_find_pyqt_py} OUTPUT_VARIABLE pyqt_config) + IF(pyqt_config) + STRING(REGEX MATCH "^pyqt_version:([^\n]+).*$" _dummy ${pyqt_config}) + SET(PYQT4_VERSION "${CMAKE_MATCH_1}" CACHE STRING "PyQt4's version as a 6-digit hexadecimal number") + + STRING(REGEX MATCH ".*\npyqt_version_str:([^\n]+).*$" _dummy ${pyqt_config}) + SET(PYQT4_VERSION_STR "${CMAKE_MATCH_1}" CACHE STRING "PyQt4's version as a human-readable string") + + STRING(REGEX MATCH ".*\npyqt_version_tag:([^\n]+).*$" _dummy ${pyqt_config}) + SET(PYQT4_VERSION_TAG "${CMAKE_MATCH_1}" CACHE STRING "The Qt4 version tag used by PyQt4's .sip files") + + STRING(REGEX MATCH ".*\npyqt_sip_dir:([^\n]+).*$" _dummy ${pyqt_config}) + SET(PYQT4_SIP_DIR "${CMAKE_MATCH_1}" CACHE PATH "The base directory where PyQt4's .sip files are installed") + + STRING(REGEX MATCH ".*\npyqt_sip_flags:([^\n]+).*$" _dummy ${pyqt_config}) + SET(PYQT4_SIP_FLAGS "${CMAKE_MATCH_1}" CACHE STRING "The SIP flags used to build PyQt4") + + IF(NOT IS_DIRECTORY "${PYQT4_SIP_DIR}") + MESSAGE(WARNING "The base directory where PyQt4's SIP files are installed could not be determined. This usually means PyQt4 was built with its new build system and pyqtconfig.py is not present.\n" + "Please set the PYQT4_SIP_DIR variable manually.") + ELSE(NOT IS_DIRECTORY "${PYQT4_SIP_DIR}") + SET(PYQT4_FOUND TRUE) + ENDIF(NOT IS_DIRECTORY "${PYQT4_SIP_DIR}") + ENDIF(pyqt_config) + + IF(PYQT4_FOUND) + IF(NOT PYQT4_FIND_QUIETLY) + MESSAGE(STATUS "Found PyQt4 version: ${PYQT4_VERSION_STR}") + ENDIF(NOT PYQT4_FIND_QUIETLY) + ELSE(PYQT4_FOUND) + IF(PYQT4_FIND_REQUIRED) + MESSAGE(FATAL_ERROR "Could not find Python") + ENDIF(PYQT4_FIND_REQUIRED) + ENDIF(PYQT4_FOUND) + +ENDIF(EXISTS PYQT4_VERSION) diff --git a/deps/extra-cmake-modules/attic/modules/FindPythonLibrary.cmake b/deps/extra-cmake-modules/attic/modules/FindPythonLibrary.cmake new file mode 100644 index 0000000..bb02c1b --- /dev/null +++ b/deps/extra-cmake-modules/attic/modules/FindPythonLibrary.cmake @@ -0,0 +1,106 @@ +# Find Python +# ~~~~~~~~~~~ +# Find the Python interpreter and related Python directories. +# +# This file defines the following variables: +# +# PYTHON_EXECUTABLE - The path and filename of the Python interpreter. +# +# PYTHON_SHORT_VERSION - The version of the Python interpreter found, +# excluding the patch version number. (e.g. 2.5 and not 2.5.1)) +# +# PYTHON_LONG_VERSION - The version of the Python interpreter found as a human +# readable string. +# +# PYTHON_SITE_PACKAGES_INSTALL_DIR - this cache variable can be used for installing +# own python modules. You may want to adjust this to be the +# same as ${PYTHON_SITE_PACKAGES_DIR}, but then admin +# privileges may be required for installation. +# +# PYTHON_SITE_PACKAGES_DIR - Location of the Python site-packages directory. +# +# PYTHON_INCLUDE_PATH - Directory holding the python.h include file. +# +# PYTHON_LIBRARY, PYTHON_LIBRARIES- Location of the Python library. + +# Copyright (c) 2007, Simon Edwards +# Redistribution and use is allowed according to the terms of the BSD license. +# For details see the accompanying COPYING-CMAKE-SCRIPTS file. + + + +include(CMakeFindFrameworks) + +if(EXISTS PYTHON_LIBRARY) + # Already in cache, be silent + set(PYTHONLIBRARY_FOUND TRUE) +else() + + find_package(PythonInterp) + + if(PYTHONINTERP_FOUND) + + # get the directory of the current file, used later on in the file + get_filename_component( _py_cmake_module_dir ${CMAKE_CURRENT_LIST_FILE} PATH) + if(NOT EXISTS "${_py_cmake_module_dir}/FindLibPython.py") + message(FATAL_ERROR "The file FindLibPython.py does not exist in ${_py_cmake_module_dir} (the directory where FindPythonLibrary.cmake is located). Check your installation.") + endif() + + execute_process(COMMAND ${PYTHON_EXECUTABLE} "${_py_cmake_module_dir}/FindLibPython.py" OUTPUT_VARIABLE python_config) + if(python_config) + string(REGEX REPLACE ".*exec_prefix:([^\n]+).*$" "\\1" PYTHON_PREFIX ${python_config}) + string(REGEX REPLACE ".*\nshort_version:([^\n]+).*$" "\\1" PYTHON_SHORT_VERSION ${python_config}) + string(REGEX REPLACE ".*\nlong_version:([^\n]+).*$" "\\1" PYTHON_LONG_VERSION ${python_config}) + + string(REGEX REPLACE ".*\npy_inc_dir:([^\n]+).*$" "\\1" _TMP_PYTHON_INCLUDE_PATH ${python_config}) + string(REGEX REPLACE ".*\nsite_packages_dir:([^\n]+).*$" "\\1" _TMP_PYTHON_SITE_PACKAGES_DIR ${python_config}) + + # Put these two variables in the cache so they are visible for the user, but read-only: + set(PYTHON_INCLUDE_PATH "${_TMP_PYTHON_INCLUDE_PATH}" CACHE PATH "The python include directory" FORCE) + set(PYTHON_SITE_PACKAGES_DIR "${_TMP_PYTHON_SITE_PACKAGES_DIR}" CACHE PATH "The python site packages dir" FORCE) + + # This one is intended to be used and changed by the user for installing own modules: + set(PYTHON_SITE_PACKAGES_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}/python${PYTHON_SHORT_VERSION}/site-packages CACHE PATH "The directory where python modules will be installed to.") + + string(REGEX REPLACE "([0-9]+).([0-9]+)" "\\1\\2" PYTHON_SHORT_VERSION_NO_DOT ${PYTHON_SHORT_VERSION}) + set(PYTHON_LIBRARY_NAMES python${PYTHON_SHORT_VERSION} python${PYTHON_SHORT_VERSION_NO_DOT}) + if(WIN32) + string(REPLACE "\\" "/" PYTHON_SITE_PACKAGES_DIR ${PYTHON_SITE_PACKAGES_DIR}) + endif() + find_library(PYTHON_LIBRARY NAMES ${PYTHON_LIBRARY_NAMES} PATHS ${PYTHON_PREFIX}/lib ${PYTHON_PREFIX}/libs NO_DEFAULT_PATH) + set(PYTHONLIBRARY_FOUND TRUE) + endif() + + # adapted from cmake's builtin FindPythonLibs + if(APPLE) + cmake_find_frameworks(Python) + set(PYTHON_FRAMEWORK_INCLUDES) + if(Python_FRAMEWORKS) + # If a framework has been selected for the include path, + # make sure "-framework" is used to link it. + if("${PYTHON_INCLUDE_PATH}" MATCHES "Python\\.framework") + set(PYTHON_LIBRARY "") + set(PYTHON_DEBUG_LIBRARY "") + endif() + if(NOT PYTHON_LIBRARY) + set (PYTHON_LIBRARY "-framework Python" CACHE FILEPATH "Python Framework" FORCE) + endif() + set(PYTHONLIBRARY_FOUND TRUE) + endif() + endif() + endif() + + if(PYTHONLIBRARY_FOUND) + set(PYTHON_LIBRARIES ${PYTHON_LIBRARY}) + if(NOT PYTHONLIBRARY_FIND_QUIETLY) + message(STATUS "Found Python executable: ${PYTHON_EXECUTABLE}") + message(STATUS "Found Python version: ${PYTHON_LONG_VERSION}") + message(STATUS "Found Python library: ${PYTHON_LIBRARY}") + endif() + else() + if(PYTHONLIBRARY_FIND_REQUIRED) + message(FATAL_ERROR "Could not find Python") + endif() + endif() + +endif (EXISTS PYTHON_LIBRARY) diff --git a/deps/extra-cmake-modules/attic/modules/FindQCA2.cmake b/deps/extra-cmake-modules/attic/modules/FindQCA2.cmake new file mode 100644 index 0000000..e2d8f2a --- /dev/null +++ b/deps/extra-cmake-modules/attic/modules/FindQCA2.cmake @@ -0,0 +1,48 @@ +# - Try to find QCA2 (Qt Cryptography Architecture 2) +# Once done this will define +# +# QCA2_FOUND - system has QCA2 +# QCA2_INCLUDE_DIR - the QCA2 include directory +# QCA2_LIBRARIES - the libraries needed to use QCA2 +# QCA2_DEFINITIONS - Compiler switches required for using QCA2 +# +# use pkg-config to get the directories and then use these values +# in the FIND_PATH() and FIND_LIBRARY() calls + +# Copyright (c) 2006, Michael Larouche, +# +# Redistribution and use is allowed according to the terms of the BSD license. +# For details see the accompanying COPYING-CMAKE-SCRIPTS file. + +include(FindLibraryWithDebug) + +if (QCA2_INCLUDE_DIR AND QCA2_LIBRARIES) + + # in cache already + set(QCA2_FOUND TRUE) + +else (QCA2_INCLUDE_DIR AND QCA2_LIBRARIES) + + + if (NOT WIN32) + find_package(PkgConfig) + pkg_check_modules(PC_QCA2 QUIET qca2) + set(QCA2_DEFINITIONS ${PC_QCA2_CFLAGS_OTHER}) + endif (NOT WIN32) + + find_library_with_debug(QCA2_LIBRARIES + WIN32_DEBUG_POSTFIX d + NAMES qca + HINTS ${PC_QCA2_LIBDIR} ${PC_QCA2_LIBRARY_DIRS} + ) + + find_path(QCA2_INCLUDE_DIR QtCrypto + HINTS ${PC_QCA2_INCLUDEDIR} ${PC_QCA2_INCLUDE_DIRS} + PATH_SUFFIXES QtCrypto) + + include(FindPackageHandleStandardArgs) + find_package_handle_standard_args(QCA2 DEFAULT_MSG QCA2_LIBRARIES QCA2_INCLUDE_DIR) + + mark_as_advanced(QCA2_INCLUDE_DIR QCA2_LIBRARIES) + +endif (QCA2_INCLUDE_DIR AND QCA2_LIBRARIES) diff --git a/deps/extra-cmake-modules/attic/modules/FindQImageBlitz.cmake b/deps/extra-cmake-modules/attic/modules/FindQImageBlitz.cmake new file mode 100644 index 0000000..1b34741 --- /dev/null +++ b/deps/extra-cmake-modules/attic/modules/FindQImageBlitz.cmake @@ -0,0 +1,51 @@ +# - Try to find the qimageblitz lib +# Once done this will define +# +# QIMAGEBLITZ_FOUND - system has qimageblitz lib +# QIMAGEBLITZ_INCLUDES - the qimageblitz include directory +# QIMAGEBLITZ_LIBRARIES - The libraries needed to use qimageblitz + +# Copyright (c) 2006, Montel Laurent, +# Copyright (c) 2007, Allen Winter, +# Redistribution and use is allowed according to the terms of the BSD license. +# For details see the accompanying COPYING-CMAKE-SCRIPTS file. + +include(FindLibraryWithDebug) + +if (QIMAGEBLITZ_INCLUDES AND QIMAGEBLITZ_LIBRARIES) + set(QImageBlitz_FIND_QUIETLY TRUE) +endif (QIMAGEBLITZ_INCLUDES AND QIMAGEBLITZ_LIBRARIES) + +if (NOT WIN32) + # use pkg-config to get the directories and then use these values + # in the FIND_PATH() and FIND_LIBRARY() calls + find_package(PkgConfig) + pkg_check_modules(PC_QIMAGEBLITZ QUIET qimageblitz) +endif (NOT WIN32) + +find_path(QIMAGEBLITZ_INCLUDES + NAMES + qimageblitz.h + PATH_SUFFIXES qimageblitz + HINTS + $ENV{QIMAGEBLITZDIR}/include + ${PC_QIMAGEBLITZ_INCLUDEDIR} + ${KDE4_INCLUDE_DIR} + ${INCLUDE_INSTALL_DIR} +) + +find_library_with_debug(QIMAGEBLITZ_LIBRARIES + WIN32_DEBUG_POSTFIX d + qimageblitz + HINTS + $ENV{QIMAGEBLITZDIR}/lib + ${PC_QIMAGEBLITZ_LIBDIR} + ${KDE4_LIB_DIR} + ${LIB_INSTALL_DIR} +) + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(QImageBlitz DEFAULT_MSG + QIMAGEBLITZ_INCLUDES QIMAGEBLITZ_LIBRARIES) + +mark_as_advanced(QIMAGEBLITZ_INCLUDES QIMAGEBLITZ_LIBRARIES) diff --git a/deps/extra-cmake-modules/attic/modules/FindQt4.cmake b/deps/extra-cmake-modules/attic/modules/FindQt4.cmake new file mode 100644 index 0000000..f501f35 --- /dev/null +++ b/deps/extra-cmake-modules/attic/modules/FindQt4.cmake @@ -0,0 +1,1272 @@ +# - Find QT 4 +# This module can be used to find Qt4. +# The most important issue is that the Qt4 qmake is available via the system path. +# This qmake is then used to detect basically everything else. +# This module defines a number of key variables and macros. +# The variable QT_USE_FILE is set which is the path to a CMake file that can be included +# to compile Qt 4 applications and libraries. It sets up the compilation +# environment for include directories, preprocessor defines and populates a +# QT_LIBRARIES variable. +# +# Typical usage could be something like: +# find_package(Qt4 4.4.3 COMPONENTS QtCore QtGui QtXml REQUIRED ) +# include(${QT_USE_FILE}) +# add_executable(myexe main.cpp) +# target_link_libraries(myexe ${QT_LIBRARIES}) +# +# The minimum required version can be specified using the standard find_package()-syntax +# (see example above). +# For compatibility with older versions of FindQt4.cmake it is also possible to +# set the variable QT_MIN_VERSION to the minimum required version of Qt4 before the +# find_package(Qt4) command. +# If both are used, the version used in the find_package() command overrides the +# one from QT_MIN_VERSION. +# +# When using the components argument, QT_USE_QT* variables are automatically set +# for the QT_USE_FILE to pick up. If one wishes to manually set them, the +# available ones to set include: +# QT_DONT_USE_QTCORE +# QT_DONT_USE_QTGUI +# QT_USE_QT3SUPPORT +# QT_USE_QTASSISTANT +# QT_USE_QAXCONTAINER +# QT_USE_QAXSERVER +# QT_USE_QTDESIGNER +# QT_USE_QTMOTIF +# QT_USE_QTMAIN +# QT_USE_QTMULTIMEDIA +# QT_USE_QTNETWORK +# QT_USE_QTNSPLUGIN +# QT_USE_QTOPENGL +# QT_USE_QTSQL +# QT_USE_QTXML +# QT_USE_QTSVG +# QT_USE_QTTEST +# QT_USE_QTUITOOLS +# QT_USE_QTDBUS +# QT_USE_QTSCRIPT +# QT_USE_QTASSISTANTCLIENT +# QT_USE_QTHELP +# QT_USE_QTWEBKIT +# QT_USE_QTXMLPATTERNS +# QT_USE_PHONON +# QT_USE_QTSCRIPTTOOLS +# QT_USE_QTDECLARATIVE +# +# QT_USE_IMPORTED_TARGETS +# If this variable is set to TRUE, FindQt4.cmake will create imported +# library targets for the various Qt libraries and set the +# library variables like QT_QTCORE_LIBRARY to point at these imported +# targets instead of the library file on disk. This provides much better +# handling of the release and debug versions of the Qt libraries and is +# also always backwards compatible, except for the case that dependencies +# of libraries are exported, these will then also list the names of the +# imported targets as dependency and not the file location on disk. This +# is much more flexible, but requires that FindQt4.cmake is executed before +# such an exported dependency file is processed. +# +# There are also some files that need processing by some Qt tools such as moc +# and uic. Listed below are macros that may be used to process those files. +# +# macro QT4_WRAP_CPP(outfiles inputfile ... OPTIONS ...) +# create moc code from a list of files containing Qt class with +# the Q_OBJECT declaration. Per-direcotry preprocessor definitions +# are also added. Options may be given to moc, such as those found +# when executing "moc -help". +# +# macro QT4_WRAP_UI(outfiles inputfile ... OPTIONS ...) +# create code from a list of Qt designer ui files. +# Options may be given to uic, such as those found +# when executing "uic -help" +# +# macro QT4_ADD_RESOURCES(outfiles inputfile ... OPTIONS ...) +# create code from a list of Qt resource files. +# Options may be given to rcc, such as those found +# when executing "rcc -help" +# +# macro QT4_GENERATE_MOC(inputfile outputfile ) +# creates a rule to run moc on infile and create outfile. +# Use this if for some reason QT4_WRAP_CPP() isn't appropriate, e.g. +# because you need a custom filename for the moc file or something similar. +# +# macro QT4_AUTOMOC(sourcefile1 sourcefile2 ... ) +# This macro is still experimental. +# It can be used to have moc automatically handled. +# So if you have the files foo.h and foo.cpp, and in foo.h a +# a class uses the Q_OBJECT macro, moc has to run on it. If you don't +# want to use QT4_WRAP_CPP() (which is reliable and mature), you can insert +# #include "foo.moc" +# in foo.cpp and then give foo.cpp as argument to QT4_AUTOMOC(). This will the +# scan all listed files at cmake-time for such included moc files and if it finds +# them cause a rule to be generated to run moc at build time on the +# accompanying header file foo.h. +# If a source file has the SKIP_AUTOMOC property set it will be ignored by this macro. +# +# macro QT4_ADD_DBUS_INTERFACE(outfiles interface basename) +# create a the interface header and implementation files with the +# given basename from the given interface xml file and add it to +# the list of sources. +# To disable generating a namespace header, set the source file property +# NO_NAMESPACE to TRUE on the interface file. +# To include a header in the interface header, set the source file property +# INCLUDE to the name of the header. +# To specify a class name to use, set the source file property CLASSNAME +# to the name of the class. +# +# macro QT4_ADD_DBUS_INTERFACES(outfiles inputfile ... ) +# create the interface header and implementation files +# for all listed interface xml files +# the name will be automatically determined from the name of the xml file +# To disable generating namespace headers, set the source file property +# NO_NAMESPACE to TRUE for these inputfiles. +# To include a header in the interface header, set the source file property +# INCLUDE to the name of the header. +# To specify a class name to use, set the source file property CLASSNAME +# to the name of the class. +# +# macro QT4_ADD_DBUS_ADAPTOR(outfiles xmlfile parentheader parentclassname [basename] [classname]) +# create a dbus adaptor (header and implementation file) from the xml file +# describing the interface, and add it to the list of sources. The adaptor +# forwards the calls to a parent class, defined in parentheader and named +# parentclassname. The name of the generated files will be +# adaptor.{cpp,h} where basename defaults to the basename of the xml file. +# If is provided, then it will be used as the classname of the +# adaptor itself. +# +# macro QT4_GENERATE_DBUS_INTERFACE( header [interfacename] OPTIONS ...) +# generate the xml interface file from the given header. +# If the optional argument interfacename is omitted, the name of the +# interface file is constructed from the basename of the header with +# the suffix .xml appended. +# Options may be given to qdbuscpp2xml, such as those found when executing "qdbuscpp2xml --help" +# +# macro QT4_CREATE_TRANSLATION( qm_files directories ... sources ... +# ts_files ... OPTIONS ...) +# out: qm_files +# in: directories sources ts_files +# options: flags to pass to lupdate, such as -extensions to specify +# extensions for a directory scan. +# generates commands to create .ts (vie lupdate) and .qm +# (via lrelease) - files from directories and/or sources. The ts files are +# created and/or updated in the source tree (unless given with full paths). +# The qm files are generated in the build tree. +# Updating the translations can be done by adding the qm_files +# to the source list of your library/executable, so they are +# always updated, or by adding a custom target to control when +# they get updated/generated. +# +# macro QT4_ADD_TRANSLATION( qm_files ts_files ... ) +# out: qm_files +# in: ts_files +# generates commands to create .qm from .ts - files. The generated +# filenames can be found in qm_files. The ts_files +# must exists and are not updated in any way. +# +# +# Below is a detailed list of variables that FindQt4.cmake sets. +# QT_FOUND If false, don't try to use Qt. +# QT4_FOUND If false, don't try to use Qt 4. +# +# QT_VERSION_MAJOR The major version of Qt found. +# QT_VERSION_MINOR The minor version of Qt found. +# QT_VERSION_PATCH The patch version of Qt found. +# +# QT_EDITION Set to the edition of Qt (i.e. DesktopLight) +# QT_EDITION_DESKTOPLIGHT True if QT_EDITION == DesktopLight +# QT_QTCORE_FOUND True if QtCore was found. +# QT_QTGUI_FOUND True if QtGui was found. +# QT_QT3SUPPORT_FOUND True if Qt3Support was found. +# QT_QTASSISTANT_FOUND True if QtAssistant was found. +# QT_QTASSISTANTCLIENT_FOUND True if QtAssistantClient was found. +# QT_QAXCONTAINER_FOUND True if QAxContainer was found (Windows only). +# QT_QAXSERVER_FOUND True if QAxServer was found (Windows only). +# QT_QTDBUS_FOUND True if QtDBus was found. +# QT_QTDESIGNER_FOUND True if QtDesigner was found. +# QT_QTDESIGNERCOMPONENTS True if QtDesignerComponents was found. +# QT_QTHELP_FOUND True if QtHelp was found. +# QT_QTMOTIF_FOUND True if QtMotif was found. +# QT_QTMULTIMEDIA_FOUND True if QtMultimedia was found (since Qt 4.6.0). +# QT_QTNETWORK_FOUND True if QtNetwork was found. +# QT_QTNSPLUGIN_FOUND True if QtNsPlugin was found. +# QT_QTOPENGL_FOUND True if QtOpenGL was found. +# QT_QTSQL_FOUND True if QtSql was found. +# QT_QTSVG_FOUND True if QtSvg was found. +# QT_QTSCRIPT_FOUND True if QtScript was found. +# QT_QTSCRIPTTOOLS_FOUND True if QtScriptTools was found. +# QT_QTTEST_FOUND True if QtTest was found. +# QT_QTUITOOLS_FOUND True if QtUiTools was found. +# QT_QTWEBKIT_FOUND True if QtWebKit was found. +# QT_QTXML_FOUND True if QtXml was found. +# QT_QTXMLPATTERNS_FOUND True if QtXmlPatterns was found. +# QT_PHONON_FOUND True if phonon was found. +# QT_QTDECLARATIVE_FOUND True if QtDeclarative was found. +# +# QT_MAC_USE_COCOA For Mac OS X, its whether Cocoa or Carbon is used. +# In general, this should not be used, but its useful +# when having platform specific code. +# +# QT_DEFINITIONS Definitions to use when compiling code that uses Qt. +# You do not need to use this if you include QT_USE_FILE. +# The QT_USE_FILE will also define QT_DEBUG and QT_NO_DEBUG +# to fit your current build type. Those are not contained +# in QT_DEFINITIONS. +# +# QT_INCLUDES List of paths to all include directories of +# Qt4 QT_INCLUDE_DIR and QT_QTCORE_INCLUDE_DIR are +# always in this variable even if NOTFOUND, +# all other INCLUDE_DIRS are +# only added if they are found. +# You do not need to use this if you include QT_USE_FILE. +# +# +# Include directories for the Qt modules are listed here. +# You do not need to use these variables if you include QT_USE_FILE. +# +# QT_INCLUDE_DIR Path to "include" of Qt4 +# QT_QT_INCLUDE_DIR Path to "include/Qt" +# QT_QT3SUPPORT_INCLUDE_DIR Path to "include/Qt3Support" +# QT_QTASSISTANT_INCLUDE_DIR Path to "include/QtAssistant" +# QT_QTASSISTANTCLIENT_INCLUDE_DIR Path to "include/QtAssistant" +# QT_QAXCONTAINER_INCLUDE_DIR Path to "include/ActiveQt" (Windows only) +# QT_QAXSERVER_INCLUDE_DIR Path to "include/ActiveQt" (Windows only) +# QT_QTCORE_INCLUDE_DIR Path to "include/QtCore" +# QT_QTDBUS_INCLUDE_DIR Path to "include/QtDBus" +# QT_QTDESIGNER_INCLUDE_DIR Path to "include/QtDesigner" +# QT_QTDESIGNERCOMPONENTS_INCLUDE_DIR Path to "include/QtDesigner" +# QT_QTGUI_INCLUDE_DIR Path to "include/QtGui" +# QT_QTHELP_INCLUDE_DIR Path to "include/QtHelp" +# QT_QTMOTIF_INCLUDE_DIR Path to "include/QtMotif" +# QT_QTMULTIMEDIA_INCLUDE_DIR Path to "include/QtMultimedia" +# QT_QTNETWORK_INCLUDE_DIR Path to "include/QtNetwork" +# QT_QTNSPLUGIN_INCLUDE_DIR Path to "include/QtNsPlugin" +# QT_QTOPENGL_INCLUDE_DIR Path to "include/QtOpenGL" +# QT_QTSCRIPT_INCLUDE_DIR Path to "include/QtScript" +# QT_QTSQL_INCLUDE_DIR Path to "include/QtSql" +# QT_QTSVG_INCLUDE_DIR Path to "include/QtSvg" +# QT_QTTEST_INCLUDE_DIR Path to "include/QtTest" +# QT_QTWEBKIT_INCLUDE_DIR Path to "include/QtWebKit" +# QT_QTXML_INCLUDE_DIR Path to "include/QtXml" +# QT_QTXMLPATTERNS_INCLUDE_DIR Path to "include/QtXmlPatterns" +# QT_PHONON_INCLUDE_DIR Path to "include/phonon" +# QT_QTSCRIPTTOOLS_INCLUDE_DIR Path to "include/QtScriptTools" +# QT_QTDECLARATIVE_INCLUDE_DIR Path to "include/QtDeclarative" +# +# QT_BINARY_DIR Path to "bin" of Qt4 +# QT_LIBRARY_DIR Path to "lib" of Qt4 +# QT_PLUGINS_DIR Path to "plugins" for Qt4 +# QT_TRANSLATIONS_DIR Path to "translations" of Qt4 +# QT_IMPORTS_DIR Path to "imports" of Qt4 +# QT_DOC_DIR Path to "doc" of Qt4 +# QT_MKSPECS_DIR Path to "mkspecs" of Qt4 +# +# +# For every library of Qt, a QT_QTFOO_LIBRARY variable is defined, with the full path to the library. +# +# So there are the following variables: +# The Qt3Support library: QT_QT3SUPPORT_LIBRARY +# +# The QtAssistant library: QT_QTASSISTANT_LIBRARY +# +# The QtAssistantClient library: QT_QTASSISTANTCLIENT_LIBRARY +# +# The QAxServer library: QT_QAXSERVER_LIBRARY +# +# The QAxContainer library: QT_QAXCONTAINER_LIBRARY +# +# The QtCore library: QT_QTCORE_LIBRARY +# +# The QtDBus library: QT_QTDBUS_LIBRARY +# +# The QtDesigner library: QT_QTDESIGNER_LIBRARY +# +# The QtDesignerComponents library: QT_QTDESIGNERCOMPONENTS_LIBRARY +# +# The QtGui library: QT_QTGUI_LIBRARY +# +# The QtHelp library: QT_QTHELP_LIBRARY +# +# The QtMotif library: QT_QTMOTIF_LIBRARY +# +# The QtMultimedia library: QT_QTMULTIMEDIA_LIBRARY +# +# The QtNetwork library: QT_QTNETWORK_LIBRARY +# +# The QtNsPLugin library: QT_QTNSPLUGIN_LIBRARY +# +# The QtOpenGL library: QT_QTOPENGL_LIBRARY +# +# The QtScript library: QT_QTSCRIPT_LIBRARY +# +# The QtScriptTools library: QT_QTSCRIPTTOOLS_LIBRARY +# +# The QtSql library: QT_QTSQL_LIBRARY +# +# The QtSvg library: QT_QTSVG_LIBRARY +# +# The QtTest library: QT_QTTEST_LIBRARY +# +# The QtUiTools library: QT_QTUITOOLS_LIBRARY +# +# The QtWebKit library: QT_QTWEBKIT_LIBRARY +# +# The QtXml library: QT_QTXML_LIBRARY +# +# The QtXmlPatterns library: QT_QTXMLPATTERNS_LIBRARY +# +# The qtmain library for Windows QT_QTMAIN_LIBRARY +# +# The Phonon library: QT_PHONON_LIBRARY +# +# The QtDeclarative library: QT_QTDECLARATIVE_LIBRARY +# +# also defined, but NOT for general use are +# QT_MOC_EXECUTABLE Where to find the moc tool. +# QT_UIC_EXECUTABLE Where to find the uic tool. +# QT_UIC3_EXECUTABLE Where to find the uic3 tool. +# QT_RCC_EXECUTABLE Where to find the rcc tool +# QT_DBUSCPP2XML_EXECUTABLE Where to find the qdbuscpp2xml tool. +# QT_DBUSXML2CPP_EXECUTABLE Where to find the qdbusxml2cpp tool. +# QT_LUPDATE_EXECUTABLE Where to find the lupdate tool. +# QT_LRELEASE_EXECUTABLE Where to find the lrelease tool. +# QT_QCOLLECTIONGENERATOR_EXECUTABLE Where to find the qcollectiongenerator tool. +# QT_DESIGNER_EXECUTABLE Where to find the Qt designer tool. +# QT_LINGUIST_EXECUTABLE Where to find the Qt linguist tool. +# +# +# These are around for backwards compatibility +# they will be set +# QT_WRAP_CPP Set true if QT_MOC_EXECUTABLE is found +# QT_WRAP_UI Set true if QT_UIC_EXECUTABLE is found +# +# These variables do _NOT_ have any effect anymore (compared to FindQt.cmake) +# QT_MT_REQUIRED Qt4 is now always multithreaded +# +# These variables are set to "" Because Qt structure changed +# (They make no sense in Qt4) +# QT_QT_LIBRARY Qt-Library is now split + +# Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. +# See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + +# Use FIND_PACKAGE( Qt4 COMPONENTS ... ) to enable modules +IF( Qt4_FIND_COMPONENTS ) + FOREACH( component ${Qt4_FIND_COMPONENTS} ) + STRING( TOUPPER ${component} _COMPONENT ) + SET( QT_USE_${_COMPONENT} 1 ) + ENDFOREACH( component ) + + # To make sure we don't use QtCore or QtGui when not in COMPONENTS + IF(NOT QT_USE_QTCORE) + SET( QT_DONT_USE_QTCORE 1 ) + ENDIF(NOT QT_USE_QTCORE) + + IF(NOT QT_USE_QTGUI) + SET( QT_DONT_USE_QTGUI 1 ) + ENDIF(NOT QT_USE_QTGUI) + +ENDIF( Qt4_FIND_COMPONENTS ) + +# 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. If switching to Qt4, the CMakeCache.txt needs to be cleaned.") + ELSE(Qt4_FIND_REQUIRED) + IF(NOT Qt4_FIND_QUIETLY) + MESSAGE( STATUS "Qt3 and Qt4 cannot be used together in one project. If switching to Qt4, the CMakeCache.txt needs to be cleaned.") + ENDIF(NOT Qt4_FIND_QUIETLY) + RETURN() + ENDIF(Qt4_FIND_REQUIRED) +ENDIF(QT_QT_LIBRARY) + +function(_QT4_QUERY_QMAKE VAR RESULT) + exec_program(${QT_QMAKE_EXECUTABLE} ARGS "-query ${VAR}" RETURN_VALUE return_code OUTPUT_VARIABLE output ) + if(NOT return_code) + file(TO_CMAKE_PATH "${output}" output) + set(${RESULT} ${output} PARENT_SCOPE) + endif() +endfunction(_QT4_QUERY_QMAKE) + + +IF (QT4_QMAKE_FOUND AND Qt4::QtCore) + # Check already done in this cmake run, nothing more to do + RETURN() +ENDIF (QT4_QMAKE_FOUND AND Qt4::QtCore) + +# check that QT_NO_DEBUG is defined for release configurations +MACRO(QT_CHECK_FLAG_EXISTS FLAG VAR DOC) + IF(NOT ${VAR} MATCHES "${FLAG}") + SET(${VAR} "${${VAR}} ${FLAG}" + CACHE STRING "Flags used by the compiler during ${DOC} builds." FORCE) + ENDIF(NOT ${VAR} MATCHES "${FLAG}") +ENDMACRO(QT_CHECK_FLAG_EXISTS FLAG VAR) + +QT_CHECK_FLAG_EXISTS(-DQT_NO_DEBUG CMAKE_CXX_FLAGS_RELWITHDEBINFO "Release with Debug Info") +QT_CHECK_FLAG_EXISTS(-DQT_NO_DEBUG CMAKE_CXX_FLAGS_RELEASE "release") +QT_CHECK_FLAG_EXISTS(-DQT_NO_DEBUG CMAKE_CXX_FLAGS_MINSIZEREL "release minsize") + +INCLUDE(MacroPushRequiredVars) +INCLUDE(CheckSymbolExists) +INCLUDE(MacroAddFileDependencies) + +SET(QT_USE_FILE ${CMAKE_ROOT}/Modules/UseQt4.cmake) + +SET( QT_DEFINITIONS "") + +SET(QT4_INSTALLED_VERSION_TOO_OLD FALSE) + +# macro for asking qmake to process pro files +MACRO(QT_QUERY_QMAKE outvar invar) + IF(QT_QMAKE_EXECUTABLE) + FILE(WRITE ${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmpQmake/tmp.pro + "message(CMAKE_MESSAGE<$$${invar}>)") + + # Invoke qmake with the tmp.pro program to get the desired + # information. Use the same variable for both stdout and stderr + # to make sure we get the output on all platforms. + EXECUTE_PROCESS(COMMAND ${QT_QMAKE_EXECUTABLE} + WORKING_DIRECTORY + ${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmpQmake + OUTPUT_VARIABLE _qmake_query_output + RESULT_VARIABLE _qmake_result + ERROR_VARIABLE _qmake_query_output ) + + FILE(REMOVE_RECURSE + "${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmpQmake") + + IF(_qmake_result) + MESSAGE(WARNING " querying qmake for ${invar}. qmake reported:\n${_qmake_query_output}") + ELSE(_qmake_result) + STRING(REGEX REPLACE ".*CMAKE_MESSAGE<([^>]*).*" "\\1" ${outvar} "${_qmake_query_output}") + ENDIF(_qmake_result) + + ENDIF(QT_QMAKE_EXECUTABLE) +ENDMACRO(QT_QUERY_QMAKE) + +GET_FILENAME_COMPONENT(qt_install_version "[HKEY_CURRENT_USER\\Software\\trolltech\\Versions;DefaultQtVersion]" NAME) +# check for qmake +# Debian uses qmake-qt4 +# macports' Qt uses qmake-mac +FIND_PROGRAM(QT_QMAKE_EXECUTABLE NAMES qmake qmake4 qmake-qt4 qmake-mac PATHS + "[HKEY_CURRENT_USER\\Software\\Trolltech\\Qt3Versions\\4.0.0;InstallDir]/bin" + "[HKEY_CURRENT_USER\\Software\\Trolltech\\Versions\\4.0.0;InstallDir]/bin" + "[HKEY_CURRENT_USER\\Software\\Trolltech\\Versions\\${qt_install_version};InstallDir]/bin" + $ENV{QTDIR}/bin + DOC "The qmake executable for the Qt installation to use" +) + +IF (QT_QMAKE_EXECUTABLE) + + IF(QT_QMAKE_EXECUTABLE_LAST) + STRING(COMPARE NOTEQUAL "${QT_QMAKE_EXECUTABLE_LAST}" "${QT_QMAKE_EXECUTABLE}" QT_QMAKE_CHANGED) + ENDIF(QT_QMAKE_EXECUTABLE_LAST) + + SET(QT_QMAKE_EXECUTABLE_LAST "${QT_QMAKE_EXECUTABLE}" CACHE INTERNAL "" FORCE) + + SET(QT4_QMAKE_FOUND FALSE) + + _qt4_query_qmake(QT_VERSION QTVERSION) + + # check for qt3 qmake and then try and find qmake4 or qmake-qt4 in the path + IF(NOT QTVERSION) + SET(QT_QMAKE_EXECUTABLE NOTFOUND CACHE FILEPATH "" FORCE) + FIND_PROGRAM(QT_QMAKE_EXECUTABLE NAMES qmake4 qmake-qt4 PATHS + "[HKEY_CURRENT_USER\\Software\\Trolltech\\Qt3Versions\\4.0.0;InstallDir]/bin" + "[HKEY_CURRENT_USER\\Software\\Trolltech\\Versions\\4.0.0;InstallDir]/bin" + $ENV{QTDIR}/bin + DOC "The qmake executable for the Qt installation to use" + ) + IF(QT_QMAKE_EXECUTABLE) + _qt4_query_qmake(QT_VERSION QTVERSION) + ENDIF(QT_QMAKE_EXECUTABLE) + ENDIF(NOT QTVERSION) + + # check that we found the Qt4 qmake, Qt3 qmake output won't match here + STRING(REGEX MATCH "^[0-9]+\\.[0-9]+\\.[0-9]+" qt_version_tmp "${QTVERSION}") + IF (qt_version_tmp) + + # we need at least version 4.0.0 + IF (NOT QT_MIN_VERSION) + SET(QT_MIN_VERSION "4.0.0") + ENDIF (NOT QT_MIN_VERSION) + + #now parse the parts of the user given version string into variables + STRING(REGEX MATCH "^[0-9]+\\.[0-9]+\\.[0-9]+" req_qt_major_vers "${QT_MIN_VERSION}") + IF (NOT req_qt_major_vers) + MESSAGE( FATAL_ERROR "Invalid Qt version string given: \"${QT_MIN_VERSION}\", expected e.g. \"4.0.1\"") + ENDIF (NOT req_qt_major_vers) + + # now parse the parts of the user given version string into variables + STRING(REGEX REPLACE "^([0-9]+)\\.[0-9]+\\.[0-9]+" "\\1" req_qt_major_vers "${QT_MIN_VERSION}") + STRING(REGEX REPLACE "^[0-9]+\\.([0-9])+\\.[0-9]+" "\\1" req_qt_minor_vers "${QT_MIN_VERSION}") + STRING(REGEX REPLACE "^[0-9]+\\.[0-9]+\\.([0-9]+)" "\\1" req_qt_patch_vers "${QT_MIN_VERSION}") + + # Suppport finding at least a particular version, for instance FIND_PACKAGE( Qt4 4.4.3 ) + # This implementation is a hack to avoid duplicating code and make sure we stay + # source-compatible with CMake 2.6.x + IF( Qt4_FIND_VERSION ) + SET( QT_MIN_VERSION ${Qt4_FIND_VERSION} ) + SET( req_qt_major_vers ${Qt4_FIND_VERSION_MAJOR} ) + SET( req_qt_minor_vers ${Qt4_FIND_VERSION_MINOR} ) + SET( req_qt_patch_vers ${Qt4_FIND_VERSION_PATCH} ) + ENDIF( Qt4_FIND_VERSION ) + + IF (NOT req_qt_major_vers EQUAL 4) + MESSAGE( FATAL_ERROR "Invalid Qt version string given: \"${QT_MIN_VERSION}\", major version 4 is required, e.g. \"4.0.1\"") + ENDIF (NOT req_qt_major_vers EQUAL 4) + + # and now the version string given by qmake + STRING(REGEX REPLACE "^([0-9]+)\\.[0-9]+\\.[0-9]+.*" "\\1" QT_VERSION_MAJOR "${QTVERSION}") + STRING(REGEX REPLACE "^[0-9]+\\.([0-9])+\\.[0-9]+.*" "\\1" QT_VERSION_MINOR "${QTVERSION}") + STRING(REGEX REPLACE "^[0-9]+\\.[0-9]+\\.([0-9]+).*" "\\1" QT_VERSION_PATCH "${QTVERSION}") + + # compute an overall version number which can be compared at once + MATH(EXPR req_vers "${req_qt_major_vers}*10000 + ${req_qt_minor_vers}*100 + ${req_qt_patch_vers}") + MATH(EXPR found_vers "${QT_VERSION_MAJOR}*10000 + ${QT_VERSION_MINOR}*100 + ${QT_VERSION_PATCH}") + + # Support finding *exactly* a particular version, for instance FIND_PACKAGE( Qt4 4.4.3 EXACT ) + IF( Qt4_FIND_VERSION_EXACT ) + IF(found_vers EQUAL req_vers) + SET( QT4_QMAKE_FOUND TRUE ) + ELSE(found_vers EQUAL req_vers) + SET( QT4_QMAKE_FOUND FALSE ) + IF (found_vers LESS req_vers) + SET(QT4_INSTALLED_VERSION_TOO_OLD TRUE) + ELSE (found_vers LESS req_vers) + SET(QT4_INSTALLED_VERSION_TOO_NEW TRUE) + ENDIF (found_vers LESS req_vers) + ENDIF(found_vers EQUAL req_vers) + ELSE( Qt4_FIND_VERSION_EXACT ) + IF (found_vers LESS req_vers) + SET(QT4_QMAKE_FOUND FALSE) + SET(QT4_INSTALLED_VERSION_TOO_OLD TRUE) + ELSE (found_vers LESS req_vers) + SET(QT4_QMAKE_FOUND TRUE) + ENDIF (found_vers LESS req_vers) + ENDIF( Qt4_FIND_VERSION_EXACT ) + ENDIF (qt_version_tmp) + +ENDIF (QT_QMAKE_EXECUTABLE) + +IF (QT4_QMAKE_FOUND) + + if (WIN32) + # get qt install dir + get_filename_component(_DIR ${QT_QMAKE_EXECUTABLE} PATH ) + get_filename_component(QT_INSTALL_DIR ${_DIR} PATH ) + endif (WIN32) + + # ask qmake for the library dir + # Set QT_LIBRARY_DIR + IF (NOT QT_LIBRARY_DIR OR QT_QMAKE_CHANGED) + _qt4_query_qmake(QT_INSTALL_LIBS QT_LIBRARY_DIR_TMP) + IF(EXISTS "${QT_LIBRARY_DIR_TMP}") + SET(QT_LIBRARY_DIR ${QT_LIBRARY_DIR_TMP} CACHE PATH "Qt library dir" FORCE) + ELSE(EXISTS "${QT_LIBRARY_DIR_TMP}") + MESSAGE("Warning: QT_QMAKE_EXECUTABLE reported QT_INSTALL_LIBS as ${QT_LIBRARY_DIR_TMP}") + MESSAGE("Warning: ${QT_LIBRARY_DIR_TMP} does NOT exist, Qt must NOT be installed correctly.") + ENDIF(EXISTS "${QT_LIBRARY_DIR_TMP}") + ENDIF(NOT QT_LIBRARY_DIR OR QT_QMAKE_CHANGED) + + IF (APPLE) + IF (EXISTS ${QT_LIBRARY_DIR}/QtCore.framework) + SET(QT_USE_FRAMEWORKS ON + CACHE BOOL "Set to ON if Qt build uses frameworks." FORCE) + ELSE (EXISTS ${QT_LIBRARY_DIR}/QtCore.framework) + SET(QT_USE_FRAMEWORKS OFF + CACHE BOOL "Set to ON if Qt build uses frameworks." FORCE) + ENDIF (EXISTS ${QT_LIBRARY_DIR}/QtCore.framework) + + MARK_AS_ADVANCED(QT_USE_FRAMEWORKS) + ENDIF (APPLE) + + # ask qmake for the binary dir + IF (QT_LIBRARY_DIR AND NOT QT_BINARY_DIR OR QT_QMAKE_CHANGED) + _qt4_query_qmake(QT_INSTALL_BINS qt_bins) + SET(QT_BINARY_DIR ${qt_bins} CACHE INTERNAL "" FORCE) + ENDIF (QT_LIBRARY_DIR AND NOT QT_BINARY_DIR OR QT_QMAKE_CHANGED) + + # ask qmake for the include dir + IF (QT_LIBRARY_DIR AND NOT QT_HEADERS_DIR OR QT_QMAKE_CHANGED) + _qt4_query_qmake(QT_INSTALL_HEADERS qt_headers) + SET(QT_HEADERS_DIR ${qt_headers} CACHE INTERNAL "" FORCE) + ENDIF (QT_LIBRARY_DIR AND NOT QT_HEADERS_DIR OR QT_QMAKE_CHANGED) + + + # ask qmake for the documentation directory + IF (QT_LIBRARY_DIR AND NOT QT_DOC_DIR OR QT_QMAKE_CHANGED) + _qt4_query_qmake(QT_INSTALL_DOCS qt_doc_dir) + SET(QT_DOC_DIR ${qt_doc_dir} CACHE PATH "The location of the Qt docs" FORCE) + ENDIF (QT_LIBRARY_DIR AND NOT QT_DOC_DIR OR QT_QMAKE_CHANGED) + + # ask qmake for the mkspecs directory + IF (QT_LIBRARY_DIR AND NOT QT_MKSPECS_DIR OR QT_QMAKE_CHANGED) + _qt4_query_qmake(QMAKE_MKSPECS qt_mkspecs_dirs) + # do not replace : on windows as it might be a drive letter + # and windows should already use ; as a separator + IF(UNIX) + STRING(REPLACE ":" ";" qt_mkspecs_dirs "${qt_mkspecs_dirs}") + ENDIF(UNIX) + SET(QT_MKSPECS_DIR NOTFOUND) + FIND_PATH(QT_MKSPECS_DIR qconfig.pri PATHS ${qt_mkspecs_dirs} + DOC "The location of the Qt mkspecs containing qconfig.pri" + NO_DEFAULT_PATH ) + ENDIF (QT_LIBRARY_DIR AND NOT QT_MKSPECS_DIR OR QT_QMAKE_CHANGED) + + # ask qmake for the plugins directory + IF (QT_LIBRARY_DIR AND NOT QT_PLUGINS_DIR OR QT_QMAKE_CHANGED) + _qt4_query_qmake(QT_INSTALL_PLUGINS qt_plugins_dir) + SET(QT_PLUGINS_DIR ${qt_plugins_dir} CACHE PATH "The location of the Qt plugins" FORCE) + ENDIF (QT_LIBRARY_DIR AND NOT QT_PLUGINS_DIR OR QT_QMAKE_CHANGED) + + # ask qmake for the translations directory + IF (QT_LIBRARY_DIR AND NOT QT_TRANSLATIONS_DIR OR QT_QMAKE_CHANGED) + _qt4_query_qmake(QT_INSTALL_TRANSLATIONS qt_translations_dir) + SET(QT_TRANSLATIONS_DIR ${qt_translations_dir} CACHE PATH "The location of the Qt translations" FORCE) + ENDIF (QT_LIBRARY_DIR AND NOT QT_TRANSLATIONS_DIR OR QT_QMAKE_CHANGED) + + # ask qmake for the imports directory + IF (QT_LIBRARY_DIR AND NOT QT_IMPORTS_DIR OR QT_QMAKE_CHANGED) + _qt4_query_qmake(QT_INSTALL_IMPORTS qt_imports_dir) + if(qt_imports_dir) + SET(QT_IMPORTS_DIR NOTFOUND) + foreach(qt_cross_path ${CMAKE_FIND_ROOT_PATH}) + set(qt_cross_paths ${qt_cross_paths} "${qt_cross_path}/imports") + endforeach(qt_cross_path) + FIND_PATH(QT_IMPORTS_DIR NAMES Qt + HINTS ${qt_cross_paths} ${qt_imports_dir} + DOC "The location of the Qt imports" + NO_CMAKE_PATH NO_CMAKE_ENVIRONMENT_PATH NO_SYSTEM_ENVIRONMENT_PATH + NO_CMAKE_SYSTEM_PATH) + mark_as_advanced(QT_IMPORTS_DIR) + endif() + ENDIF (QT_LIBRARY_DIR AND NOT QT_IMPORTS_DIR OR QT_QMAKE_CHANGED) + + # Make variables changeble to the advanced user + MARK_AS_ADVANCED( QT_LIBRARY_DIR QT_DOC_DIR QT_MKSPECS_DIR + QT_PLUGINS_DIR QT_TRANSLATIONS_DIR) + + + ############################################# + # + # Find out what window system we're using + # + ############################################# + # Save required includes and required_flags variables + MACRO_PUSH_REQUIRED_VARS() + # Add QT_INCLUDE_DIR to CMAKE_REQUIRED_INCLUDES + SET(CMAKE_REQUIRED_INCLUDES "${CMAKE_REQUIRED_INCLUDES};${QT_HEADERS_DIR}") + # On Mac OS X when Qt has framework support, also add the framework path + IF( QT_USE_FRAMEWORKS ) + SET(CMAKE_REQUIRED_FLAGS "-F${QT_LIBRARY_DIR} ") + ENDIF( QT_USE_FRAMEWORKS ) + # Check for Window system symbols (note: only one should end up being set) + CHECK_SYMBOL_EXISTS(Q_WS_X11 "QtCore/qglobal.h" Q_WS_X11) + CHECK_SYMBOL_EXISTS(Q_WS_WIN "QtCore/qglobal.h" Q_WS_WIN) + CHECK_SYMBOL_EXISTS(Q_WS_QWS "QtCore/qglobal.h" Q_WS_QWS) + CHECK_SYMBOL_EXISTS(Q_WS_MAC "QtCore/qglobal.h" Q_WS_MAC) + IF(Q_WS_MAC) + IF(QT_QMAKE_CHANGED) + UNSET(QT_MAC_USE_COCOA CACHE) + ENDIF(QT_QMAKE_CHANGED) + CHECK_SYMBOL_EXISTS(QT_MAC_USE_COCOA "QtCore/qconfig.h" QT_MAC_USE_COCOA) + ENDIF(Q_WS_MAC) + + IF (QT_QTCOPY_REQUIRED) + CHECK_SYMBOL_EXISTS(QT_IS_QTCOPY "QtCore/qglobal.h" QT_KDE_QT_COPY) + IF (NOT QT_IS_QTCOPY) + MESSAGE(FATAL_ERROR "qt-copy is required, but hasn't been found") + ENDIF (NOT QT_IS_QTCOPY) + ENDIF (QT_QTCOPY_REQUIRED) + + # Restore CMAKE_REQUIRED_INCLUDES+CMAKE_REQUIRED_FLAGS variables + MACRO_POP_REQUIRED_VARS() + # + ############################################# + + + + ######################################## + # + # Setting the INCLUDE-Variables + # + ######################################## + + SET(QT_MODULES QtCore QtGui Qt3Support QtSvg QtScript QtTest QtUiTools + QtHelp QtWebKit QtXmlPatterns QtNetwork QtMultimedia + QtNsPlugin QtOpenGL QtSql QtXml QtDesigner QtDBus QtScriptTools + QtDeclarative) + + IF(Q_WS_X11) + SET(QT_MODULES ${QT_MODULES} QtMotif) + ENDIF(Q_WS_X11) + + IF(QT_QMAKE_CHANGED) + FOREACH(QT_MODULE ${QT_MODULES}) + STRING(TOUPPER ${QT_MODULE} _upper_qt_module) + SET(QT_${_upper_qt_module}_INCLUDE_DIR NOTFOUND) + SET(QT_${_upper_qt_module}_LIBRARY_RELEASE NOTFOUND) + SET(QT_${_upper_qt_module}_LIBRARY_DEBUG NOTFOUND) + ENDFOREACH(QT_MODULE) + SET(QT_QTDESIGNERCOMPONENTS_INCLUDE_DIR NOTFOUND) + SET(QT_QTDESIGNERCOMPONENTS_LIBRARY_RELEASE NOTFOUND) + SET(QT_QTDESIGNERCOMPONENTS_LIBRARY_DEBUG NOTFOUND) + SET(QT_QTASSISTANTCLIENT_INCLUDE_DIR NOTFOUND) + SET(QT_QTASSISTANTCLIENT_LIBRARY_RELEASE NOTFOUND) + SET(QT_QTASSISTANTCLIENT_LIBRARY_DEBUG NOTFOUND) + SET(QT_QTASSISTANT_INCLUDE_DIR NOTFOUND) + SET(QT_QTASSISTANT_LIBRARY_RELEASE NOTFOUND) + SET(QT_QTASSISTANT_LIBRARY_DEBUG NOTFOUND) + SET(QT_QTCLUCENE_LIBRARY_RELEASE NOTFOUND) + SET(QT_QTCLUCENE_LIBRARY_DEBUG NOTFOUND) + SET(QT_QAXCONTAINER_INCLUDE_DIR NOTFOUND) + SET(QT_QAXCONTAINER_LIBRARY_RELEASE NOTFOUND) + SET(QT_QAXCONTAINER_LIBRARY_DEBUG NOTFOUND) + SET(QT_QAXSERVER_INCLUDE_DIR NOTFOUND) + SET(QT_QAXSERVER_LIBRARY_RELEASE NOTFOUND) + SET(QT_QAXSERVER_LIBRARY_DEBUG NOTFOUND) + IF(WIN32) + SET(QT_QTMAIN_LIBRARY_DEBUG NOTFOUND) + SET(QT_QTMAIN_LIBRARY_RELEASE NOTFOUND) + ENDIF(WIN32) + SET(QT_PHONON_INCLUDE_DIR NOTFOUND) + ENDIF(QT_QMAKE_CHANGED) + + FOREACH(QT_MODULE ${QT_MODULES}) + STRING(TOUPPER ${QT_MODULE} _upper_qt_module) + FIND_PATH(QT_${_upper_qt_module}_INCLUDE_DIR ${QT_MODULE} + PATHS + ${QT_HEADERS_DIR}/${QT_MODULE} + ${QT_LIBRARY_DIR}/${QT_MODULE}.framework/Headers + NO_DEFAULT_PATH + ) + ENDFOREACH(QT_MODULE) + + IF(WIN32) + SET(QT_MODULES ${QT_MODULES} QAxContainer QAxServer) + # Set QT_AXCONTAINER_INCLUDE_DIR and QT_AXSERVER_INCLUDE_DIR + FIND_PATH(QT_QAXCONTAINER_INCLUDE_DIR ActiveQt + PATHS + ${QT_HEADERS_DIR}/ActiveQt + NO_DEFAULT_PATH + ) + FIND_PATH(QT_QAXSERVER_INCLUDE_DIR ActiveQt + PATHS + ${QT_HEADERS_DIR}/ActiveQt + NO_DEFAULT_PATH + ) + ENDIF(WIN32) + + # Set QT_QTDESIGNERCOMPONENTS_INCLUDE_DIR + FIND_PATH(QT_QTDESIGNERCOMPONENTS_INCLUDE_DIR QDesignerComponents + PATHS + ${QT_HEADERS_DIR}/QtDesigner + ${QT_LIBRARY_DIR}/QtDesigner.framework/Headers + NO_DEFAULT_PATH + ) + + # Set QT_QTASSISTANT_INCLUDE_DIR + FIND_PATH(QT_QTASSISTANT_INCLUDE_DIR QtAssistant + PATHS + ${QT_HEADERS_DIR}/QtAssistant + ${QT_LIBRARY_DIR}/QtAssistant.framework/Headers + NO_DEFAULT_PATH + ) + + # Set QT_QTASSISTANTCLIENT_INCLUDE_DIR + FIND_PATH(QT_QTASSISTANTCLIENT_INCLUDE_DIR QAssistantClient + PATHS + ${QT_HEADERS_DIR}/QtAssistant + ${QT_LIBRARY_DIR}/QtAssistant.framework/Headers + NO_DEFAULT_PATH + ) + + # Set QT_QT_INCLUDE_DIR + FIND_PATH(QT_QT_INCLUDE_DIR qglobal.h + PATHS + ${QT_HEADERS_DIR}/Qt + ${QT_LIBRARY_DIR}/QtCore.framework/Headers + NO_DEFAULT_PATH + ) + + # Set QT_PHONON_INCLUDE_DIR + # Qt >= 4.5.3 (or kde-qt-4.5.2 which has the fix too) : Phonon/ClassName is inside include/phonon + # With previous versions of Qt, this could not work; upgrade Qt or use a standalone phonon + FIND_PATH(QT_PHONON_INCLUDE_DIR Phonon + PATHS + ${QT_HEADERS_DIR}/phonon + NO_DEFAULT_PATH + ) + SET(QT_MODULES ${QT_MODULES} phonon) + + # Set QT_INCLUDE_DIR by removine "/QtCore" in the string ${QT_QTCORE_INCLUDE_DIR} + IF( QT_QTCORE_INCLUDE_DIR AND NOT QT_INCLUDE_DIR) + IF (QT_USE_FRAMEWORKS) + SET(QT_INCLUDE_DIR ${QT_HEADERS_DIR}) + ELSE (QT_USE_FRAMEWORKS) + STRING( REGEX REPLACE "/QtCore$" "" qt4_include_dir ${QT_QTCORE_INCLUDE_DIR}) + SET( QT_INCLUDE_DIR ${qt4_include_dir} CACHE PATH "") + ENDIF (QT_USE_FRAMEWORKS) + ENDIF( QT_QTCORE_INCLUDE_DIR AND NOT QT_INCLUDE_DIR) + + IF( NOT QT_INCLUDE_DIR) + IF(Qt4_FIND_REQUIRED) + MESSAGE( FATAL_ERROR "Could NOT find QtCore header") + ENDIF(Qt4_FIND_REQUIRED) + ENDIF( NOT QT_INCLUDE_DIR) + + # Make variables changeble to the advanced user + MARK_AS_ADVANCED( QT_INCLUDE_DIR QT_QT_INCLUDE_DIR) + + # Set QT_INCLUDES + SET( QT_INCLUDES ${QT_QT_INCLUDE_DIR} ${QT_MKSPECS_DIR}/default ${QT_INCLUDE_DIR} ) + + + ####################################### + # + # Qt configuration + # + ####################################### + IF(EXISTS "${QT_MKSPECS_DIR}/qconfig.pri") + FILE(READ ${QT_MKSPECS_DIR}/qconfig.pri _qconfig_FILE_contents) + STRING(REGEX MATCH "QT_CONFIG[^\n]+" QT_QCONFIG "${_qconfig_FILE_contents}") + STRING(REGEX MATCH "CONFIG[^\n]+" QT_CONFIG "${_qconfig_FILE_contents}") + STRING(REGEX MATCH "EDITION[^\n]+" QT_EDITION "${_qconfig_FILE_contents}") + STRING(REGEX MATCH "QT_LIBINFIX[^\n]+" _qconfig_qt_libinfix "${_qconfig_FILE_contents}") + STRING(REGEX REPLACE "QT_LIBINFIX *= *([^\n]*)" "\\1" QT_LIBINFIX "${_qconfig_qt_libinfix}") + ENDIF(EXISTS "${QT_MKSPECS_DIR}/qconfig.pri") + IF("${QT_EDITION}" MATCHES "DesktopLight") + SET(QT_EDITION_DESKTOPLIGHT 1) + ENDIF("${QT_EDITION}" MATCHES "DesktopLight") + + ######################################## + # + # Setting the LIBRARY-Variables + # + ######################################## + + # find the libraries + FOREACH(QT_MODULE ${QT_MODULES}) + STRING(TOUPPER ${QT_MODULE} _upper_qt_module) + FIND_LIBRARY(QT_${_upper_qt_module}_LIBRARY_RELEASE + NAMES ${QT_MODULE}${QT_LIBINFIX} ${QT_MODULE}${QT_LIBINFIX}4 + PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH + ) + FIND_LIBRARY(QT_${_upper_qt_module}_LIBRARY_DEBUG + NAMES ${QT_MODULE}${QT_LIBINFIX}_debug ${QT_MODULE}${QT_LIBINFIX}d ${QT_MODULE}${QT_LIBINFIX}d4 + PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH + ) + ENDFOREACH(QT_MODULE) + + # QtUiTools not with other frameworks with binary installation (in /usr/lib) + IF(Q_WS_MAC AND QT_QTCORE_LIBRARY_RELEASE AND NOT QT_QTUITOOLS_LIBRARY_RELEASE) + FIND_LIBRARY(QT_QTUITOOLS_LIBRARY_RELEASE NAMES QtUiTools${QT_LIBINFIX} PATHS ${QT_LIBRARY_DIR}) + ENDIF(Q_WS_MAC AND QT_QTCORE_LIBRARY_RELEASE AND NOT QT_QTUITOOLS_LIBRARY_RELEASE) + + IF( NOT QT_QTCORE_LIBRARY_DEBUG AND NOT QT_QTCORE_LIBRARY_RELEASE ) + + # try dropping a hint if trying to use Visual Studio with Qt built by mingw + IF(QT_LIBRARY_DIR AND MSVC) + IF(EXISTS ${QT_LIBRARY_DIR}/libqtmain.a) + MESSAGE( FATAL_ERROR "It appears you're trying to use Visual Studio with Qt built by mingw") + ENDIF(EXISTS ${QT_LIBRARY_DIR}/libqtmain.a) + ENDIF(QT_LIBRARY_DIR AND MSVC) + + IF(Qt4_FIND_REQUIRED) + MESSAGE( FATAL_ERROR "Could NOT find QtCore. Check ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log for more details.") + ENDIF(Qt4_FIND_REQUIRED) + ENDIF( NOT QT_QTCORE_LIBRARY_DEBUG AND NOT QT_QTCORE_LIBRARY_RELEASE ) + + # Set QT_QTDESIGNERCOMPONENTS_LIBRARY + FIND_LIBRARY(QT_QTDESIGNERCOMPONENTS_LIBRARY_RELEASE NAMES QtDesignerComponents${QT_LIBINFIX} QtDesignerComponents${QT_LIBINFIX}4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH) + FIND_LIBRARY(QT_QTDESIGNERCOMPONENTS_LIBRARY_DEBUG NAMES QtDesignerComponents${QT_LIBINFIX}_debug QtDesignerComponents${QT_LIBINFIX}d QtDesignerComponents${QT_LIBINFIX}d4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH) + + # Set QT_QTMAIN_LIBRARY + IF(WIN32) + FIND_LIBRARY(QT_QTMAIN_LIBRARY_RELEASE NAMES qtmain${QT_LIBINFIX} PATHS ${QT_LIBRARY_DIR} + NO_DEFAULT_PATH) + FIND_LIBRARY(QT_QTMAIN_LIBRARY_DEBUG NAMES qtmain${QT_LIBINFIX}d PATHS ${QT_LIBRARY_DIR} + NO_DEFAULT_PATH) + ENDIF(WIN32) + + # Set QT_QTASSISTANTCLIENT_LIBRARY + FIND_LIBRARY(QT_QTASSISTANTCLIENT_LIBRARY_RELEASE NAMES QtAssistantClient${QT_LIBINFIX} QtAssistantClient${QT_LIBINFIX}4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH) + FIND_LIBRARY(QT_QTASSISTANTCLIENT_LIBRARY_DEBUG NAMES QtAssistantClient${QT_LIBINFIX}_debug QtAssistantClient${QT_LIBINFIX}d QtAssistantClient${QT_LIBINFIX}d4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH) + + # Set QT_QTASSISTANT_LIBRARY + FIND_LIBRARY(QT_QTASSISTANT_LIBRARY_RELEASE NAMES QtAssistantClient${QT_LIBINFIX} QtAssistantClient${QT_LIBINFIX}4 QtAssistant${QT_LIBINFIX} QtAssistant${QT_LIBINFIX}4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH) + FIND_LIBRARY(QT_QTASSISTANT_LIBRARY_DEBUG NAMES QtAssistantClient${QT_LIBINFIX}_debug QtAssistantClient${QT_LIBINFIX}d QtAssistantClient${QT_LIBINFIX}d4 QtAssistant${QT_LIBINFIX}_debug QtAssistant${QT_LIBINFIX}d4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH) + + # Set QT_QTHELP_LIBRARY + FIND_LIBRARY(QT_QTCLUCENE_LIBRARY_RELEASE NAMES QtCLucene${QT_LIBINFIX} QtCLucene${QT_LIBINFIX}4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH) + FIND_LIBRARY(QT_QTCLUCENE_LIBRARY_DEBUG NAMES QtCLucene${QT_LIBINFIX}_debug QtCLucene${QT_LIBINFIX}d QtCLucene${QT_LIBINFIX}d4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH) + # QtCLucene not with other frameworks with binary installation (in /usr/lib) + IF(Q_WS_MAC AND QT_QTCORE_LIBRARY_RELEASE AND NOT QT_QTCLUCENE_LIBRARY_RELEASE) + FIND_LIBRARY(QT_QTCLUCENE_LIBRARY_RELEASE NAMES QtCLucene${QT_LIBINFIX} PATHS ${QT_LIBRARY_DIR}) + ENDIF(Q_WS_MAC AND QT_QTCORE_LIBRARY_RELEASE AND NOT QT_QTCLUCENE_LIBRARY_RELEASE) + + ############################################ + # + # Check the existence of the libraries. + # + ############################################ + + # On OSX when Qt is found as framework, never use the imported targets for now, since + # in this case the handling of the framework directory currently does not work correctly. + IF(QT_USE_FRAMEWORKS) + SET(QT_USE_IMPORTED_TARGETS FALSE) + ENDIF(QT_USE_FRAMEWORKS) + + + MACRO (_QT4_ADJUST_LIB_VARS _camelCaseBasename) + + STRING(TOUPPER "${_camelCaseBasename}" basename) + + # The name of the imported targets, i.e. the prefix "Qt4::" must not change, + # since it is stored in EXPORT-files as name of a required library. If the name would change + # here, this would lead to the imported Qt4-library targets not being resolved by cmake anymore. + IF (QT_${basename}_LIBRARY_RELEASE OR QT_${basename}_LIBRARY_DEBUG) + + IF(NOT TARGET Qt4::${_camelCaseBasename}) + ADD_LIBRARY(Qt4::${_camelCaseBasename} UNKNOWN IMPORTED ) + + IF (QT_${basename}_LIBRARY_RELEASE) + SET_PROPERTY(TARGET Qt4::${_camelCaseBasename} APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE) + SET_PROPERTY(TARGET Qt4::${_camelCaseBasename} PROPERTY IMPORTED_LOCATION_RELEASE "${QT_${basename}_LIBRARY_RELEASE}" ) + ENDIF (QT_${basename}_LIBRARY_RELEASE) + + IF (QT_${basename}_LIBRARY_DEBUG) + SET_PROPERTY(TARGET Qt4::${_camelCaseBasename} APPEND PROPERTY IMPORTED_CONFIGURATIONS DEBUG) + SET_PROPERTY(TARGET Qt4::${_camelCaseBasename} PROPERTY IMPORTED_LOCATION_DEBUG "${QT_${basename}_LIBRARY_DEBUG}" ) + ENDIF (QT_${basename}_LIBRARY_DEBUG) + ENDIF(NOT TARGET Qt4::${_camelCaseBasename}) + + # If QT_USE_IMPORTED_TARGETS is enabled, the QT_QTFOO_LIBRARY variables are set to point at these + # imported targets. This works better in general, and is also in almost all cases fully + # backward compatible. The only issue is when a project A which had this enabled then exports its + # libraries via export or EXPORT_LIBRARY_DEPENDENCIES(). In this case the libraries from project + # A will depend on the imported Qt targets, and the names of these imported targets will be stored + # in the dependency files on disk. This means when a project B then uses project A, these imported + # targets must be created again, otherwise e.g. "Qt4__QtCore" will be interpreted as name of a + # library file on disk, and not as a target, and linking will fail: + IF(QT_USE_IMPORTED_TARGETS) + SET(QT_${basename}_LIBRARY Qt4::${_camelCaseBasename} ) + SET(QT_${basename}_LIBRARIES Qt4::${_camelCaseBasename} ) + ELSE(QT_USE_IMPORTED_TARGETS) + + # if the release- as well as the debug-version of the library have been found: + IF (QT_${basename}_LIBRARY_DEBUG AND QT_${basename}_LIBRARY_RELEASE) + # if the generator supports configuration types then set + # optimized and debug libraries, or if the CMAKE_BUILD_TYPE has a value + IF (CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE) + SET(QT_${basename}_LIBRARY optimized ${QT_${basename}_LIBRARY_RELEASE} debug ${QT_${basename}_LIBRARY_DEBUG}) + ELSE(CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE) + # if there are no configuration types and CMAKE_BUILD_TYPE has no value + # then just use the release libraries + SET(QT_${basename}_LIBRARY ${QT_${basename}_LIBRARY_RELEASE} ) + ENDIF(CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE) + SET(QT_${basename}_LIBRARIES optimized ${QT_${basename}_LIBRARY_RELEASE} debug ${QT_${basename}_LIBRARY_DEBUG}) + ENDIF (QT_${basename}_LIBRARY_DEBUG AND QT_${basename}_LIBRARY_RELEASE) + + # if only the release version was found, set the debug variable also to the release version + IF (QT_${basename}_LIBRARY_RELEASE AND NOT QT_${basename}_LIBRARY_DEBUG) + SET(QT_${basename}_LIBRARY_DEBUG ${QT_${basename}_LIBRARY_RELEASE}) + SET(QT_${basename}_LIBRARY ${QT_${basename}_LIBRARY_RELEASE}) + SET(QT_${basename}_LIBRARIES ${QT_${basename}_LIBRARY_RELEASE}) + ENDIF (QT_${basename}_LIBRARY_RELEASE AND NOT QT_${basename}_LIBRARY_DEBUG) + + # if only the debug version was found, set the release variable also to the debug version + IF (QT_${basename}_LIBRARY_DEBUG AND NOT QT_${basename}_LIBRARY_RELEASE) + SET(QT_${basename}_LIBRARY_RELEASE ${QT_${basename}_LIBRARY_DEBUG}) + SET(QT_${basename}_LIBRARY ${QT_${basename}_LIBRARY_DEBUG}) + SET(QT_${basename}_LIBRARIES ${QT_${basename}_LIBRARY_DEBUG}) + ENDIF (QT_${basename}_LIBRARY_DEBUG AND NOT QT_${basename}_LIBRARY_RELEASE) + + # put the value in the cache: + SET(QT_${basename}_LIBRARY ${QT_${basename}_LIBRARY} CACHE STRING "The Qt ${basename} library" FORCE) + + ENDIF(QT_USE_IMPORTED_TARGETS) + +# message(STATUS "QT_${basename}_LIBRARY: ${QT_${basename}_LIBRARY}") + + SET(QT_${basename}_FOUND 1) + + ENDIF (QT_${basename}_LIBRARY_RELEASE OR QT_${basename}_LIBRARY_DEBUG) + + IF (QT_${basename}_INCLUDE_DIR) + #add the include directory to QT_INCLUDES + SET(QT_INCLUDES "${QT_${basename}_INCLUDE_DIR}" ${QT_INCLUDES}) + ENDIF (QT_${basename}_INCLUDE_DIR) + + # Make variables changeble to the advanced user + MARK_AS_ADVANCED(QT_${basename}_LIBRARY QT_${basename}_LIBRARY_RELEASE QT_${basename}_LIBRARY_DEBUG QT_${basename}_INCLUDE_DIR) + ENDMACRO (_QT4_ADJUST_LIB_VARS) + + + # Set QT_xyz_LIBRARY variable and add + # library include path to QT_INCLUDES + _QT4_ADJUST_LIB_VARS(QtCore) + _QT4_ADJUST_LIB_VARS(QtGui) + _QT4_ADJUST_LIB_VARS(Qt3Support) + _QT4_ADJUST_LIB_VARS(QtAssistant) + _QT4_ADJUST_LIB_VARS(QtAssistantClient) + _QT4_ADJUST_LIB_VARS(QtCLucene) + _QT4_ADJUST_LIB_VARS(QtDBus) + _QT4_ADJUST_LIB_VARS(QtDeclarative) + _QT4_ADJUST_LIB_VARS(QtDesigner) + _QT4_ADJUST_LIB_VARS(QtDesignerComponents) + _QT4_ADJUST_LIB_VARS(QtHelp) + _QT4_ADJUST_LIB_VARS(QtMultimedia) + _QT4_ADJUST_LIB_VARS(QtNetwork) + _QT4_ADJUST_LIB_VARS(QtNsPlugin) + _QT4_ADJUST_LIB_VARS(QtOpenGL) + _QT4_ADJUST_LIB_VARS(QtScript) + _QT4_ADJUST_LIB_VARS(QtScriptTools) + _QT4_ADJUST_LIB_VARS(QtSql) + _QT4_ADJUST_LIB_VARS(QtSvg) + _QT4_ADJUST_LIB_VARS(QtTest) + _QT4_ADJUST_LIB_VARS(QtUiTools) + _QT4_ADJUST_LIB_VARS(QtWebKit) + _QT4_ADJUST_LIB_VARS(QtXml) + _QT4_ADJUST_LIB_VARS(QtXmlPatterns) + _QT4_ADJUST_LIB_VARS(phonon) + + # platform dependent libraries + IF(Q_WS_X11) + _QT4_ADJUST_LIB_VARS(QtMotif) + ENDIF(Q_WS_X11) + IF(WIN32) + _QT4_ADJUST_LIB_VARS(qtmain) + _QT4_ADJUST_LIB_VARS(QAxServer) + _QT4_ADJUST_LIB_VARS(QAxContainer) + ENDIF(WIN32) + + # If Qt is installed as a framework, we need to add QT_QTCORE_LIBRARY here (which + # is the framework directory in that case), since this will make the cmake include_directories() + # command recognize that we need the framework flag with the respective directory (-F) + IF(QT_USE_FRAMEWORKS) + SET(QT_INCLUDES ${QT_INCLUDES} ${QT_QTCORE_LIBRARY} ) + SET(QT_INCLUDE_DIR ${QT_INCLUDE_DIR} ${QT_QTCORE_LIBRARY} ) + ENDIF(QT_USE_FRAMEWORKS) + + + + ####################################### + # + # Check the executables of Qt + # ( moc, uic, rcc ) + # + ####################################### + + + IF(QT_QMAKE_CHANGED) + SET(QT_UIC_EXECUTABLE NOTFOUND) + SET(QT_MOC_EXECUTABLE NOTFOUND) + SET(QT_UIC3_EXECUTABLE NOTFOUND) + SET(QT_RCC_EXECUTABLE NOTFOUND) + SET(QT_DBUSCPP2XML_EXECUTABLE NOTFOUND) + SET(QT_DBUSXML2CPP_EXECUTABLE NOTFOUND) + SET(QT_LUPDATE_EXECUTABLE NOTFOUND) + SET(QT_LRELEASE_EXECUTABLE NOTFOUND) + SET(QT_QCOLLECTIONGENERATOR_EXECUTABLE NOTFOUND) + SET(QT_DESIGNER_EXECUTABLE NOTFOUND) + SET(QT_LINGUIST_EXECUTABLE NOTFOUND) + ENDIF(QT_QMAKE_CHANGED) + + FIND_PROGRAM(QT_MOC_EXECUTABLE + NAMES moc-qt4 moc + PATHS ${QT_BINARY_DIR} + NO_DEFAULT_PATH + ) + + FIND_PROGRAM(QT_UIC_EXECUTABLE + NAMES uic-qt4 uic + PATHS ${QT_BINARY_DIR} + NO_DEFAULT_PATH + ) + + FIND_PROGRAM(QT_UIC3_EXECUTABLE + NAMES uic3 + PATHS ${QT_BINARY_DIR} + NO_DEFAULT_PATH + ) + + FIND_PROGRAM(QT_RCC_EXECUTABLE + NAMES rcc + PATHS ${QT_BINARY_DIR} + NO_DEFAULT_PATH + ) + +if(NOT WINCE) + FIND_PROGRAM(QT_DBUSCPP2XML_EXECUTABLE + NAMES qdbuscpp2xml + PATHS ${QT_BINARY_DIR} + NO_DEFAULT_PATH + ) + + FIND_PROGRAM(QT_DBUSXML2CPP_EXECUTABLE + NAMES qdbusxml2cpp + PATHS ${QT_BINARY_DIR} + NO_DEFAULT_PATH + ) +else() + FIND_PROGRAM(QT_DBUSCPP2XML_EXECUTABLE + NAMES qdbuscpp2xml + PATHS ${HOST_BINDIR} + NO_DEFAULT_PATH + ) + + FIND_PROGRAM(QT_DBUSXML2CPP_EXECUTABLE + NAMES qdbusxml2cpp + PATHS ${HOST_BINDIR} + NO_DEFAULT_PATH + ) +endif() + + FIND_PROGRAM(QT_LUPDATE_EXECUTABLE + NAMES lupdate-qt4 lupdate + PATHS ${QT_BINARY_DIR} + NO_DEFAULT_PATH + ) + + FIND_PROGRAM(QT_LRELEASE_EXECUTABLE + NAMES lrelease-qt4 lrelease + PATHS ${QT_BINARY_DIR} + NO_DEFAULT_PATH + ) + + FIND_PROGRAM(QT_QCOLLECTIONGENERATOR_EXECUTABLE + NAMES qcollectiongenerator-qt4 qcollectiongenerator + PATHS ${QT_BINARY_DIR} + NO_DEFAULT_PATH + ) + + FIND_PROGRAM(QT_DESIGNER_EXECUTABLE + NAMES designer-qt4 designer + PATHS ${QT_BINARY_DIR} + NO_DEFAULT_PATH + ) + + FIND_PROGRAM(QT_LINGUIST_EXECUTABLE + NAMES linguist-qt4 linguist + PATHS ${QT_BINARY_DIR} + NO_DEFAULT_PATH + ) + + IF (QT_MOC_EXECUTABLE) + SET(QT_WRAP_CPP "YES") + ENDIF (QT_MOC_EXECUTABLE) + + IF (QT_UIC_EXECUTABLE) + SET(QT_WRAP_UI "YES") + ENDIF (QT_UIC_EXECUTABLE) + + + + MARK_AS_ADVANCED( QT_UIC_EXECUTABLE QT_UIC3_EXECUTABLE QT_MOC_EXECUTABLE + QT_RCC_EXECUTABLE QT_DBUSXML2CPP_EXECUTABLE QT_DBUSCPP2XML_EXECUTABLE + QT_LUPDATE_EXECUTABLE QT_LRELEASE_EXECUTABLE QT_QCOLLECTIONGENERATOR_EXECUTABLE + QT_DESIGNER_EXECUTABLE QT_LINGUIST_EXECUTABLE) + + + # get the directory of the current file, used later on in the file + GET_FILENAME_COMPONENT( _qt4_current_dir "${CMAKE_CURRENT_LIST_FILE}" PATH) + + ###################################### + # + # Macros for building Qt files + # + ###################################### + + INCLUDE("${_qt4_current_dir}/Qt4Macros.cmake") + + + ###################################### + # + # decide if Qt got found + # + ###################################### + + # if the includes,libraries,moc,uic and rcc are found then we have it + IF( QT_LIBRARY_DIR AND QT_INCLUDE_DIR AND QT_MOC_EXECUTABLE AND + QT_UIC_EXECUTABLE AND QT_RCC_EXECUTABLE AND QT_QTCORE_LIBRARY) + SET( QT4_FOUND "YES" ) + IF( NOT Qt4_FIND_QUIETLY) + MESSAGE(STATUS "Found Qt-Version ${QTVERSION} (using ${QT_QMAKE_EXECUTABLE})") + ENDIF( NOT Qt4_FIND_QUIETLY) + ELSE( QT_LIBRARY_DIR AND QT_INCLUDE_DIR AND QT_MOC_EXECUTABLE AND + QT_UIC_EXECUTABLE AND QT_RCC_EXECUTABLE AND QT_QTCORE_LIBRARY) + SET( QT4_FOUND "NO") + SET(QT_QMAKE_EXECUTABLE "${QT_QMAKE_EXECUTABLE}-NOTFOUND" CACHE FILEPATH "Invalid qmake found" FORCE) + IF( Qt4_FIND_REQUIRED) + IF ( NOT QT_LIBRARY_DIR ) + MESSAGE(STATUS "Qt libraries NOT found!") + ENDIF(NOT QT_LIBRARY_DIR ) + IF ( NOT QT_INCLUDE_DIR ) + MESSAGE(STATUS "Qt includes NOT found!") + ENDIF( NOT QT_INCLUDE_DIR ) + IF ( NOT QT_MOC_EXECUTABLE ) + MESSAGE(STATUS "Qt's moc NOT found!") + ENDIF( NOT QT_MOC_EXECUTABLE ) + IF ( NOT QT_UIC_EXECUTABLE ) + MESSAGE(STATUS "Qt's uic NOT found!") + ENDIF( NOT QT_UIC_EXECUTABLE ) + IF ( NOT QT_RCC_EXECUTABLE ) + MESSAGE(STATUS "Qt's rcc NOT found!") + ENDIF( NOT QT_RCC_EXECUTABLE ) + MESSAGE( FATAL_ERROR "Qt libraries, includes, moc, uic or/and rcc NOT found!") + ENDIF( Qt4_FIND_REQUIRED) + ENDIF( QT_LIBRARY_DIR AND QT_INCLUDE_DIR AND QT_MOC_EXECUTABLE AND + QT_UIC_EXECUTABLE AND QT_RCC_EXECUTABLE AND QT_QTCORE_LIBRARY) + + SET(QT_FOUND ${QT4_FOUND}) + + + ############################################### + # + # configuration/system dependent settings + # + ############################################### + + INCLUDE("${_qt4_current_dir}/Qt4ConfigDependentSettings.cmake") + + + ####################################### + # + # compatibility settings + # + ####################################### + # Backwards compatibility for CMake1.4 and 1.2 + SET (QT_MOC_EXE ${QT_MOC_EXECUTABLE} ) + SET (QT_UIC_EXE ${QT_UIC_EXECUTABLE} ) + + SET( QT_QT_LIBRARY "") + +ELSE(QT4_QMAKE_FOUND) + + SET(QT_QMAKE_EXECUTABLE "${QT_QMAKE_EXECUTABLE}-NOTFOUND" CACHE FILEPATH "Invalid qmake found" FORCE) + + # The code below is overly complex to make sure we do not break compatibility with CMake 2.6.x + # For CMake 2.8, it should be simplified by getting rid of QT4_INSTALLED_VERSION_TOO_OLD and + # QT4_INSTALLED_VERSION_TOO_NEW + IF(Qt4_FIND_REQUIRED) + IF(QT4_INSTALLED_VERSION_TOO_OLD) + IF( Qt4_FIND_VERSION_EXACT ) + MESSAGE(FATAL_ERROR "The installed Qt version ${QTVERSION} is too old, version ${QT_MIN_VERSION} is required") + ELSE( Qt4_FIND_VERSION_EXACT ) + MESSAGE(FATAL_ERROR "The installed Qt version ${QTVERSION} is too old, at least version ${QT_MIN_VERSION} is required") + ENDIF( Qt4_FIND_VERSION_EXACT ) + ELSE(QT4_INSTALLED_VERSION_TOO_OLD) + IF( Qt4_FIND_VERSION_EXACT AND QT4_INSTALLED_VERSION_TOO_NEW ) + MESSAGE(FATAL_ERROR "The installed Qt version ${QTVERSION} is too new, version ${QT_MIN_VERSION} is required") + ELSE( Qt4_FIND_VERSION_EXACT AND QT4_INSTALLED_VERSION_TOO_NEW ) + MESSAGE( FATAL_ERROR "Qt qmake not found!") + ENDIF( Qt4_FIND_VERSION_EXACT AND QT4_INSTALLED_VERSION_TOO_NEW ) + ENDIF(QT4_INSTALLED_VERSION_TOO_OLD) + ELSE(Qt4_FIND_REQUIRED) + IF(QT4_INSTALLED_VERSION_TOO_OLD AND NOT Qt4_FIND_QUIETLY) + 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) + diff --git a/deps/extra-cmake-modules/attic/modules/FindSIP.cmake b/deps/extra-cmake-modules/attic/modules/FindSIP.cmake new file mode 100644 index 0000000..61eaa65 --- /dev/null +++ b/deps/extra-cmake-modules/attic/modules/FindSIP.cmake @@ -0,0 +1,60 @@ +# Find SIP +# ~~~~~~~~ +# +# SIP website: http://www.riverbankcomputing.co.uk/sip/index.php +# +# Find the installed version of SIP. FindSIP should be called after Python +# has been found. +# +# This file defines the following variables: +# +# SIP_VERSION - The version of SIP found expressed as a 6 digit hex number +# suitable for comparision as a string. +# +# SIP_VERSION_STR - The version of SIP found as a human readable string. +# +# SIP_EXECUTABLE - Path and filename of the SIP command line executable. +# +# SIP_INCLUDE_DIR - Directory holding the SIP C++ header file. +# +# SIP_DEFAULT_SIP_DIR - Default directory where .sip files should be installed +# into. + +# Copyright (c) 2007, Simon Edwards +# Redistribution and use is allowed according to the terms of the BSD license. +# For details see the accompanying COPYING-CMAKE-SCRIPTS file. + + + +IF(SIP_VERSION) + # Already in cache, be silent + SET(SIP_FOUND TRUE) +ELSE(SIP_VERSION) + + FIND_FILE(_find_sip_py FindSIP.py PATHS ${CMAKE_MODULE_PATH}) + + EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} ${_find_sip_py} OUTPUT_VARIABLE sip_config) + IF(sip_config) + STRING(REGEX REPLACE "^sip_version:([^\n]+).*$" "\\1" SIP_VERSION ${sip_config}) + STRING(REGEX REPLACE ".*\nsip_version_str:([^\n]+).*$" "\\1" SIP_VERSION_STR ${sip_config}) + STRING(REGEX REPLACE ".*\nsip_bin:([^\n]+).*$" "\\1" SIP_EXECUTABLE ${sip_config}) + IF(NOT SIP_DEFAULT_SIP_DIR) + STRING(REGEX REPLACE ".*\ndefault_sip_dir:([^\n]+).*$" "\\1" SIP_DEFAULT_SIP_DIR ${sip_config}) + ENDIF(NOT SIP_DEFAULT_SIP_DIR) + STRING(REGEX REPLACE ".*\nsip_inc_dir:([^\n]+).*$" "\\1" SIP_INCLUDE_DIR ${sip_config}) + FILE(TO_CMAKE_PATH ${SIP_DEFAULT_SIP_DIR} SIP_DEFAULT_SIP_DIR) + FILE(TO_CMAKE_PATH ${SIP_INCLUDE_DIR} SIP_INCLUDE_DIR) + SET(SIP_FOUND TRUE) + ENDIF(sip_config) + + IF(SIP_FOUND) + IF(NOT SIP_FIND_QUIETLY) + MESSAGE(STATUS "Found SIP version: ${SIP_VERSION_STR}") + ENDIF(NOT SIP_FIND_QUIETLY) + ELSE(SIP_FOUND) + IF(SIP_FIND_REQUIRED) + MESSAGE(FATAL_ERROR "Could not find SIP") + ENDIF(SIP_FIND_REQUIRED) + ENDIF(SIP_FOUND) + +ENDIF(SIP_VERSION) diff --git a/deps/extra-cmake-modules/attic/modules/FindSIP.py b/deps/extra-cmake-modules/attic/modules/FindSIP.py new file mode 100644 index 0000000..ecb734f --- /dev/null +++ b/deps/extra-cmake-modules/attic/modules/FindSIP.py @@ -0,0 +1,15 @@ +# FindSIP.py +# +# Copyright (c) 2007, Simon Edwards +# Redistribution and use is allowed according to the terms of the BSD license. +# For details see the accompanying COPYING-CMAKE-SCRIPTS file. + +import sys +import sipconfig + +sipcfg = sipconfig.Configuration() +print("sip_version:%06.0x" % sipcfg.sip_version) +print("sip_version_str:%s" % sipcfg.sip_version_str) +print("sip_bin:%s" % sipcfg.sip_bin) +print("default_sip_dir:%s" % sipcfg.default_sip_dir) +print("sip_inc_dir:%s" % sipcfg.sip_inc_dir) diff --git a/deps/extra-cmake-modules/attic/modules/FindSamba.cmake b/deps/extra-cmake-modules/attic/modules/FindSamba.cmake new file mode 100644 index 0000000..92746fd --- /dev/null +++ b/deps/extra-cmake-modules/attic/modules/FindSamba.cmake @@ -0,0 +1,62 @@ +# - Try to find the samba directory library +# Once done this will define +# +# SAMBA_FOUND - system has SAMBA +# SAMBA_INCLUDE_DIR - the SAMBA include directory +# SAMBA_LIBRARIES - The libraries needed to use SAMBA +# Set SAMBA_REQUIRE_SMBC_SET_CONTEXT to TRUE if you need a version of Samba +# which comes with smbc_set_context() + +# Copyright (c) 2006, Alexander Neundorf, +# +# Redistribution and use is allowed according to the terms of the BSD license. +# For details see the accompanying COPYING-CMAKE-SCRIPTS file. + +if(SAMBA_INCLUDE_DIR AND SAMBA_LIBRARIES) + # Already in cache, be silent + set(Samba_FIND_QUIETLY TRUE) +endif() + +find_path(SAMBA_INCLUDE_DIR NAMES libsmbclient.h ) + +find_library(SAMBA_LIBRARIES NAMES smbclient ) + + +if(SAMBA_INCLUDE_DIR AND SAMBA_LIBRARIES) + set(SAMBA_FOUND TRUE) + # check whether libsmbclient has smbc_set_context() + include(CheckSymbolExists) + include(MacroPushRequiredVars) + macro_push_required_vars() + set(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} ${SAMBA_LIBRARIES}) + set(CMAKE_REQUIRED_INCLUDES ${CMAKE_REQUIRED_INCLUDES} ${SAMBA_INCLUDE_DIR}) + check_symbol_exists(smbc_set_context "libsmbclient.h" SAMBA_HAVE_SMBC_SET_CONTEXT) + check_symbol_exists(smbc_option_set "libsmbclient.h" SAMBA_HAVE_SMBC_OPTION_SET) + macro_pop_required_vars() + # fail if smbc_set_context() was required but hasn't been found + if (SAMBA_REQUIRE_SMBC_SET_CONTEXT AND NOT SAMBA_HAVE_SMBC_SET_CONTEXT) + set(SAMBA_FOUND FALSE) + endif (SAMBA_REQUIRE_SMBC_SET_CONTEXT AND NOT SAMBA_HAVE_SMBC_SET_CONTEXT) + # fail if smbc_option_set() was required but hasn't been found + if (SAMBA_REQUIRE_SMBC_OPTION_SET AND NOT SAMBA_HAVE_SMBC_OPTION_SET) + set(SAMBA_FOUND FALSE) + endif (SAMBA_REQUIRE_SMBC_OPTION_SET AND NOT SAMBA_HAVE_SMBC_OPTION_SET) + +else() + set(SAMBA_FOUND FALSE) + set(SAMBA_HAVE_SMBC_SET_CONTEXT FALSE) +endif() + + +if(SAMBA_FOUND) + if(NOT Samba_FIND_QUIETLY) + message(STATUS "Found samba: ${SAMBA_LIBRARIES}") + endif() +else() + if (Samba_FIND_REQUIRED) + message(FATAL_ERROR "Could not find Samba library") + endif (Samba_FIND_REQUIRED) +endif() + +mark_as_advanced(SAMBA_INCLUDE_DIR SAMBA_LIBRARIES) + diff --git a/deps/extra-cmake-modules/attic/modules/FindSane.cmake b/deps/extra-cmake-modules/attic/modules/FindSane.cmake new file mode 100644 index 0000000..64efa87 --- /dev/null +++ b/deps/extra-cmake-modules/attic/modules/FindSane.cmake @@ -0,0 +1,21 @@ +# cmake macro to test if we use sane +# +# SANE_FOUND - system has SANE libs +# SANE_INCLUDE_DIR - the SANE include directory +# SANE_LIBRARIES - The libraries needed to use SANE + +# Copyright (c) 2006, Marcus Hufgard 2006 +# +# Redistribution and use is allowed according to the terms of the BSD license. +# For details see the accompanying COPYING-CMAKE-SCRIPTS file. + +FIND_PATH(SANE_INCLUDE_DIR sane/sane.h) + +FIND_LIBRARY(SANE_LIBRARY NAMES sane libsane + PATH_SUFFIXES sane +) + +INCLUDE(FindPackageHandleStandardArgs) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(Sane DEFAULT_MSG SANE_LIBRARY SANE_INCLUDE_DIR ) + +MARK_AS_ADVANCED(SANE_INCLUDE_DIR SANE_LIBRARY) diff --git a/deps/extra-cmake-modules/attic/modules/FindSasl2.cmake b/deps/extra-cmake-modules/attic/modules/FindSasl2.cmake new file mode 100644 index 0000000..9fe12ea --- /dev/null +++ b/deps/extra-cmake-modules/attic/modules/FindSasl2.cmake @@ -0,0 +1,26 @@ +# - Try to find the sasl2 directory library +# Once done this will define +# +# SASL2_FOUND - system has SASL2 +# SASL2_INCLUDE_DIR - the SASL2 include directory +# SASL2_LIBRARIES - The libraries needed to use SASL2 + +# Copyright (c) 2006, 2007 Laurent Montel, +# +# Redistribution and use is allowed according to the terms of the BSD license. +# For details see the accompanying COPYING-CMAKE-SCRIPTS file. + + +find_path(SASL2_INCLUDE_DIR sasl/sasl.h +) + +# libsasl2 add for windows, because the windows package of cyrus-sasl2 +# contains a libsasl2 also for msvc which is not standard conform +find_library(SASL2_LIBRARIES NAMES sasl2 libsasl2 +) + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(Sasl2 DEFAULT_MSG SASL2_LIBRARIES SASL2_INCLUDE_DIR) + +mark_as_advanced(SASL2_INCLUDE_DIR SASL2_LIBRARIES) + diff --git a/deps/extra-cmake-modules/attic/modules/FindSharedDesktopOntologies.cmake b/deps/extra-cmake-modules/attic/modules/FindSharedDesktopOntologies.cmake new file mode 100644 index 0000000..b60f8e9 --- /dev/null +++ b/deps/extra-cmake-modules/attic/modules/FindSharedDesktopOntologies.cmake @@ -0,0 +1,42 @@ +# - Try to find shared-desktop-ontologies +# The shared-desktop-ontologies package is a direct dependancy of the Nepomuk +# semantic desktop system and provides all necessary ontology files like +# RDF, RDFS, NRL, or NIE. +# +# The package is created by the OSCAF project (http://oscaf.sourceforge.net). +# +# Once done this will define +# +# SHAREDDESKTOPONTOLOGIES_FOUND - system has shared-desktop-ontologies +# SHAREDDESKTOPONTOLOGIES_ROOT_DIR - Folder where the ontologies are stored +# SHAREDDESKTOPONTOLOGIES_VERSION_MAJOR - The major version number, i.e. '1' in '1.2' +# SHAREDDESKTOPONTOLOGIES_VERSION_MINOR - The minor version number, i.e. '2' in '1.2' +# SHAREDDESKTOPONTOLOGIES_VERSION - The complete version string, i.e. '1.2' +# + +# Copyright (c) 2009, Sebastian Trueg, +# +# Redistribution and use is allowed according to the terms of the BSD license. +# For details see the accompanying COPYING-CMAKE-SCRIPTS file. + + +# First try the SharedDesktopOntologiesConfig.cmake from shared-desktop-ontologies 0.2 and newer + +# This is to make it work with cmake 2.6.2, since SDO 0.2 installs its config file into +# the 2.6.3 compatible location only ( share/cmake/SDO/ instead share/SDO/[cmake/] ) +if( "${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}" VERSION_LESS "2.6.3") + find_path(_SDO_CONFIG_DIR SharedDesktopOntologiesConfig.cmake PATH_SUFFIXES share/cmake/SharedDesktopOntologies/ ) +endif() + +if(NOT SharedDesktopOntologies_FIND_VERSION) + set(SharedDesktopOntologies_FIND_VERSION "${SDO_MIN_VERSION}") +endif() + +find_package(SharedDesktopOntologies ${SharedDesktopOntologies_FIND_VERSION} QUIET NO_MODULE HINTS "${_SDO_CONFIG_DIR}" ) + +if (SHAREDDESKTOPONTOLOGIES_ROOT_DIR) + mark_as_advanced(SHAREDDESKTOPONTOLOGIES_ROOT_DIR) +endif (SHAREDDESKTOPONTOLOGIES_ROOT_DIR) + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(SharedDesktopOntologies REQUIRED_VARS SHAREDDESKTOPONTOLOGIES_ROOT_DIR VERSION_VAR SharedDesktopOntologies_VERSION) diff --git a/deps/extra-cmake-modules/attic/modules/FindSqlite.cmake b/deps/extra-cmake-modules/attic/modules/FindSqlite.cmake new file mode 100644 index 0000000..ed8d4ea --- /dev/null +++ b/deps/extra-cmake-modules/attic/modules/FindSqlite.cmake @@ -0,0 +1,50 @@ +# - Try to find Sqlite +# Once done this will define +# +# SQLITE_FOUND - system has Sqlite +# SQLITE_INCLUDE_DIR - the Sqlite include directory +# SQLITE_LIBRARIES - Link these to use Sqlite +# SQLITE_DEFINITIONS - Compiler switches required for using Sqlite +# Redistribution and use is allowed according to the terms of the BSD license. +# For details see the accompanying COPYING-CMAKE-SCRIPTS file. +# + + +# Copyright (c) 2008, Gilles Caulier, +# +# Redistribution and use is allowed according to the terms of the BSD license. +# For details see the accompanying COPYING-CMAKE-SCRIPTS file. + +if ( SQLITE_INCLUDE_DIR AND SQLITE_LIBRARIES ) + # in cache already + SET(Sqlite_FIND_QUIETLY TRUE) +endif ( SQLITE_INCLUDE_DIR AND SQLITE_LIBRARIES ) + +# use pkg-config to get the directories and then use these values +# in the FIND_PATH() and FIND_LIBRARY() calls +if( NOT WIN32 ) + find_package(PkgConfig) + + pkg_check_modules(PC_SQLITE QUIET sqlite3) + + set(SQLITE_DEFINITIONS ${PC_SQLITE_CFLAGS_OTHER}) +endif() + +find_path(SQLITE_INCLUDE_DIR NAMES sqlite3.h + PATHS + ${PC_SQLITE_INCLUDEDIR} + ${PC_SQLITE_INCLUDE_DIRS} +) + +find_library(SQLITE_LIBRARIES NAMES sqlite3 + PATHS + ${PC_SQLITE_LIBDIR} + ${PC_SQLITE_LIBRARY_DIRS} +) + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(Sqlite DEFAULT_MSG SQLITE_INCLUDE_DIR SQLITE_LIBRARIES ) + +# show the SQLITE_INCLUDE_DIR and SQLITE_LIBRARIES variables only in the advanced view +mark_as_advanced(SQLITE_INCLUDE_DIR SQLITE_LIBRARIES ) + diff --git a/deps/extra-cmake-modules/attic/modules/FindStrigi.cmake b/deps/extra-cmake-modules/attic/modules/FindStrigi.cmake new file mode 100644 index 0000000..214894c --- /dev/null +++ b/deps/extra-cmake-modules/attic/modules/FindStrigi.cmake @@ -0,0 +1,148 @@ +# - Try to find Strigi, a fast and small desktop search program (http://strigi.sourceforge.net ) +# Once done this will define +# +# STRIGI_FOUND - system has Strigi +# STRIGI_INCLUDE_DIR - the Strigi include directory +# STRIGI_STREAMANALYZER_LIBRARY - Link these to use Strigi streamanalyzer +# STRIGI_STREAMS_LIBRARY - Link these to use Strigi streams +# STRIGI_LINE_ANALYZER_PREFIX - strigi plugin prefix +# STRIGI_THROUGH_ANALYZER_PREFIX - strigi plugin prefix + +# Copyright (c) 2008, Jos van den Oever, +# +# Redistribution and use is allowed according to the terms of the BSD license. +# For details see the accompanying COPYING-CMAKE-SCRIPTS file. + + +if(NOT STRIGI_MIN_VERSION) + set(STRIGI_MIN_VERSION "0.5.9") +endif() + +file(TO_CMAKE_PATH "$ENV{STRIGI_HOME}" strigi_home) + +set(_Strigi_FIND_QUIETLY ${Strigi_FIND_QUIETLY}) +# Try to find and load the StrigiConfig.cmake installed by kdesupport/strigi +find_package(Strigi QUIET NO_MODULE PATHS "${strigi_home}/lib/strigi" "${strigi_home}/lib64/strigi") +set(Strigi_FIND_QUIETLY ${_Strigi_FIND_QUIETLY}) + +# If StrigiConfig.cmake (installed by kdesupport/Strigi) has been found +# and it contains all necessary information (since November 16th, 2008), use the information +# included there, otherwise search it in the same way as any non-cmake project. +# This variable is set by StrigiConfig.cmake . Alex +if (STRIGI_CONFIG_FOUND_AND_HAS_COMPLETE_INFORMATION) + set (_strigiErrorMessage "Couldn't find Strigi streams and streamanalyzer libraries. Set the environment variable STRIGI_HOME (or CMAKE_PREFIX_PATH) to the strigi install dir.") + set(STRIGI_VERSION_OK TRUE) + if(STRIGI_VERSION VERSION_LESS ${STRIGI_MIN_VERSION}) + set(_strigiErrorMessage "Strigi version ${STRIGI_VERSION} found, but at least version ${STRIGI_MIN_VERSION} is required") + set(STRIGI_VERSION_OK FALSE) + endif() + + include(FindPackageHandleStandardArgs) + find_package_handle_standard_args(Strigi + "${_strigiErrorMessage}" + STRIGI_STREAMS_LIBRARY STRIGI_STREAMANALYZER_LIBRARY STRIGI_INCLUDE_DIR STRIGI_VERSION_OK) + +else() + # this else() branch is for finding strigi versions before November 16th, 2008. Alex + include(FindLibraryWithDebug) + include(MacroPushRequiredVars) + + if (WIN32) + file(TO_CMAKE_PATH "$ENV{PROGRAMFILES}" _program_FILES_DIR) + endif() + + if (NOT WIN32) + if(NOT strigi_home) + find_package(PkgConfig) + if(PKG_CONFIG_EXECUTABLE) + pkg_check_modules(STRIGI QUIET libstreamanalyzer>=${STRIGI_MIN_VERSION}) + endif() + endif() + endif() + + if (NOT STRIGI_INCLUDEDIR) + find_path(STRIGI_INCLUDE_DIR strigi/streamanalyzer.h + PATHS + ${strigi_home}/include + ${STRIGI_INCLUDEDIR} + ${_program_FILES_DIR}/strigi/include + ) + set( STRIGI_INCLUDEDIR ${STRIGI_INCLUDE_DIR} ) + else (NOT STRIGI_INCLUDEDIR) + set( STRIGI_INCLUDE_DIR ${STRIGI_INCLUDEDIR} ) + endif (NOT STRIGI_INCLUDEDIR) + + + find_library_with_debug(STRIGI_STREAMANALYZER_LIBRARY + WIN32_DEBUG_POSTFIX d + NAMES streamanalyzer + PATHS + ${strigi_home}/lib + ${STRIGI_LIBRARY_DIRS} + ${_program_FILES_DIR}/strigi/lib + ) + + find_library_with_debug(STRIGI_STREAMS_LIBRARY + WIN32_DEBUG_POSTFIX d + NAMES streams + PATHS + ${strigi_home}/lib + ${STRIGI_LIBRARY_DIRS} + ${_program_FILES_DIR}/strigi/lib + ) + + find_library_with_debug(STRIGI_STRIGIQTDBUSCLIENT_LIBRARY + WIN32_DEBUG_POSTFIX d + NAMES strigiqtdbusclient + PATHS + ${strigi_home}/lib + ${STRIGI_LIBRARY_DIRS} + ${_program_FILES_DIR}/strigi/lib + ) + + include(FindPackageHandleStandardArgs) + find_package_handle_standard_args(Strigi + "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 (STRIGI_FOUND) + set( STRIGI_NEEDS_SIGNED_CHAR TRUE CACHE BOOL "TRUE if strigi is 0.6.0 or later" ) + set( STRIGI_NEEDS_CHAR FALSE CACHE BOOL "TRUE if strigi is 0.5.9 or before" ) + endif (STRIGI_FOUND) + +endif (STRIGI_CONFIG_FOUND_AND_HAS_COMPLETE_INFORMATION) + + +if(WIN32) + # this is needed to have mingw, cygwin and msvc libs installed in one directory + if(MSVC) + set(STRIGI_LINE_ANALYZER_PREFIX msvc_strigila_) + set(STRIGI_THROUGH_ANALYZER_PREFIX msvc_strigita_) + elseif(CYGWIN) + set(STRIGI_LINE_ANALYZER_PREFIX cyg_strigila_) + set(STRIGI_THROUGH_ANALYZER_PREFIX cyg_strigita_) + elseif(MINGW) + set(STRIGI_LINE_ANALYZER_PREFIX mingw_strigila_) + set(STRIGI_THROUGH_ANALYZER_PREFIX mingw_strigita_) + endif() +else() + set(STRIGI_LINE_ANALYZER_PREFIX strigila_) + set(STRIGI_THROUGH_ANALYZER_PREFIX strigita_) +endif() + +mark_as_advanced( + STRIGI_INCLUDE_DIR + STRIGI_STREAMANALYZER_LIBRARY + STRIGI_STREAMANALYZER_LIBRARY_DEBUG + STRIGI_STREAMANALYZER_LIBRARY_RELEASE + STRIGI_STREAMS_LIBRARY + STRIGI_STREAMS_LIBRARY_DEBUG + STRIGI_STREAMS_LIBRARY_RELEASE + STRIGI_STRIGIQTDBUSCLIENT_LIBRARY + STRIGI_STRIGIQTDBUSCLIENT_LIBRARY_DEBUG + STRIGI_STRIGIQTDBUSCLIENT_LIBRARY_RELEASE + STRIGI_LINE_ANALYZER_PREFIX + STRIGI_THROUGH_ANALYZER_PREFIX + STRIGI_NEEDS_SIGNED_CHAR + STRIGI_NEEDS_CHAR +) diff --git a/deps/extra-cmake-modules/attic/modules/FindTaglib.cmake b/deps/extra-cmake-modules/attic/modules/FindTaglib.cmake new file mode 100644 index 0000000..4b58bf6 --- /dev/null +++ b/deps/extra-cmake-modules/attic/modules/FindTaglib.cmake @@ -0,0 +1,85 @@ +# - Try to find the Taglib library +# Once done this will define +# +# TAGLIB_FOUND - system has the taglib library +# TAGLIB_CFLAGS - the taglib cflags +# TAGLIB_LIBRARIES - The libraries needed to use taglib + +# Copyright (c) 2006, Laurent Montel, +# +# Redistribution and use is allowed according to the terms of the BSD license. +# For details see the accompanying COPYING-CMAKE-SCRIPTS file. + +if(NOT TAGLIB_MIN_VERSION) + set(TAGLIB_MIN_VERSION "1.4") +endif() + +if(NOT WIN32) + find_program(TAGLIBCONFIG_EXECUTABLE NAMES taglib-config PATHS + ${BIN_INSTALL_DIR} + ) +endif() + +#reset vars +set(TAGLIB_LIBRARIES) +set(TAGLIB_CFLAGS) + +# if taglib-config has been found +if(TAGLIBCONFIG_EXECUTABLE) + + 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) + else() + + 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) + + if(TAGLIB_LIBRARIES AND TAGLIB_CFLAGS) + set(TAGLIB_FOUND TRUE) + message(STATUS "Found taglib: ${TAGLIB_LIBRARIES}") + endif() + string(REGEX REPLACE " *-I" ";" TAGLIB_INCLUDES "${TAGLIB_CFLAGS}") + endif() + mark_as_advanced(TAGLIB_CFLAGS TAGLIB_LIBRARIES TAGLIB_INCLUDES) + +else() + + include(FindLibraryWithDebug) + include(FindPackageHandleStandardArgs) + + find_path(TAGLIB_INCLUDES + NAMES + tag.h + PATH_SUFFIXES taglib + PATHS + ${KDE4_INCLUDE_DIR} + ${INCLUDE_INSTALL_DIR} + ) + + find_library_with_debug(TAGLIB_LIBRARIES + WIN32_DEBUG_POSTFIX d + NAMES tag + PATHS + ${KDE4_LIB_DIR} + ${LIB_INSTALL_DIR} + ) + + find_package_handle_standard_args(Taglib DEFAULT_MSG + TAGLIB_INCLUDES TAGLIB_LIBRARIES) +endif() + + +if(TAGLIB_FOUND) + if(NOT Taglib_FIND_QUIETLY AND TAGLIBCONFIG_EXECUTABLE) + message(STATUS "Taglib found: ${TAGLIB_LIBRARIES}") + endif() +else() + if(Taglib_FIND_REQUIRED) + message(FATAL_ERROR "Could not find Taglib") + endif() +endif() + diff --git a/deps/extra-cmake-modules/attic/modules/FindUDev.cmake b/deps/extra-cmake-modules/attic/modules/FindUDev.cmake new file mode 100644 index 0000000..4c8390d --- /dev/null +++ b/deps/extra-cmake-modules/attic/modules/FindUDev.cmake @@ -0,0 +1,19 @@ +# - Try to find UDev +# Once done this will define +# +# UDEV_FOUND - system has UDev +# UDEV_INCLUDE_DIR - the libudev include directory +# UDEV_LIBS - The libudev libraries + +# Copyright (c) 2010, Rafael Fernández López, +# +# Redistribution and use is allowed according to the terms of the BSD license. +# For details see the accompanying COPYING-CMAKE-SCRIPTS file. + +find_path(UDEV_INCLUDE_DIR libudev.h) +find_library(UDEV_LIBS udev) + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(UDev DEFAULT_MSG UDEV_INCLUDE_DIR UDEV_LIBS) + +mark_as_advanced(UDEV_INCLUDE_DIR UDEV_LIBS) diff --git a/deps/extra-cmake-modules/attic/modules/FindUSB.cmake b/deps/extra-cmake-modules/attic/modules/FindUSB.cmake new file mode 100644 index 0000000..73b54a8 --- /dev/null +++ b/deps/extra-cmake-modules/attic/modules/FindUSB.cmake @@ -0,0 +1,30 @@ +# - Try to find the freetype library +# Once done this defines +# +# LIBUSB_FOUND - system has libusb +# LIBUSB_INCLUDE_DIR - the libusb include directory +# LIBUSB_LIBRARIES - Link these to use libusb + +# Copyright (c) 2006, 2008 Laurent Montel, +# +# Redistribution and use is allowed according to the terms of the BSD license. +# For details see the accompanying COPYING-CMAKE-SCRIPTS file. + + +if (NOT WIN32) + # use pkg-config to get the directories and then use these values + # in the FIND_PATH() and FIND_LIBRARY() calls + find_package(PkgConfig) + pkg_check_modules(PC_LIBUSB QUIET libusb) +endif() + +find_path(LIBUSB_INCLUDE_DIR usb.h + HINTS ${PC_LIBUSB_INCLUDEDIR} ${PC_LIBUSB_INCLUDE_DIRS}) + +find_library(LIBUSB_LIBRARIES NAMES usb + HINTS ${PC_LIBUSB_LIBDIR} ${PC_LIBUSB_LIBRARY_DIRS}) + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(LIBUSB DEFAULT_MSG LIBUSB_LIBRARIES LIBUSB_INCLUDE_DIR) + +mark_as_advanced(LIBUSB_INCLUDE_DIR LIBUSB_LIBRARIES) diff --git a/deps/extra-cmake-modules/attic/modules/FindWcecompat.cmake b/deps/extra-cmake-modules/attic/modules/FindWcecompat.cmake new file mode 100644 index 0000000..acba2dd --- /dev/null +++ b/deps/extra-cmake-modules/attic/modules/FindWcecompat.cmake @@ -0,0 +1,25 @@ +# Try to find Wcecompat functionality +# Once done this will define +# +# WCECOMPAT_FOUND - system has Wcecompat +# WCECOMPAT_INCLUDE_DIR - Wcecompat include directory +# WCECOMPAT_LIBRARIES - Libraries needed to use Wcecompat +# +# Copyright (c) 2010, Andreas Holzammer, +# +# Redistribution and use is allowed according to the terms of the BSD license. + +find_path(WCECOMPAT_INCLUDE_DIR errno.h PATH_SUFFIXES wcecompat) + +set(WCECOMPAT_LIB_FOUND FALSE) + +if(WCECOMPAT_INCLUDE_DIR) + find_library(WCECOMPAT_LIBRARIES NAMES wcecompat wcecompatex ) + + if(WCECOMPAT_LIBRARIES) + set(WCECOMPAT_LIB_FOUND TRUE) + endif() +endif() + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(Wcecompat DEFAULT_MSG WCECOMPAT_LIBRARIES WCECOMPAT_LIB_FOUND) diff --git a/deps/extra-cmake-modules/attic/modules/FindXKB.cmake b/deps/extra-cmake-modules/attic/modules/FindXKB.cmake new file mode 100644 index 0000000..a91078a --- /dev/null +++ b/deps/extra-cmake-modules/attic/modules/FindXKB.cmake @@ -0,0 +1,15 @@ +# + + find_path(X11_XKB_INCLUDE_PATH X11/XKBlib.h "${X11_INC_SEARCH_PATH}") + if (X11_XKB_INCLUDE_PATH) + MACRO_PUSH_REQUIRED_VARS() + set(CMAKE_REQUIRED_LIBRARIES "${X11_LIBRARIES} ${CMAKE_REQUIRED_LIBRARIES}") + check_library_exists(X11 XkbLockModifiers "" HAVE_XKB) + MACRO_POP_REQUIRED_VARS() + if (HAVE_XKB) + set(XKB_FOUND TRUE) + endif (HAVE_XKB) + endif (X11_XKB_INCLUDE_PATH) + + + diff --git a/deps/extra-cmake-modules/attic/modules/FindXine.cmake b/deps/extra-cmake-modules/attic/modules/FindXine.cmake new file mode 100644 index 0000000..de29679 --- /dev/null +++ b/deps/extra-cmake-modules/attic/modules/FindXine.cmake @@ -0,0 +1,64 @@ +# - 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) + +find_package(PkgConfig) +if (PKG_CONFIG_FOUND) + pkg_check_modules(PC_LIBXINE QUIET libxine) +endif (PKG_CONFIG_FOUND) + +find_path(XINE_INCLUDE_DIR NAMES xine.h + HINTS # HINTS is new in cmake 2.6. These dirs will be preferred over the default ones + ${PC_LIBXINE_INCLUDEDIR} + ${PC_LIBXINE_INCLUDE_DIRS} + ) + +find_library(XINE_LIBRARY NAMES xine + HINTS + ${PC_LIBXINE_LIBDIR} + ${PC_LIBXINE_LIBRARY_DIRS} + ) + +find_program(XINECONFIG_EXECUTABLE NAMES xine-config + HINTS + ${PC_LIBXINE_PREFIX}/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) + if("${XINE_VERSION}" VERSION_GREATER "1.1.0") #if (... VERSION_GREATER) is new since cmake 2.6.2 + set(XINE_VERSION_OK TRUE) + string(REGEX REPLACE "[0-9]\\.[0-9]\\." "" XINE_BUGFIX_VERSION ${XINE_VERSION}) + endif() +endif (XINE_INCLUDE_DIR AND XINE_LIBRARY AND XINECONFIG_EXECUTABLE) + + +if( XINE_VERSION_OK) + 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) + set(XINE_FOUND TRUE) +endif() + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(Xine "Could NOT find XINE 1.1.1 or greater" XINE_INCLUDE_DIR XINE_LIBRARY XINECONFIG_EXECUTABLE XINE_VERSION_OK) + +mark_as_advanced(XINE_INCLUDE_DIR XINE_LIBRARY XINECONFIG_EXECUTABLE) diff --git a/deps/extra-cmake-modules/attic/modules/FindXmms.cmake b/deps/extra-cmake-modules/attic/modules/FindXmms.cmake new file mode 100644 index 0000000..b687d12 --- /dev/null +++ b/deps/extra-cmake-modules/attic/modules/FindXmms.cmake @@ -0,0 +1,44 @@ +# Search xmms +# Once done this will define +# +# XMMS_FOUND - system has xmms +# XMMS_INCLUDE_DIRS - the xmms include directory +# XMMS_LIBRARIES - Link these to use xmms +# XMMS_LDFLAGS - for compatibility only, same as XMMS_LIBRARIES + +# Copyright (c) 2006, 2007 Laurent Montel, +# Copyright (c) 2007 Allen Winter +# +# Redistribution and use is allowed according to the terms of the BSD license. +# For details see the accompanying COPYING-CMAKE-SCRIPTS file. + +if (XMMS_INCLUDE_DIRS AND XMMS_LIBRARIES) + # in cache already + set(XMMS_FOUND TRUE) + +else (XMMS_INCLUDE_DIRS AND XMMS_LIBRARIES) + if (NOT WIN32) + # use pkg-config to get the directories and then use these values + # in the FIND_PATH() and FIND_LIBRARY() calls + find_package(PkgConfig) + + pkg_check_modules(PC_XMMS QUIET xmms) + endif() + + find_path(XMMS_INCLUDE_DIRS xmmsctrl.h + PATHS ${PC_XMMS_INCLUDEDIR} ${PC_XMMS_INCLUDE_DIRS} + PATH_SUFFIXES xmms) + + find_library(XMMS_LIBRARIES NAMES xmms + PATHS ${PC_XMMS_LIBDIR} ${PC_XMMS_LIBRARY_DIRS}) + + include(FindPackageHandleStandardArgs) + find_package_handle_standard_args(Xmms DEFAULT_MSG + XMMS_LIBRARIES XMMS_INCLUDE_DIRS) + + mark_as_advanced(XMMS_INCLUDE_DIRS XMMS_LIBRARIES) + +endif (XMMS_INCLUDE_DIRS AND XMMS_LIBRARIES) + +# for compatibility +set(XMMS_LDFLAGS ${XMMS_LIBRARIES}) diff --git a/deps/extra-cmake-modules/attic/modules/HandleImportedTargetsInCMakeRequiredLibraries.cmake b/deps/extra-cmake-modules/attic/modules/HandleImportedTargetsInCMakeRequiredLibraries.cmake new file mode 100644 index 0000000..b775b42 --- /dev/null +++ b/deps/extra-cmake-modules/attic/modules/HandleImportedTargetsInCMakeRequiredLibraries.cmake @@ -0,0 +1,85 @@ + +# This is a helper function used by CheckCXXSourceRuns.cmake and +# CheckCXXSourceCompiles.cmake. Actually it should be used by all macros which +# use TRY_COMPILE() or TRY_RUN(). +# It takes the CMAKE_REQUIRED_LIBRARY variable and searches it for imported +# (library) targets. Since the project created by TRY_COMPILE() (and TRY_RUN()) +# does not know about these imported targets, this macro here replaces these +# imported targets with the actual library files on disk and it also +# adds the libraries from the link interface of these imported targets. +# E.g the imported target KDE4__kdeui is replaced on my system with /opt/kdelibs/lib/libkdeui.so +# and the link interface libraries, which includes e.g. /opt/kdelibs/lib/libkdecore.so. +# This way imported targets work also when used with CHECK_CXX_SOURCE_COMPILES/RUNS(). + +# Copyright (c) 2009, Alexander Neundorf, +# +# Redistribution and use is allowed according to the terms of the BSD license. +# For details see the accompanying COPYING-CMAKE-SCRIPTS file. + +FUNCTION(HANDLE_IMPORTED_TARGETS_IN_CMAKE_REQUIRED_LIBRARIES _RESULT) +# handle imported library targets + SET(_CCSR_IMP_TARGETS_MAP) + SET(_CCSR_REQ_LIBS ${CMAKE_REQUIRED_LIBRARIES}) + SET(_CHECK_FOR_IMPORTED_TARGETS TRUE) + SET(_CCSR_LOOP_COUNTER 0) + WHILE(_CHECK_FOR_IMPORTED_TARGETS) + MATH(EXPR _CCSR_LOOP_COUNTER "${_CCSR_LOOP_COUNTER} + 1 ") + SET(_CCSR_NEW_REQ_LIBS ) + SET(_CHECK_FOR_IMPORTED_TARGETS FALSE) + FOREACH(_CURRENT_LIB ${_CCSR_REQ_LIBS}) + GET_TARGET_PROPERTY(_importedConfigs ${_CURRENT_LIB} IMPORTED_CONFIGURATIONS) + IF (_importedConfigs) + # Ok, so this is an imported target. + # First we get the imported configurations. + # Then we get the location of the actual library on disk of the first configuration. + # then we'll get its link interface libraries property, + # iterate through it and replace all imported targets we find there + # with there actual location. + + # guard against infinite loop: abort after 100 iterations ( 100 is arbitrary chosen) + IF ("${_CCSR_LOOP_COUNTER}" LESS 100) + SET(_CHECK_FOR_IMPORTED_TARGETS TRUE) +# ELSE ("${_CCSR_LOOP_COUNTER}" LESS 1) +# MESSAGE(STATUS "********* aborting loop, counter : ${_CCSR_LOOP_COUNTER}") + ENDIF ("${_CCSR_LOOP_COUNTER}" LESS 100) + + LIST(GET _importedConfigs 0 _firstImportedConfig) + GET_TARGET_PROPERTY(_firstImportedLocation ${_CURRENT_LIB} IMPORTED_LOCATION_${_firstImportedConfig}) + GET_TARGET_PROPERTY(_linkInterfaceLibs ${_CURRENT_LIB} IMPORTED_LINK_INTERFACE_LIBRARIES_${_firstImportedConfig} ) + + LIST(APPEND _CCSR_NEW_REQ_LIBS ${_firstImportedLocation}) +# MESSAGE(STATUS "Appending lib ${_CURRENT_LIB} as ${_firstImportedLocation}") + IF(_linkInterfaceLibs) + FOREACH(_currentLinkInterfaceLib ${_linkInterfaceLibs}) +# MESSAGE(STATUS "Appending link interface lib ${_currentLinkInterfaceLib}") + IF(_currentLinkInterfaceLib) + LIST(APPEND _CCSR_NEW_REQ_LIBS ${_currentLinkInterfaceLib} ) + ENDIF(_currentLinkInterfaceLib) + ENDFOREACH(_currentLinkInterfaceLib ${_linkInterfaceLibs}) + ENDIF(_linkInterfaceLibs) + ELSE(_importedConfigs) + # "Normal" libraries are just used as they are. + LIST(APPEND _CCSR_NEW_REQ_LIBS ${_CURRENT_LIB} ) +# MESSAGE(STATUS "Appending lib directly: ${_CURRENT_LIB}") + ENDIF(_importedConfigs) + ENDFOREACH(_CURRENT_LIB ${_CCSR_REQ_LIBS}) + + SET(_CCSR_REQ_LIBS ${_CCSR_NEW_REQ_LIBS} ) + ENDWHILE(_CHECK_FOR_IMPORTED_TARGETS) + + # Finally we iterate once more over all libraries. This loop only removes + # all remaining imported target names (there shouldn't be any left anyway). + SET(_CCSR_NEW_REQ_LIBS ) + FOREACH(_CURRENT_LIB ${_CCSR_REQ_LIBS}) + GET_TARGET_PROPERTY(_importedConfigs ${_CURRENT_LIB} IMPORTED_CONFIGURATIONS) + IF (NOT _importedConfigs) + LIST(APPEND _CCSR_NEW_REQ_LIBS ${_CURRENT_LIB} ) +# MESSAGE(STATUS "final: appending ${_CURRENT_LIB}") + ELSE (NOT _importedConfigs) +# MESSAGE(STATUS "final: skipping ${_CURRENT_LIB}") + ENDIF (NOT _importedConfigs) + ENDFOREACH(_CURRENT_LIB ${_CCSR_REQ_LIBS}) + SET(${_RESULT} ${_CCSR_NEW_REQ_LIBS} PARENT_SCOPE) + +ENDFUNCTION(HANDLE_IMPORTED_TARGETS_IN_CMAKE_REQUIRED_LIBRARIES _CCSR_REQ_LIBS) + diff --git a/deps/extra-cmake-modules/attic/modules/MacroAppendIf.cmake b/deps/extra-cmake-modules/attic/modules/MacroAppendIf.cmake new file mode 100644 index 0000000..90f26af --- /dev/null +++ b/deps/extra-cmake-modules/attic/modules/MacroAppendIf.cmake @@ -0,0 +1,22 @@ +# MACRO_APPEND_IF(CONDITION VAR VALUE1...VALUEN ) +# This convenience macro appends the values VALUE1 up to VALUEN to the list +# given in VAR, but only if the variable CONDITION is TRUE: +# +# usage example: +# IF(SOMELIB_FOUND) +# SET(my_sources ${my_sources} somefile.c someotherfile.c) +# ENDIF(SOMELIB_FOUND) +# +# becomes: +# MACRO_APPEND_IF(SOMELIB_FOUND my_sources somefile.c someotherfile.c) + +# Copyright (c) 2006, Alexander Neundorf, +# +# Redistribution and use is allowed according to the terms of the BSD license. +# For details see the accompanying COPYING-CMAKE-SCRIPTS file. + +macro(macro_append_if _cond _list) + if(${_cond}) + list(APPEND ${_list} ${ARGN}) + endif() +endmacro(macro_append_if _cond _list) diff --git a/deps/extra-cmake-modules/attic/modules/MacroBoolTo01.cmake b/deps/extra-cmake-modules/attic/modules/MacroBoolTo01.cmake new file mode 100644 index 0000000..63b9852 --- /dev/null +++ b/deps/extra-cmake-modules/attic/modules/MacroBoolTo01.cmake @@ -0,0 +1,20 @@ +# MACRO_BOOL_TO_01( VAR RESULT0 ... RESULTN ) +# This macro evaluates its first argument +# and sets all the given vaiables either to 0 or 1 +# depending on the value of the first one + +# Copyright (c) 2006, Alexander Neundorf, +# +# Redistribution and use is allowed according to the terms of the BSD license. +# For details see the accompanying COPYING-CMAKE-SCRIPTS file. + + +MACRO(MACRO_BOOL_TO_01 FOUND_VAR ) + FOREACH (_current_VAR ${ARGN}) + IF(${FOUND_VAR}) + SET(${_current_VAR} 1) + ELSE(${FOUND_VAR}) + SET(${_current_VAR} 0) + ENDIF(${FOUND_VAR}) + ENDFOREACH(_current_VAR) +ENDMACRO(MACRO_BOOL_TO_01) diff --git a/deps/extra-cmake-modules/attic/modules/MacroEnsureOutOfSourceBuild.cmake b/deps/extra-cmake-modules/attic/modules/MacroEnsureOutOfSourceBuild.cmake new file mode 100644 index 0000000..cb26e0c --- /dev/null +++ b/deps/extra-cmake-modules/attic/modules/MacroEnsureOutOfSourceBuild.cmake @@ -0,0 +1,20 @@ +# - 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, +# +# Redistribution and use is allowed according to the terms of the BSD license. +# For details see the accompanying COPYING-CMAKE-SCRIPTS file. + +MACRO (MACRO_ENSURE_OUT_OF_SOURCE_BUILD _errorMessage) + + STRING(COMPARE EQUAL "${CMAKE_SOURCE_DIR}" "${CMAKE_BINARY_DIR}" insource) + IF(insource) + MESSAGE(FATAL_ERROR "${_errorMessage}") + ENDIF(insource) + +ENDMACRO (MACRO_ENSURE_OUT_OF_SOURCE_BUILD) diff --git a/deps/extra-cmake-modules/attic/modules/MacroLibrary.cmake b/deps/extra-cmake-modules/attic/modules/MacroLibrary.cmake new file mode 100644 index 0000000..a467d84 --- /dev/null +++ b/deps/extra-cmake-modules/attic/modules/MacroLibrary.cmake @@ -0,0 +1,19 @@ +# - include MacroLibrary offers a collection of macros which extend the built-in cmake commands + +# Copyright (c) 2006, Alexander Neundorf, +# +# Redistribution and use is allowed according to the terms of the BSD license. +# For details see the accompanying COPYING-CMAKE-SCRIPTS file. + +INCLUDE(MacroOptionalFindPackage) +INCLUDE(MacroOptionalAddSubdirectory) +INCLUDE(MacroAdditionalCleanFiles) +INCLUDE(MacroAddFileDependencies) +INCLUDE(MacroAddCompileFlags) +INCLUDE(MacroAddLinkFlags) +INCLUDE(MacroAppendIf) +INCLUDE(MacroEnsureOutOfSourceBuild) +INCLUDE(MacroBoolTo01) +INCLUDE(MacroPushRequiredVars) +INCLUDE(MacroLogFeature) +INCLUDE(MacroWriteBasicCMakeVersionFile) diff --git a/deps/extra-cmake-modules/attic/modules/NepomukAddOntologyClasses.cmake b/deps/extra-cmake-modules/attic/modules/NepomukAddOntologyClasses.cmake new file mode 100644 index 0000000..ad336a2 --- /dev/null +++ b/deps/extra-cmake-modules/attic/modules/NepomukAddOntologyClasses.cmake @@ -0,0 +1,115 @@ +# +# Use the Nepomuk resource class generator to generate convinient Resource subclasses +# from ontologies. +# +# Usage: +# NEPOMUK_ADD_ONTOLOGY_CLASSES( +# [FAST] +# [ONTOLOGIES] [ ...] +# [CLASSES [ ...]] +# [VISIBILITY ] +# ) +# +# If FAST is specified the rcgen parameter --fast will be used which results in resource classes +# not based on Nepomuk::Resource but on a custom class which does not perform any checks and simply +# writes the data to Nepomuk (hence the name fast). +# +# The optional CLASSES parameter allows to specify the classes to be generated (RDF URIs) in +# case one does not want all classes in the ontologies to be generated. +# +# The optional VISIBILITY parameter can only be used in non-fast mode and allows to set the gcc visibility +# to make the generated classes usable in a publically exported API. The is used to create +# the name of the export macro and the export include file. Thus, when using "VISIBILITY foobar" include +# file "foobar_export.h" needs to define FOOBAR_EXPORT. +# +# Copyright (c) 2009 Sebastian Trueg +# +# Redistribution and use is allowed according to the terms of the BSD license. +# For details see the accompanying COPYING-CMAKE-SCRIPTS file. +# +macro(NEPOMUK_ADD_ONTOLOGY_CLASSES _sources) + # extract arguments + set(_current_arg_type "onto") + foreach(_arg ${ARGN}) + if(${_arg} STREQUAL "ONTOLOGIES") + set(_current_arg_type "onto") + elseif(${_arg} STREQUAL "VISIBILITY") + set(_current_arg_type "visib") + elseif(${_arg} STREQUAL "CLASSES") + set(_current_arg_type "class") + elseif(${_arg} STREQUAL "FAST") + set(_fastmode "--fast") + else() + if(${_current_arg_type} STREQUAL "onto") + list(APPEND _ontologies ${_arg}) + get_filename_component(_filename ${_arg} NAME) + list(APPEND _ontofilenames ${_filename}) + elseif(${_current_arg_type} STREQUAL "class") + list(APPEND _classes "--class" "${_arg}") + else() + set(_visibility "--visibility" "${_arg}") + endif() + endif() + endforeach(_arg) + + # find our helper program (first in the install dir, then everywhere) + if(NOT WINCE) + find_program(RCGEN nepomuk-rcgen PATHS ${KDE4_BIN_INSTALL_DIR} ${BIN_INSTALL_DIR} NO_DEFAULT_PATH) + find_program(RCGEN nepomuk-rcgen) + else() + find_program(RCGEN nepomuk-rcgen PATHS ${HOST_BINDIR} NO_DEFAULT_PATH) + endif() + + if(NOT RCGEN) + message(SEND_ERROR "Failed to find the Nepomuk source generator" ) + else() + file(TO_NATIVE_PATH ${RCGEN} RCGEN) + + # we generate the files in the current binary dir + set(_targetdir ${CMAKE_CURRENT_BINARY_DIR}) + + # generate the list of source and header files + execute_process( + COMMAND ${RCGEN} ${_fastmode} --listheaders --prefix ${_targetdir}/ ${_classes} ${_visibility} ${_ontologies} + OUTPUT_VARIABLE _out_headers + RESULT_VARIABLE rcgen_result + ) + if(NOT ${rcgen_result} EQUAL 0) + message(SEND_ERROR "Running ${RCGEN} to generate list of headers failed with error code ${rcgen_result}") + endif() + + execute_process( + COMMAND ${RCGEN} ${_fastmode} --listsources --prefix ${_targetdir}/ ${_classes} ${_visibility} ${_ontologies} + OUTPUT_VARIABLE _out_sources + RESULT_VARIABLE rcgen_result + ) + if(NOT ${rcgen_result} EQUAL 0) + message(SEND_ERROR "Running ${RCGEN} to generate list of sources failed with error code ${rcgen_result}") + endif() + + add_custom_command(OUTPUT ${_out_headers} ${_out_sources} + COMMAND ${RCGEN} ${_fastmode} --writeall --target ${_targetdir}/ ${_classes} ${_visibility} ${_ontologies} + DEPENDS ${_ontologies} + COMMENT "Generating ontology source files from ${_ontofilenames}" + ) + + # make sure the includes are found + include_directories(${_targetdir}) + + # finally append the source files to the source list + list(APPEND ${_sources} ${_out_sources}) + endif() + + # reset variable names used + unset(_current_arg_type) + unset(_arg) + unset(_ontologies) + unset(_ontofilenames) + unset(_classes) + unset(_visibility) + unset(_fastmode) + unset(_targetdir) + unset(_out_headers) + unset(_out_sources) + unset(rcgen_result) +endmacro(NEPOMUK_ADD_ONTOLOGY_CLASSES) diff --git a/deps/extra-cmake-modules/attic/modules/NepomukMacros.cmake b/deps/extra-cmake-modules/attic/modules/NepomukMacros.cmake new file mode 100644 index 0000000..ef68fc5 --- /dev/null +++ b/deps/extra-cmake-modules/attic/modules/NepomukMacros.cmake @@ -0,0 +1,67 @@ +# This file contains the following macros: +# +# NEPOMUK_GENERATE_FROM_ONTOLOGY +# Parameters: +# ontofile - Path to the NRL ontology defining the resources to be generated. +# targetdir - Folder to which the generated sources should be written. +# out_headers - Variable which will be filled with the names of all generated headers. +# out_sources - Variable which will be filled with the names of all generated sources. +# out_includes - Variable which will be filled with complete include statements of all +# generated resource classes. +# +# In addition to the parameters an arbitrary number of template filenames can be set as arguments +# +# In case of success NEPOMUK_RESOURCES_GENERATED is true, otherwise false + +# (C) 2007 Sebastian Trueg + + +macro(NEPOMUK_GENERATE_FROM_ONTOLOGY ontofile targetdir out_headers out_sources out_includes) + + # init + set(NEPOMUK_RESOURCES_GENERATED false) + + find_program(RCGEN nepomuk-rcgen PATHS ${KDE4_BIN_INSTALL_DIR} ${BIN_INSTALL_DIR} NO_DEFAULT_PATH) + + if(NOT RCGEN) + + message(STATUS "Failed to find the Nepomuk source generator" ) + + else() + + FILE(TO_NATIVE_PATH ${RCGEN} RCGEN) + + execute_process( + COMMAND ${RCGEN} --listheaders --prefix ${targetdir}/ --ontologies ${ontofile} + OUTPUT_VARIABLE ${out_headers} + RESULT_VARIABLE rcgen_result + ) + + # If the first call succeeds it is very very likely that the rest will, too + if(${rcgen_result} EQUAL 0) + + execute_process( + COMMAND ${RCGEN} --listsources --prefix ${targetdir}/ --ontologies ${ontofile} + OUTPUT_VARIABLE ${out_sources} + ) + + execute_process( + COMMAND ${RCGEN} --listincludes --ontologies ${ontofile} + OUTPUT_VARIABLE ${out_includes} + ) + + execute_process( + COMMAND ${RCGEN} --writeall --templates ${ARGN} --target ${targetdir}/ --ontologies ${ontofile} + ) + + set(NEPOMUK_RESOURCES_GENERATED true) + + else() + + message(STATUS "Failed to generate Nepomuk resource classes.") + + endif() + + endif() + +endmacro(NEPOMUK_GENERATE_FROM_ONTOLOGY) diff --git a/deps/extra-cmake-modules/attic/modules/PythonCompile.py b/deps/extra-cmake-modules/attic/modules/PythonCompile.py new file mode 100644 index 0000000..156fea2 --- /dev/null +++ b/deps/extra-cmake-modules/attic/modules/PythonCompile.py @@ -0,0 +1,4 @@ +# By Simon Edwards +# This file is in the public domain. +import py_compile, sys +sys.exit(py_compile.main()) diff --git a/deps/extra-cmake-modules/attic/modules/PythonMacros.cmake b/deps/extra-cmake-modules/attic/modules/PythonMacros.cmake new file mode 100644 index 0000000..0abaccb --- /dev/null +++ b/deps/extra-cmake-modules/attic/modules/PythonMacros.cmake @@ -0,0 +1,62 @@ +# Python macros +# ~~~~~~~~~~~~~ +# Copyright (c) 2007, Simon Edwards +# +# Redistribution and use is allowed according to the terms of the BSD license. +# For details see the accompanying COPYING-CMAKE-SCRIPTS file. +# +# This file defines the following macros: +# +# PYTHON_INSTALL (SOURCE_FILE DESINATION_DIR) +# Install the SOURCE_FILE, which is a Python .py file, into the +# destination directory during install. The file will be byte compiled +# and both the .py file and .pyc file will be installed. + +GET_FILENAME_COMPONENT(PYTHON_MACROS_MODULE_PATH ${CMAKE_CURRENT_LIST_FILE} PATH) + +MACRO(PYTHON_INSTALL SOURCE_FILE DESINATION_DIR) + + FIND_FILE(_python_compile_py PythonCompile.py PATHS ${CMAKE_MODULE_PATH}) + + ADD_CUSTOM_TARGET(compile_python_files ALL) + + # Install the source file. + INSTALL(FILES ${SOURCE_FILE} DESTINATION ${DESINATION_DIR}) + + # Byte compile and install the .pyc file. + GET_FILENAME_COMPONENT(_absfilename ${SOURCE_FILE} ABSOLUTE) + GET_FILENAME_COMPONENT(_filename ${SOURCE_FILE} NAME) + GET_FILENAME_COMPONENT(_filenamebase ${SOURCE_FILE} NAME_WE) + GET_FILENAME_COMPONENT(_basepath ${SOURCE_FILE} PATH) + + if(WIN32) + string(REGEX REPLACE ".:/" "/" _basepath "${_basepath}") + endif() + + SET(_bin_py ${CMAKE_CURRENT_BINARY_DIR}/${_basepath}/${_filename}) + SET(_bin_pyc ${CMAKE_CURRENT_BINARY_DIR}/${_basepath}/${_filenamebase}.pyc) + + FILE(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${_basepath}) + + SET(_message "-DMESSAGE=Byte-compiling ${_bin_py}") + + GET_FILENAME_COMPONENT(_abs_bin_py ${_bin_py} ABSOLUTE) + IF(_abs_bin_py STREQUAL ${_absfilename}) # Don't copy the file onto itself. + ADD_CUSTOM_COMMAND( + TARGET compile_python_files + COMMAND ${CMAKE_COMMAND} -E echo ${message} + COMMAND ${PYTHON_EXECUTABLE} ${_python_compile_py} ${_bin_py} + DEPENDS ${_absfilename} + ) + ELSE(_abs_bin_py STREQUAL ${_absfilename}) + ADD_CUSTOM_COMMAND( + TARGET compile_python_files + COMMAND ${CMAKE_COMMAND} -E echo ${message} + COMMAND ${CMAKE_COMMAND} -E copy ${_absfilename} ${_bin_py} + COMMAND ${PYTHON_EXECUTABLE} ${_python_compile_py} ${_bin_py} + DEPENDS ${_absfilename} + ) + ENDIF(_abs_bin_py STREQUAL ${_absfilename}) + + INSTALL(FILES ${_bin_pyc} DESTINATION ${DESINATION_DIR}) +ENDMACRO(PYTHON_INSTALL) diff --git a/deps/extra-cmake-modules/attic/modules/Qt4ConfigDependentSettings.cmake b/deps/extra-cmake-modules/attic/modules/Qt4ConfigDependentSettings.cmake new file mode 100644 index 0000000..b5462e7 --- /dev/null +++ b/deps/extra-cmake-modules/attic/modules/Qt4ConfigDependentSettings.cmake @@ -0,0 +1,384 @@ +# This file is included by FindQt4.cmake, don't include it directly. + +#============================================================================= +# Copyright 2005-2009 Kitware, Inc. +# +# Distributed under the OSI-approved BSD License (the "License"); +# see accompanying file Copyright.txt for details. +# +# This software is distributed WITHOUT ANY WARRANTY; without even the +# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the License for more information. +#============================================================================= +# (To distributed this file outside of CMake, substitute the full +# License text for the above reference.) + + +############################################### +# +# configuration/system dependent settings +# +############################################### + +# this check for X11 and threads may not be necessary, since it is not +# contained in the cmake version of FindQt4.cmake: + +# for unix add X11 stuff +IF(UNIX) + # on OS X X11 may not be required + IF (Q_WS_X11) + FIND_PACKAGE(X11 REQUIRED) + ENDIF (Q_WS_X11) + FIND_PACKAGE(Threads) + SET(QT_QTCORE_LIBRARY ${QT_QTCORE_LIBRARY} ${CMAKE_THREAD_LIBS_INIT}) +ENDIF(UNIX) + + +# find dependencies for some Qt modules +# when doing builds against a static Qt, they are required +# when doing builds against a shared Qt, they are not required +# if a user needs the dependencies, and they couldn't be found, they can set +# the variables themselves. + +SET(QT_QTGUI_LIB_DEPENDENCIES "") +SET(QT_QTCORE_LIB_DEPENDENCIES "") +SET(QT_QTNETWORK_LIB_DEPENDENCIES "") +SET(QT_QTOPENGL_LIB_DEPENDENCIES "") +SET(QT_QTDBUS_LIB_DEPENDENCIES "") +SET(QT_QTHELP_LIB_DEPENDENCIES ${QT_QTCLUCENE_LIBRARY}) + + +IF(WIN32) + # On Windows, qconfig.pri has "static" for static library builds + IF(QT_CONFIG MATCHES "static") + SET(QT_IS_STATIC 1) + ENDIF(QT_CONFIG MATCHES "static") +ELSE(WIN32) + # On other platforms, check file extension to know if its static + IF(QT_QTCORE_LIBRARY_RELEASE) + GET_FILENAME_COMPONENT(qtcore_lib_ext "${QT_QTCORE_LIBRARY_RELEASE}" EXT) + IF("${qtcore_lib_ext}" STREQUAL "${CMAKE_STATIC_LIBRARY_SUFFIX}") + SET(QT_IS_STATIC 1) + ENDIF("${qtcore_lib_ext}" STREQUAL "${CMAKE_STATIC_LIBRARY_SUFFIX}") + ENDIF(QT_QTCORE_LIBRARY_RELEASE) + IF(QT_QTCORE_LIBRARY_DEBUG) + GET_FILENAME_COMPONENT(qtcore_lib_ext "${QT_QTCORE_LIBRARY_DEBUG}" EXT) + IF(${qtcore_lib_ext} STREQUAL ${CMAKE_STATIC_LIBRARY_SUFFIX}) + SET(QT_IS_STATIC 1) + ENDIF(${qtcore_lib_ext} STREQUAL ${CMAKE_STATIC_LIBRARY_SUFFIX}) + ENDIF(QT_QTCORE_LIBRARY_DEBUG) +ENDIF(WIN32) + +# build using shared Qt needs -DQT_DLL on Windows +IF(WIN32 AND NOT QT_IS_STATIC) + SET(QT_DEFINITIONS ${QT_DEFINITIONS} -DQT_DLL) +ENDIF(WIN32 AND NOT QT_IS_STATIC) + + +# QtOpenGL dependencies +QT_QUERY_QMAKE(QMAKE_LIBS_OPENGL "QMAKE_LIBS_OPENGL") +IF(Q_WS_MAC) +# On the Mac OpenGL is probably frameworks and QMAKE_LIBS_OPENGL can be e.g. "-framework OpenGL -framework AGL". +# The separate_arguments() call in the other branch makes "-framework;-OpenGL;-framework;-lAGL" appear in the +# linker command. So we need to protect the "-framework foo" as non-separatable strings. +# We do this by replacing the space after "-framework" with an underscore, then calling separate_arguments(), +# and then we replace the underscores again with spaces. So we get proper linker commands. Alex + STRING(REGEX REPLACE "-framework +" "-framework_" QMAKE_LIBS_OPENGL "${QMAKE_LIBS_OPENGL}") + SEPARATE_ARGUMENTS(QMAKE_LIBS_OPENGL) + STRING(REGEX REPLACE "-framework_" "-framework " QMAKE_LIBS_OPENGL "${QMAKE_LIBS_OPENGL}") +ELSE(Q_WS_MAC) + SEPARATE_ARGUMENTS(QMAKE_LIBS_OPENGL) +ENDIF(Q_WS_MAC) +SET (QT_QTOPENGL_LIB_DEPENDENCIES ${QT_QTOPENGL_LIB_DEPENDENCIES} ${QMAKE_LIBS_OPENGL}) + + +## system png +IF(QT_QCONFIG MATCHES "system-png") + FIND_LIBRARY(QT_PNG_LIBRARY NAMES png) + MARK_AS_ADVANCED(QT_PNG_LIBRARY) + IF(QT_PNG_LIBRARY) + SET(QT_QTGUI_LIB_DEPENDENCIES ${QT_QTGUI_LIB_DEPENDENCIES} ${QT_PNG_LIBRARY}) + ENDIF(QT_PNG_LIBRARY) +ENDIF(QT_QCONFIG MATCHES "system-png") + + +# for X11, get X11 library directory +IF(Q_WS_X11) + QT_QUERY_QMAKE(QMAKE_LIBDIR_X11 "QMAKE_LIBDIR_X11") +ENDIF(Q_WS_X11) + + +## X11 SM +IF(QT_QCONFIG MATCHES "x11sm") + # ask qmake where the x11 libs are + FIND_LIBRARY(QT_X11_SM_LIBRARY NAMES SM PATHS ${QMAKE_LIBDIR_X11}) + FIND_LIBRARY(QT_X11_ICE_LIBRARY NAMES ICE PATHS ${QMAKE_LIBDIR_X11}) + MARK_AS_ADVANCED(QT_X11_SM_LIBRARY) + MARK_AS_ADVANCED(QT_X11_ICE_LIBRARY) + IF(QT_X11_SM_LIBRARY AND QT_X11_ICE_LIBRARY) + SET(QT_QTGUI_LIB_DEPENDENCIES ${QT_QTGUI_LIB_DEPENDENCIES} ${QT_X11_SM_LIBRARY} ${QT_X11_ICE_LIBRARY}) + ENDIF(QT_X11_SM_LIBRARY AND QT_X11_ICE_LIBRARY) +ENDIF(QT_QCONFIG MATCHES "x11sm") + + +## Xi +IF(QT_QCONFIG MATCHES "tablet") + FIND_LIBRARY(QT_XI_LIBRARY NAMES Xi PATHS ${QMAKE_LIBDIR_X11}) + MARK_AS_ADVANCED(QT_XI_LIBRARY) + IF(QT_XI_LIBRARY) + SET(QT_QTGUI_LIB_DEPENDENCIES ${QT_QTGUI_LIB_DEPENDENCIES} ${QT_XI_LIBRARY}) + ENDIF(QT_XI_LIBRARY) +ENDIF(QT_QCONFIG MATCHES "tablet") + + +## Xrender +IF(QT_QCONFIG MATCHES "xrender") + FIND_LIBRARY(QT_XRENDER_LIBRARY NAMES Xrender PATHS ${QMAKE_LIBDIR_X11}) + MARK_AS_ADVANCED(QT_XRENDER_LIBRARY) + IF(QT_XRENDER_LIBRARY) + SET(QT_QTGUI_LIB_DEPENDENCIES ${QT_QTGUI_LIB_DEPENDENCIES} ${QT_XRENDER_LIBRARY}) + ENDIF(QT_XRENDER_LIBRARY) +ENDIF(QT_QCONFIG MATCHES "xrender") + + +## Xrandr +IF(QT_QCONFIG MATCHES "xrandr") + FIND_LIBRARY(QT_XRANDR_LIBRARY NAMES Xrandr PATHS ${QMAKE_LIBDIR_X11}) + MARK_AS_ADVANCED(QT_XRANDR_LIBRARY) + IF(QT_XRANDR_LIBRARY) + SET(QT_QTGUI_LIB_DEPENDENCIES ${QT_QTGUI_LIB_DEPENDENCIES} ${QT_XRANDR_LIBRARY}) + ENDIF(QT_XRANDR_LIBRARY) +ENDIF(QT_QCONFIG MATCHES "xrandr") + + +## Xcursor +IF(QT_QCONFIG MATCHES "xcursor") + FIND_LIBRARY(QT_XCURSOR_LIBRARY NAMES Xcursor PATHS ${QMAKE_LIBDIR_X11}) + MARK_AS_ADVANCED(QT_XCURSOR_LIBRARY) + IF(QT_XCURSOR_LIBRARY) + SET(QT_QTGUI_LIB_DEPENDENCIES ${QT_QTGUI_LIB_DEPENDENCIES} ${QT_XCURSOR_LIBRARY}) + ENDIF(QT_XCURSOR_LIBRARY) +ENDIF(QT_QCONFIG MATCHES "xcursor") + + +## Xinerama +IF(QT_QCONFIG MATCHES "xinerama") + FIND_LIBRARY(QT_XINERAMA_LIBRARY NAMES Xinerama PATHS ${QMAKE_LIBDIR_X11}) + MARK_AS_ADVANCED(QT_XINERAMA_LIBRARY) + IF(QT_XINERAMA_LIBRARY) + SET(QT_QTGUI_LIB_DEPENDENCIES ${QT_QTGUI_LIB_DEPENDENCIES} ${QT_XINERAMA_LIBRARY}) + ENDIF(QT_XINERAMA_LIBRARY) +ENDIF(QT_QCONFIG MATCHES "xinerama") + + +## Xfixes +IF(QT_QCONFIG MATCHES "xfixes") + FIND_LIBRARY(QT_XFIXES_LIBRARY NAMES Xfixes PATHS ${QMAKE_LIBDIR_X11}) + MARK_AS_ADVANCED(QT_XFIXES_LIBRARY) + IF(QT_XFIXES_LIBRARY) + SET(QT_QTGUI_LIB_DEPENDENCIES ${QT_QTGUI_LIB_DEPENDENCIES} ${QT_XFIXES_LIBRARY}) + ENDIF(QT_XFIXES_LIBRARY) +ENDIF(QT_QCONFIG MATCHES "xfixes") + + +## system-freetype +IF(QT_QCONFIG MATCHES "system-freetype") + FIND_LIBRARY(QT_FREETYPE_LIBRARY NAMES freetype) + MARK_AS_ADVANCED(QT_FREETYPE_LIBRARY) + IF(QT_FREETYPE_LIBRARY) + SET(QT_QTGUI_LIB_DEPENDENCIES ${QT_QTGUI_LIB_DEPENDENCIES} ${QT_FREETYPE_LIBRARY}) + ENDIF(QT_FREETYPE_LIBRARY) +ENDIF(QT_QCONFIG MATCHES "system-freetype") + + +## fontconfig +IF(QT_QCONFIG MATCHES "fontconfig") + FIND_LIBRARY(QT_FONTCONFIG_LIBRARY NAMES fontconfig) + MARK_AS_ADVANCED(QT_FONTCONFIG_LIBRARY) + IF(QT_FONTCONFIG_LIBRARY) + SET(QT_QTGUI_LIB_DEPENDENCIES ${QT_QTGUI_LIB_DEPENDENCIES} ${QT_FONTCONFIG_LIBRARY}) + ENDIF(QT_FONTCONFIG_LIBRARY) +ENDIF(QT_QCONFIG MATCHES "fontconfig") + + +## system-zlib +IF(QT_QCONFIG MATCHES "system-zlib") + FIND_LIBRARY(QT_ZLIB_LIBRARY NAMES z) + MARK_AS_ADVANCED(QT_ZLIB_LIBRARY) + IF(QT_ZLIB_LIBRARY) + SET(QT_QTCORE_LIB_DEPENDENCIES ${QT_QTCORE_LIB_DEPENDENCIES} ${QT_ZLIB_LIBRARY}) + ENDIF(QT_ZLIB_LIBRARY) +ENDIF(QT_QCONFIG MATCHES "system-zlib") + + +## openssl +IF(NOT Q_WS_WIN) + SET(_QT_NEED_OPENSSL 0) + IF(QT_VERSION_MINOR LESS 4 AND QT_QCONFIG MATCHES "openssl") + SET(_QT_NEED_OPENSSL 1) + ENDIF(QT_VERSION_MINOR LESS 4 AND QT_QCONFIG MATCHES "openssl") + IF(QT_VERSION_MINOR GREATER 3 AND QT_QCONFIG MATCHES "openssl-linked") + SET(_QT_NEED_OPENSSL 1) + ENDIF(QT_VERSION_MINOR GREATER 3 AND QT_QCONFIG MATCHES "openssl-linked") + IF(_QT_NEED_OPENSSL) + FIND_PACKAGE(OpenSSL) + IF(OPENSSL_LIBRARIES) + SET(QT_QTNETWORK_LIB_DEPENDENCIES ${QT_QTNETWORK_LIB_DEPENDENCIES} ${OPENSSL_LIBRARIES}) + ENDIF(OPENSSL_LIBRARIES) + ENDIF(_QT_NEED_OPENSSL) +ENDIF(NOT Q_WS_WIN) + + +## dbus +IF(QT_QCONFIG MATCHES "dbus") + + # if the dbus library isn't found, we'll assume its not required to build + # shared Qt on Linux doesn't require it + IF(NOT QT_DBUS_LIBRARY) + EXECUTE_PROCESS(COMMAND pkg-config --libs-only-L dbus-1 + OUTPUT_VARIABLE _dbus_query_output + RESULT_VARIABLE _dbus_result + ERROR_VARIABLE _dbus_query_output ) + + IF(_dbus_result MATCHES 0) + STRING(REPLACE "-L" "" _dbus_query_output "${_dbus_query_output}") + SEPARATE_ARGUMENTS(_dbus_query_output) + ELSE(_dbus_result MATCHES 0) + SET(_dbus_query_output) + ENDIF(_dbus_result MATCHES 0) + + FIND_LIBRARY(QT_DBUS_LIBRARY NAMES dbus-1 PATHS ${_dbus_query_output} ) + + IF(QT_DBUS_LIBRARY) + SET(QT_QTDBUS_LIB_DEPENDENCIES ${QT_QTDBUS_LIB_DEPENDENCIES} ${QT_DBUS_LIBRARY}) + ENDIF(QT_DBUS_LIBRARY) + + MARK_AS_ADVANCED(QT_DBUS_LIBRARY) + ENDIF(NOT QT_DBUS_LIBRARY) + +ENDIF(QT_QCONFIG MATCHES "dbus") + + +## glib +IF(QT_QCONFIG MATCHES "glib") + + # if the glib libraries aren't found, we'll assume its not required to build + # shared Qt on Linux doesn't require it + + # Qt 4.2.0+ uses glib-2.0 + IF(NOT QT_GLIB_LIBRARY OR NOT QT_GTHREAD_LIBRARY) + EXECUTE_PROCESS(COMMAND pkg-config --libs-only-L glib-2.0 gthread-2.0 + OUTPUT_VARIABLE _glib_query_output + RESULT_VARIABLE _glib_result + ERROR_VARIABLE _glib_query_output ) + + IF(_glib_result MATCHES 0) + STRING(REPLACE "-L" "" _glib_query_output "${_glib_query_output}") + SEPARATE_ARGUMENTS(_glib_query_output) + ELSE(_glib_result MATCHES 0) + SET(_glib_query_output) + ENDIF(_glib_result MATCHES 0) + + FIND_LIBRARY(QT_GLIB_LIBRARY NAMES glib-2.0 PATHS ${_glib_query_output} ) + FIND_LIBRARY(QT_GTHREAD_LIBRARY NAMES gthread-2.0 PATHS ${_glib_query_output} ) + + MARK_AS_ADVANCED(QT_GLIB_LIBRARY) + MARK_AS_ADVANCED(QT_GTHREAD_LIBRARY) + ENDIF(NOT QT_GLIB_LIBRARY OR NOT QT_GTHREAD_LIBRARY) + + IF(QT_GLIB_LIBRARY AND QT_GTHREAD_LIBRARY) + SET(QT_QTCORE_LIB_DEPENDENCIES ${QT_QTCORE_LIB_DEPENDENCIES} + ${QT_GTHREAD_LIBRARY} ${QT_GLIB_LIBRARY}) + ENDIF(QT_GLIB_LIBRARY AND QT_GTHREAD_LIBRARY) + + + # Qt 4.5+ also links to gobject-2.0 + IF(QT_VERSION_MINOR GREATER 4) + IF(NOT QT_GOBJECT_LIBRARY) + EXECUTE_PROCESS(COMMAND pkg-config --libs-only-L gobject-2.0 + OUTPUT_VARIABLE _glib_query_output + RESULT_VARIABLE _glib_result + ERROR_VARIABLE _glib_query_output ) + + IF(_glib_result MATCHES 0) + STRING(REPLACE "-L" "" _glib_query_output "${_glib_query_output}") + SEPARATE_ARGUMENTS(_glib_query_output) + ELSE(_glib_result MATCHES 0) + SET(_glib_query_output) + ENDIF(_glib_result MATCHES 0) + + FIND_LIBRARY(QT_GOBJECT_LIBRARY NAMES gobject-2.0 PATHS ${_glib_query_output} ) + + MARK_AS_ADVANCED(QT_GOBJECT_LIBRARY) + ENDIF(NOT QT_GOBJECT_LIBRARY) + + IF(QT_GOBJECT_LIBRARY) + SET(QT_QTCORE_LIB_DEPENDENCIES ${QT_QTCORE_LIB_DEPENDENCIES} + ${QT_GOBJECT_LIBRARY}) + ENDIF(QT_GOBJECT_LIBRARY) + ENDIF(QT_VERSION_MINOR GREATER 4) + +ENDIF(QT_QCONFIG MATCHES "glib") + + +## clock-monotonic, just see if we need to link with rt +IF(QT_QCONFIG MATCHES "clock-monotonic") + SET(CMAKE_REQUIRED_LIBRARIES_SAVE ${CMAKE_REQUIRED_LIBRARIES}) + SET(CMAKE_REQUIRED_LIBRARIES rt) + CHECK_SYMBOL_EXISTS(_POSIX_TIMERS "unistd.h;time.h" QT_POSIX_TIMERS) + SET(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES_SAVE}) + IF(QT_POSIX_TIMERS) + FIND_LIBRARY(QT_RT_LIBRARY NAMES rt) + MARK_AS_ADVANCED(QT_RT_LIBRARY) + IF(QT_RT_LIBRARY) + SET(QT_QTCORE_LIB_DEPENDENCIES ${QT_QTCORE_LIB_DEPENDENCIES} ${QT_RT_LIBRARY}) + ENDIF(QT_RT_LIBRARY) + ENDIF(QT_POSIX_TIMERS) +ENDIF(QT_QCONFIG MATCHES "clock-monotonic") + + +IF(Q_WS_X11) + # X11 libraries Qt absolutely depends on + QT_QUERY_QMAKE(QT_LIBS_X11 "QMAKE_LIBS_X11") + SEPARATE_ARGUMENTS(QT_LIBS_X11) + FOREACH(QT_X11_LIB ${QT_LIBS_X11}) + STRING(REGEX REPLACE "-l" "" QT_X11_LIB "${QT_X11_LIB}") + SET(QT_TMP_STR "QT_X11_${QT_X11_LIB}_LIBRARY") + FIND_LIBRARY(${QT_TMP_STR} NAMES "${QT_X11_LIB}" PATHS ${QMAKE_LIBDIR_X11}) + MARK_AS_ADVANCED(${QT_TMP_STR}) + IF(${QT_TMP_STR}) + SET(QT_QTGUI_LIB_DEPENDENCIES ${QT_QTGUI_LIB_DEPENDENCIES} ${${QT_TMP_STR}}) + ENDIF(${QT_TMP_STR}) + ENDFOREACH(QT_X11_LIB) + + QT_QUERY_QMAKE(QT_LIBS_THREAD "QMAKE_LIBS_THREAD") + SET(QT_QTCORE_LIB_DEPENDENCIES ${QT_QTCORE_LIB_DEPENDENCIES} ${QT_LIBS_THREAD}) + + QT_QUERY_QMAKE(QMAKE_LIBS_DYNLOAD "QMAKE_LIBS_DYNLOAD") + SET (QT_QTCORE_LIB_DEPENDENCIES ${QT_QTCORE_LIB_DEPENDENCIES} ${QMAKE_LIBS_DYNLOAD}) + +ENDIF(Q_WS_X11) + + +IF(Q_WS_WIN) + SET(QT_QTGUI_LIB_DEPENDENCIES ${QT_QTGUI_LIB_DEPENDENCIES} imm32 winmm) + SET(QT_QTCORE_LIB_DEPENDENCIES ${QT_QTCORE_LIB_DEPENDENCIES} ws2_32) +ENDIF(Q_WS_WIN) + + +IF(Q_WS_MAC) + SET(QT_QTGUI_LIB_DEPENDENCIES ${QT_QTGUI_LIB_DEPENDENCIES} "-framework Carbon") + + # Qt 4.0, 4.1, 4.2 use QuickTime + IF(QT_VERSION_MINOR LESS 3) + SET(QT_QTGUI_LIB_DEPENDENCIES ${QT_QTGUI_LIB_DEPENDENCIES} "-framework QuickTime") + ENDIF(QT_VERSION_MINOR LESS 3) + + # Qt 4.2+ use AppKit + IF(QT_VERSION_MINOR GREATER 1) + SET(QT_QTGUI_LIB_DEPENDENCIES ${QT_QTGUI_LIB_DEPENDENCIES} "-framework AppKit") + ENDIF(QT_VERSION_MINOR GREATER 1) + + SET(QT_QTCORE_LIB_DEPENDENCIES ${QT_QTCORE_LIB_DEPENDENCIES} "-framework ApplicationServices") +ENDIF(Q_WS_MAC) + diff --git a/deps/extra-cmake-modules/attic/modules/Qt4Macros.cmake b/deps/extra-cmake-modules/attic/modules/Qt4Macros.cmake new file mode 100644 index 0000000..1422c59 --- /dev/null +++ b/deps/extra-cmake-modules/attic/modules/Qt4Macros.cmake @@ -0,0 +1,414 @@ +# This file is included by FindQt4.cmake, don't include it directly. + +#============================================================================= +# Copyright 2005-2009 Kitware, Inc. +# +# Distributed under the OSI-approved BSD License (the "License"); +# see accompanying file Copyright.txt for details. +# +# This software is distributed WITHOUT ANY WARRANTY; without even the +# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the License for more information. +#============================================================================= +# (To distributed this file outside of CMake, substitute the full +# License text for the above reference.) + + +###################################### +# +# Macros for building Qt files +# +###################################### + + +MACRO (QT4_EXTRACT_OPTIONS _qt4_files _qt4_options) + SET(${_qt4_files}) + SET(${_qt4_options}) + SET(_QT4_DOING_OPTIONS FALSE) + FOREACH(_currentArg ${ARGN}) + IF ("${_currentArg}" STREQUAL "OPTIONS") + SET(_QT4_DOING_OPTIONS TRUE) + ELSE ("${_currentArg}" STREQUAL "OPTIONS") + IF(_QT4_DOING_OPTIONS) + LIST(APPEND ${_qt4_options} "${_currentArg}") + ELSE(_QT4_DOING_OPTIONS) + LIST(APPEND ${_qt4_files} "${_currentArg}") + ENDIF(_QT4_DOING_OPTIONS) + ENDIF ("${_currentArg}" STREQUAL "OPTIONS") + ENDFOREACH(_currentArg) +ENDMACRO (QT4_EXTRACT_OPTIONS) + + +# macro used to create the names of output files preserving relative dirs +MACRO (QT4_MAKE_OUTPUT_FILE infile prefix ext outfile ) + STRING(LENGTH ${CMAKE_CURRENT_BINARY_DIR} _binlength) + STRING(LENGTH ${infile} _infileLength) + SET(_checkinfile ${CMAKE_CURRENT_SOURCE_DIR}) + IF(_infileLength GREATER _binlength) + STRING(SUBSTRING "${infile}" 0 ${_binlength} _checkinfile) + IF(_checkinfile STREQUAL "${CMAKE_CURRENT_BINARY_DIR}") + FILE(RELATIVE_PATH rel ${CMAKE_CURRENT_BINARY_DIR} ${infile}) + ELSE(_checkinfile STREQUAL "${CMAKE_CURRENT_BINARY_DIR}") + FILE(RELATIVE_PATH rel ${CMAKE_CURRENT_SOURCE_DIR} ${infile}) + ENDIF(_checkinfile STREQUAL "${CMAKE_CURRENT_BINARY_DIR}") + ELSE(_infileLength GREATER _binlength) + FILE(RELATIVE_PATH rel ${CMAKE_CURRENT_SOURCE_DIR} ${infile}) + ENDIF(_infileLength GREATER _binlength) + IF(WIN32 AND rel MATCHES "^[a-zA-Z]:") # absolute path + STRING(REGEX REPLACE "^([a-zA-Z]):(.*)$" "\\1_\\2" rel "${rel}") + ENDIF(WIN32 AND rel MATCHES "^[a-zA-Z]:") + SET(_outfile "${CMAKE_CURRENT_BINARY_DIR}/${rel}") + STRING(REPLACE ".." "__" _outfile ${_outfile}) + GET_FILENAME_COMPONENT(outpath ${_outfile} PATH) + GET_FILENAME_COMPONENT(_outfile ${_outfile} NAME_WE) + FILE(MAKE_DIRECTORY ${outpath}) + SET(${outfile} ${outpath}/${prefix}${_outfile}.${ext}) +ENDMACRO (QT4_MAKE_OUTPUT_FILE ) + + +MACRO (QT4_GET_MOC_FLAGS _moc_flags) + SET(${_moc_flags}) + GET_DIRECTORY_PROPERTY(_inc_DIRS INCLUDE_DIRECTORIES) + + FOREACH(_current ${_inc_DIRS}) + IF("${_current}" MATCHES ".framework/?$") + STRING(REGEX REPLACE "/[^/]+.framework" "" framework_path "${_current}") + SET(${_moc_flags} ${${_moc_flags}} "-F${framework_path}") + ELSE("${_current}" MATCHES ".framework/?$") + SET(${_moc_flags} ${${_moc_flags}} "-I${_current}") + ENDIF("${_current}" MATCHES ".framework/?$") + ENDFOREACH(_current ${_inc_DIRS}) + + GET_DIRECTORY_PROPERTY(_defines COMPILE_DEFINITIONS) + FOREACH(_current ${_defines}) + SET(${_moc_flags} ${${_moc_flags}} "-D${_current}") + ENDFOREACH(_current ${_defines}) + + IF(Q_WS_WIN) + SET(${_moc_flags} ${${_moc_flags}} -DWIN32) + ENDIF(Q_WS_WIN) + +ENDMACRO(QT4_GET_MOC_FLAGS) + + +# helper macro to set up a moc rule +MACRO (QT4_CREATE_MOC_COMMAND infile outfile moc_flags moc_options) + # For Windows, create a parameters file to work around command line length limit + IF (WIN32) + # Pass the parameters in a file. Set the working directory to + # be that containing the parameters file and reference it by + # just the file name. This is necessary because the moc tool on + # MinGW builds does not seem to handle spaces in the path to the + # file given with the @ syntax. + GET_FILENAME_COMPONENT(_moc_outfile_name "${outfile}" NAME) + GET_FILENAME_COMPONENT(_moc_outfile_dir "${outfile}" PATH) + IF(_moc_outfile_dir) + SET(_moc_working_dir WORKING_DIRECTORY ${_moc_outfile_dir}) + ENDIF(_moc_outfile_dir) + SET (_moc_parameters_file ${outfile}_parameters) + SET (_moc_parameters ${moc_flags} ${moc_options} -o "${outfile}" "${infile}") + FILE (REMOVE ${_moc_parameters_file}) + FOREACH(arg ${_moc_parameters}) + FILE (APPEND ${_moc_parameters_file} "${arg}\n") + ENDFOREACH(arg) + ADD_CUSTOM_COMMAND(OUTPUT ${outfile} + COMMAND ${QT_MOC_EXECUTABLE} @${_moc_outfile_name}_parameters + DEPENDS ${infile} + ${_moc_working_dir} + VERBATIM) + ELSE (WIN32) + ADD_CUSTOM_COMMAND(OUTPUT ${outfile} + COMMAND ${QT_MOC_EXECUTABLE} + ARGS ${moc_flags} ${moc_options} -o ${outfile} ${infile} + DEPENDS ${infile}) + ENDIF (WIN32) +ENDMACRO (QT4_CREATE_MOC_COMMAND) + + +MACRO (QT4_GENERATE_MOC infile outfile ) +# get include dirs and flags + QT4_GET_MOC_FLAGS(moc_flags) + GET_FILENAME_COMPONENT(abs_infile ${infile} ABSOLUTE) + QT4_CREATE_MOC_COMMAND(${abs_infile} ${outfile} "${moc_flags}" "") + SET_SOURCE_FILES_PROPERTIES(${outfile} PROPERTIES SKIP_AUTOMOC TRUE) # dont run automoc on this file + + MACRO_ADD_FILE_DEPENDENCIES(${abs_infile} ${outfile}) +ENDMACRO (QT4_GENERATE_MOC) + + +# QT4_WRAP_CPP(outfiles inputfile ... ) + +MACRO (QT4_WRAP_CPP outfiles ) + # get include dirs + QT4_GET_MOC_FLAGS(moc_flags) + QT4_EXTRACT_OPTIONS(moc_files moc_options ${ARGN}) + + FOREACH (it ${moc_files}) + GET_FILENAME_COMPONENT(it ${it} ABSOLUTE) + QT4_MAKE_OUTPUT_FILE(${it} moc_ cxx outfile) + QT4_CREATE_MOC_COMMAND(${it} ${outfile} "${moc_flags}" "${moc_options}") + SET(${outfiles} ${${outfiles}} ${outfile}) + ENDFOREACH(it) + +ENDMACRO (QT4_WRAP_CPP) + + +# QT4_WRAP_UI(outfiles inputfile ... ) + +MACRO (QT4_WRAP_UI outfiles ) + QT4_EXTRACT_OPTIONS(ui_files ui_options ${ARGN}) + + FOREACH (it ${ui_files}) + GET_FILENAME_COMPONENT(outfile ${it} NAME_WE) + GET_FILENAME_COMPONENT(infile ${it} ABSOLUTE) + SET(outfile ${CMAKE_CURRENT_BINARY_DIR}/ui_${outfile}.h) + ADD_CUSTOM_COMMAND(OUTPUT ${outfile} + COMMAND ${QT_UIC_EXECUTABLE} + ARGS ${ui_options} -o ${outfile} ${infile} + MAIN_DEPENDENCY ${infile}) + SET(${outfiles} ${${outfiles}} ${outfile}) + ENDFOREACH (it) + +ENDMACRO (QT4_WRAP_UI) + + +# QT4_ADD_RESOURCES(outfiles inputfile ... ) + +MACRO (QT4_ADD_RESOURCES outfiles ) + QT4_EXTRACT_OPTIONS(rcc_files rcc_options ${ARGN}) + + FOREACH (it ${rcc_files}) + GET_FILENAME_COMPONENT(outfilename ${it} NAME_WE) + GET_FILENAME_COMPONENT(infile ${it} ABSOLUTE) + GET_FILENAME_COMPONENT(rc_path ${infile} PATH) + SET(outfile ${CMAKE_CURRENT_BINARY_DIR}/qrc_${outfilename}.cxx) + # parse file for dependencies + # all files are absolute paths or relative to the location of the qrc file + FILE(READ "${infile}" _RC_FILE_CONTENTS) + STRING(REGEX MATCHALL "]*>" "" _RC_FILE "${_RC_FILE}") + STRING(REGEX MATCH "^/|([A-Za-z]:/)" _ABS_PATH_INDICATOR "${_RC_FILE}") + IF(NOT _ABS_PATH_INDICATOR) + SET(_RC_FILE "${rc_path}/${_RC_FILE}") + ENDIF(NOT _ABS_PATH_INDICATOR) + SET(_RC_DEPENDS ${_RC_DEPENDS} "${_RC_FILE}") + ENDFOREACH(_RC_FILE) + ADD_CUSTOM_COMMAND(OUTPUT ${outfile} + COMMAND ${QT_RCC_EXECUTABLE} + ARGS ${rcc_options} -name ${outfilename} -o ${outfile} ${infile} + MAIN_DEPENDENCY ${infile} + DEPENDS ${_RC_DEPENDS}) + SET(${outfiles} ${${outfiles}} ${outfile}) + ENDFOREACH (it) + +ENDMACRO (QT4_ADD_RESOURCES) + + +MACRO(QT4_ADD_DBUS_INTERFACE _sources _interface _basename) + GET_FILENAME_COMPONENT(_infile ${_interface} ABSOLUTE) + SET(_header ${CMAKE_CURRENT_BINARY_DIR}/${_basename}.h) + SET(_impl ${CMAKE_CURRENT_BINARY_DIR}/${_basename}.cpp) + SET(_moc ${CMAKE_CURRENT_BINARY_DIR}/${_basename}.moc) + + GET_SOURCE_FILE_PROPERTY(_nonamespace ${_interface} NO_NAMESPACE) + IF ( _nonamespace ) + SET(_params -N -m) + ELSE ( _nonamespace ) + SET(_params -m) + ENDIF ( _nonamespace ) + + GET_SOURCE_FILE_PROPERTY(_classname ${_interface} CLASSNAME) + IF ( _classname ) + SET(_params ${_params} -c ${_classname}) + ENDIF ( _classname ) + + GET_SOURCE_FILE_PROPERTY(_include ${_interface} INCLUDE) + IF ( _include ) + SET(_params ${_params} -i ${_include}) + ENDIF ( _include ) + + ADD_CUSTOM_COMMAND(OUTPUT ${_impl} ${_header} + COMMAND ${QT_DBUSXML2CPP_EXECUTABLE} ${_params} -p ${_basename} ${_infile} + DEPENDS ${_infile}) + + SET_SOURCE_FILES_PROPERTIES(${_impl} PROPERTIES SKIP_AUTOMOC TRUE) + + QT4_GENERATE_MOC(${_header} ${_moc}) + + SET(${_sources} ${${_sources}} ${_impl} ${_header} ${_moc}) + MACRO_ADD_FILE_DEPENDENCIES(${_impl} ${_moc}) + +ENDMACRO(QT4_ADD_DBUS_INTERFACE) + + +MACRO(QT4_ADD_DBUS_INTERFACES _sources) + FOREACH (_current_FILE ${ARGN}) + GET_FILENAME_COMPONENT(_infile ${_current_FILE} ABSOLUTE) + # get the part before the ".xml" suffix + STRING(REGEX REPLACE "(.*[/\\.])?([^\\.]+)\\.xml" "\\2" _basename ${_current_FILE}) + STRING(TOLOWER ${_basename} _basename) + QT4_ADD_DBUS_INTERFACE(${_sources} ${_infile} ${_basename}interface) + ENDFOREACH (_current_FILE) +ENDMACRO(QT4_ADD_DBUS_INTERFACES) + + +MACRO(QT4_GENERATE_DBUS_INTERFACE _header) # _customName OPTIONS -some -options ) + QT4_EXTRACT_OPTIONS(_customName _qt4_dbus_options ${ARGN}) + + GET_FILENAME_COMPONENT(_in_file ${_header} ABSOLUTE) + GET_FILENAME_COMPONENT(_basename ${_header} NAME_WE) + + IF (_customName) + SET(_target ${CMAKE_CURRENT_BINARY_DIR}/${_customName}) + ELSE (_customName) + SET(_target ${CMAKE_CURRENT_BINARY_DIR}/${_basename}.xml) + ENDIF (_customName) + + ADD_CUSTOM_COMMAND(OUTPUT ${_target} + COMMAND ${QT_DBUSCPP2XML_EXECUTABLE} ${_qt4_dbus_options} ${_in_file} -o ${_target} + DEPENDS ${_in_file} + ) +ENDMACRO(QT4_GENERATE_DBUS_INTERFACE) + + +MACRO(QT4_ADD_DBUS_ADAPTOR _sources _xml_file _include _parentClass) # _optionalBasename _optionalClassName) + GET_FILENAME_COMPONENT(_infile ${_xml_file} ABSOLUTE) + + SET(_optionalBasename "${ARGV4}") + IF (_optionalBasename) + SET(_basename ${_optionalBasename} ) + ELSE (_optionalBasename) + STRING(REGEX REPLACE "(.*[/\\.])?([^\\.]+)\\.xml" "\\2adaptor" _basename ${_infile}) + STRING(TOLOWER ${_basename} _basename) + ENDIF (_optionalBasename) + + SET(_optionalClassName "${ARGV5}") + SET(_header ${CMAKE_CURRENT_BINARY_DIR}/${_basename}.h) + SET(_impl ${CMAKE_CURRENT_BINARY_DIR}/${_basename}.cpp) + SET(_moc ${CMAKE_CURRENT_BINARY_DIR}/${_basename}.moc) + + IF(_optionalClassName) + ADD_CUSTOM_COMMAND(OUTPUT ${_impl} ${_header} + COMMAND ${QT_DBUSXML2CPP_EXECUTABLE} -m -a ${_basename} -c ${_optionalClassName} -i ${_include} -l ${_parentClass} ${_infile} + DEPENDS ${_infile} + ) + ELSE(_optionalClassName) + ADD_CUSTOM_COMMAND(OUTPUT ${_impl} ${_header} + COMMAND ${QT_DBUSXML2CPP_EXECUTABLE} -m -a ${_basename} -i ${_include} -l ${_parentClass} ${_infile} + DEPENDS ${_infile} + ) + ENDIF(_optionalClassName) + + QT4_GENERATE_MOC(${_header} ${_moc}) + SET_SOURCE_FILES_PROPERTIES(${_impl} PROPERTIES SKIP_AUTOMOC TRUE) + MACRO_ADD_FILE_DEPENDENCIES(${_impl} ${_moc}) + + SET(${_sources} ${${_sources}} ${_impl} ${_header} ${_moc}) +ENDMACRO(QT4_ADD_DBUS_ADAPTOR) + + +MACRO(QT4_AUTOMOC) + QT4_GET_MOC_FLAGS(_moc_INCS) + + SET(_matching_FILES ) + FOREACH (_current_FILE ${ARGN}) + + GET_FILENAME_COMPONENT(_abs_FILE ${_current_FILE} ABSOLUTE) + # if "SKIP_AUTOMOC" is set to true, we will not handle this file here. + # This is required to make uic work correctly: + # we need to add generated .cpp files to the sources (to compile them), + # but we cannot let automoc handle them, as the .cpp files don't exist yet when + # cmake is run for the very first time on them -> however the .cpp files might + # exist at a later run. at that time we need to skip them, so that we don't add two + # different rules for the same moc file + GET_SOURCE_FILE_PROPERTY(_skip ${_abs_FILE} SKIP_AUTOMOC) + + IF ( NOT _skip AND EXISTS ${_abs_FILE} ) + + FILE(READ ${_abs_FILE} _contents) + + GET_FILENAME_COMPONENT(_abs_PATH ${_abs_FILE} PATH) + + STRING(REGEX MATCHALL "# *include +[^ ]+\\.moc[\">]" _match "${_contents}") + IF(_match) + FOREACH (_current_MOC_INC ${_match}) + STRING(REGEX MATCH "[^ <\"]+\\.moc" _current_MOC "${_current_MOC_INC}") + + GET_FILENAME_COMPONENT(_basename ${_current_MOC} NAME_WE) + IF(EXISTS ${_abs_PATH}/${_basename}.hpp) + SET(_header ${_abs_PATH}/${_basename}.hpp) + ELSE(EXISTS ${_abs_PATH}/${_basename}.hpp) + SET(_header ${_abs_PATH}/${_basename}.h) + ENDIF(EXISTS ${_abs_PATH}/${_basename}.hpp) + SET(_moc ${CMAKE_CURRENT_BINARY_DIR}/${_current_MOC}) + QT4_CREATE_MOC_COMMAND(${_header} ${_moc} "${_moc_INCS}" "") + MACRO_ADD_FILE_DEPENDENCIES(${_abs_FILE} ${_moc}) + ENDFOREACH (_current_MOC_INC) + ENDIF(_match) + ENDIF ( NOT _skip AND EXISTS ${_abs_FILE} ) + ENDFOREACH (_current_FILE) +ENDMACRO(QT4_AUTOMOC) + + +MACRO(QT4_CREATE_TRANSLATION _qm_files) + QT4_EXTRACT_OPTIONS(_lupdate_files _lupdate_options ${ARGN}) + SET(_my_sources) + SET(_my_dirs) + SET(_my_tsfiles) + SET(_ts_pro) + FOREACH (_file ${_lupdate_files}) + GET_FILENAME_COMPONENT(_ext ${_file} EXT) + GET_FILENAME_COMPONENT(_abs_FILE ${_file} ABSOLUTE) + IF(_ext MATCHES "ts") + LIST(APPEND _my_tsfiles ${_abs_FILE}) + ELSE(_ext MATCHES "ts") + IF(NOT _ext) + LIST(APPEND _my_dirs ${_abs_FILE}) + ELSE(NOT _ext) + LIST(APPEND _my_sources ${_abs_FILE}) + ENDIF(NOT _ext) + ENDIF(_ext MATCHES "ts") + ENDFOREACH(_file) + FOREACH(_ts_file ${_my_tsfiles}) + IF(_my_sources) + # make a .pro file to call lupdate on, so we don't make our commands too + # long for some systems + GET_FILENAME_COMPONENT(_ts_name ${_ts_file} NAME_WE) + SET(_ts_pro ${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/${_ts_name}_lupdate.pro) + SET(_pro_srcs) + FOREACH(_pro_src ${_my_sources}) + SET(_pro_srcs "${_pro_srcs} \"${_pro_src}\"") + ENDFOREACH(_pro_src ${_my_sources}) + FILE(WRITE ${_ts_pro} "SOURCES = ${_pro_srcs}") + ENDIF(_my_sources) + ADD_CUSTOM_COMMAND(OUTPUT ${_ts_file} + COMMAND ${QT_LUPDATE_EXECUTABLE} + ARGS ${_lupdate_options} ${_ts_pro} ${_my_dirs} -ts ${_ts_file} + DEPENDS ${_my_sources} ${_ts_pro}) + ENDFOREACH(_ts_file) + QT4_ADD_TRANSLATION(${_qm_files} ${_my_tsfiles}) +ENDMACRO(QT4_CREATE_TRANSLATION) + + +MACRO(QT4_ADD_TRANSLATION _qm_files) + FOREACH (_current_FILE ${ARGN}) + GET_FILENAME_COMPONENT(_abs_FILE ${_current_FILE} ABSOLUTE) + GET_FILENAME_COMPONENT(qm ${_abs_FILE} NAME_WE) + GET_SOURCE_FILE_PROPERTY(output_location ${_abs_FILE} OUTPUT_LOCATION) + IF(output_location) + FILE(MAKE_DIRECTORY "${output_location}") + SET(qm "${output_location}/${qm}.qm") + ELSE(output_location) + SET(qm "${CMAKE_CURRENT_BINARY_DIR}/${qm}.qm") + ENDIF(output_location) + + ADD_CUSTOM_COMMAND(OUTPUT ${qm} + COMMAND ${QT_LRELEASE_EXECUTABLE} + ARGS ${_abs_FILE} -qm ${qm} + DEPENDS ${_abs_FILE} + ) + SET(${_qm_files} ${${_qm_files}} ${qm}) + ENDFOREACH (_current_FILE) +ENDMACRO(QT4_ADD_TRANSLATION) diff --git a/deps/extra-cmake-modules/attic/modules/README b/deps/extra-cmake-modules/attic/modules/README new file mode 100644 index 0000000..d487a0b --- /dev/null +++ b/deps/extra-cmake-modules/attic/modules/README @@ -0,0 +1,19 @@ +these are additional cmake modules required for compiling KDE3 or KDE4 +applications with cmake. Some of them are enhanced versions of the files +coming with cmake, some of them are NOT yet part of cmake. +To use them, copy them into the cmake Module directory or +run "cmake ." followed by "make install" + +Changes to any files should follow the + +cmake commit policy + + at http://techbase.kde.org/Policies/CMake_Commit_Policy + +and the cmake coding style + + at http://techbase.kde.org/Policies/CMake_Coding_Style + + +Alex + diff --git a/deps/extra-cmake-modules/attic/modules/SIPMacros.cmake b/deps/extra-cmake-modules/attic/modules/SIPMacros.cmake new file mode 100644 index 0000000..7c5476e --- /dev/null +++ b/deps/extra-cmake-modules/attic/modules/SIPMacros.cmake @@ -0,0 +1,124 @@ +# Macros for SIP +# ~~~~~~~~~~~~~~ +# Copyright (c) 2007, Simon Edwards +# Redistribution and use is allowed according to the terms of the BSD license. +# For details see the accompanying COPYING-CMAKE-SCRIPTS file. +# +# SIP website: http://www.riverbankcomputing.co.uk/sip/index.php +# +# This file defines the following macros: +# +# ADD_SIP_PYTHON_MODULE (MODULE_NAME MODULE_SIP [library1, libaray2, ...]) +# Specifies a SIP file to be built into a Python module and installed. +# MODULE_NAME is the name of Python module including any path name. (e.g. +# os.sys, Foo.bar etc). MODULE_SIP the path and filename of the .sip file +# to process and compile. libraryN are libraries that the Python module, +# which is typically a shared library, should be linked to. The built +# module will also be install into Python's site-packages directory. +# +# The behaviour of the ADD_SIP_PYTHON_MODULE macro can be controlled by a +# number of variables: +# +# SIP_INCLUDES - List of directories which SIP will scan through when looking +# for included .sip files. (Corresponds to the -I option for SIP.) +# +# SIP_TAGS - List of tags to define when running SIP. (Corresponds to the -t +# option for SIP.) +# +# SIP_CONCAT_PARTS - An integer which defines the number of parts the C++ code +# of each module should be split into. Defaults to 8. (Corresponds to the +# -j option for SIP.) +# +# SIP_DISABLE_FEATURES - List of feature names which should be disabled +# running SIP. (Corresponds to the -x option for SIP.) +# +# SIP_EXTRA_OPTIONS - Extra command line options which should be passed on to +# SIP. + +SET(SIP_INCLUDES) +SET(SIP_TAGS) +SET(SIP_CONCAT_PARTS 8) +SET(SIP_DISABLE_FEATURES) +SET(SIP_EXTRA_OPTIONS) + +MACRO(ADD_SIP_PYTHON_MODULE MODULE_NAME MODULE_SIP) + + SET(EXTRA_LINK_LIBRARIES ${ARGN}) + + STRING(REPLACE "." "/" _x ${MODULE_NAME}) + GET_FILENAME_COMPONENT(_parent_module_path ${_x} PATH) + GET_FILENAME_COMPONENT(_child_module_name ${_x} NAME) + + GET_FILENAME_COMPONENT(_module_path ${MODULE_SIP} PATH) + + if(_module_path STREQUAL "") + set(CMAKE_CURRENT_SIP_OUTPUT_DIR "${CMAKE_CURRENT_BINARY_DIR}") + else() + set(CMAKE_CURRENT_SIP_OUTPUT_DIR "${CMAKE_CURRENT_BINARY_DIR}/${_module_path}") + endif() + + GET_FILENAME_COMPONENT(_abs_module_sip ${MODULE_SIP} ABSOLUTE) + + # We give this target a long logical target name. + # (This is to avoid having the library name clash with any already + # install library names. If that happens then cmake dependancy + # tracking get confused.) + STRING(REPLACE "." "_" _logical_name ${MODULE_NAME}) + SET(_logical_name "python_module_${_logical_name}") + + FILE(MAKE_DIRECTORY ${CMAKE_CURRENT_SIP_OUTPUT_DIR}) # Output goes in this dir. + + SET(_sip_includes) + FOREACH (_inc ${SIP_INCLUDES}) + GET_FILENAME_COMPONENT(_abs_inc ${_inc} ABSOLUTE) + LIST(APPEND _sip_includes -I ${_abs_inc}) + ENDFOREACH (_inc ) + + SET(_sip_tags) + FOREACH (_tag ${SIP_TAGS}) + LIST(APPEND _sip_tags -t ${_tag}) + ENDFOREACH (_tag) + + SET(_sip_x) + FOREACH (_x ${SIP_DISABLE_FEATURES}) + LIST(APPEND _sip_x -x ${_x}) + ENDFOREACH (_x ${SIP_DISABLE_FEATURES}) + + SET(_message "-DMESSAGE=Generating CPP code for module ${MODULE_NAME}") + SET(_sip_output_files) + FOREACH(CONCAT_NUM RANGE 0 ${SIP_CONCAT_PARTS} ) + IF( ${CONCAT_NUM} LESS ${SIP_CONCAT_PARTS} ) + SET(_sip_output_files ${_sip_output_files} ${CMAKE_CURRENT_SIP_OUTPUT_DIR}/sip${_child_module_name}part${CONCAT_NUM}.cpp ) + ENDIF( ${CONCAT_NUM} LESS ${SIP_CONCAT_PARTS} ) + ENDFOREACH(CONCAT_NUM RANGE 0 ${SIP_CONCAT_PARTS} ) + + IF(NOT WIN32) + SET(TOUCH_COMMAND touch) + ELSE(NOT WIN32) + SET(TOUCH_COMMAND echo) + # instead of a touch command, give out the name and append to the files + # this is basically what the touch command does. + FOREACH(filename ${_sip_output_files}) + FILE(APPEND filename "") + ENDFOREACH(filename ${_sip_output_files}) + ENDIF(NOT WIN32) + ADD_CUSTOM_COMMAND( + OUTPUT ${_sip_output_files} + COMMAND ${CMAKE_COMMAND} -E echo ${message} + COMMAND ${TOUCH_COMMAND} ${_sip_output_files} + COMMAND ${SIP_EXECUTABLE} ${_sip_tags} ${_sip_x} ${SIP_EXTRA_OPTIONS} -j ${SIP_CONCAT_PARTS} -c ${CMAKE_CURRENT_SIP_OUTPUT_DIR} ${_sip_includes} ${_abs_module_sip} + DEPENDS ${_abs_module_sip} ${SIP_EXTRA_FILES_DEPEND} + ) + # not sure if type MODULE could be uses anywhere, limit to cygwin for now + IF (CYGWIN) + ADD_LIBRARY(${_logical_name} MODULE ${_sip_output_files} ) + ELSE (CYGWIN) + ADD_LIBRARY(${_logical_name} SHARED ${_sip_output_files} ) + ENDIF (CYGWIN) + TARGET_LINK_LIBRARIES(${_logical_name} ${PYTHON_LIBRARY}) + TARGET_LINK_LIBRARIES(${_logical_name} ${EXTRA_LINK_LIBRARIES}) + SET_TARGET_PROPERTIES(${_logical_name} PROPERTIES PREFIX "" OUTPUT_NAME ${_child_module_name}) + + INSTALL(TARGETS ${_logical_name} DESTINATION "${PYTHON_SITE_PACKAGES_INSTALL_DIR}/${_parent_module_path}") + +ENDMACRO(ADD_SIP_PYTHON_MODULE) diff --git a/deps/extra-cmake-modules/attic/modules/Win32.Manifest.in b/deps/extra-cmake-modules/attic/modules/Win32.Manifest.in new file mode 100644 index 0000000..f8d7ba4 --- /dev/null +++ b/deps/extra-cmake-modules/attic/modules/Win32.Manifest.in @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/deps/extra-cmake-modules/attic/modules/check_installed_exports_file.cmake b/deps/extra-cmake-modules/attic/modules/check_installed_exports_file.cmake new file mode 100644 index 0000000..83ed205 --- /dev/null +++ b/deps/extra-cmake-modules/attic/modules/check_installed_exports_file.cmake @@ -0,0 +1,73 @@ + +# This file is executed via install(SCRIPT). +# This means it is include()d into the cmake_install.cmake file +# Due to this the following variables already have the correct value: +# CMAKE_INSTALL_PREFIX +# CMAKE_CURRENT_BINARY_DIR +# +# Additionally the following two variables have to be set: +# EXPORT_INSTALL_DIR - set it to the install destination +# EXPORT_FILES - the filenames of the exports file +# +# Alex + + +# put all the code into a function so all variables used here are local +# which makes sure including this file multiple times in a cmake_install.cmake works +function(CHECK_INSTALLED_EXPORTS_FILE _filename) + + # get the absolute install directory, consider absolute and relative paths and also DESTDIR + if(IS_ABSOLUTE "${EXPORT_INSTALL_DIR}") + set(installDir "$ENV{DESTDIR}${EXPORT_INSTALL_DIR}") + else() + set(installDir "$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/${EXPORT_INSTALL_DIR}") + endif() + + set(installedExportsFile "${installDir}/${_filename}") + + #message(STATUS "************ bin dir: ${CMAKE_CURRENT_BINARY_DIR}") + #message(STATUS "************ prefix: ${CMAKE_INSTALL_PREFIX}") + #message(STATUS "************ exportsfile: ${installedExportsFile}") + + # if the file already exists at the install location, and if we can + # find the exports file in the build dir, read both, and if their contents differ, + # remove all configuration-specific exports files from the install dir, since + # they may create conflicts if the new targets have been added/targets have been + # removed/ targets have been renamed/ the namespace for the exported targets has changed + if(EXISTS "${installedExportsFile}") + if (${EXPORT_INSTALL_DIR} MATCHES "^(/)(.+)$") + set(binaryDirExportFileDir "_${CMAKE_MATCH_2}") + set(binaryDirExportsFile "${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/Export/${binaryDirExportFileDir}/${_filename}") + else (${EXPORT_INSTALL_DIR} MATCHES "^(/)(.+)$") + set(binaryDirExportsFile "${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/Export/${EXPORT_INSTALL_DIR}/${_filename}") + endif (${EXPORT_INSTALL_DIR} MATCHES "^(/)(.+)$") + + # message(STATUS "************* binaryDirExportsFile: ${binaryDirExportsFile}") + + if(EXISTS "${binaryDirExportsFile}") + file(READ "${installedExportsFile}" installedExportsFileContents) + file(READ "${binaryDirExportsFile}" binaryDirExportsFileContents) + + if(NOT "${installedExportsFileContents}" STREQUAL "${binaryDirExportsFileContents}") + + if("${_filename}" MATCHES "^(.+)(\\.cmake)$") + message(STATUS "XXX Installed and new ${_filename} differ, removing installed ${CMAKE_MATCH_1}-*.cmake files") + file(GLOB exportFiles "${installDir}/${CMAKE_MATCH_1}-*.cmake") +# message(STATUS "XXX files: ${exportFiles}") + file(REMOVE ${exportFiles}) + endif() + else() +# message(STATUS "XXX FILES ${_filename} are the same") + endif() + + endif() + + endif() + +endfunction(CHECK_INSTALLED_EXPORTS_FILE) + +# call the function for each exports file +foreach(_currentExportsFile ${EXPORT_FILES}) + check_installed_exports_file("${_currentExportsFile}") +endforeach(_currentExportsFile ${EXPORT_FILES}) + diff --git a/deps/extra-cmake-modules/attic/modules/cmake-modules-styleguide.txt b/deps/extra-cmake-modules/attic/modules/cmake-modules-styleguide.txt new file mode 100644 index 0000000..10e65dc --- /dev/null +++ b/deps/extra-cmake-modules/attic/modules/cmake-modules-styleguide.txt @@ -0,0 +1,115 @@ +This is a copy of the file CMake/Modules/readme.txt from cmake cvs. +Please adhere to the guidelines given below when writing cmake modules +for KDE. + +Some additional guidelines for use in KDE: +-indent using 2, 3 or 4 spaces, not tabs +-use all-lower-case for commands, except if the rest of the file uses +consistently all-upper-case for commands + +Alex + +---------------------------------------------------------------------- + +Note to authors of FindXXX.cmake files + +We would like all FindXXX.cmake files to produce consistent variable names. + +Please use the following consistent variable names for general use. + +XXX_INCLUDE_DIRS The final set of include directories listed in one variable for use by client code. This should not be a cache entry. +XXX_LIBRARIES The libraries to link against to use XXX. These should include full paths. This should not be a cache entry. +XXX_DEFINITIONS Definitions to use when compiling code that uses XXX. This really shouldn't include options such as (-DHAS_JPEG)that a client source-code file uses to decide whether to #include +XXX_EXECUTABLE Where to find the XXX tool. +XXX_YYY_EXECUTABLE Where to find the YYY tool that comes with XXX. +XXX_LIBRARY_DIRS Optionally, the final set of library directories listed in one variable for use by client code. This should not be a cache entry. +XXX_ROOT_DIR Where to find the base directory of XXX. +XXX_VERSION_YY Expect Version YY if true. Make sure at most one of these is ever true. +XXX_WRAP_YY If False, do not try to use the relevent CMake wrapping command. +XXX_YY_FOUND If False, optional YY part of XXX sytem is not available. +XXX_FOUND Set to false, or undefined, if we haven't found, or don't want to use XXX. +XXX_RUNTIME_LIBRARY_DIRS Optionally, the runtime library search path for use when running an executable linked to shared libraries. + The list should be used by user code to create the PATH on windows or LD_LIBRARY_PATH on unix. + This should not be a cache entry. +XXX_VERSION_STRING A human-readable string containing the version of the package found, if any. +XXX_VERSION_MAJOR The major version of the package found, if any. +XXX_VERSION_MINOR The minor version of the package found, if any. +XXX_VERSION_PATCH The patch version of the package found, if any. + +You do not have to provide all of the above variables. You should provide XXX_FOUND under most circumstances. If XXX is a library, then XXX_LIBRARIES, should also be defined, and XXX_INCLUDE_DIRS should usually be defined (I guess libm.a might be an exception) + +The following names should not usually be used in CMakeLists.txt files, but they may be usefully modified in users' CMake Caches to control stuff. + +XXX_LIBRARY Name of XXX Library. A User may set this and XXX_INCLUDE_DIR to ignore to force non-use of XXX. +XXX_YY_LIBRARY Name of YY library that is part of the XXX system. It may or may not be required to use XXX. +XXX_INCLUDE_DIR Where to find xxx.h, etc. (XXX_INCLUDE_PATH was considered bad because a path includes an actual filename.) +XXX_YY_INCLUDE_DIR Where to find xxx_yy.h, etc. + +For tidiness's sake, try to keep as many options as possible out of the cache, leaving at least one option which can be used to disable use of the module, or locate a not-found library (e.g. XXX_ROOT_DIR). For the same reason, mark most cache options as advanced. + +If you need other commands to do special things then it should still begin with XXX_. This gives a sort of namespace effect and keeps things tidy for the user. You should put comments describing all the exported settings, plus descriptions of any the users can use to control stuff. + +You really should also provide backwards compatibility any old settings that were actually in use. Make sure you comment them as deprecated, so that no-one starts using them. + +To correctly document a module, create a comment block at the top with # comments. There are three types of comments that can be in the block: + +1. The brief description of the module, this is done by: +# - a small description + +2. A paragraph of text. This is done with all text that has a single +space between the # and the text. To create a new paragraph, just +put a # with no text on the line. + +3. A verbatim line. This is done with two spaces between the # and the text. + +For example: + +# - This is a cool module +# This module does really cool stuff. +# It can do even more than you think. +# +# It even needs to paragraphs to tell you about it. +# And it defines the following variables: +# VAR_COOL - this is great isn't it? +# VAR_REALLY_COOL - cool right? +# + +To have a .cmake file in this directory NOT show up in the +modules documentation, you should start the file with a blank +line. + +A FindXXX.cmake module will typically be loaded by the command + + FIND_PACKAGE(XXX [major[.minor[.patch]]] [EXACT] + [QUIET] [REQUIRED [components...]]) + +If any version numbers are given to the command it will set the +variable XXX_FIND_VERSION to contain the whole version. The variables +XXX_FIND_VERSION_MAJOR, XXX_FIND_VERSION_MINOR, and +XXX_FIND_VERSION_PATCH will be set to contain the corresponding +portions of the version number. The variable XXX_FIND_VERSION_EXACT +will indicate whether an exact version is requested. +If the find module supports versioning it should locate a version of +the package that is compatible with the version requested. If a +compatible version of the package cannot be found the module should +not report success. The version of the package found should be stored +in the version variables named above. + +If the QUIET option is given to the command it will set the variable +XXX_FIND_QUIETLY to true before loading the FindXXX.cmake module. If +this variable is set the module should not complain about not being +able to find the package. If the +REQUIRED option is given to the command it will set the variable +XXX_FIND_REQUIRED to true before loading the FindXXX.cmake module. If +this variable is set the module should issue a FATAL_ERROR if the +package cannot be found. For each package-specific component, say +YYY, listed after the REQUIRED option a variable XXX_FIND_REQUIRED_YYY +to true. The set of components listed will also be specified in a +XXX_FIND_COMPONENTS variable. This can be used by the FindXXX.cmake +module to determine which sub-components of the package must be found. +If neither the QUIET nor REQUIRED options are given then the +FindXXX.cmake module should look for the package and complain without +error if the module is not found. + +To get this behaviour you can use the FIND_PACKAGE_HANDLE_STANDARD_ARGS() +macro, as an example see FindJPEG.cmake. diff --git a/deps/extra-cmake-modules/attic/modules/config-alsa.h.cmake b/deps/extra-cmake-modules/attic/modules/config-alsa.h.cmake new file mode 100644 index 0000000..fb9cb8c --- /dev/null +++ b/deps/extra-cmake-modules/attic/modules/config-alsa.h.cmake @@ -0,0 +1,34 @@ +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_LINUX_AWE_VOICE_H 1 + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_SYS_AWE_VOICE_H 1 + +/* Define to 1 if you have the + header file. */ +#cmakedefine HAVE__USR_SRC_SYS_GNU_I386_ISA_SOUND_AWE_VOICE_H 1 + +/* Define to 1 if you have the + header file. */ +#cmakedefine HAVE__USR_SRC_SYS_I386_ISA_SOUND_AWE_VOICE_H 1 + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_AWE_VOICE_H 1 + +/* Define if you have libasound.so.2 (required for ALSA 0.9.x support) */ +#cmakedefine HAVE_LIBASOUND2 1 + +/* Define if libasound has snd_pcm_resume() */ +#cmakedefine HAVE_SND_PCM_RESUME 1 + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_ALSA_ASOUNDLIB_H 1 + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_SYS_ASOUNDLIB_H 1 + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_SYS_SOUNDCARD_H 1 + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_MACHINE_SOUNDCARD_H 1 diff --git a/deps/extra-cmake-modules/attic/modules/create_exe_symlink.cmake b/deps/extra-cmake-modules/attic/modules/create_exe_symlink.cmake new file mode 100644 index 0000000..f265780 --- /dev/null +++ b/deps/extra-cmake-modules/attic/modules/create_exe_symlink.cmake @@ -0,0 +1,16 @@ +# Create an executable symlink to a Python script. +# This also sets the target script's permission bits. + +MESSAGE(STATUS "Symlinking $ENV{DESTDIR}/${LINK_NAME} to ${TARGET}") + +GET_FILENAME_COMPONENT(abs_link_name $ENV{DESTDIR}/${LINK_NAME} ABSOLUTE) +GET_FILENAME_COMPONENT(link_path $ENV{DESTDIR}/${LINK_NAME} PATH) +GET_FILENAME_COMPONENT(abs_link_path ${link_path} ABSOLUTE) +FILE(MAKE_DIRECTORY ${abs_link_path}) + +GET_FILENAME_COMPONENT(abs_target ${TARGET} ABSOLUTE) +IF(UNIX) + EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND} -E create_symlink ${abs_target} ${abs_link_name}) + EXECUTE_PROCESS(COMMAND chmod a+x $ENV{DESTDIR}/${abs_target}) +ENDIF(UNIX) +# FIXME: WIN32 support diff --git a/deps/extra-cmake-modules/attic/modules/kde4_cmake_uninstall.cmake.in b/deps/extra-cmake-modules/attic/modules/kde4_cmake_uninstall.cmake.in new file mode 100644 index 0000000..36dd9ba --- /dev/null +++ b/deps/extra-cmake-modules/attic/modules/kde4_cmake_uninstall.cmake.in @@ -0,0 +1,22 @@ +IF(NOT EXISTS "@CMAKE_BINARY_DIR@/install_manifest.txt") + MESSAGE(FATAL_ERROR "Cannot find install manifest: \"@CMAKE_BINARY_DIR@/install_manifest.txt\"") +ENDIF(NOT EXISTS "@CMAKE_BINARY_DIR@/install_manifest.txt") + +FILE(READ "@CMAKE_BINARY_DIR@/install_manifest.txt" files) +STRING(REGEX REPLACE "\n" ";" files "${files}") +FOREACH(file ${files}) + MESSAGE(STATUS "Uninstalling \"${file}\"") + IF(EXISTS "${file}") + EXEC_PROGRAM( + "@CMAKE_COMMAND@" ARGS "-E remove \"${file}\"" + OUTPUT_VARIABLE rm_out + RETURN_VALUE rm_retval + ) + IF("${rm_retval}" STREQUAL 0) + ELSE("${rm_retval}" STREQUAL 0) + MESSAGE(FATAL_ERROR "Problem when removing \"${file}\"") + ENDIF("${rm_retval}" STREQUAL 0) + ELSE(EXISTS "${file}") + MESSAGE(STATUS "File \"${file}\" does not exist.") + ENDIF(EXISTS "${file}") +ENDFOREACH(file) diff --git a/deps/extra-cmake-modules/attic/modules/kde4_exec_via_sh.cmake b/deps/extra-cmake-modules/attic/modules/kde4_exec_via_sh.cmake new file mode 100644 index 0000000..6b826ff --- /dev/null +++ b/deps/extra-cmake-modules/attic/modules/kde4_exec_via_sh.cmake @@ -0,0 +1,31 @@ + +# Copyright (c) 2006, Alexander Neundorf, +# +# Redistribution and use is allowed according to the terms of the BSD license. +# For details see the accompanying COPYING-CMAKE-SCRIPTS file. + + +if (UNIX) + +file(WRITE "${_filename}" +"#!/bin/sh +# created by cmake, don't edit, changes will be lost + +${_library_path_variable}=${_ld_library_path}\${${_library_path_variable}:+:\$${_library_path_variable}} \"${_executable}\" \"$@\" +") + +# make it executable +# since this is only executed on UNIX, it is safe to call chmod +exec_program(chmod ARGS ug+x \"${_filename}\" OUTPUT_VARIABLE _dummy ) + +else (UNIX) + +file(TO_NATIVE_PATH "${_ld_library_path}" win_path) + +file(WRITE "${_filename}" +" +set PATH=${win_path};$ENV{PATH} +\"${_executable}\" %* +") + +endif (UNIX) diff --git a/deps/extra-cmake-modules/cmake/FindQCollectionGenerator.cmake b/deps/extra-cmake-modules/cmake/FindQCollectionGenerator.cmake new file mode 100644 index 0000000..315f5fa --- /dev/null +++ b/deps/extra-cmake-modules/cmake/FindQCollectionGenerator.cmake @@ -0,0 +1,94 @@ +#.rst: +# FindQCollectionGenerator +# ------------------------ +# +# Try to find the Qt help collection generator. +# +# This will define the following variables: +# +# ``QCollectionGenerator_FOUND`` +# True if (the requested version of) Sphinx is available +# ``QCollectionGenerator_VERSION`` +# The version of the Qt help collection generator. Note that this not the +# same as the version of Qt it is provided by. +# ``QCollectionGenerator_QT_VERSION`` +# The version of Qt that the Qt help collection generator is from. +# ``QCollectionGenerator_EXECUTABLE`` +# The path to the Qt help collection generator executable. +# +# If ``QCollectionGenerator_FOUND`` is TRUE, it will also define the following +# imported target: +# +# ``QCollectionGenerator::Generator`` +# The Qt help collection generator. +# +# In general we recommend using the imported target, as it is easier to use. +# +# Since 5.17.0. + +#============================================================================= +# Copyright 2015 Alex Merry +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# 1. Redistributions of source code must retain the copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. 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. +#============================================================================= + +find_program(QCollectionGenerator_EXECUTABLE + NAMES + qcollectiongenerator + qcollectiongenerator-qt4 + qcollectiongenerator-qt5 + DOC "Qt help collection generator" +) + +if (QCollectionGenerator_EXECUTABLE) + if(NOT TARGET QCollectionGenerator::Generator) + add_executable(QCollectionGenerator::Generator IMPORTED) + set_target_properties(QCollectionGenerator::Generator PROPERTIES + IMPORTED_LOCATION "${QCollectionGenerator_EXECUTABLE}" + ) + endif() + + execute_process( + COMMAND "${QCollectionGenerator_EXECUTABLE}" -v + OUTPUT_VARIABLE _QCollectionGenerator_version_raw + ERROR_VARIABLE _QCollectionGenerator_version_raw + ) + if (_QCollectionGenerator_version_raw MATCHES "^Qt Collection Generator version ([0-9]+(\\.[0-9]+)*) \\(Qt ([0-9]+(\\.[0-9]+)*)\\)") + set(QCollectionGenerator_VERSION "${CMAKE_MATCH_1}") + set(QCollectionGenerator_QT_VERSION "${CMAKE_MATCH_3}") + endif() + unset(_QCollectionGenerator_version_raw) +endif() + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(QCollectionGenerator + FOUND_VAR + QCollectionGenerator_FOUND + REQUIRED_VARS + QCollectionGenerator_EXECUTABLE + VERSION_VAR + QCollectionGenerator_VERSION +) + +mark_as_advanced(QCollectionGenerator_EXECUTABLE) diff --git a/deps/extra-cmake-modules/cmake/FindSphinx.cmake b/deps/extra-cmake-modules/cmake/FindSphinx.cmake new file mode 100644 index 0000000..276f3a2 --- /dev/null +++ b/deps/extra-cmake-modules/cmake/FindSphinx.cmake @@ -0,0 +1,91 @@ +#.rst: +# FindSphinx +# ---------- +# +# Try to find the Sphinx documentation builder. +# +# This will define the following variables: +# +# ``Sphinx_FOUND`` +# True if (the requested version of) Sphinx is available +# ``Sphinx_VERSION`` +# The version of the Sphinx documentation builder. +# ``Sphinx_BUILD_EXECUTABLE`` +# The path to the Sphinx documentation builder executable. +# +# If ``Sphinx_FOUND`` is TRUE, it will also define the following imported target: +# +# ``Sphinx::Build`` +# The Sphinx documentation builder. +# +# In general we recommend using the imported target, as it is easier to use. +# +# Since 5.17.0. + +#============================================================================= +# Copyright 2015 Alex Merry +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# 1. Redistributions of source code must retain the copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. 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. +#============================================================================= + +# Distros sometimes rename Python executables to allow for parallel +# installation of Python2 and Python3 versions +find_program(Sphinx_BUILD_EXECUTABLE + NAMES + sphinx-build + sphinx-build2 + sphinx-build3 + DOC "Sphinx Documentation Builder (http://sphinx-doc.org/)" +) + +if (Sphinx_BUILD_EXECUTABLE) + if(NOT TARGET Sphinx::Build) + add_executable(Sphinx::Build IMPORTED) + set_target_properties(Sphinx::Build PROPERTIES + IMPORTED_LOCATION "${Sphinx_BUILD_EXECUTABLE}" + ) + endif() + + execute_process( + COMMAND "${Sphinx_BUILD_EXECUTABLE}" --version + OUTPUT_VARIABLE _Sphinx_version_raw + ERROR_VARIABLE _Sphinx_version_raw + ) + if (_Sphinx_version_raw MATCHES "^Sphinx \\([^)]*\\) ([0-9]+(\\.[0-9]+)*)") + set(Sphinx_VERSION "${CMAKE_MATCH_1}") + endif() + unset(_Sphinx_version_raw) +endif() + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(Sphinx + FOUND_VAR + Sphinx_FOUND + REQUIRED_VARS + Sphinx_BUILD_EXECUTABLE + VERSION_VAR + Sphinx_VERSION +) + +mark_as_advanced(Sphinx_BUILD_EXECUTABLE) diff --git a/deps/extra-cmake-modules/docs/CMakeLists.txt b/deps/extra-cmake-modules/docs/CMakeLists.txt new file mode 100644 index 0000000..0f96ce5 --- /dev/null +++ b/deps/extra-cmake-modules/docs/CMakeLists.txt @@ -0,0 +1,153 @@ +#============================================================================= +# Copyright 2000-2013 Kitware, Inc. +# Copyright 2014-2015 Alex Merry +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# 1. Redistributions of source code must retain the copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. 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. +#============================================================================= + +include(CMakeDependentOption) + +find_package(Sphinx 1.2 MODULE) +set_package_properties( + Sphinx + PROPERTIES + URL "http://sphinx-doc.org/" + DESCRIPTION "Tool to generate documentation." + TYPE OPTIONAL + PURPOSE "Required to build documentation for Extra CMake Modules." +) + +find_package(QCollectionGenerator MODULE) +set_package_properties( + QCollectionGenerator + PROPERTIES + URL "http://www.qt.io/" + DESCRIPTION "Qt help collection generator." + TYPE OPTIONAL + PURPOSE "Required to build Extra CMake Modules documentation in Qt Help format." +) + +cmake_dependent_option( + BUILD_HTML_DOCS "Build html help with Sphinx" ON + "Sphinx_FOUND" OFF +) +add_feature_info(BUILD_HTML_DOCS BUILD_HTML_DOCS "Generate HTML documentation for installed modules.") + +cmake_dependent_option( + BUILD_MAN_DOCS "Build man pages with Sphinx" ON + "Sphinx_FOUND" OFF +) +add_feature_info(BUILD_MAN_DOCS BUILD_MAN_DOCS "Generate man page documentation for installed modules.") + +cmake_dependent_option( + BUILD_QTHELP_DOCS "Build Qt help with Sphinx" OFF + "Sphinx_FOUND;QCollectionGenerator_FOUND" OFF +) +add_feature_info(BUILD_QTHELP_DOCS BUILD_QTHELP_DOCS "Generate QtHelp documentation for installed modules.") + + +set(doc_formats "") +if(BUILD_HTML_DOCS) + list(APPEND doc_formats html) +endif() +if(BUILD_MAN_DOCS) + list(APPEND doc_formats man) +endif() +if(BUILD_QTHELP_DOCS) + list(APPEND doc_formats qthelp) + set(qthelp_extra_commands + COMMAND + QCollectionGenerator::Generator + ${CMAKE_CURRENT_BINARY_DIR}/qthelp/ExtraCMakeModules.qhcp + ) +endif() + +if(NOT doc_formats) + return() +endif() + +if (Sphinx_VERSION VERSION_LESS 1.3) + set(sphinx_theme default) +else() + set(sphinx_theme classic) +endif() +configure_file(sphinx/conf.py.in conf.py @ONLY) +configure_file(sphinx/ecm.css.in static/ecm.css) + + +set(doc_format_outputs "") +set(doc_format_last "") +foreach(format ${doc_formats}) + set(doc_format_output "doc_format_${format}") + set(doc_format_log "build-${format}.log") + add_custom_command( + OUTPUT ${doc_format_output} + COMMAND + Sphinx::Build + -c ${CMAKE_CURRENT_BINARY_DIR} + -d ${CMAKE_CURRENT_BINARY_DIR}/doctrees + -b ${format} + ${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_CURRENT_BINARY_DIR}/${format} + > ${doc_format_log} # log stdout, pass stderr + ${${format}_extra_commands} + DEPENDS ${doc_format_last} + COMMENT "sphinx-build ${format}: see ${CMAKE_CURRENT_BINARY_DIR}/${doc_format_log}" + VERBATIM + ) + set_property(SOURCE ${doc_format_output} PROPERTY SYMBOLIC 1) + list(APPEND doc_format_outputs ${doc_format_output}) + set(doc_format_last ${doc_format_output}) +endforeach() + +add_custom_target(documentation ALL DEPENDS ${doc_format_outputs}) + +if(BUILD_MAN_DOCS) + file(GLOB man_rst RELATIVE ${ECM_SOURCE_DIR}/docs/manual + ${ECM_SOURCE_DIR}/docs/manual/*.[1-9].rst) + foreach(m ${man_rst}) + if("x${m}" MATCHES "^x(.+)\\.([1-9])\\.rst$") + set(name "${CMAKE_MATCH_1}") + set(sec "${CMAKE_MATCH_2}") + install( + FILES ${CMAKE_CURRENT_BINARY_DIR}/man/${name}.${sec} + DESTINATION ${MAN_INSTALL_DIR}/man${sec} + ) + endif() + endforeach() +endif() +if(BUILD_HTML_DOCS) + install( + DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/html + DESTINATION ${DOC_INSTALL_DIR} + PATTERN .buildinfo EXCLUDE + PATTERN objects.inv EXCLUDE + ) +endif() +if(BUILD_QTHELP_DOCS) + install( + FILES ${CMAKE_CURRENT_BINARY_DIR}/qthelp/ExtraCMakeModules.qch + DESTINATION ${DOC_INSTALL_DIR} + ) +endif() diff --git a/deps/extra-cmake-modules/docs/find-module/FindEGL.rst b/deps/extra-cmake-modules/docs/find-module/FindEGL.rst new file mode 100644 index 0000000..6eb9710 --- /dev/null +++ b/deps/extra-cmake-modules/docs/find-module/FindEGL.rst @@ -0,0 +1 @@ +.. ecm-module:: ../../find-modules/FindEGL.cmake diff --git a/deps/extra-cmake-modules/docs/find-module/FindKF5.rst b/deps/extra-cmake-modules/docs/find-module/FindKF5.rst new file mode 100644 index 0000000..47ef384 --- /dev/null +++ b/deps/extra-cmake-modules/docs/find-module/FindKF5.rst @@ -0,0 +1 @@ +.. ecm-module:: ../../find-modules/FindKF5.cmake diff --git a/deps/extra-cmake-modules/docs/find-module/FindLibGit2.rst b/deps/extra-cmake-modules/docs/find-module/FindLibGit2.rst new file mode 100644 index 0000000..cd21068 --- /dev/null +++ b/deps/extra-cmake-modules/docs/find-module/FindLibGit2.rst @@ -0,0 +1 @@ +.. ecm-module:: ../../find-modules/FindLibGit2.cmake diff --git a/deps/extra-cmake-modules/docs/find-module/FindOpenEXR.rst b/deps/extra-cmake-modules/docs/find-module/FindOpenEXR.rst new file mode 100644 index 0000000..abefc85 --- /dev/null +++ b/deps/extra-cmake-modules/docs/find-module/FindOpenEXR.rst @@ -0,0 +1 @@ +.. ecm-module:: ../../find-modules/FindOpenEXR.cmake diff --git a/deps/extra-cmake-modules/docs/find-module/FindPng2Ico.rst b/deps/extra-cmake-modules/docs/find-module/FindPng2Ico.rst new file mode 100644 index 0000000..db8aa77 --- /dev/null +++ b/deps/extra-cmake-modules/docs/find-module/FindPng2Ico.rst @@ -0,0 +1 @@ +.. ecm-module:: ../../find-modules/FindPng2Ico.cmake diff --git a/deps/extra-cmake-modules/docs/find-module/FindPoppler.rst b/deps/extra-cmake-modules/docs/find-module/FindPoppler.rst new file mode 100644 index 0000000..26f6644 --- /dev/null +++ b/deps/extra-cmake-modules/docs/find-module/FindPoppler.rst @@ -0,0 +1 @@ +.. ecm-module:: ../../find-modules/FindPoppler.cmake diff --git a/deps/extra-cmake-modules/docs/find-module/FindQtWaylandScanner.rst b/deps/extra-cmake-modules/docs/find-module/FindQtWaylandScanner.rst new file mode 100644 index 0000000..addc912 --- /dev/null +++ b/deps/extra-cmake-modules/docs/find-module/FindQtWaylandScanner.rst @@ -0,0 +1 @@ +.. ecm-module:: ../../find-modules/FindQtWaylandScanner.cmake diff --git a/deps/extra-cmake-modules/docs/find-module/FindSharedMimeInfo.rst b/deps/extra-cmake-modules/docs/find-module/FindSharedMimeInfo.rst new file mode 100644 index 0000000..678eb51 --- /dev/null +++ b/deps/extra-cmake-modules/docs/find-module/FindSharedMimeInfo.rst @@ -0,0 +1 @@ +.. ecm-module:: ../../find-modules/FindSharedMimeInfo.cmake diff --git a/deps/extra-cmake-modules/docs/find-module/FindWayland.rst b/deps/extra-cmake-modules/docs/find-module/FindWayland.rst new file mode 100644 index 0000000..c64c6d8 --- /dev/null +++ b/deps/extra-cmake-modules/docs/find-module/FindWayland.rst @@ -0,0 +1 @@ +.. ecm-module:: ../../find-modules/FindWayland.cmake diff --git a/deps/extra-cmake-modules/docs/find-module/FindWaylandScanner.rst b/deps/extra-cmake-modules/docs/find-module/FindWaylandScanner.rst new file mode 100644 index 0000000..7dac025 --- /dev/null +++ b/deps/extra-cmake-modules/docs/find-module/FindWaylandScanner.rst @@ -0,0 +1 @@ +.. ecm-module:: ../../find-modules/FindWaylandScanner.cmake diff --git a/deps/extra-cmake-modules/docs/find-module/FindX11_XCB.rst b/deps/extra-cmake-modules/docs/find-module/FindX11_XCB.rst new file mode 100644 index 0000000..30b9246 --- /dev/null +++ b/deps/extra-cmake-modules/docs/find-module/FindX11_XCB.rst @@ -0,0 +1 @@ +.. ecm-module:: ../../find-modules/FindX11_XCB.cmake diff --git a/deps/extra-cmake-modules/docs/find-module/FindXCB.rst b/deps/extra-cmake-modules/docs/find-module/FindXCB.rst new file mode 100644 index 0000000..31e2228 --- /dev/null +++ b/deps/extra-cmake-modules/docs/find-module/FindXCB.rst @@ -0,0 +1 @@ +.. ecm-module:: ../../find-modules/FindXCB.cmake diff --git a/deps/extra-cmake-modules/docs/index.rst b/deps/extra-cmake-modules/docs/index.rst new file mode 100644 index 0000000..1441005 --- /dev/null +++ b/deps/extra-cmake-modules/docs/index.rst @@ -0,0 +1,19 @@ +.. title:: Extra CMake Modules Reference Documentation + +Reference Manuals +################# + +.. toctree:: + :maxdepth: 1 + :glob: + + /manual/ecm.7 + /manual/* + +.. only:: html + + Index and Search + ################ + + * :ref:`genindex` + * :ref:`search` diff --git a/deps/extra-cmake-modules/docs/kde-module/KDECMakeSettings.rst b/deps/extra-cmake-modules/docs/kde-module/KDECMakeSettings.rst new file mode 100644 index 0000000..48ab140 --- /dev/null +++ b/deps/extra-cmake-modules/docs/kde-module/KDECMakeSettings.rst @@ -0,0 +1 @@ +.. ecm-module:: ../../kde-modules/KDECMakeSettings.cmake diff --git a/deps/extra-cmake-modules/docs/kde-module/KDECompilerSettings.rst b/deps/extra-cmake-modules/docs/kde-module/KDECompilerSettings.rst new file mode 100644 index 0000000..28f3e9c --- /dev/null +++ b/deps/extra-cmake-modules/docs/kde-module/KDECompilerSettings.rst @@ -0,0 +1 @@ +.. ecm-module:: ../../kde-modules/KDECompilerSettings.cmake diff --git a/deps/extra-cmake-modules/docs/kde-module/KDEFrameworkCompilerSettings.rst b/deps/extra-cmake-modules/docs/kde-module/KDEFrameworkCompilerSettings.rst new file mode 100644 index 0000000..6b8d7df --- /dev/null +++ b/deps/extra-cmake-modules/docs/kde-module/KDEFrameworkCompilerSettings.rst @@ -0,0 +1 @@ +.. ecm-module:: ../../kde-modules/KDEFrameworkCompilerSettings.cmake diff --git a/deps/extra-cmake-modules/docs/kde-module/KDEInstallDirs.rst b/deps/extra-cmake-modules/docs/kde-module/KDEInstallDirs.rst new file mode 100644 index 0000000..0643517 --- /dev/null +++ b/deps/extra-cmake-modules/docs/kde-module/KDEInstallDirs.rst @@ -0,0 +1 @@ +.. ecm-module:: ../../kde-modules/KDEInstallDirs.cmake diff --git a/deps/extra-cmake-modules/docs/kde-module/KDEPackageAppTemplates.rst b/deps/extra-cmake-modules/docs/kde-module/KDEPackageAppTemplates.rst new file mode 100644 index 0000000..283bae4 --- /dev/null +++ b/deps/extra-cmake-modules/docs/kde-module/KDEPackageAppTemplates.rst @@ -0,0 +1 @@ +.. ecm-module:: ../../kde-modules/KDEPackageAppTemplates.cmake diff --git a/deps/extra-cmake-modules/docs/manual/ecm-developer.7.rst b/deps/extra-cmake-modules/docs/manual/ecm-developer.7.rst new file mode 100644 index 0000000..8eea58c --- /dev/null +++ b/deps/extra-cmake-modules/docs/manual/ecm-developer.7.rst @@ -0,0 +1,244 @@ +.. ecm-manual-description: ECM Developer Reference + +ecm-developer(7) +**************** + +.. only:: html or latex + + .. contents:: + + +Writing Modules +=============== + +The CMake 3 documentation (and `cmake-developer(7)`_ in particular) has a lot of +useful information about writing CMake modules, including a large section +devoted to find modules. This guide will only highlight things that are +particular to the Extra CMake Modules project. + +Most of these are stylistic points. For example, the license header for a module +in ECM should look like:: + + #============================================================================= + # Copyright 20XX Your Name + # + # Redistribution and use in source and binary forms, with or without + # modification, are permitted provided that the following conditions + # are met: + # + # 1. Redistributions of source code must retain the copyright + # notice, this list of conditions and the following disclaimer. + # 2. Redistributions in binary form must reproduce the copyright + # notice, this list of conditions and the following disclaimer in the + # documentation and/or other materials provided with the distribution. + # 3. 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. + +Functions should be used instead of macros unless there is a good reason not to +(and that reason should be noted in a comment), and lowercase should be used for +macros, functions and commands. + +4 spaces is the generally-recommended indent, although there are several files +that use 2 spaces; consistency within a file is more important than consistency +across files. + +If in doubt, look at how other modules in Extra CMake Modules are written, and +follow the same pattern. + + +Find Modules +------------ + +A good template for find module documentation is:: + + #.rst: + # FindFoo + # ------- + # + # Finds the Foo library. + # + # This will define the following variables: + # + # ``Foo_FOUND`` + # True if (the requested version of) Foo is available + # ``Foo_VERSION`` + # The version of Foo, if it is found + # ``Foo_LIBRARIES`` + # This can be passed to target_link_libraries() instead of the ``Foo::Foo`` + # target + # ``Foo_INCLUDE_DIRS`` + # This should be passed to target_include_directories() if the target is not + # used for linking + # ``Foo_DEFINITIONS`` + # This should be passed to target_compile_options() if the target is not + # used for linking + # + # If ``Foo_FOUND`` is TRUE, it will also define the following imported target: + # + # ``Foo::Foo`` + # The Foo library + # + # In general we recommend using the imported target, as it is easier to use. + # Bear in mind, however, that if the target is in the link interface of an + # exported library, it must be made available by the package config file. + +Note the use of definition lists for the variables. + +Because of the :module:`ECMUseFindModules` module, projects may easily make +local copies of find modules, and may install those copies with their own CMake +project config files. For this reason, find modules should include the full BSD +3-clause license:: + + #============================================================================= + # Copyright 20XX Your Name + # + # Redistribution and use in source and binary forms, with or without + # modification, are permitted provided that the following conditions + # are met: + # + # 1. Redistributions of source code must retain the copyright + # notice, this list of conditions and the following disclaimer. + # 2. Redistributions in binary form must reproduce the copyright + # notice, this list of conditions and the following disclaimer in the + # documentation and/or other materials provided with the distribution. + # 3. 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. + #============================================================================= + +Find modules should always provide imported targets in addition to the +traditional variables (like ``Foo_LIBRARIES``, etc). + +Unlike find modules shipped with CMake, if the module requires a specific CMake +version it is not enough to warn when the minimum required version is not high +enough: you should also produce an error when the actual CMake version being +used is not high enough. This can be done with: + +.. code-block:: cmake + + if(CMAKE_VERSION VERSION_LESS 2.8.12) + message(FATAL_ERROR "CMake 2.8.12 is required by FindFoo.cmake") + endif() + if(CMAKE_MINIMUM_REQUIRED_VERSION VERSION_LESS 2.8.12) + message(AUTHOR_WARNING "Your project should require at least CMake 2.8.12 to use FindFoo.cmake") + endif() + +The :module:`ECMFindModuleHelpers` module has several useful functions and +macros. For example, it allows you to replace the above version check with: + +.. code-block:: cmake + + ecm_find_package_version_check(Foo) + +Components +~~~~~~~~~~ + +Using :module:`ECMFindModuleHelpers`, creating a find module for a library with +several inter-dependent components is reasonably straightforward. After the +documentation, you need to include the module and do the usual version check: + +.. code-block:: cmake + + include(ECMFindModuleHelpers) + ecm_find_package_version_check(Foo) + +The important macros are ``ecm_find_package_parse_components`` and +``ecm_find_package_handle_library_components``. These take a list of +components, and query other variables you provide to find out the information +they require. The documentation for :module:`ECMFindModuleHelpers` provides +more information, but a simple setup might look like: + +.. code-block:: cmake + + set(Foo_known_components Bar Baz) + set(Foo_Bar_pkg_config "foo-bar") + set(Foo_Bar_lib "bar") + set(Foo_Bar_header "foo/bar.h") + set(Foo_Bar_pkg_config "foo-baz") + set(Foo_Baz_lib "baz") + set(Foo_Baz_header "foo/baz.h") + +If ``Baz`` depends on ``Bar``, for example, you can specify this with + +.. code-block:: cmake + + set(Foo_Baz_component_deps "Bar") + +Then call the macros: + +.. code-block:: cmake + + ecm_find_package_parse_components(Foo + RESULT_VAR Foo_components + KNOWN_COMPONENTS ${Foo_known_components} + ) + ecm_find_package_handle_library_components(Foo + COMPONENTS ${Foo_components} + ) + +Of course, if your components need unusual handling, you may want to replace +``ecm_find_package_handle_library_components`` with, for example, a ``foreach`` +loop over the components (the body of which should implement most of what a +normal find module does, including setting ``Foo__FOUND``). + +At this point, you should set ``Foo_VERSION`` using whatever information you +have available (such as from parsing header files). Note that +``ecm_find_package_handle_library_components`` will set it to the version +reported by pkg-config of the first component found, but this depends on the +presence of pkg-config files, and the version of a component may not be the same +as the version of the whole package. After that, finish off with + +.. code-block:: cmake + + include(FindPackageHandleStandardArgs) + find_package_handle_standard_args(Foo + FOUND_VAR + Foo_FOUND + REQUIRED_VARS + Foo_LIBRARIES + VERSION_VAR + Foo_VERSION + HANDLE_COMPONENTS + ) + + include(FeatureSummary) + set_package_properties(Foo PROPERTIES + URL "http://www.foo.example.com/" + DESCRIPTION "A library for doing useful things") + + +Submitting Modules +================== + +Proposed new modules should be submitted using the `KDE Review Board instance`_, +and be assigned to the ``buildsystem`` and ``extracmakemodules`` groups. You +should be able to point to two separate projects that will make use of the +module. + +The mailing list can be found at +https://mail.kde.org/mailman/listinfo/kde-buildsystem\ . + + +.. _KDE Review Board instance: https://git.reviewboard.kde.org/ +.. _cmake-developer(7): http://www.cmake.org/cmake/help/git-master/manual/cmake-developer.7.html diff --git a/deps/extra-cmake-modules/docs/manual/ecm-find-modules.7.rst b/deps/extra-cmake-modules/docs/manual/ecm-find-modules.7.rst new file mode 100644 index 0000000..0f09c22 --- /dev/null +++ b/deps/extra-cmake-modules/docs/manual/ecm-find-modules.7.rst @@ -0,0 +1,64 @@ +.. ecm-manual-description: ECM Find Modules Reference + +ecm-find-modules(7) +******************* + +.. only:: html or latex + + .. contents:: + +Introduction +============ + +Find modules are used by the CMake ``find_package`` command to search for +packages that do not provide their own CMake package config files. CMake +provides an extensive set of find modules, and Extra CMake Modules (ECM) adds +to that. + +To use ECM's find modules, you need to tell CMake to find the ECM package, and +then add either ``${ECM_MODULE_PATH}`` or ``${ECM_FIND_MODULE_DIR}`` to the +``CMAKE_MODULE_PATH`` variable: + +.. code-block:: cmake + + find_package(ECM REQUIRED NO_MODULE) + set(CMAKE_MODULE_PATH ${ECM_FIND_MODULE_DIR}) + +Using ``${ECM_MODULE_PATH}`` will also make the modules intended for direct use +by CMake scripts available (see :manual:`ecm-modules(7)` and +:manual:`ecm-kde-modules(7)`). + +You can also make local copies of find modules using the +``ecm_use_find_modules`` function from :module:`ECMUseFindModules`, which is +automatically included when ECM is found: + +.. code-block:: cmake + + find_package(ECM REQUIRED NO_MODULE) + ecm_use_find_modules( + DIR "${CMAKE_BINARY_DIR}/cmake" + MODULES FindEGL.cmake + ) + set(CMAKE_MODULE_PATH "${CMAKE_BINARY_DIR}/cmake") + +This allows selective use of ECM's find modules, and the NO_OVERRIDE argument +can be used to ensure that if CMake ships its own version of that find module, +it will be used instead. + + +All Find Modules +================ + +.. toctree:: + :maxdepth: 1 + :glob: + + /find-module/* + +.. only:: man + + See Also + ======== + + :manual:`ecm(7)`, :manual:`ecm-modules(7)`, :manual:`ecm-kde-modules(7)` + diff --git a/deps/extra-cmake-modules/docs/manual/ecm-kde-modules.7.rst b/deps/extra-cmake-modules/docs/manual/ecm-kde-modules.7.rst new file mode 100644 index 0000000..184458f --- /dev/null +++ b/deps/extra-cmake-modules/docs/manual/ecm-kde-modules.7.rst @@ -0,0 +1,47 @@ +.. ecm-manual-description: ECM KDE Modules Reference + +ecm-kde-modules(7) +****************** + +.. only:: html or latex + + .. contents:: + +Introduction +============ + +Extra CMake Modules (ECM) provides several modules that provide default settings +(like installation directories, compiler flags and other CMake options) aimed at +software produced by the KDE modules; these are documented here. ECM also +provides modules with more general functionality, documented in +:manual:`ecm-modules(7)`, and ones that extend the functionality of the +``find_package`` command, documented in :manual:`ecm-find-modules(7)`. + +To use these modules, you need to tell CMake to find the ECM package, and +then add either ``${ECM_MODULE_PATH}`` or ``${ECM_KDE_MODULE_DIR}`` to the +``CMAKE_MODULE_PATH`` variable: + +.. code-block:: cmake + + find_package(ECM REQUIRED NO_MODULE) + set(CMAKE_MODULE_PATH ${ECM_MODULE_DIR}) + +Using ``${ECM_MODULE_PATH}`` will also make the other types of modules +available. + +All KDE Modules +=============== + +.. toctree:: + :maxdepth: 1 + :glob: + + /kde-module/* + +.. only:: man + + See Also + ======== + + :manual:`ecm(7)`, :manual:`ecm-modules(7)`, :manual:`ecm-find-modules(7)` + diff --git a/deps/extra-cmake-modules/docs/manual/ecm-modules.7.rst b/deps/extra-cmake-modules/docs/manual/ecm-modules.7.rst new file mode 100644 index 0000000..ee0e463 --- /dev/null +++ b/deps/extra-cmake-modules/docs/manual/ecm-modules.7.rst @@ -0,0 +1,53 @@ +.. ecm-manual-description: ECM Modules Reference + +ecm-modules(7) +************** + +.. only:: html or latex + + .. contents:: + +Introduction +============ + +Extra CMake Modules (ECM) provides various modules that provide useful functions +for CMake scripts. ECM actually provides three types of modules that can be +used from CMake scripts: those that extend the functionality of the +``find_package`` command are documented in :manual:`ecm-find-modules(7)`; those +that provide standard settings for software produced by the KDE community are +documented in :manual:`ecm-kde-modules(7)`. The rest provide macros and +functions for general use by CMake scripts and are documented here. + +To use these modules, you need to tell CMake to find the ECM package, and +then add either ``${ECM_MODULE_PATH}`` or ``${ECM_MODULE_DIR}`` to the +``CMAKE_MODULE_PATH`` variable: + +.. code-block:: cmake + + find_package(ECM REQUIRED NO_MODULE) + set(CMAKE_MODULE_PATH ${ECM_MODULE_DIR}) + +Using ``${ECM_MODULE_PATH}`` will also make the find modules and KDE modules +available. + +Note that there are also toolchain modules, documented in +:manual:`ecm-toolchains(7)`, but these are used by users building the software +rather than developers writing CMake scripts. + + +All Modules +=========== + +.. toctree:: + :maxdepth: 1 + :glob: + + /module/* + +.. only:: man + + See Also + ======== + + :manual:`ecm(7)`, :manual:`ecm-find-modules(7)`, :manual:`ecm-kde-modules(7)` + diff --git a/deps/extra-cmake-modules/docs/manual/ecm-toolchains.7.rst b/deps/extra-cmake-modules/docs/manual/ecm-toolchains.7.rst new file mode 100644 index 0000000..66f685e --- /dev/null +++ b/deps/extra-cmake-modules/docs/manual/ecm-toolchains.7.rst @@ -0,0 +1,33 @@ +.. ecm-manual-description: ECM Toolchains Reference + +ecm-toolchains(7) +***************** + +.. only:: html or latex + + .. contents:: + +Introduction +============ + +Extra CMake Modules (ECM) provides some toolchain modules. Unlike normal +modules, these are not included directly in projects, but specified with +the ``CMAKE_TOOLCHAIN_FILE`` cache variable on the commandline. + + +All Modules +=========== + +.. toctree:: + :maxdepth: 1 + :glob: + + /toolchain/* + +.. only:: man + + See Also + ======== + + :manual:`ecm(7)` + diff --git a/deps/extra-cmake-modules/docs/manual/ecm.7.rst b/deps/extra-cmake-modules/docs/manual/ecm.7.rst new file mode 100644 index 0000000..fdc444a --- /dev/null +++ b/deps/extra-cmake-modules/docs/manual/ecm.7.rst @@ -0,0 +1,11 @@ +.. ecm-manual-description: Extra CMake Modules + +ecm(7) +****** + +.. only:: html or latex + + .. contents:: + +.. include:: ../../README.rst + :start-line: 2 diff --git a/deps/extra-cmake-modules/docs/module/ECMAddAppIcon.rst b/deps/extra-cmake-modules/docs/module/ECMAddAppIcon.rst new file mode 100644 index 0000000..31c09a8 --- /dev/null +++ b/deps/extra-cmake-modules/docs/module/ECMAddAppIcon.rst @@ -0,0 +1 @@ +.. ecm-module:: ../../modules/ECMAddAppIcon.cmake diff --git a/deps/extra-cmake-modules/docs/module/ECMAddTests.rst b/deps/extra-cmake-modules/docs/module/ECMAddTests.rst new file mode 100644 index 0000000..f971953 --- /dev/null +++ b/deps/extra-cmake-modules/docs/module/ECMAddTests.rst @@ -0,0 +1 @@ +.. ecm-module:: ../../modules/ECMAddTests.cmake diff --git a/deps/extra-cmake-modules/docs/module/ECMCoverageOption.rst b/deps/extra-cmake-modules/docs/module/ECMCoverageOption.rst new file mode 100644 index 0000000..41bffd7 --- /dev/null +++ b/deps/extra-cmake-modules/docs/module/ECMCoverageOption.rst @@ -0,0 +1 @@ +.. ecm-module:: ../../modules/ECMCoverageOption.cmake diff --git a/deps/extra-cmake-modules/docs/module/ECMCreateQmFromPoFiles.rst b/deps/extra-cmake-modules/docs/module/ECMCreateQmFromPoFiles.rst new file mode 100644 index 0000000..13340c0 --- /dev/null +++ b/deps/extra-cmake-modules/docs/module/ECMCreateQmFromPoFiles.rst @@ -0,0 +1 @@ +.. ecm-module:: ../../modules/ECMCreateQmFromPoFiles.cmake diff --git a/deps/extra-cmake-modules/docs/module/ECMEnableSanitizers.rst b/deps/extra-cmake-modules/docs/module/ECMEnableSanitizers.rst new file mode 100644 index 0000000..e25dd4f --- /dev/null +++ b/deps/extra-cmake-modules/docs/module/ECMEnableSanitizers.rst @@ -0,0 +1 @@ +.. ecm-module:: ../../modules/ECMEnableSanitizers.cmake diff --git a/deps/extra-cmake-modules/docs/module/ECMFindModuleHelpers.rst b/deps/extra-cmake-modules/docs/module/ECMFindModuleHelpers.rst new file mode 100644 index 0000000..bec8f82 --- /dev/null +++ b/deps/extra-cmake-modules/docs/module/ECMFindModuleHelpers.rst @@ -0,0 +1 @@ +.. ecm-module:: ../../modules/ECMFindModuleHelpers.cmake diff --git a/deps/extra-cmake-modules/docs/module/ECMGenerateHeaders.rst b/deps/extra-cmake-modules/docs/module/ECMGenerateHeaders.rst new file mode 100644 index 0000000..ad3e481 --- /dev/null +++ b/deps/extra-cmake-modules/docs/module/ECMGenerateHeaders.rst @@ -0,0 +1 @@ +.. ecm-module:: ../../modules/ECMGenerateHeaders.cmake diff --git a/deps/extra-cmake-modules/docs/module/ECMGeneratePkgConfigFile.rst b/deps/extra-cmake-modules/docs/module/ECMGeneratePkgConfigFile.rst new file mode 100644 index 0000000..cd311f6 --- /dev/null +++ b/deps/extra-cmake-modules/docs/module/ECMGeneratePkgConfigFile.rst @@ -0,0 +1 @@ +.. ecm-module:: ../../modules/ECMGeneratePkgConfigFile.cmake diff --git a/deps/extra-cmake-modules/docs/module/ECMGeneratePriFile.rst b/deps/extra-cmake-modules/docs/module/ECMGeneratePriFile.rst new file mode 100644 index 0000000..1cb4d6a --- /dev/null +++ b/deps/extra-cmake-modules/docs/module/ECMGeneratePriFile.rst @@ -0,0 +1 @@ +.. ecm-module:: ../../modules/ECMGeneratePriFile.cmake diff --git a/deps/extra-cmake-modules/docs/module/ECMInstallIcons.rst b/deps/extra-cmake-modules/docs/module/ECMInstallIcons.rst new file mode 100644 index 0000000..7bb70ea --- /dev/null +++ b/deps/extra-cmake-modules/docs/module/ECMInstallIcons.rst @@ -0,0 +1 @@ +.. ecm-module:: ../../modules/ECMInstallIcons.cmake diff --git a/deps/extra-cmake-modules/docs/module/ECMMarkAsTest.rst b/deps/extra-cmake-modules/docs/module/ECMMarkAsTest.rst new file mode 100644 index 0000000..8b6a875 --- /dev/null +++ b/deps/extra-cmake-modules/docs/module/ECMMarkAsTest.rst @@ -0,0 +1 @@ +.. ecm-module:: ../../modules/ECMMarkAsTest.cmake diff --git a/deps/extra-cmake-modules/docs/module/ECMMarkNonGuiExecutable.rst b/deps/extra-cmake-modules/docs/module/ECMMarkNonGuiExecutable.rst new file mode 100644 index 0000000..2684fee --- /dev/null +++ b/deps/extra-cmake-modules/docs/module/ECMMarkNonGuiExecutable.rst @@ -0,0 +1 @@ +.. ecm-module:: ../../modules/ECMMarkNonGuiExecutable.cmake diff --git a/deps/extra-cmake-modules/docs/module/ECMOptionalAddSubdirectory.rst b/deps/extra-cmake-modules/docs/module/ECMOptionalAddSubdirectory.rst new file mode 100644 index 0000000..af9595e --- /dev/null +++ b/deps/extra-cmake-modules/docs/module/ECMOptionalAddSubdirectory.rst @@ -0,0 +1 @@ +.. ecm-module:: ../../modules/ECMOptionalAddSubdirectory.cmake diff --git a/deps/extra-cmake-modules/docs/module/ECMPackageConfigHelpers.rst b/deps/extra-cmake-modules/docs/module/ECMPackageConfigHelpers.rst new file mode 100644 index 0000000..21102c4 --- /dev/null +++ b/deps/extra-cmake-modules/docs/module/ECMPackageConfigHelpers.rst @@ -0,0 +1 @@ +.. ecm-module:: ../../modules/ECMPackageConfigHelpers.cmake diff --git a/deps/extra-cmake-modules/docs/module/ECMPoQmTools.rst b/deps/extra-cmake-modules/docs/module/ECMPoQmTools.rst new file mode 100644 index 0000000..21e6d91 --- /dev/null +++ b/deps/extra-cmake-modules/docs/module/ECMPoQmTools.rst @@ -0,0 +1 @@ +.. ecm-module:: ../../modules/ECMPoQmTools.cmake diff --git a/deps/extra-cmake-modules/docs/module/ECMQtDeclareLoggingCategory.rst b/deps/extra-cmake-modules/docs/module/ECMQtDeclareLoggingCategory.rst new file mode 100644 index 0000000..8f0af2a --- /dev/null +++ b/deps/extra-cmake-modules/docs/module/ECMQtDeclareLoggingCategory.rst @@ -0,0 +1 @@ +.. ecm-module:: ../../modules/ECMQtDeclareLoggingCategory.cmake diff --git a/deps/extra-cmake-modules/docs/module/ECMSetupVersion.rst b/deps/extra-cmake-modules/docs/module/ECMSetupVersion.rst new file mode 100644 index 0000000..f984a81 --- /dev/null +++ b/deps/extra-cmake-modules/docs/module/ECMSetupVersion.rst @@ -0,0 +1 @@ +.. ecm-module:: ../../modules/ECMSetupVersion.cmake diff --git a/deps/extra-cmake-modules/docs/module/ECMUninstallTarget.rst b/deps/extra-cmake-modules/docs/module/ECMUninstallTarget.rst new file mode 100644 index 0000000..a189515 --- /dev/null +++ b/deps/extra-cmake-modules/docs/module/ECMUninstallTarget.rst @@ -0,0 +1 @@ +.. ecm-module:: ../../modules/ECMUninstallTarget.cmake diff --git a/deps/extra-cmake-modules/docs/module/ECMUseFindModules.rst b/deps/extra-cmake-modules/docs/module/ECMUseFindModules.rst new file mode 100644 index 0000000..48bbf35 --- /dev/null +++ b/deps/extra-cmake-modules/docs/module/ECMUseFindModules.rst @@ -0,0 +1 @@ +.. ecm-module:: ../../modules/ECMUseFindModules.cmake diff --git a/deps/extra-cmake-modules/docs/sphinx/.gitignore b/deps/extra-cmake-modules/docs/sphinx/.gitignore new file mode 100644 index 0000000..0d20b64 --- /dev/null +++ b/deps/extra-cmake-modules/docs/sphinx/.gitignore @@ -0,0 +1 @@ +*.pyc diff --git a/deps/extra-cmake-modules/docs/sphinx/conf.py.in b/deps/extra-cmake-modules/docs/sphinx/conf.py.in new file mode 100644 index 0000000..d32b53f --- /dev/null +++ b/deps/extra-cmake-modules/docs/sphinx/conf.py.in @@ -0,0 +1,61 @@ +#============================================================================= +# CMake - Cross Platform Makefile Generator +# Copyright 2000-2013 Kitware, Inc., Insight Software Consortium +# +# Distributed under the OSI-approved BSD License (the "License"); +# see accompanying file Copyright.txt for details. +# +# This software is distributed WITHOUT ANY WARRANTY; without even the +# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the License for more information. +#============================================================================= +import sys +import os +import re +import glob + +sys.path.insert(0, r'@CMAKE_CURRENT_SOURCE_DIR@/sphinx/ext') + +source_suffix = '.rst' +master_doc = 'index' + +project = 'Extra CMake Modules' +copyright = 'KDE Developers' +version = '@PROJECT_VERSION_MAJOR@.@PROJECT_VERSION_MINOR@' # feature version +release = '@PROJECT_VERSION@' # full version string + +primary_domain = 'ecm' + +exclude_patterns = [] + +extensions = ['ecm'] + +ecm_manuals = sorted(glob.glob(r'@CMAKE_CURRENT_SOURCE_DIR@/manual/*.rst')) +ecm_manual_description = re.compile('^\.\. ecm-manual-description:(.*)$') +man_pages = [] +for fpath in ecm_manuals: + try: + name, sec, rst = os.path.basename(fpath).split('.') + desc = None + f = open(fpath, 'r') + for l in f: + m = ecm_manual_description.match(l) + if m: + desc = m.group(1).strip() + break + f.close() + if desc: + man_pages.append(('manual/%s.%s' % (name, sec), + name, desc, [], int(sec))) + else: + sys.stderr.write("ERROR: No ecm-manual-description in '%s'\n" % fpath) + except Exception as e: + sys.stderr.write("ERROR: %s\n" % str(e)) +man_show_urls = False + +html_show_sourcelink = True +html_static_path = ['@CMAKE_CURRENT_BINARY_DIR@/static'] +html_style = 'ecm.css' +html_theme = '@sphinx_theme@' +html_short_title = 'ECM %s documentation' % version +html_favicon = '@CMAKE_CURRENT_SOURCE_DIR@/sphinx/kde-favicon.ico' diff --git a/deps/extra-cmake-modules/docs/sphinx/ecm.css.in b/deps/extra-cmake-modules/docs/sphinx/ecm.css.in new file mode 100644 index 0000000..a05e452 --- /dev/null +++ b/deps/extra-cmake-modules/docs/sphinx/ecm.css.in @@ -0,0 +1,8 @@ +/* Import the Sphinx theme style. */ +@import url("${sphinx_theme}.css"); + +/* Wrap sidebar content even within words so that long + document names do not escape sidebar borders. */ +div.sphinxsidebarwrapper { + word-wrap: break-word; +} diff --git a/deps/extra-cmake-modules/docs/sphinx/ext/ecm.py b/deps/extra-cmake-modules/docs/sphinx/ext/ecm.py new file mode 100644 index 0000000..ed966bf --- /dev/null +++ b/deps/extra-cmake-modules/docs/sphinx/ext/ecm.py @@ -0,0 +1,307 @@ +# Copyright 2014 Alex Merry +# Based on cmake.py from CMake: +# Copyright 2000-2013 Kitware, Inc., Insight Software Consortium +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# 1. Redistributions of source code must retain the copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. 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. + +import os +import re + +# Monkey patch for pygments reporting an error when generator expressions are +# used. +# https://bitbucket.org/birkenfeld/pygments-main/issue/942/cmake-generator-expressions-not-handled +from pygments.lexers import CMakeLexer +from pygments.token import Name, Operator +from pygments.lexer import bygroups +CMakeLexer.tokens["args"].append(('(\\$<)(.+?)(>)', + bygroups(Operator, Name.Variable, Operator))) + +# Monkey patch for sphinx generating invalid content for qcollectiongenerator +# https://bitbucket.org/birkenfeld/sphinx/issue/1435/qthelp-builder-should-htmlescape-keywords +from sphinx.util.pycompat import htmlescape +from sphinx.builders.qthelp import QtHelpBuilder +old_build_keywords = QtHelpBuilder.build_keywords +def new_build_keywords(self, title, refs, subitems): + old_items = old_build_keywords(self, title, refs, subitems) + new_items = [] + for item in old_items: + before, rest = item.split("ref=\"", 1) + ref, after = rest.split("\"") + if ("<" in ref and ">" in ref): + new_items.append(before + "ref=\"" + htmlescape(ref) + "\"" + after) + else: + new_items.append(item) + return new_items +QtHelpBuilder.build_keywords = new_build_keywords + + +from docutils.parsers.rst import Directive, directives +from docutils.transforms import Transform +try: + from docutils.utils.error_reporting import SafeString, ErrorString +except ImportError: + # error_reporting was not in utils before version 0.11: + from docutils.error_reporting import SafeString, ErrorString + +from docutils import io, nodes + +from sphinx.directives import ObjectDescription +from sphinx.domains import Domain, ObjType +from sphinx.roles import XRefRole +from sphinx.util.nodes import make_refnode +from sphinx import addnodes + +class ECMModule(Directive): + required_arguments = 1 + optional_arguments = 0 + final_argument_whitespace = True + option_spec = {'encoding': directives.encoding} + + def __init__(self, *args, **keys): + self.re_start = re.compile(r'^#\[(?P=*)\[\.rst:$') + Directive.__init__(self, *args, **keys) + + def run(self): + settings = self.state.document.settings + if not settings.file_insertion_enabled: + raise self.warning('"%s" directive disabled.' % self.name) + + env = self.state.document.settings.env + rel_path, path = env.relfn2path(self.arguments[0]) + path = os.path.normpath(path) + encoding = self.options.get('encoding', settings.input_encoding) + e_handler = settings.input_encoding_error_handler + try: + settings.record_dependencies.add(path) + f = io.FileInput(source_path=path, encoding=encoding, + error_handler=e_handler) + except UnicodeEncodeError as error: + raise self.severe('Problems with "%s" directive path:\n' + 'Cannot encode input file path "%s" ' + '(wrong locale?).' % + (self.name, SafeString(path))) + except IOError as error: + raise self.severe('Problems with "%s" directive path:\n%s.' % + (self.name, ErrorString(error))) + raw_lines = f.read().splitlines() + f.close() + rst = None + lines = [] + for line in raw_lines: + if rst is not None and rst != '#': + # Bracket mode: check for end bracket + pos = line.find(rst) + if pos >= 0: + if line[0] == '#': + line = '' + else: + line = line[0:pos] + rst = None + else: + # Line mode: check for .rst start (bracket or line) + m = self.re_start.match(line) + if m: + rst = ']%s]' % m.group('eq') + line = '' + elif line == '#.rst:': + rst = '#' + line = '' + elif rst == '#': + if line == '#' or line[:2] == '# ': + line = line[2:] + else: + rst = None + line = '' + elif rst is None: + line = '' + lines.append(line) + if rst is not None and rst != '#': + raise self.warning('"%s" found unclosed bracket "#[%s[.rst:" in %s' % + (self.name, rst[1:-1], path)) + self.state_machine.insert_input(lines, path) + return [] + +class _ecm_index_entry: + def __init__(self, desc): + self.desc = desc + + def __call__(self, title, targetid): + return ('pair', u'%s ; %s' % (self.desc, title), targetid, 'main') + +_ecm_index_objs = { + 'manual': _ecm_index_entry('manual'), + 'module': _ecm_index_entry('module'), + 'find-module': _ecm_index_entry('find-module'), + 'kde-module': _ecm_index_entry('kde-module'), + 'toolchain': _ecm_index_entry('toolchain'), + } + +def _ecm_object_inventory(env, document, line, objtype, targetid): + inv = env.domaindata['ecm']['objects'] + if targetid in inv: + document.reporter.warning( + 'ECM object "%s" also described in "%s".' % + (targetid, env.doc2path(inv[targetid][0])), line=line) + inv[targetid] = (env.docname, objtype) + +class ECMTransform(Transform): + + # Run this transform early since we insert nodes we want + # treated as if they were written in the documents. + default_priority = 210 + + def __init__(self, document, startnode): + Transform.__init__(self, document, startnode) + self.titles = {} + + def parse_title(self, docname): + """Parse a document title as the first line starting in [A-Za-z0-9<] + or fall back to the document basename if no such line exists. + Return the title or False if the document file does not exist. + """ + env = self.document.settings.env + title = self.titles.get(docname) + if title is None: + fname = os.path.join(env.srcdir, docname+'.rst') + try: + f = open(fname, 'r') + except IOError: + title = False + else: + for line in f: + if len(line) > 0 and (line[0].isalnum() or line[0] == '<'): + title = line.rstrip() + break + f.close() + if title is None: + title = os.path.basename(docname) + self.titles[docname] = title + return title + + def apply(self): + env = self.document.settings.env + + # Treat some documents as ecm domain objects. + objtype, sep, tail = env.docname.rpartition('/') + make_index_entry = _ecm_index_objs.get(objtype) + if make_index_entry: + title = self.parse_title(env.docname) + # Insert the object link target. + targetid = '%s:%s' % (objtype, title) + targetnode = nodes.target('', '', ids=[targetid]) + self.document.insert(0, targetnode) + # Insert the object index entry. + indexnode = addnodes.index() + indexnode['entries'] = [make_index_entry(title, targetid)] + self.document.insert(0, indexnode) + # Add to ecm domain object inventory + _ecm_object_inventory(env, self.document, 1, objtype, targetid) + +class ECMObject(ObjectDescription): + + def handle_signature(self, sig, signode): + # called from sphinx.directives.ObjectDescription.run() + signode += addnodes.desc_name(sig, sig) + return sig + + def add_target_and_index(self, name, sig, signode): + targetid = '%s:%s' % (self.objtype, name) + if targetid not in self.state.document.ids: + signode['names'].append(targetid) + signode['ids'].append(targetid) + signode['first'] = (not self.names) + self.state.document.note_explicit_target(signode) + _ecm_object_inventory(self.env, self.state.document, + self.lineno, self.objtype, targetid) + + make_index_entry = _ecm_index_objs.get(self.objtype) + if make_index_entry: + self.indexnode['entries'].append(make_index_entry(name, targetid)) + +class ECMXRefRole(XRefRole): + + # See sphinx.util.nodes.explicit_title_re; \x00 escapes '<'. + _re = re.compile(r'^(.+?)(\s*)(?$', re.DOTALL) + _re_sub = re.compile(r'^([^()\s]+)\s*\(([^()]*)\)$', re.DOTALL) + + def __call__(self, typ, rawtext, text, *args, **keys): + # CMake cross-reference targets may contain '<' so escape + # any explicit `` with '<' not preceded by whitespace. + while True: + m = ECMXRefRole._re.match(text) + if m and len(m.group(2)) == 0: + text = '%s\x00<%s>' % (m.group(1), m.group(3)) + else: + break + return XRefRole.__call__(self, typ, rawtext, text, *args, **keys) + +class ECMDomain(Domain): + """ECM domain.""" + name = 'ecm' + label = 'ECM' + object_types = { + 'module': ObjType('module', 'module'), + 'kde-module': ObjType('kde-module', 'kde-module'), + 'find-module': ObjType('find-module', 'find-module'), + 'manual': ObjType('manual', 'manual'), + 'toolchain': ObjType('toolchain', 'toolchain'), + } + directives = {} + roles = { + 'module': XRefRole(), + 'kde-module': XRefRole(), + 'find-module': XRefRole(), + 'manual': XRefRole(), + 'toolchain': XRefRole(), + } + initial_data = { + 'objects': {}, # fullname -> docname, objtype + } + + def clear_doc(self, docname): + to_clear = [] + for fullname, (fn, _) in self.data['objects'].items(): + if fn == docname: + to_clear.append(fullname) + for fullname in to_clear: + del self.data['objects'][fullname] + + def resolve_xref(self, env, fromdocname, builder, + typ, target, node, contnode): + targetid = '%s:%s' % (typ, target) + obj = self.data['objects'].get(targetid) + if obj is None: + # TODO: warn somehow? + return None + return make_refnode(builder, fromdocname, obj[0], targetid, + contnode, target) + + def get_objects(self): + for refname, (docname, type) in self.data['objects'].items(): + yield (refname, refname, type, docname, refname, 1) + +def setup(app): + app.add_directive('ecm-module', ECMModule) + app.add_transform(ECMTransform) + app.add_domain(ECMDomain) diff --git a/deps/extra-cmake-modules/docs/sphinx/kde-favicon.ico b/deps/extra-cmake-modules/docs/sphinx/kde-favicon.ico new file mode 100644 index 0000000000000000000000000000000000000000..3741beba39c68c62adf8a9f1859b655ff7f416ce GIT binary patch literal 1406 zcmaizd05m%7{|X>mfd#QZFXChR$c*RrLbsnh$4xyoT3~7rXU^&h;l3-YJ>vffh`LJ z?1F&sTbBKCh#(*kpn$-#H|!;_EH^Ap^^bq$%ri6ZGtc|X%=`I%2bf3t!i6C70(i{_ z76DjF2HCH-PFgd7%tb_$6n+ZDJ4dtxu(6tq#KEj;jI6>ExgZ5Y#bRAiS z91o(a8w1Kh7Ap7KLR651ag7AU!PbxzoW$Jh6gk5gL+vzVf^_iwEFn*{f$+pOsQ8KK zWJh8|+y>G4jhGbGKwX~!RUI3BMJ!Yu*nrL`D~M7(P!aEh8~$cc3C}=Lb`Ep`dA~so z?JX`8R0OUc*$VoUJA`p=pi`oW7CRsDr54B|ygh)&S`P8t z9F$er=*vF_RaG)*mLq1TMo7K+&`UcY%M1o@uNC3uOms;^$)R1uQ+AMC@gre;O9JGa!iiEzq7Ci}OF!UCqJIw_>sjiUGndnMmf*(dSJh2?j zA?u-|SeO=7LzG}c_+&!Nc7ul0B#d)~lt+A)5(PoD^FyEf(c#FqyPoapdO5mj-MaGc zF7Kb8qh0&i+j%BE%~86u@4Xq!+ZbPeKW3=ItKd+Jy79}O5`*65yjHQY)6BmzC3Kl< zpW_nvWDEa%dcjr+W%tK(e@9f?@8#~?v5IN>!S$1@uS13hG)I3pkyT55QfT=O^_IhL zzdrL6Rr>1hRP4O%)X$&aOnZIvSARXJQc!E!sSiCCdS0yA_mOm)mE7X^3obwATAwj| zygn|8+K`Z5ckPQ?fs7ZI-+g0HP?R6=68m)WV`ZEAMX%_^4d(Z5e81G@K-({=yDwCo zqu;-Juq5NtQ+sYdFZ(9!&N2St#mXzIeT%)F{hY$P&u2byT5VUj_qr{Ly!2>7 H|DW*ysYz_V literal 0 HcmV?d00001 diff --git a/deps/extra-cmake-modules/docs/toolchain/Android.rst b/deps/extra-cmake-modules/docs/toolchain/Android.rst new file mode 100644 index 0000000..9103e62 --- /dev/null +++ b/deps/extra-cmake-modules/docs/toolchain/Android.rst @@ -0,0 +1 @@ +.. ecm-module:: ../../toolchain/Android.cmake diff --git a/deps/extra-cmake-modules/find-modules/ECMFindModuleHelpersStub.cmake b/deps/extra-cmake-modules/find-modules/ECMFindModuleHelpersStub.cmake new file mode 100644 index 0000000..bb8c9a6 --- /dev/null +++ b/deps/extra-cmake-modules/find-modules/ECMFindModuleHelpersStub.cmake @@ -0,0 +1 @@ +include(${CMAKE_CURRENT_LIST_DIR}/../modules/ECMFindModuleHelpers.cmake) diff --git a/deps/extra-cmake-modules/find-modules/FindEGL.cmake b/deps/extra-cmake-modules/find-modules/FindEGL.cmake new file mode 100644 index 0000000..b8787d8 --- /dev/null +++ b/deps/extra-cmake-modules/find-modules/FindEGL.cmake @@ -0,0 +1,149 @@ +#.rst: +# FindEGL +# ------- +# +# Try to find EGL. +# +# This will define the following variables: +# +# ``EGL_FOUND`` +# True if (the requested version of) EGL is available +# ``EGL_VERSION`` +# The version of EGL; note that this is the API version defined in the +# headers, rather than the version of the implementation (eg: Mesa) +# ``EGL_LIBRARIES`` +# This can be passed to target_link_libraries() instead of the ``EGL::EGL`` +# target +# ``EGL_INCLUDE_DIRS`` +# This should be passed to target_include_directories() if the target is not +# used for linking +# ``EGL_DEFINITIONS`` +# This should be passed to target_compile_options() if the target is not +# used for linking +# +# If ``EGL_FOUND`` is TRUE, it will also define the following imported target: +# +# ``EGL::EGL`` +# The EGL library +# +# In general we recommend using the imported target, as it is easier to use. +# Bear in mind, however, that if the target is in the link interface of an +# exported library, it must be made available by the package config file. +# +# Since pre-1.0.0. + +#============================================================================= +# Copyright 2014 Alex Merry +# Copyright 2014 Martin Gräßlin +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# 1. Redistributions of source code must retain the copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. 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. +#============================================================================= + +include(${CMAKE_CURRENT_LIST_DIR}/ECMFindModuleHelpersStub.cmake) + +ecm_find_package_version_check(EGL) + +# Use pkg-config to get the directories and then use these values +# in the FIND_PATH() and FIND_LIBRARY() calls +find_package(PkgConfig) +pkg_check_modules(PKG_EGL QUIET egl) + +set(EGL_DEFINITIONS ${PKG_EGL_CFLAGS_OTHER}) + +find_path(EGL_INCLUDE_DIR + NAMES + egl.h + HINTS + ${PKG_EGL_INCLUDE_DIRS} + PATH_SUFFIXES + EGL +) +find_library(EGL_LIBRARY + NAMES + EGL + HINTS + ${PKG_EGL_LIBRARY_DIRS} +) + +# NB: We do *not* use the version information from pkg-config, as that +# is the implementation version (eg: the Mesa version) +if(EGL_INCLUDE_DIR) + # egl.h has defines of the form EGL_VERSION_x_y for each supported + # version; so the header for EGL 1.1 will define EGL_VERSION_1_0 and + # EGL_VERSION_1_1. Finding the highest supported version involves + # finding all these defines and selecting the highest numbered. + file(READ "${EGL_INCLUDE_DIR}/egl.h" _EGL_header_contents) + string(REGEX MATCHALL + "[ \t]EGL_VERSION_[0-9_]+" + _EGL_version_lines + "${_EGL_header_contents}" + ) + unset(_EGL_header_contents) + foreach(_EGL_version_line ${_EGL_version_lines}) + string(REGEX REPLACE + "[ \t]EGL_VERSION_([0-9_]+)" + "\\1" + _version_candidate + "${_EGL_version_line}" + ) + string(REPLACE "_" "." _version_candidate "${_version_candidate}") + if(NOT DEFINED EGL_VERSION OR EGL_VERSION VERSION_LESS _version_candidate) + set(EGL_VERSION "${_version_candidate}") + endif() + endforeach() + unset(_EGL_version_lines) +endif() + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(EGL + FOUND_VAR + EGL_FOUND + REQUIRED_VARS + EGL_LIBRARY + EGL_INCLUDE_DIR + VERSION_VAR + EGL_VERSION +) + +if(EGL_FOUND AND NOT TARGET EGL::EGL) + add_library(EGL::EGL UNKNOWN IMPORTED) + set_target_properties(EGL::EGL PROPERTIES + IMPORTED_LOCATION "${EGL_LIBRARY}" + INTERFACE_COMPILE_OPTIONS "${EGL_DEFINITIONS}" + INTERFACE_INCLUDE_DIRECTORIES "${EGL_INCLUDE_DIR}" + ) +endif() + +mark_as_advanced(EGL_LIBRARY EGL_INCLUDE_DIR) + +# compatibility variables +set(EGL_LIBRARIES ${EGL_LIBRARY}) +set(EGL_INCLUDE_DIRS ${EGL_INCLUDE_DIR}) +set(EGL_VERSION_STRING ${EGL_VERSION}) + +include(FeatureSummary) +set_package_properties(EGL PROPERTIES + URL "https://www.khronos.org/egl/" + DESCRIPTION "A platform-agnostic mechanism for creating rendering surfaces for use with other graphics libraries, such as OpenGL|ES and OpenVG." +) diff --git a/deps/extra-cmake-modules/find-modules/FindKF5.cmake b/deps/extra-cmake-modules/find-modules/FindKF5.cmake new file mode 100644 index 0000000..b0ba9f6 --- /dev/null +++ b/deps/extra-cmake-modules/find-modules/FindKF5.cmake @@ -0,0 +1,119 @@ +#.rst: +# FindKF5 +# ------- +# +# Find KDE Frameworks 5 with a single find_package() call. +# +# This will use the package config files provided by the individual frameworks. +# For example, if you wish to find KArchive, which presents itself to CMake as +# KF5Archive (ie: you would do ``find_package(KF5Archive)`` to find it +# directly), you can do +# +# .. code-block:: cmake +# +# find_package(KF5 COMPONENTS Archive) +# +# If all the required components (those given in the COMPONENTS argument, but +# not those given in the OPTIONAL_COMPONENTS argument) are found, ``KF5_FOUND`` +# will be set to true. Otherwise, it will be set to false. +# +# Since pre-1.0.0. + +#============================================================================= +# Copyright 2014 Alex Merry +# Copyright 2013 Stephen Kelly +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# 1. Redistributions of source code must retain the copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. 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. +#============================================================================= + +include(${CMAKE_CURRENT_LIST_DIR}/ECMFindModuleHelpersStub.cmake) + +ecm_find_package_version_check(KF5) + +if (NOT KF5_FIND_COMPONENTS) + set(KF5_NOT_FOUND_MESSAGE "The KF5 package requires at least one component") + set(KF5_FOUND False) + return() +endif() + +set(_quiet_arg) +if (KF5_FIND_QUIETLY) + set(_quiet_arg QUIET) +endif() +set(_exact_arg) +if (KF5_FIND_EXACT) + set(_exact_arg EXACT) +endif() + +include(FindPackageHandleStandardArgs) +include(FeatureSummary) + +set(KF5_VERSION) +foreach(_module ${KF5_FIND_COMPONENTS}) + find_package(KF5${_module} ${KF5_FIND_VERSION} + ${_exact_arg} ${_quiet_arg} + CONFIG + ) + find_package_handle_standard_args(KF5${_module} CONFIG_MODE) + if (KF5_FIND_REQUIRED AND KF5_FIND_REQUIRED_${_module}) + # If the component was required, we tell FeatureSummary so that it + # will be displayed in the correct list. We do not use the REQUIRED + # argument of find_package() to allow all the missing frameworks + # to be listed at once (fphsa will error out at the end of this file + # anyway). + set_package_properties(KF5${_module} PROPERTIES TYPE REQUIRED) + endif() + + # Component-based find modules are expected to set + # __FOUND and __VERSION variables, + # but the find_package calls above will have set KF5_* + # variables. + set(KF5_${_module}_FOUND ${KF5${_module}_FOUND}) + if(KF5${_module}_FOUND) + set(KF5_${_module}_VERSION ${KF5${_module}_VERSION}) + + # make KF5_VERSION the minimum found version + if(NOT KF5_VERSION OR KF5_VERSION VERSION_GREATER KF5${_module}_VERSION) + set(KF5_VERSION ${KF5${_module}_VERSION}) + endif() + endif() +endforeach() + +# Annoyingly, find_package_handle_standard_args requires you to provide +# REQUIRED_VARS even when using HANDLE_COMPONENTS, but all we actually +# care about is whether the required components were found. So we provide +# a dummy variable that is just set to something that will be printed +# on success. +set(_dummy_req_var "success") + +find_package_handle_standard_args(KF5 + FOUND_VAR + KF5_FOUND + REQUIRED_VARS + _dummy_req_var + VERSION_VAR + KF5_VERSION + HANDLE_COMPONENTS +) + diff --git a/deps/extra-cmake-modules/find-modules/FindLibGit2.cmake b/deps/extra-cmake-modules/find-modules/FindLibGit2.cmake new file mode 100644 index 0000000..eaf227f --- /dev/null +++ b/deps/extra-cmake-modules/find-modules/FindLibGit2.cmake @@ -0,0 +1,132 @@ +#.rst: +# FindLibGit2 +# ----------- +# +# Try to find libgit2 on a Unix system. +# +# This will define the following variables: +# +# ``LIBGIT2_FOUND`` +# True if (the requested version of) libgit2 is available +# ``LIBGIT2_VERSION`` +# The version of libgit2 +# ``LIBGIT2_LIBRARIES`` +# This can be passed to target_link_libraries() instead of the ``LibGit2::LibGit2`` +# target +# ``LIBGIT2_INCLUDE_DIRS`` +# This should be passed to target_include_directories() if the target is not +# used for linking +# ``LIBGIT2_DEFINITIONS`` +# This should be passed to target_compile_options() if the target is not +# used for linking +# +# If ``LIBGIT2_FOUND`` is TRUE, it will also define the following imported target: +# +# ``LibGit2::LibGit2`` +# The libgit2 library +# +# In general we recommend using the imported target, as it is easier to use. +# Bear in mind, however, that if the target is in the link interface of an +# exported library, it must be made available by the package config file. +# +# Since 1.3.0. + +#============================================================================= +# Copyright 2014 Alex Merry +# Copyright 2014 Martin Gräßlin +# Copyright 2014 Christoph Cullmann +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# 1. Redistributions of source code must retain the copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. 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. +#============================================================================= + +include(${CMAKE_CURRENT_LIST_DIR}/ECMFindModuleHelpersStub.cmake) + +ecm_find_package_version_check(LibGit2) + +# Use pkg-config to get the directories and then use these values +# in the FIND_PATH() and FIND_LIBRARY() calls +find_package(PkgConfig) +pkg_check_modules(PKG_GIT2 QUIET git2) + +set(LIBGIT2_DEFINITIONS ${PKG_GIT2_CFLAGS_OTHER}) + +find_path(LIBGIT2_INCLUDE_DIR + NAMES + git2.h + HINTS + ${PKG_GIT2_INCLUDE_DIRS} +) +find_library(LIBGIT2_LIBRARY + NAMES + git2 + HINTS + ${PKG_GIT2_LIBRARY_DIRS} +) + +# get version from header, should work on windows, too +if(LIBGIT2_INCLUDE_DIR) + file(STRINGS "${LIBGIT2_INCLUDE_DIR}/git2/version.h" LIBGIT2_H REGEX "^#define LIBGIT2_VERSION \"[^\"]*\"$") + + string(REGEX REPLACE "^.*LIBGIT2_VERSION \"([0-9]+).*$" "\\1" LIBGIT2_VERSION_MAJOR "${LIBGIT2_H}") + string(REGEX REPLACE "^.*LIBGIT2_VERSION \"[0-9]+\\.([0-9]+).*$" "\\1" LIBGIT2_VERSION_MINOR "${LIBGIT2_H}") + string(REGEX REPLACE "^.*LIBGIT2_VERSION \"[0-9]+\\.[0-9]+\\.([0-9]+).*$" "\\1" LIBGIT2_VERSION_PATCH "${LIBGIT2_H}") + set(LIBGIT2_VERSION "${LIBGIT2_VERSION_MAJOR}.${LIBGIT2_VERSION_MINOR}.${LIBGIT2_VERSION_PATCH}") + + set(LIBGIT2_MAJOR_VERSION "${LIBGIT2_VERSION_MAJOR}") + set(LIBGIT2_MINOR_VERSION "${LIBGIT2_VERSION_MINOR}") + set(LIBGIT2_PATCH_VERSION "${LIBGIT2_VERSION_PATCH}") + + unset(LIBGIT2_H) +endif() + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(LibGit2 + FOUND_VAR + LIBGIT2_FOUND + REQUIRED_VARS + LIBGIT2_LIBRARY + LIBGIT2_INCLUDE_DIR + VERSION_VAR + LIBGIT2_VERSION +) + +if(LIBGIT2_FOUND AND NOT TARGET LibGit2::LibGit2) + add_library(LibGit2::LibGit2 UNKNOWN IMPORTED) + set_target_properties(LibGit2::LibGit2 PROPERTIES + IMPORTED_LOCATION "${LIBGIT2_LIBRARY}" + INTERFACE_COMPILE_OPTIONS "${LIBGIT2_DEFINITIONS}" + INTERFACE_INCLUDE_DIRECTORIES "${LIBGIT2_INCLUDE_DIR}" + ) +endif() + +mark_as_advanced(LIBGIT2_LIBRARY LIBGIT2_INCLUDE_DIR) + +set(LIBGIT2_LIBRARIES ${LIBGIT2_LIBRARY}) +set(LIBGIT2_INCLUDE_DIRS ${LIBGIT2_INCLUDE_DIR}) + +include(FeatureSummary) +set_package_properties(LibGit2 PROPERTIES + URL "https://libgit2.github.com/" + DESCRIPTION "A plain C library to interface with the git version control system." +) diff --git a/deps/extra-cmake-modules/find-modules/FindOpenEXR.cmake b/deps/extra-cmake-modules/find-modules/FindOpenEXR.cmake new file mode 100644 index 0000000..d80caad --- /dev/null +++ b/deps/extra-cmake-modules/find-modules/FindOpenEXR.cmake @@ -0,0 +1,161 @@ +#.rst: +# FindOpenEXR +# ----------- +# +# Try to find the OpenEXR libraries. +# +# This will define the following variables: +# +# ``OpenEXR_FOUND`` +# True if OpenEXR is available +# ``OpenEXR_LIBRARIES`` +# Link to these to use OpenEXR +# ``OpenEXR_INCLUDE_DIRS`` +# Include directory for OpenEXR +# ``OpenEXR_DEFINITIONS`` +# Compiler flags required to link against OpenEXR +# +# and the following imported targets: +# +# ``OpenEXR::IlmImf`` +# The OpenEXR core library +# +# In general we recommend using the imported target, as it is easier to use. +# Bear in mind, however, that if the target is in the link interface of an +# exported library, it must be made available by the package config file. +# +# Since pre-1.0.0. + +#============================================================================= +# Copyright 2013-2014 Alex Merry +# Copyright 2006 Alexander Neundorf +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# 1. Redistributions of source code must retain the copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. 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. +#============================================================================= + +include(${CMAKE_CURRENT_LIST_DIR}/ECMFindModuleHelpersStub.cmake) + +ecm_find_package_version_check(OpenEXR) + +# use pkg-config to get the directories and then use these values +# in the FIND_PATH() and FIND_LIBRARY() calls +find_package(PkgConfig) +pkg_check_modules(PC_OpenEXR QUIET OpenEXR) + +set(OpenEXR_DEFINITIONS ${PC_OpenEXR_CFLAGS_OTHER}) + +find_path(OpenEXR_INCLUDE_DIR ImfRgbaFile.h + PATHS + ${PC_OpenEXR_INCLUDEDIR} + ${PC_OpenEXR_INCLUDE_DIRS} + PATH_SUFFIXES OpenEXR +) + +# Required libraries for OpenEXR +find_library(OpenEXR_HALF_LIBRARY NAMES Half + PATHS + ${PC_OpenEXR_LIBDIR} + ${PC_OpenEXR_LIBRARY_DIRS} +) +find_library(OpenEXR_IEX_LIBRARY NAMES Iex + PATHS + ${PC_OpenEXR_LIBDIR} + ${PC_OpenEXR_LIBRARY_DIRS} +) +find_library(OpenEXR_IMATH_LIBRARY NAMES Imath + PATHS + ${PC_OpenEXR_LIBDIR} + ${PC_OpenEXR_LIBRARY_DIRS} +) +find_library(OpenEXR_ILMTHREAD_LIBRARY NAMES IlmThread + PATHS + ${PC_OpenEXR_LIBDIR} + ${PC_OpenEXR_LIBRARY_DIRS} +) +# This is the actual OpenEXR library +find_library(OpenEXR_ILMIMF_LIBRARY NAMES IlmImf + PATHS + ${PC_OpenEXR_LIBDIR} + ${PC_OpenEXR_LIBRARY_DIRS} +) + +set(_OpenEXR_deps + ${OpenEXR_HALF_LIBRARY} + ${OpenEXR_IEX_LIBRARY} + ${OpenEXR_IMATH_LIBRARY} + ${OpenEXR_ILMTHREAD_LIBRARY}) + +set(OpenEXR_LIBRARIES + ${_OpenEXR_deps} + ${OpenEXR_ILMIMF_LIBRARY}) + +if (OpenEXR_INCLUDE_DIR AND EXISTS "${OpenEXR_INCLUDE_DIR}/OpenEXRConfig.h") + file(STRINGS "${OpenEXR_INCLUDE_DIR}/OpenEXRConfig.h" openexr_version_str + REGEX "^#define[\t ]+OPENEXR_VERSION_STRING[\t ]+\"[^\"]*\"") + string(REGEX REPLACE "^#define[\t ]+OPENEXR_VERSION_STRING[\t ]+\"([^\"]*).*" + "\\1" OpenEXR_VERSION_STRING "${openexr_version_str}") + unset(openexr_version_str) +endif () + +include(FindPackageHandleStandardArgs) +# find_package_handle_standard_args reports the value of the first variable +# on success, so make sure this is the actual OpenEXR library +find_package_handle_standard_args(OpenEXR + FOUND_VAR OpenEXR_FOUND + REQUIRED_VARS + OpenEXR_ILMIMF_LIBRARY + OpenEXR_HALF_LIBRARY + OpenEXR_IEX_LIBRARY + OpenEXR_IMATH_LIBRARY + OpenEXR_ILMTHREAD_LIBRARY + OpenEXR_INCLUDE_DIR + VERSION_VAR OpenEXR_VERSION_STRING) + +set(OpenEXR_INCLUDE_DIRS ${OpenEXR_INCLUDE_DIR}) + +include(FeatureSummary) +set_package_properties(OpenEXR PROPERTIES + URL http://www.openexr.com/ + DESCRIPTION "A library for handling OpenEXR high dynamic-range image files") + +mark_as_advanced( + OpenEXR_INCLUDE_DIR + OpenEXR_LIBRARIES + OpenEXR_DEFINITIONS + OpenEXR_ILMIMF_LIBRARY + OpenEXR_ILMTHREAD_LIBRARY + OpenEXR_IMATH_LIBRARY + OpenEXR_IEX_LIBRARY + OpenEXR_HALF_LIBRARY +) + +if(OpenEXR_FOUND AND NOT TARGET OpenEXR::IlmImf) + add_library(OpenEXR::IlmImf UNKNOWN IMPORTED) + set_target_properties(OpenEXR::IlmImf PROPERTIES + IMPORTED_LOCATION "${OpenEXR_ILMIMF_LIBRARY}" + INTERFACE_COMPILE_OPTIONS "${OpenEXR_DEFINITIONS}" + INTERFACE_INCLUDE_DIRECTORIES "${OpenEXR_INCLUDE_DIR}" + INTERFACE_LINK_LIBRARIES "${_OpenEXR_deps}" + ) +endif() diff --git a/deps/extra-cmake-modules/find-modules/FindPng2Ico.cmake b/deps/extra-cmake-modules/find-modules/FindPng2Ico.cmake new file mode 100644 index 0000000..d84f667 --- /dev/null +++ b/deps/extra-cmake-modules/find-modules/FindPng2Ico.cmake @@ -0,0 +1,117 @@ +#.rst: +# FindPng2Ico +# ----------- +# +# Try to find png2ico. +# +# If the png2ico executable is not in your PATH, you can provide +# an alternative name or full path location with the ``Png2Ico_EXECUTABLE`` +# variable. +# +# This will define the following variables: +# +# ``Png2Ico_FOUND`` +# True if png2ico is available. +# +# ``Png2Ico_EXECUTABLE`` +# The png2ico executable. +# +# If ``Png2Ico_FOUND`` is TRUE, it will also define the following imported +# target: +# +# ``Png2Ico::Png2Ico`` +# The png2ico executable. +# +# and the following variables: +# +# ``Png2Ico_HAS_COLORS_ARGUMENT`` +# Whether png2ico accepts a ``--colors`` argument. `Matthias Benkmann's +# tool `_ does, while the +# version of png2ico from the `"KDE On Windows" (kdewin) +# `_ project does not. +# +# ``Png2Ico_HAS_RCFILE_ARGUMENT`` +# Whether png2ico accepts an ``--rcfile`` argument. The version of png2ico +# from the `"KDE On Windows" (kdewin) +# `_ project does, +# while `Matthias Benkmann's tool +# `_ does not. +# +# Since 1.7.0. + +#============================================================================= +# Copyright 2014 Alex Merry +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# 1. Redistributions of source code must retain the copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. 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. +#============================================================================= + +include(${CMAKE_CURRENT_LIST_DIR}/ECMFindModuleHelpersStub.cmake) + +ecm_find_package_version_check(Png2Ico) + +# Find png2ico +find_program(Png2Ico_EXECUTABLE NAMES png2ico) + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(Png2Ico + FOUND_VAR + Png2Ico_FOUND + REQUIRED_VARS + Png2Ico_EXECUTABLE +) + +mark_as_advanced(Png2Ico_EXECUTABLE) + +if (Png2Ico_FOUND) + execute_process( + COMMAND "${Png2Ico_EXECUTABLE}" --help + OUTPUT_VARIABLE _png2ico_help_text + ERROR_VARIABLE _png2ico_help_text + ) + if (_png2ico_help_text MATCHES ".*--rcfile .*") + set(Png2Ico_HAS_RCFILE_ARGUMENT TRUE) + else() + set(Png2Ico_HAS_RCFILE_ARGUMENT FALSE) + endif() + if (_png2ico_help_text MATCHES ".*--colors .*") + set(Png2Ico_HAS_COLORS_ARGUMENT TRUE) + else() + set(Png2Ico_HAS_COLORS_ARGUMENT FALSE) + endif() + unset(_png2ico_help_text) + + if (NOT TARGET Png2Ico::Png2Ico) + add_executable(Png2Ico::Png2Ico IMPORTED) + set_target_properties(Png2Ico::Png2Ico PROPERTIES + IMPORTED_LOCATION "${Png2Ico_EXECUTABLE}" + ) + endif() +endif() + +include(FeatureSummary) +set_package_properties(Png2Ico PROPERTIES + URL "http://www.winterdrache.de/freeware/png2ico/ or https://projects.kde.org/projects/kdesupport/kdewin" + DESCRIPTION "Executable that converts a collection of PNG files into a Windows icon file" +) + diff --git a/deps/extra-cmake-modules/find-modules/FindPoppler.cmake b/deps/extra-cmake-modules/find-modules/FindPoppler.cmake new file mode 100644 index 0000000..57bfa07 --- /dev/null +++ b/deps/extra-cmake-modules/find-modules/FindPoppler.cmake @@ -0,0 +1,151 @@ +#.rst: +# FindPoppler +# ----------- +# +# Try to find Poppler. +# +# This is a component-based find module, which makes use of the COMPONENTS +# and OPTIONAL_COMPONENTS arguments to find_module. The following components +# are available:: +# +# Core Cpp Qt5 Qt4 Glib +# +# If no components are specified, this module will act as though all components +# were passed to OPTIONAL_COMPONENTS. +# +# This module will define the following variables, independently of the +# components searched for or found: +# +# ``Poppler_FOUND`` +# TRUE if (the requested version of) Poppler is available +# ``Poppler_VERSION`` +# Found Poppler version +# ``Poppler_TARGETS`` +# A list of all targets imported by this module (note that there may be more +# than the components that were requested) +# ``Poppler_LIBRARIES`` +# This can be passed to target_link_libraries() instead of the imported +# targets +# ``Poppler_INCLUDE_DIRS`` +# This should be passed to target_include_directories() if the targets are +# not used for linking +# ``Poppler_DEFINITIONS`` +# This should be passed to target_compile_options() if the targets are not +# used for linking +# +# For each searched-for components, ``Poppler__FOUND`` will be set to +# TRUE if the corresponding Poppler library was found, and FALSE otherwise. If +# ``Poppler__FOUND`` is TRUE, the imported target +# ``Poppler::`` will be defined. This module will also attempt to +# determine ``Poppler_*_VERSION`` variables for each imported target, although +# ``Poppler_VERSION`` should normally be sufficient. +# +# In general we recommend using the imported targets, as they are easier to use +# and provide more control. Bear in mind, however, that if any target is in the +# link interface of an exported library, it must be made available by the +# package config file. +# +# Since 5.19 + +#============================================================================= +# Copyright 2015 Alex Richardson +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# 1. Redistributions of source code must retain the copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. 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. +#============================================================================= +include(${CMAKE_CURRENT_LIST_DIR}/ECMFindModuleHelpersStub.cmake) + +ecm_find_package_version_check(Poppler) + +set(Poppler_known_components + Cpp + Qt4 + Qt5 + Glib +) +foreach(_comp ${Poppler_known_components}) + string(TOLOWER "${_comp}" _lc_comp) + set(Poppler_${_comp}_component_deps "Core") + set(Poppler_${_comp}_pkg_config "poppler-${_lc_comp}") + set(Poppler_${_comp}_lib "poppler-${_lc_comp}") + set(Poppler_${_comp}_header_subdir "poppler/${_lc_comp}") +endforeach() +set(Poppler_known_components Core ${Poppler_known_components}) + +set(Poppler_Core_component_deps "") +set(Poppler_Core_pkg_config "poppler") +# poppler-config.h header is only installed with --enable-xpdf-headers +# fall back to using any header from a submodule with a path to make it work in that case too +set(Poppler_Core_header "poppler-config.h" "cpp/poppler-version.h" "qt5/poppler-qt5.h" "qt4/poppler-qt4.h" "glib/poppler.h") +set(Poppler_Core_header_subdir "poppler") +set(Poppler_Core_lib "poppler") + +set(Poppler_Cpp_header "poppler-version.h") +set(Poppler_Qt5_header "poppler-qt5.h") +set(Poppler_Qt4_header "poppler-qt4.h") +set(Poppler_Glib_header "poppler.h") + +ecm_find_package_parse_components(Poppler + RESULT_VAR Poppler_components + KNOWN_COMPONENTS ${Poppler_known_components} +) +ecm_find_package_handle_library_components(Poppler + COMPONENTS ${Poppler_components} +) + +# If pkg-config didn't provide us with version information, +# try to extract it from poppler-version.h or poppler-config.h +if(NOT Poppler_VERSION) + find_file(Poppler_VERSION_HEADER + NAMES "poppler-config.h" "cpp/poppler-version.h" + HINTS ${Poppler_INCLUDE_DIRS} + PATH_SUFFIXES ${Poppler_Core_header_subdir} + ) + mark_as_advanced(Poppler_VERSION_HEADER) + if(Poppler_VERSION_HEADER) + file(READ ${Poppler_VERSION_HEADER} _poppler_version_header_contents) + string(REGEX REPLACE + "^.*[ \t]+POPPLER_VERSION[ \t]+\"([0-9d.]*)\".*$" + "\\1" + Poppler_VERSION + "${_poppler_version_header_contents}" + ) + unset(_poppler_version_header_contents) + endif() +endif() + +find_package_handle_standard_args(Poppler + FOUND_VAR + Poppler_FOUND + REQUIRED_VARS + Poppler_LIBRARIES + VERSION_VAR + Poppler_VERSION + HANDLE_COMPONENTS +) + +include(FeatureSummary) +set_package_properties(Poppler PROPERTIES + DESCRIPTION "A PDF rendering library" + URL "http://poppler.freedesktop.org" +) diff --git a/deps/extra-cmake-modules/find-modules/FindQtWaylandScanner.cmake b/deps/extra-cmake-modules/find-modules/FindQtWaylandScanner.cmake new file mode 100644 index 0000000..79a1b05 --- /dev/null +++ b/deps/extra-cmake-modules/find-modules/FindQtWaylandScanner.cmake @@ -0,0 +1,189 @@ +#.rst: +# FindQtWaylandScanner +# -------------------- +# +# Try to find qtwaylandscanner. +# +# If the qtwaylandscanner executable is not in your PATH, you can provide +# an alternative name or full path location with the ``QtWaylandScanner_EXECUTABLE`` +# variable. +# +# This will define the following variables: +# +# ``QtWaylandScanner_FOUND`` +# True if qtwaylandscanner is available +# +# ``QtWaylandScanner_EXECUTABLE`` +# The qtwaylandscanner executable. +# +# If ``QtWaylandScanner_FOUND`` is TRUE, it will also define the following imported +# target: +# +# ``Wayland::QtScanner`` +# The qtwaylandscanner executable. +# +# This module provides the following functions to generate C++ protocol +# implementations: +# +# - ``ecm_add_qtwayland_client_protocol`` +# - ``ecm_add_qtwayland_server_protocol`` +# +# :: +# +# ecm_add_qtwayland_client_protocol( +# PROTOCOL +# BASENAME +# [PREFIX ]) +# +# Generate C++ wrapper to Wayland client protocol files from ```` +# XML definition for the ```` interface and append those files +# to ````. Pass the ```` argument if the interface +# names don't start with ``qt_`` or ``wl_``. +# +# WaylandScanner is required and will be searched for. +# +# :: +# +# ecm_add_qtwayland_server_protocol( +# PROTOCOL +# BASENAME +# [PREFIX ]) +# +# Generate C++ wrapper to Wayland server protocol files from ```` +# XML definition for the ```` interface and append those files +# to ````. Pass the ```` argument if the interface +# names don't start with ``qt_`` or ``wl_``. +# +# WaylandScanner is required and will be searched for. +# +# Since 1.4.0. + +#============================================================================= +# Copyright 2012-2014 Pier Luigi Fiorini +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# 1. Redistributions of source code must retain the copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. 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. +#============================================================================= + +include(${CMAKE_CURRENT_LIST_DIR}/ECMFindModuleHelpersStub.cmake) + +ecm_find_package_version_check(QtWaylandScanner) + +# Find qtwaylandscanner +find_program(QtWaylandScanner_EXECUTABLE NAMES qtwaylandscanner HINTS /usr/lib/${CMAKE_LIBRARY_ARCHITECTURE}/qt5/bin/) + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(QtWaylandScanner + FOUND_VAR + QtWaylandScanner_FOUND + REQUIRED_VARS + QtWaylandScanner_EXECUTABLE +) + +mark_as_advanced(QtWaylandScanner_EXECUTABLE) + +if(NOT TARGET Wayland::QtScanner AND QtWaylandScanner_FOUND) + add_executable(Wayland::QtScanner IMPORTED) + set_target_properties(Wayland::QtScanner PROPERTIES + IMPORTED_LOCATION "${QtWaylandScanner_EXECUTABLE}" + ) +endif() + +include(FeatureSummary) +set_package_properties(QtWaylandScanner PROPERTIES + URL "http://qt.io" + DESCRIPTION "Executable that converts XML protocol files to C++ code" +) + + +include(CMakeParseArguments) + +function(ecm_add_qtwayland_client_protocol out_var) + # Parse arguments + set(oneValueArgs PROTOCOL BASENAME PREFIX) + cmake_parse_arguments(ARGS "" "${oneValueArgs}" "" ${ARGN}) + + if(ARGS_UNPARSED_ARGUMENTS) + message(FATAL_ERROR "Unknown keywords given to ecm_add_qtwayland_client_protocol(): \"${ARGS_UNPARSED_ARGUMENTS}\"") + endif() + + set(_prefix "${ARGS_PREFIX}") + + find_package(WaylandScanner REQUIRED QUIET) + ecm_add_wayland_client_protocol(${out_var} + PROTOCOL ${ARGS_PROTOCOL} + BASENAME ${ARGS_BASENAME}) + + get_filename_component(_infile ${ARGS_PROTOCOL} ABSOLUTE) + set(_cheader "${CMAKE_CURRENT_BINARY_DIR}/wayland-${ARGS_BASENAME}-client-protocol.h") + set(_header "${CMAKE_CURRENT_BINARY_DIR}/qwayland-${ARGS_BASENAME}.h") + set(_code "${CMAKE_CURRENT_BINARY_DIR}/qwayland-${ARGS_BASENAME}.cpp") + + set_source_files_properties(${_header} ${_code} GENERATED) + + add_custom_command(OUTPUT "${_header}" + COMMAND ${QtWaylandScanner_EXECUTABLE} client-header ${_infile} "" ${_prefix} > ${_header} + DEPENDS ${_infile} ${_cheader} VERBATIM) + + add_custom_command(OUTPUT "${_code}" + COMMAND ${QtWaylandScanner_EXECUTABLE} client-code ${_infile} "" ${_prefix} > ${_code} + DEPENDS ${_infile} ${_header} VERBATIM) + + list(APPEND ${out_var} "${_code}") + set(${out_var} ${${out_var}} PARENT_SCOPE) +endfunction() + + +function(ecm_add_qtwayland_server_protocol out_var) + # Parse arguments + set(oneValueArgs PROTOCOL BASENAME PREFIX) + cmake_parse_arguments(ARGS "" "${oneValueArgs}" "" ${ARGN}) + + if(ARGS_UNPARSED_ARGUMENTS) + message(FATAL_ERROR "Unknown keywords given to ecm_add_qtwayland_server_protocol(): \"${ARGS_UNPARSED_ARGUMENTS}\"") + endif() + + set(_prefix "${ARGS_PREFIX}") + + find_package(WaylandScanner REQUIRED QUIET) + ecm_add_wayland_server_protocol(${out_var} + PROTOCOL ${ARGS_PROTOCOL} + BASENAME ${ARGS_BASENAME}) + + get_filename_component(_infile ${ARGS_PROTOCOL} ABSOLUTE) + set(_header "${CMAKE_CURRENT_BINARY_DIR}/qwayland-server-${ARGS_BASENAME}.h") + set(_code "${CMAKE_CURRENT_BINARY_DIR}/qwayland-server-${ARGS_BASENAME}.cpp") + + set_source_files_properties(${_header} ${_code} GENERATED) + + add_custom_command(OUTPUT "${_header}" + COMMAND ${QtWaylandScanner_EXECUTABLE} server-header ${_infile} "" ${_prefix} > ${_header} + DEPENDS ${_infile} VERBATIM) + + add_custom_command(OUTPUT "${_code}" + COMMAND ${QtWaylandScanner_EXECUTABLE} server-code ${_infile} "" ${_prefix} > ${_code} + DEPENDS ${_infile} ${_header} VERBATIM) + + list(APPEND ${out_var} "${_code}") + set(${out_var} ${${out_var}} PARENT_SCOPE) +endfunction() diff --git a/deps/extra-cmake-modules/find-modules/FindSharedMimeInfo.cmake b/deps/extra-cmake-modules/find-modules/FindSharedMimeInfo.cmake new file mode 100644 index 0000000..a850d43 --- /dev/null +++ b/deps/extra-cmake-modules/find-modules/FindSharedMimeInfo.cmake @@ -0,0 +1,114 @@ +#.rst: +# FindSharedMimeInfo +# ------------------ +# +# Try to find the shared-mime-info package. +# +# This will define the following variables: +# +# ``SharedMimeInfo_FOUND`` +# True if system has the shared-mime-info package +# ``UPDATE_MIME_DATABASE_EXECUTABLE`` +# The update-mime-database executable +# +# and the following imported targets: +# +# ``SharedMimeInfo::UpdateMimeDatabase`` +# The update-mime-database executable +# +# The follow macro is available:: +# +# update_xdg_mimetypes() +# +# Updates the XDG mime database at install time (unless the ``$DESTDIR`` +# environment variable is set, in which case it is up to package managers to +# perform this task). +# +# Since pre-1.0.0. + +#============================================================================= +# Copyright 2013-2014 Alex Merry +# Copyright 2007 Pino Toscano +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# 1. Redistributions of source code must retain the copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. 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. +#============================================================================= + +include(${CMAKE_CURRENT_LIST_DIR}/ECMFindModuleHelpersStub.cmake) + +ecm_find_package_version_check(SharedMimeInfo) + +find_program (UPDATE_MIME_DATABASE_EXECUTABLE NAMES update-mime-database) + +if (UPDATE_MIME_DATABASE_EXECUTABLE) + execute_process( + COMMAND "${UPDATE_MIME_DATABASE_EXECUTABLE}" -v + OUTPUT_VARIABLE _smiVersionRaw + ERROR_VARIABLE _smiVersionRaw) + + string(REGEX REPLACE "update-mime-database \\([a-zA-Z\\-]+\\) ([0-9]\\.[0-9]+).*" + "\\1" SharedMimeInfo_VERSION_STRING "${_smiVersionRaw}") +endif() + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(SharedMimeInfo + FOUND_VAR + SharedMimeInfo_FOUND + REQUIRED_VARS + UPDATE_MIME_DATABASE_EXECUTABLE + VERSION_VAR + SharedMimeInfo_VERSION_STRING) + +if(SharedMimeInfo_FOUND AND NOT TARGET SharedMimeInfo::UpdateMimeDatabase) + add_executable(SharedMimeInfo::UpdateMimeDatabase IMPORTED) + set_target_properties(SharedMimeInfo::UpdateMimeDatabase PROPERTIES + IMPORTED_LOCATION "${UPDATE_MIME_DATABASE_EXECUTABLE}" + ) +endif() + +mark_as_advanced(UPDATE_MIME_DATABASE_EXECUTABLE) + +function(UPDATE_XDG_MIMETYPES _path) + get_filename_component(_xdgmimeDir "${_path}" NAME) + if("${_xdgmimeDir}" STREQUAL packages ) + get_filename_component(_xdgmimeDir "${_path}" PATH) + else() + set(_xdgmimeDir "${_path}") + endif() + + # Note that targets and most variables are not available to install code + 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 + message(STATUS \"Updating MIME database at \${CMAKE_INSTALL_PREFIX}/${_xdgmimeDir}\") + execute_process(COMMAND \"${UPDATE_MIME_DATABASE_EXECUTABLE}\" \"${_xdgmimeDir}\" + WORKING_DIRECTORY \"\${CMAKE_INSTALL_PREFIX}\") +endif (NOT DESTDIR_VALUE) +") +endfunction() + +include(FeatureSummary) +set_package_properties(SharedMimeInfo PROPERTIES + URL http://freedesktop.org/wiki/Software/shared-mime-info/ + DESCRIPTION "A database of common MIME types") diff --git a/deps/extra-cmake-modules/find-modules/FindWayland.cmake b/deps/extra-cmake-modules/find-modules/FindWayland.cmake new file mode 100644 index 0000000..233cc88 --- /dev/null +++ b/deps/extra-cmake-modules/find-modules/FindWayland.cmake @@ -0,0 +1,143 @@ +#.rst: +# FindWayland +# ----------- +# +# Try to find Wayland. +# +# This is a component-based find module, which makes use of the COMPONENTS +# and OPTIONAL_COMPONENTS arguments to find_module. The following components +# are available:: +# +# Client Server Cursor Egl +# +# If no components are specified, this module will act as though all components +# were passed to OPTIONAL_COMPONENTS. +# +# This module will define the following variables, independently of the +# components searched for or found: +# +# ``Wayland_FOUND`` +# TRUE if (the requested version of) Wayland is available +# ``Wayland_VERSION`` +# Found Wayland version +# ``Wayland_TARGETS`` +# A list of all targets imported by this module (note that there may be more +# than the components that were requested) +# ``Wayland_LIBRARIES`` +# This can be passed to target_link_libraries() instead of the imported +# targets +# ``Wayland_INCLUDE_DIRS`` +# This should be passed to target_include_directories() if the targets are +# not used for linking +# ``Wayland_DEFINITIONS`` +# This should be passed to target_compile_options() if the targets are not +# used for linking +# +# For each searched-for components, ``Wayland__FOUND`` will be set to +# TRUE if the corresponding Wayland library was found, and FALSE otherwise. If +# ``Wayland__FOUND`` is TRUE, the imported target +# ``Wayland::`` will be defined. This module will also attempt to +# determine ``Wayland_*_VERSION`` variables for each imported target, although +# ``Wayland_VERSION`` should normally be sufficient. +# +# In general we recommend using the imported targets, as they are easier to use +# and provide more control. Bear in mind, however, that if any target is in the +# link interface of an exported library, it must be made available by the +# package config file. +# +# Since pre-1.0.0. + +#============================================================================= +# Copyright 2014 Alex Merry +# Copyright 2014 Martin Gräßlin +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# 1. Redistributions of source code must retain the copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. 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. +#============================================================================= + +include(${CMAKE_CURRENT_LIST_DIR}/ECMFindModuleHelpersStub.cmake) + +ecm_find_package_version_check(Wayland) + +set(Wayland_known_components + Client + Server + Cursor + Egl +) +foreach(_comp ${Wayland_known_components}) + string(TOLOWER "${_comp}" _lc_comp) + set(Wayland_${_comp}_component_deps) + set(Wayland_${_comp}_pkg_config "wayland-${_lc_comp}") + set(Wayland_${_comp}_lib "wayland-${_lc_comp}") + set(Wayland_${_comp}_header "wayland-${_lc_comp}.h") +endforeach() +set(Wayland_Egl_component_deps Client) + +ecm_find_package_parse_components(Wayland + RESULT_VAR Wayland_components + KNOWN_COMPONENTS ${Wayland_known_components} +) +ecm_find_package_handle_library_components(Wayland + COMPONENTS ${Wayland_components} +) + +# If pkg-config didn't provide us with version information, +# try to extract it from wayland-version.h +# (Note that the version from wayland-egl.pc will probably be +# the Mesa version, rather than the Wayland version, but that +# version will be ignored as we always find wayland-client.pc +# first). +if(NOT Wayland_VERSION) + find_file(Wayland_VERSION_HEADER + NAMES wayland-version.h + HINTS ${Wayland_INCLUDE_DIRS} + ) + mark_as_advanced(Wayland_VERSION_HEADER) + if(Wayland_VERSION_HEADER) + file(READ ${Wayland_VERSION_HEADER} _wayland_version_header_contents) + string(REGEX REPLACE + "^.*[ \t]+WAYLAND_VERSION[ \t]+\"([0-9.]*)\".*$" + "\\1" + Wayland_VERSION + "${_wayland_version_header_contents}" + ) + unset(_wayland_version_header_contents) + endif() +endif() + +find_package_handle_standard_args(Wayland + FOUND_VAR + Wayland_FOUND + REQUIRED_VARS + Wayland_LIBRARIES + VERSION_VAR + Wayland_VERSION + HANDLE_COMPONENTS +) + +include(FeatureSummary) +set_package_properties(Wayland PROPERTIES + URL "http://wayland.freedesktop.org" + DESCRIPTION "C library implementation of the Wayland protocol: a protocol for a compositor to talk to its clients" +) diff --git a/deps/extra-cmake-modules/find-modules/FindWaylandScanner.cmake b/deps/extra-cmake-modules/find-modules/FindWaylandScanner.cmake new file mode 100644 index 0000000..4052cda --- /dev/null +++ b/deps/extra-cmake-modules/find-modules/FindWaylandScanner.cmake @@ -0,0 +1,166 @@ +#.rst: +# FindWaylandScanner +# ------------------ +# +# Try to find wayland-scanner. +# +# If the wayland-scanner executable is not in your PATH, you can provide +# an alternative name or full path location with the ``WaylandScanner_EXECUTABLE`` +# variable. +# +# This will define the following variables: +# +# ``WaylandScanner_FOUND`` +# True if wayland-scanner is available. +# +# ``WaylandScanner_EXECUTABLE`` +# The wayland-scanner executable. +# +# If ``WaylandScanner_FOUND`` is TRUE, it will also define the following imported +# target: +# +# ``Wayland::Scanner`` +# The wayland-scanner executable. +# +# This module provides the following functions to generate C protocol +# implementations: +# +# - ``ecm_add_wayland_client_protocol`` +# - ``ecm_add_wayland_server_protocol`` +# +# :: +# +# ecm_add_wayland_client_protocol( +# PROTOCOL +# BASENAME ) +# +# Generate Wayland client protocol files from ```` XML +# definition for the ```` interface and append those files +# to ````. +# +# :: +# +# ecm_add_wayland_server_protocol( +# PROTOCOL +# BASENAME ) +# +# Generate Wayland server protocol files from ```` XML +# definition for the ```` interface and append those files +# to ````. +# +# Since 1.4.0. + +#============================================================================= +# Copyright 2012-2014 Pier Luigi Fiorini +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# 1. Redistributions of source code must retain the copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. 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. +#============================================================================= + +include(${CMAKE_CURRENT_LIST_DIR}/ECMFindModuleHelpersStub.cmake) + +ecm_find_package_version_check(WaylandScanner) + +# Find wayland-scanner +find_program(WaylandScanner_EXECUTABLE NAMES wayland-scanner) + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(WaylandScanner + FOUND_VAR + WaylandScanner_FOUND + REQUIRED_VARS + WaylandScanner_EXECUTABLE +) + +mark_as_advanced(WaylandScanner_EXECUTABLE) + +if(NOT TARGET Wayland::Scanner AND WaylandScanner_FOUND) + add_executable(Wayland::Scanner IMPORTED) + set_target_properties(Wayland::Scanner PROPERTIES + IMPORTED_LOCATION "${WaylandScanner_EXECUTABLE}" + ) +endif() + +include(FeatureSummary) +set_package_properties(WaylandScanner PROPERTIES + URL "http://wayland.freedesktop.org" + DESCRIPTION "Executable that converts XML protocol files to C code" +) + + +include(CMakeParseArguments) + +function(ecm_add_wayland_client_protocol out_var) + # Parse arguments + set(oneValueArgs PROTOCOL BASENAME) + cmake_parse_arguments(ARGS "" "${oneValueArgs}" "" ${ARGN}) + + if(ARGS_UNPARSED_ARGUMENTS) + message(FATAL_ERROR "Unknown keywords given to ecm_add_wayland_client_protocol(): \"${ARGS_UNPARSED_ARGUMENTS}\"") + endif() + + get_filename_component(_infile ${ARGS_PROTOCOL} ABSOLUTE) + set(_client_header "${CMAKE_CURRENT_BINARY_DIR}/wayland-${ARGS_BASENAME}-client-protocol.h") + set(_code "${CMAKE_CURRENT_BINARY_DIR}/wayland-${ARGS_BASENAME}-protocol.c") + + set_source_files_properties(${_client_header} GENERATED) + set_source_files_properties(${_code} GENERATED) + + add_custom_command(OUTPUT "${_client_header}" + COMMAND ${WaylandScanner_EXECUTABLE} client-header < ${_infile} > ${_client_header} + DEPENDS ${_infile} VERBATIM) + + add_custom_command(OUTPUT "${_code}" + COMMAND ${WaylandScanner_EXECUTABLE} code < ${_infile} > ${_code} + DEPENDS ${_infile} ${_client_header} VERBATIM) + + list(APPEND ${out_var} "${_client_header}" "${_code}") + set(${out_var} ${${out_var}} PARENT_SCOPE) +endfunction() + + +function(ecm_add_wayland_server_protocol out_var) + # Parse arguments + set(oneValueArgs PROTOCOL BASENAME) + cmake_parse_arguments(ARGS "" "${oneValueArgs}" "" ${ARGN}) + + if(ARGS_UNPARSED_ARGUMENTS) + message(FATAL_ERROR "Unknown keywords given to ecm_add_wayland_server_protocol(): \"${ARGS_UNPARSED_ARGUMENTS}\"") + endif() + + ecm_add_wayland_client_protocol(${out_var} + PROTOCOL ${ARGS_PROTOCOL} + BASENAME ${ARGS_BASENAME}) + + get_filename_component(_infile ${ARGS_PROTOCOL} ABSOLUTE) + set(_server_header "${CMAKE_CURRENT_BINARY_DIR}/wayland-${ARGS_BASENAME}-server-protocol.h") + + set_source_files_properties(${_server_header} GENERATED) + + add_custom_command(OUTPUT "${_server_header}" + COMMAND ${WaylandScanner_EXECUTABLE} server-header < ${_infile} > ${_server_header} + DEPENDS ${_infile} VERBATIM) + + list(APPEND ${out_var} "${_server_header}") + set(${out_var} ${${out_var}} PARENT_SCOPE) +endfunction() diff --git a/deps/extra-cmake-modules/find-modules/FindX11_XCB.cmake b/deps/extra-cmake-modules/find-modules/FindX11_XCB.cmake new file mode 100644 index 0000000..dd55fd7 --- /dev/null +++ b/deps/extra-cmake-modules/find-modules/FindX11_XCB.cmake @@ -0,0 +1,118 @@ +#.rst: +# FindX11_XCB +# ----------- +# +# Try to find the X11 XCB compatibility library. +# +# This will define the following variables: +# +# ``X11_XCB_FOUND`` +# True if (the requested version of) libX11-xcb is available +# ``X11_XCB_VERSION`` +# The version of libX11-xcb (this is not guaranteed to be set even when +# X11_XCB_FOUND is true) +# ``X11_XCB_LIBRARIES`` +# This can be passed to target_link_libraries() instead of the ``EGL::EGL`` +# target +# ``X11_XCB_INCLUDE_DIR`` +# This should be passed to target_include_directories() if the target is not +# used for linking +# ``X11_XCB_DEFINITIONS`` +# This should be passed to target_compile_options() if the target is not +# used for linking +# +# If ``X11_XCB_FOUND`` is TRUE, it will also define the following imported +# target: +# +# ``X11::XCB`` +# The X11 XCB compatibility library +# +# In general we recommend using the imported target, as it is easier to use. +# Bear in mind, however, that if the target is in the link interface of an +# exported library, it must be made available by the package config file. +# +# Since pre-1.0.0. + +#============================================================================= +# Copyright 2014 Alex Merry +# Copyright 2011 Fredrik Höglund +# Copyright 2008 Helio Chissini de Castro +# Copyright 2007 Matthias Kretz +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# 1. Redistributions of source code must retain the copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. 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. +#============================================================================= + +include(${CMAKE_CURRENT_LIST_DIR}/ECMFindModuleHelpersStub.cmake) + +ecm_find_package_version_check(X11_XCB) + +# use pkg-config to get the directories and then use these values +# in the FIND_PATH() and FIND_LIBRARY() calls +find_package(PkgConfig) +pkg_check_modules(PKG_X11_XCB QUIET x11-xcb) + +set(X11_XCB_DEFINITIONS ${PKG_X11_XCB_CFLAGS_OTHER}) +set(X11_XCB_VERSION ${PKG_X11_XCB_VERSION}) + +find_path(X11_XCB_INCLUDE_DIR + NAMES X11/Xlib-xcb.h + HINTS ${PKG_X11_XCB_INCLUDE_DIRS} +) +find_library(X11_XCB_LIBRARY + NAMES X11-xcb + HINTS ${PKG_X11_XCB_LIBRARY_DIRS} +) + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(X11_XCB + FOUND_VAR + X11_XCB_FOUND + REQUIRED_VARS + X11_XCB_LIBRARY + X11_XCB_INCLUDE_DIR + VERSION_VAR + X11_XCB_VERSION +) + +if(X11_XCB_FOUND AND NOT TARGET X11::XCB) + add_library(X11::XCB UNKNOWN IMPORTED) + set_target_properties(X11::XCB PROPERTIES + IMPORTED_LOCATION "${X11_XCB_LIBRARY}" + INTERFACE_COMPILE_OPTIONS "${X11_XCB_DEFINITIONS}" + INTERFACE_INCLUDE_DIRECTORIES "${X11_XCB_INCLUDE_DIR}" + ) +endif() + +mark_as_advanced(X11_XCB_INCLUDE_DIR X11_XCB_LIBRARY) + +# compatibility variables +set(X11_XCB_LIBRARIES ${X11_XCB_LIBRARY}) +set(X11_XCB_INCLUDE_DIRS ${X11_XCB_INCLUDE_DIR}) +set(X11_XCB_VERSION_STRING ${X11_XCB_VERSION}) + +include(FeatureSummary) +set_package_properties(X11_XCB PROPERTIES + URL "http://xorg.freedesktop.org/" + DESCRIPTION "A compatibility library for code that translates Xlib API calls into XCB calls" +) diff --git a/deps/extra-cmake-modules/find-modules/FindXCB.cmake b/deps/extra-cmake-modules/find-modules/FindXCB.cmake new file mode 100644 index 0000000..d530d2d --- /dev/null +++ b/deps/extra-cmake-modules/find-modules/FindXCB.cmake @@ -0,0 +1,201 @@ +#.rst: +# FindXCB +# ------- +# +# Try to find XCB. +# +# This is a component-based find module, which makes use of the COMPONENTS and +# OPTIONAL_COMPONENTS arguments to find_module. The following components are +# available:: +# +# XCB +# ATOM AUX COMPOSITE CURSOR DAMAGE +# DPMS DRI2 DRI3 EVENT EWMH +# GLX ICCCM IMAGE KEYSYMS PRESENT +# RANDR RECORD RENDER RENDERUTIL RES +# SCREENSAVER SHAPE SHM SYNC UTIL +# XEVIE XF86DRI XFIXES XINERAMA XINPUT +# XKB XPRINT XTEST XV XVMC +# +# If no components are specified, this module will act as though all components +# except XINPUT (which is considered unstable) were passed to +# OPTIONAL_COMPONENTS. +# +# This module will define the following variables, independently of the +# components searched for or found: +# +# ``XCB_FOUND`` +# True if (the requestion version of) xcb is available +# ``XCB_VERSION`` +# Found xcb version +# ``XCB_TARGETS`` +# A list of all targets imported by this module (note that there may be more +# than the components that were requested) +# ``XCB_LIBRARIES`` +# This can be passed to target_link_libraries() instead of the imported +# targets +# ``XCB_INCLUDE_DIRS`` +# This should be passed to target_include_directories() if the targets are +# not used for linking +# ``XCB_DEFINITIONS`` +# This should be passed to target_compile_options() if the targets are not +# used for linking +# +# For each searched-for components, ``XCB__FOUND`` will be set to +# true if the corresponding xcb library was found, and false otherwise. If +# ``XCB__FOUND`` is true, the imported target ``XCB::`` +# will be defined. This module will also attempt to determine +# ``XCB_*_VERSION`` variables for each imported target, although +# ``XCB_VERSION`` should normally be sufficient. +# +# In general we recommend using the imported targets, as they are easier to use +# and provide more control. Bear in mind, however, that if any target is in the +# link interface of an exported library, it must be made available by the +# package config file. +# +# Since pre-1.0.0. + +#============================================================================= +# Copyright 2011 Fredrik Höglund +# Copyright 2013 Martin Gräßlin +# Copyright 2014-2015 Alex Merry +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# 1. Redistributions of source code must retain the copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. 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. +#============================================================================= + +include(${CMAKE_CURRENT_LIST_DIR}/ECMFindModuleHelpersStub.cmake) + +ecm_find_package_version_check(XCB) + +# Note that this list needs to be ordered such that any component +# appears after its dependencies +set(XCB_known_components + XCB + RENDER + SHAPE + XFIXES + SHM + ATOM + AUX + COMPOSITE + CURSOR + DAMAGE + DPMS + DRI2 + DRI3 + EVENT + EWMH + GLX + ICCCM + IMAGE + KEYSYMS + PRESENT + RANDR + RECORD + RENDERUTIL + RES + SCREENSAVER + SYNC + UTIL + XEVIE + XF86DRI + XINERAMA + XINPUT + XKB + XPRINT + XTEST + XV + XVMC +) + +# XINPUT is unstable; do not include it by default +set(XCB_default_components ${XCB_known_components}) +list(REMOVE_ITEM XCB_default_components "XINPUT") + +# default component info: xcb components have fairly predictable +# header files, library names and pkg-config names +foreach(_comp ${XCB_known_components}) + string(TOLOWER "${_comp}" _lc_comp) + set(XCB_${_comp}_component_deps XCB) + set(XCB_${_comp}_pkg_config "xcb-${_lc_comp}") + set(XCB_${_comp}_lib "xcb-${_lc_comp}") + set(XCB_${_comp}_header "xcb/${_lc_comp}.h") +endforeach() +# exceptions +set(XCB_XCB_component_deps) +set(XCB_COMPOSITE_component_deps XCB XFIXES) +set(XCB_DAMAGE_component_deps XCB XFIXES) +set(XCB_IMAGE_component_deps XCB SHM) +set(XCB_RENDERUTIL_component_deps XCB RENDER) +set(XCB_XFIXES_component_deps XCB RENDER SHAPE) +set(XCB_XVMC_component_deps XCB XV) +set(XCB_XV_component_deps XCB SHM) +set(XCB_XCB_pkg_config "xcb") +set(XCB_XCB_lib "xcb") +set(XCB_ATOM_header "xcb/xcb_atom.h") +set(XCB_ATOM_lib "xcb-util") +set(XCB_AUX_header "xcb/xcb_aux.h") +set(XCB_AUX_lib "xcb-util") +set(XCB_CURSOR_header "xcb/xcb_cursor.h") +set(XCB_EVENT_header "xcb/xcb_event.h") +set(XCB_EVENT_lib "xcb-util") +set(XCB_EWMH_header "xcb/xcb_ewmh.h") +set(XCB_ICCCM_header "xcb/xcb_icccm.h") +set(XCB_IMAGE_header "xcb/xcb_image.h") +set(XCB_KEYSYMS_header "xcb/xcb_keysyms.h") +set(XCB_PIXEL_header "xcb/xcb_pixel.h") +set(XCB_RENDERUTIL_header "xcb/xcb_renderutil.h") +set(XCB_RENDERUTIL_lib "xcb-render-util") +set(XCB_UTIL_header "xcb/xcb_util.h") + +ecm_find_package_parse_components(XCB + RESULT_VAR XCB_components + KNOWN_COMPONENTS ${XCB_known_components} + DEFAULT_COMPONENTS ${XCB_default_components} +) + +list(FIND XCB_components "XINPUT" _XCB_XINPUT_index) +if (NOT _XCB_XINPUT_index EQUAL -1) + message(AUTHOR_WARNING "XINPUT from XCB was requested: this is EXPERIMENTAL and is likely to unavailable on many systems!") +endif() + +ecm_find_package_handle_library_components(XCB + COMPONENTS ${XCB_components} +) + +find_package_handle_standard_args(XCB + FOUND_VAR + XCB_FOUND + REQUIRED_VARS + XCB_LIBRARIES + VERSION_VAR + XCB_VERSION + HANDLE_COMPONENTS +) + +include(FeatureSummary) +set_package_properties(XCB PROPERTIES + URL "http://xcb.freedesktop.org" + DESCRIPTION "X protocol C-language Binding" +) diff --git a/deps/extra-cmake-modules/kde-modules/KDECMakeSettings.cmake b/deps/extra-cmake-modules/kde-modules/KDECMakeSettings.cmake new file mode 100644 index 0000000..523271a --- /dev/null +++ b/deps/extra-cmake-modules/kde-modules/KDECMakeSettings.cmake @@ -0,0 +1,263 @@ +#.rst: +# KDECMakeSettings +# ---------------- +# +# Changes various CMake settings to what the KDE community views as more +# sensible defaults. +# +# It is recommended to include this module with the NO_POLICY_SCOPE flag, +# otherwise you may get spurious warnings with some versions of CMake. +# +# It is split into three parts, which can be independently disabled if desired. +# +# Runtime Paths +# ~~~~~~~~~~~~~ +# +# The default runtime path (used on Unix systems to search for +# dynamically-linked libraries) is set to include the location that libraries +# will be installed to (as set in LIB_INSTALL_DIR), and also the linker search +# path. +# +# Note that ``LIB_INSTALL_DIR`` needs to be set before including this module. +# Typically, this is done by including the :kde-module:`KDEInstallDirs` module. +# +# This section can be disabled by setting ``KDE_SKIP_RPATH_SETTINGS`` to TRUE +# before including this module. +# +# +# Testing +# ~~~~~~~ +# +# Testing is enabled by default, and an option (BUILD_TESTING) is provided for +# users to control this. See the CTest module documentation in the CMake manual +# for more details. +# +# This section can be disabled by setting ``KDE_SKIP_TEST_SETTINGS`` to TRUE +# before including this module. +# +# +# Build Settings +# ~~~~~~~~~~~~~~ +# +# Various CMake build defaults are altered, such as searching source and build +# directories for includes first and enabling automoc by default. +# +# This section can be disabled by setting ``KDE_SKIP_BUILD_SETTINGS`` to TRUE +# before including this module. +# +# This section also provides an "uninstall" target that can be individually +# disabled by setting ``KDE_SKIP_UNINSTALL_TARGET`` to TRUE before including +# this module. +# +# By default on OS X, X11 and XCB related detections are disabled. However if +# the need would arise to use these technologies, the detection can be enabled +# by setting ``APPLE_FORCE_X11`` to ``ON``. +# +# A warning is printed for the developer to know that the detection is disabled on OS X. +# This message can be turned off by setting ``APPLE_SUPPRESS_X11_WARNING`` to ``ON``. +# +# Since pre-1.0.0. +# +# ``ENABLE_CLAZY`` option is added (OFF by default) when clang is being used. +# Turning this option on will force clang to load the clazy plugins for richer +# warnings on Qt-related code. +# +# If clang is not being used, this won't have an effect. +# See https://quickgit.kde.org/?p=clazy.git&a=blob&f=README&o=plain +# +# Since 5.17.0 +# +# - Uninstall target functionality since 1.7.0. +# - ``APPLE_FORCE_X11`` option since 5.14.0 (detecting X11 was previously the default behavior) +# - ``APPLE_SUPPRESS_X11_WARNING`` option since 5.14.0 + +#============================================================================= +# Copyright 2014 Alex Merry +# Copyright 2013 Aleix Pol +# Copyright 2012-2013 Stephen Kelly +# Copyright 2007 Matthias Kretz +# Copyright 2006-2007 Laurent Montel +# Copyright 2006-2013 Alex Neundorf +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# 1. Redistributions of source code must retain the copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. 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. + +################# RPATH handling ################################## + +if(NOT KDE_SKIP_RPATH_SETTINGS) + + # Set the default RPATH to point to useful locations, namely where the + # libraries will be installed and the linker search path + + if(NOT LIB_INSTALL_DIR) + message(FATAL_ERROR "LIB_INSTALL_DIR not set. This is necessary for using the RPATH settings.") + endif() + + set(_abs_LIB_INSTALL_DIR "${LIB_INSTALL_DIR}") + if (NOT IS_ABSOLUTE "${_abs_LIB_INSTALL_DIR}") + set(_abs_LIB_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/${LIB_INSTALL_DIR}") + endif() + + if (UNIX) + # for mac os: add install name dir in addition + # check: is the rpath stuff below really required on mac os? at least it seems so to use a stock qt from qt.io + if (APPLE) + set(CMAKE_INSTALL_NAME_DIR ${_abs_LIB_INSTALL_DIR}) + endif () + + # add our LIB_INSTALL_DIR to the RPATH (but only when it is not one of + # the standard system link directories - such as /usr/lib on UNIX) + list(FIND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES "${_abs_LIB_INSTALL_DIR}" _isSystemLibDir) + list(FIND CMAKE_CXX_IMPLICIT_LINK_DIRECTORIES "${_abs_LIB_INSTALL_DIR}" _isSystemCxxLibDir) + list(FIND CMAKE_C_IMPLICIT_LINK_DIRECTORIES "${_abs_LIB_INSTALL_DIR}" _isSystemCLibDir) + if("${_isSystemLibDir}" STREQUAL "-1" AND "${_isSystemCxxLibDir}" STREQUAL "-1" AND "${_isSystemCLibDir}" STREQUAL "-1") + set(CMAKE_INSTALL_RPATH "${_abs_LIB_INSTALL_DIR}") + endif() + + # Append directories in the linker search path (but outside the project) + set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE) + endif (UNIX) + +endif() + +################ Testing setup #################################### + +find_program(APPSTREAMCLI appstreamcli) +function(appstreamtest) + if(APPSTREAMCLI AND NOT _done) + set(_done TRUE) + add_test(NAME appstreamtest COMMAND cmake -DAPPSTREAMCLI=${APPSTREAMCLI} -DINSTALL_FILES=${CMAKE_BINARY_DIR}/install_manifest.txt -P ${CMAKE_CURRENT_LIST_DIR}/appstreamtest.cmake) + else() + message(STATUS "Could not set up the appstream test. appstreamcli is missing.") + endif() +endfunction() + +if(NOT KDE_SKIP_TEST_SETTINGS) + + # If there is a CTestConfig.cmake, include CTest. + # Otherwise, there will not be any useful settings, so just + # fake the functionality we care about from CTest. + + if (EXISTS ${CMAKE_SOURCE_DIR}/CTestConfig.cmake) + include(CTest) + else() + option(BUILD_TESTING "Build the testing tree." ON) + if(BUILD_TESTING) + enable_testing() + appstreamtest() + endif () + endif () + +endif() + + + +################ Build-related settings ########################### + +if(NOT KDE_SKIP_BUILD_SETTINGS) + + # Always include srcdir and builddir in include path + # This saves typing ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR} in about every subdir + # since cmake 2.4.0 + set(CMAKE_INCLUDE_CURRENT_DIR ON) + + # put the include dirs which are in the source or build tree + # before all other include dirs, so the headers in the sources + # are prefered over the already installed ones + # since cmake 2.4.1 + set(CMAKE_INCLUDE_DIRECTORIES_PROJECT_BEFORE ON) + + # Add the src and build dir to the BUILD_INTERFACE include directories + # of all targets. Similar to CMAKE_INCLUDE_CURRENT_DIR, but transitive. + # Since CMake 2.8.11 + set(CMAKE_INCLUDE_CURRENT_DIR_IN_INTERFACE ON) + + # When a shared library changes, but its includes do not, don't relink + # all dependencies. It is not needed. + # Since CMake 2.8.11 + set(CMAKE_LINK_DEPENDS_NO_SHARED ON) + + # Default to shared libs for KDE, if no type is explicitely given to add_library(): + set(BUILD_SHARED_LIBS TRUE CACHE BOOL "If enabled, shared libs will be built by default, otherwise static libs") + + # Enable automoc in cmake + # Since CMake 2.8.6 + set(CMAKE_AUTOMOC ON) + + # By default, create 'GUI' executables. This can be reverted on a per-target basis + # using ECMMarkNonGuiExecutable + # Since CMake 2.8.8 + set(CMAKE_WIN32_EXECUTABLE ON) + set(CMAKE_MACOSX_BUNDLE ON) + + # By default, don't put a prefix on MODULE targets. add_library(MODULE) is basically for plugin targets, + # and in KDE plugins don't have a prefix. + set(CMAKE_SHARED_MODULE_PREFIX "") + + unset(EXECUTABLE_OUTPUT_PATH) + unset(LIBRARY_OUTPUT_PATH) + unset(CMAKE_ARCHIVE_OUTPUT_DIRECTORY) + unset(CMAKE_LIBRARY_OUTPUT_DIRECTORY) + unset(CMAKE_RUNTIME_OUTPUT_DIRECTORY) + + # under Windows, output all executables and dlls into + # one common directory, and all static|import libraries and plugins + # into another one. This way test executables can find their dlls + # even without installation. + if(WIN32) + set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib") + set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin") + set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin") + endif() + + # Disable detection of X11 and related package on OS X because when using + # brew or macports, X11 can be installed and thus is detected. + option(APPLE_FORCE_X11 "Force enable X11 related detection on OS X" OFF) + option(APPLE_SUPPRESS_X11_WARNING "Suppress X11 and related technologies search disabling warning on OS X" OFF) + + if(APPLE AND NOT APPLE_FORCE_X11) + if (NOT APPLE_SUPPRESS_X11_WARNING) + message(WARNING "Searching for X11 and related technologies is disabled on Apple systems. Set APPLE_FORCE_X11 to ON to change this behaviour. Set APPLE_SUPPRESS_X11_WARNING to ON to hide this warning.") + endif() + + set(CMAKE_DISABLE_FIND_PACKAGE_X11 true) + set(CMAKE_DISABLE_FIND_PACKAGE_XCB true) + set(CMAKE_DISABLE_FIND_PACKAGE_Qt5X11Extras true) + endif() + + option(KDE_SKIP_UNINSTALL_TARGET "Prevent an \"uninstall\" target from being generated." OFF) + if(NOT KDE_SKIP_UNINSTALL_TARGET) + include("${ECM_MODULE_DIR}/ECMUninstallTarget.cmake") + endif() + +endif() + +if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang") + option(ENABLE_CLAZY "Enable Clazy warnings" OFF) + + if(ENABLE_CLAZY) + set(CMAKE_CXX_COMPILE_OBJECT "${CMAKE_CXX_COMPILE_OBJECT} -Xclang -load -Xclang ClangLazy.so -Xclang -add-plugin -Xclang clang-lazy") + endif() +endif() + +################################################################### diff --git a/deps/extra-cmake-modules/kde-modules/KDECompilerSettings.cmake b/deps/extra-cmake-modules/kde-modules/KDECompilerSettings.cmake new file mode 100644 index 0000000..dfa29f7 --- /dev/null +++ b/deps/extra-cmake-modules/kde-modules/KDECompilerSettings.cmake @@ -0,0 +1,462 @@ +#.rst: +# KDECompilerSettings +# ------------------- +# +# Set useful compile and link flags for C++ (and C) code. +# +# Enables many more warnings than the default, and sets stricter modes +# for some compiler features. By default, exceptions are disabled; +# kde_target_enable_exceptions() can be used to re-enable them for a +# specific target. +# +# NB: it is recommended to include this module with the NO_POLICY_SCOPE +# flag, otherwise you may get spurious warnings with some versions of CMake. +# +# This module provides the following functions:: +# +# kde_source_files_enable_exceptions([file1 [file2 [...]]]) +# +# Enables exceptions for specific source files. This should not be +# used on source files in a language other than C++. +# +# :: +# +# kde_target_enable_exceptions(target ) +# +# Enables exceptions for a specific target. This should not be used +# on a target that has source files in a language other than C++. +# +# :: +# +# kde_enable_exceptions() +# +# Enables exceptions for C++ source files compiled for the +# CMakeLists.txt file in the current directory and all subdirectories. +# +# Since pre-1.0.0. + +#============================================================================= +# Copyright 2014 Alex Merry +# Copyright 2013 Stephen Kelly +# Copyright 2012-2013 Raphael Kubo da Costa +# Copyright 2007 Matthias Kretz +# Copyright 2006-2007 Laurent Montel +# Copyright 2006-2013 Alex Neundorf +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# 1. Redistributions of source code must retain the copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. 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. + +############################################################ +# Toolchain minimal requirements +# +# Note that only compilers officially supported by Qt are +# supported by this file; workarounds for older compilers +# will generally not be included. See +# https://qt-project.org/doc/qt-5/supported-platforms.html +# and +# https://community.kde.org/Frameworks/Policies#Frameworks_compiler_requirements_and_C.2B.2B11 +# for more details. +############################################################ + +macro(_kde_compiler_min_version min_version) + if ("${CMAKE_CXX_COMPILER_VERSION}" VERSION_LESS "${min_version}") + message(WARNING "Version ${CMAKE_CXX_COMPILER_VERSION} of the ${CMAKE_CXX_COMPILER_ID} C++ compiler is not supported. Please use version ${min_version} or later.") + endif() +endmacro() + +if (MSVC) + # MSVC_VERSION 1600 = VS 10.0 = Windows SDK 7 + # See: cmake --help-variable MSVC_VERSION + # and https://developer.mozilla.org/en-US/docs/Windows_SDK_versions + if (${MSVC_VERSION} LESS 1600) + message(WARNING "Your MSVC version (${MSVC_VERSION}) is not supported. Please use the Windows SDK version 7 or later (or Microsoft Visual Studio 2010 or later).") + endif() +elseif (CMAKE_CXX_COMPILER_ID STREQUAL "GNU") + if (WIN32) + _kde_compiler_min_version("4.7") + elseif (APPLE) + # FIXME: Apple heavily modifies GCC, so checking the + # GCC version on OS/X is not very useful. + else() + _kde_compiler_min_version("4.5") + endif() +elseif (CMAKE_CXX_COMPILER_ID STREQUAL "Clang") + _kde_compiler_min_version("3.1") +else() + message(WARNING "${CMAKE_CXX_COMPILER_ID} is not a supported C++ compiler.") +endif() + + + +############################################################ +# System API features +############################################################ + +# This macro is for adding definitions that affect the underlying +# platform API. It makes sure that configure checks will also have +# the same defines, so that the checks match compiled code. +macro (_KDE_ADD_PLATFORM_DEFINITIONS) + add_definitions(${ARGV}) + set(CMAKE_REQUIRED_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS} ${ARGV}) +endmacro() + +include(CheckSymbolExists) +check_symbol_exists("__GLIBC__" "stdlib.h" LIBC_IS_GLIBC) +if (LIBC_IS_GLIBC) + # Enable everything in GNU libc. Any code using non-portable features + # needs to perform feature tests, but this ensures that any such features + # will be found if they exist. + # + # NB: we do NOT define _BSD_SOURCE, as with GNU libc that requires linking + # against the -lbsd-compat library (it changes the behaviour of some + # functions). This, however, means that strlcat and strlcpy are not + # provided by glibc. + _kde_add_platform_definitions(-D_GNU_SOURCE) +endif () + +if (UNIX) + # Enable extra API for using 64-bit file offsets on 32-bit systems. + # FIXME: this is included in _GNU_SOURCE in glibc; do other libc + # implementation recognize it? + _kde_add_platform_definitions(-D_LARGEFILE64_SOURCE) + + include(CheckCXXSourceCompiles) + + # By default (in glibc, at least), on 32bit platforms off_t is 32 bits, + # which causes a SIGXFSZ when trying to manipulate files larger than 2Gb + # using libc calls (note that this issue does not occur when using QFile). + check_cxx_source_compiles(" +#include + /* Check that off_t can represent 2**63 - 1 correctly. + We can't simply define LARGE_OFF_T to be 9223372036854775807, + since some C++ compilers masquerading as C compilers + incorrectly reject 9223372036854775807. */ +#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; + int main() { return 0; } +" _OFFT_IS_64BIT) + + if (NOT _OFFT_IS_64BIT) + _kde_add_platform_definitions(-D_FILE_OFFSET_BITS=64) + endif () +endif() + +if (WIN32) + # Speeds up compile times by not including everything with windows.h + # See http://msdn.microsoft.com/en-us/library/windows/desktop/aa383745%28v=vs.85%29.aspx + _kde_add_platform_definitions(-DWIN32_LEAN_AND_MEAN) + + # Target Windows Vista + # This enables various bits of new API + # See http://msdn.microsoft.com/en-us/library/windows/desktop/aa383745%28v=vs.85%29.aspx + _kde_add_platform_definitions(-D_WIN32_WINNT=0x0600 -DWINVER=0x0600 -D_WIN32_IE=0x0600) + + # Use the Unicode versions of Windows API by default + # See http://msdn.microsoft.com/en-us/library/windows/desktop/dd317766%28v=vs.85%29.aspx + _kde_add_platform_definitions(-DUNICODE -D_UNICODE) + + # As stated in http://msdn.microsoft.com/en-us/library/4hwaceh6.aspx M_PI only gets defined + # if _USE_MATH_DEFINES is defined, with mingw this has a similar effect as -D_GNU_SOURCE on math.h + _kde_add_platform_definitions(-D_USE_MATH_DEFINES) +endif() + + + +############################################################ +# Language and toolchain features +############################################################ + +# Pick sensible versions of the C and C++ standards. +# Note that MSVC does not have equivalent flags; the features are either +# supported or they are not. +if (CMAKE_C_COMPILER_ID STREQUAL "GNU" OR CMAKE_C_COMPILER_ID STREQUAL "Clang") + # We use the C89 standard because that is what is common to all our + # compilers (in particular, MSVC 2010 does not support C99) + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=iso9899:1990") +endif() +if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x") +elseif (CMAKE_CXX_COMPILER_ID STREQUAL "Intel" AND NOT WIN32) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x") +endif() + +# Do not merge uninitialized global variables. +# This is mostly a "principle of least surprise" thing, but also +# has performance benefits. +# See https://www.ibm.com/developerworks/community/blogs/zTPF/entry/benefits_of_the_fnocommon_compile_option_peter_lemieszewski?lang=en +# Note that this only applies to C code; C++ already behaves like this. +if (CMAKE_C_COMPILER_ID STREQUAL "GNU" OR + CMAKE_C_COMPILER_ID STREQUAL "Clang" OR + (CMAKE_C_COMPILER_ID STREQUAL "Intel" AND NOT WIN32)) + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fno-common") +endif() + +# Default to hidden visibility for symbols +set(CMAKE_C_VISIBILITY_PRESET hidden) +set(CMAKE_CXX_VISIBILITY_PRESET hidden) +set(CMAKE_VISIBILITY_INLINES_HIDDEN 1) +if (POLICY CMP0063) + # No sane project should be affected by CMP0063, so suppress the warnings + # generated by the above visibility settings in CMake >= 3.3 + cmake_policy(SET CMP0063 NEW) +endif() + +if (UNIX AND NOT APPLE) + # Enable adding DT_RUNPATH, which means that LD_LIBRARY_PATH takes precedence + # over the built-in rPath + set(CMAKE_SHARED_LINKER_FLAGS "-Wl,--enable-new-dtags ${CMAKE_SHARED_LINKER_FLAGS}") + set(CMAKE_MODULE_LINKER_FLAGS "-Wl,--enable-new-dtags ${CMAKE_MODULE_LINKER_FLAGS}") + set(CMAKE_EXE_LINKER_FLAGS "-Wl,--enable-new-dtags ${CMAKE_EXE_LINKER_FLAGS}") +endif() + +if (CMAKE_SYSTEM_NAME STREQUAL GNU) + # Enable multithreading with the pthread library + # FIXME: Is this actually necessary to have here? + # Can CMakeLists.txt files that require it use FindThreads.cmake + # instead? + set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -pthread") + set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -pthread") +endif() + + + +############################################################ +# Turn off exceptions by default +# +# This involves enough code to be separate from the +# previous section. +############################################################ + +# TODO: Deal with QT_NO_EXCEPTIONS for non-gnu compilers? +# This should be defined if and only if exceptions are disabled. +# qglobal.h has some magic to set it when exceptions are disabled +# with gcc, but other compilers are unaccounted for. + +# Turn off exceptions by default +if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-exceptions") +elseif(CMAKE_CXX_COMPILER_ID STREQUAL "Clang") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-exceptions") +elseif (CMAKE_CXX_COMPILER_ID STREQUAL "Intel" AND NOT WIN32) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-exceptions") +#elseif (MSVC OR (WIN32 AND CMAKE_CXX_COMPILER_ID STREQUAL "Intel")) + # Exceptions appear to be disabled by default for MSVC + # http://msdn.microsoft.com/en-us/library/1deeycx5.aspx + + # FIXME: are exceptions disabled by default for Intel? +endif() + +macro(_kdecompilersettings_append_exception_flag VAR) + if (MSVC) + set(${VAR} "${${VAR}} -EHsc") + elseif (CMAKE_CXX_COMPILER_ID STREQUAL "Intel") + if (WIN32) + set(${VAR} "${${VAR}} -EHsc") + else() + set(${VAR} "${${VAR}} -fexceptions") + endif() + elseif(CMAKE_CXX_COMPILER_ID STREQUAL "GNU") + set(${VAR} "${${VAR}} -fexceptions") + elseif(CMAKE_CXX_COMPILER_ID STREQUAL "Clang") + set(${VAR} "${${VAR}} -fexceptions") + endif() + string(STRIP "${${VAR}}" ${VAR}) +endmacro() + +function(KDE_SOURCE_FILES_ENABLE_EXCEPTIONS) + foreach(source_file ${ARGV}) + get_source_file_property(flags ${source_file} COMPILE_FLAGS) + if(NOT flags) + # If COMPILE_FLAGS is not set, get_source_file_property() sets it to + # NOTFOUND, which breaks build if we concatenate anything to + # the "NOTFOUND" string. + # Note that NOTFOUND evaluates to False, so we do enter the if. + set(flags "") + endif() + _kdecompilersettings_append_exception_flag(flags) + set_source_files_properties(${source_file} COMPILE_FLAGS "${flags}") + endforeach() +endfunction() + +function(KDE_TARGET_ENABLE_EXCEPTIONS target mode) + target_compile_options(${target} ${mode} "$<$:-EHsc>") + if (WIN32) + target_compile_options(${target} ${mode} "$<$:-EHsc>") + else() + target_compile_options(${target} ${mode} "$<$:-fexceptions>") + endif() + target_compile_options(${target} ${mode} + "$<$,$>:-fexceptions>") +endfunction() + +function(KDE_ENABLE_EXCEPTIONS) + # We set CMAKE_CXX_FLAGS, rather than add_compile_options(), because + # we only want to affect the compilation of C++ source files. + + # strip any occurrences of -DQT_NO_EXCEPTIONS; this should only be defined + # if exceptions are disabled + # the extra spaces mean we will not accentially mangle any other options + string(REPLACE " -DQT_NO_EXCEPTIONS " " " CMAKE_CXX_FLAGS " ${CMAKE_CXX_FLAGS} ") + # this option is common to several compilers, so just always remove it + string(REPLACE " -fno-exceptions " " " CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}") + # strip undoes the extra spaces we put in above + string(STRIP "${CMAKE_CXX_FLAGS}" CMAKE_CXX_FLAGS) + + _kdecompilersettings_append_exception_flag(CMAKE_CXX_FLAGS) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}" PARENT_SCOPE) +endfunction() + + + +############################################################ +# Better diagnostics (warnings, errors) +############################################################ + +if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR + (CMAKE_CXX_COMPILER_ID STREQUAL "Clang" AND NOT APPLE) OR + (CMAKE_CXX_COMPILER_ID STREQUAL "Intel" AND NOT WIN32)) + # Linker warnings should be treated as errors + set(CMAKE_SHARED_LINKER_FLAGS "-Wl,--fatal-warnings ${CMAKE_SHARED_LINKER_FLAGS}") + set(CMAKE_MODULE_LINKER_FLAGS "-Wl,--fatal-warnings ${CMAKE_MODULE_LINKER_FLAGS}") + + # Do not allow undefined symbols, even in non-symbolic shared libraries + set(CMAKE_SHARED_LINKER_FLAGS "-Wl,--no-undefined ${CMAKE_SHARED_LINKER_FLAGS}") + set(CMAKE_MODULE_LINKER_FLAGS "-Wl,--no-undefined ${CMAKE_MODULE_LINKER_FLAGS}") +endif() + +set(_KDE_GCC_COMMON_WARNING_FLAGS "-Wall -Wextra -Wcast-align -Wchar-subscripts -Wformat-security -Wno-long-long -Wpointer-arith -Wundef") +if(CMAKE_C_COMPILER_ID STREQUAL "GNU" OR CMAKE_C_COMPILER_ID STREQUAL "Clang") + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${_KDE_GCC_COMMON_WARNING_FLAGS} -Wmissing-format-attribute -Wwrite-strings") + # Make some warnings errors + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror=implicit-function-declaration") +endif() +if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${_KDE_GCC_COMMON_WARNING_FLAGS} -Wnon-virtual-dtor -Woverloaded-virtual") + # Make some warnings errors + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror=return-type") +endif() + +# -w1 turns on warnings and errors +# FIXME: someone needs to have a closer look at the Intel compiler options +if (CMAKE_C_COMPILER_ID STREQUAL "Intel" AND NOT WIN32) + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -w1 -Wpointer-arith") +endif() +if (CMAKE_CXX_COMPILER_ID STREQUAL "Intel" AND NOT WIN32) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -w1 -Wpointer-arith") +endif() + +if (MSVC) + # FIXME: do we not want to set the warning level up to level 3? (/W3) + # Disable warnings: + # C4250: 'class1' : inherits 'class2::member' via dominance + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4250") + # C4251: 'identifier' : class 'type' needs to have dll-interface to be + # used by clients of class 'type2' + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4251") + # C4396: 'identifier' : 'function' the inline specifier cannot be used + # when a friend declaration refers to a specialization of a + # function template + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4396") + # C4661: 'identifier' : no suitable definition provided for explicit + # template instantiation request + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4661") +endif() + +if (WIN32) + # Disable deprecation warnings for some API + # FIXME: do we really want this? + add_definitions(-D_CRT_SECURE_NO_DEPRECATE + -D_CRT_SECURE_NO_WARNINGS + -D_CRT_NONSTDC_NO_DEPRECATE + -D_SCL_SECURE_NO_WARNINGS + ) +endif() + +if (APPLE) + #full Single Unix Standard v3 (SUSv3) conformance (the Unix API) + _kde_add_platform_definitions(-D_DARWIN_C_SOURCE) + #Cocoa is unconditional since we only support OS X 10.6 and above + _kde_add_platform_definitions(-DQT_MAC_USE_COCOA) +endif() + + +############################################################ +# Hacks +# +# Anything in this section should be thoroughly documented, +# including what problems it is supposed to fix and in what +# circumstances those problems occur. Include links to any +# relevant bug reports. +############################################################ + +if (APPLE) + # FIXME: why are these needed? The commit log is unhelpful + # (it was introduced in svn path=/trunk/KDE/kdelibs/; revision=503025 - + # kdelibs git commit 4e4cb9cb9a2216b63d3eabf88b8fe94ee3c898cf - + # with the message "mac os x fixes for the cmake build") + set (CMAKE_SHARED_LINKER_FLAGS "-single_module -multiply_defined suppress ${CMAKE_SHARED_LINKER_FLAGS}") + set (CMAKE_MODULE_LINKER_FLAGS "-multiply_defined suppress ${CMAKE_MODULE_LINKER_FLAGS}") +endif() + +if (WIN32) + if (MSVC OR CMAKE_CXX_COMPILER_ID STREQUAL "Intel") + # MSVC has four incompatible C runtime libraries: static (libcmt), + # static debug (libcmtd), shared (msvcrt) and shared debug (msvcrtd): + # see http://support.microsoft.com/kb/154753 + # + # By default, when you create static libraries, they are automatically + # linked against either libcmt or libcmtd, and when you create shared + # libraries, they are automatically linked against either msvcrt or + # msvcrtd. Trying to link to both a library that links to libcmt and + # library that links to mscvrt, for example, will produce a warning as + # described at + # http://msdn.microsoft.com/en-us/library/aa267384%28VS.60%29.aspx + # and can produce link errors like + # "__thiscall type_info::type_info(class type_info const &)" + # (??0type_info@@AAE@ABV0@@Z) already defined in LIBCMT.lib(typinfo.obj) + # + # It is actually the options passed to the compiler, rather than the + # linker, which control what will be linked (/MT, /MTd, /MD or /MDd), + # but we can override this by telling the linker to ignore any "libcmt" + # or "libcmtd" link suggestion embedded in the object files, and instead + # link against the shared versions. That way, everything will link + # against the same runtime library. + set(CMAKE_EXE_LINKER_FLAGS_RELEASE "/NODEFAULTLIB:libcmt /DEFAULTLIB:msvcrt ${CMAKE_EXE_LINKER_FLAGS_RELEASE}") + set(CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO "/NODEFAULTLIB:libcmt /DEFAULTLIB:msvcrt ${CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO}") + set(CMAKE_EXE_LINKER_FLAGS_MINSIZEREL "/NODEFAULTLIB:libcmt /DEFAULTLIB:msvcrt ${CMAKE_EXE_LINKER_FLAGS_MINSIZEREL}") + set(CMAKE_EXE_LINKER_FLAGS_DEBUG "/NODEFAULTLIB:libcmtd /DEFAULTLIB:msvcrtd ${CMAKE_EXE_LINKER_FLAGS_DEBUG}") + endif() +endif() + +if (MINGW AND CMAKE_CXX_COMPILER_ID STREQUAL "GNU") + # This was copied from the Phonon build settings, where it had the comment + # "otherwise undefined symbol in phononcore.dll errors occurs", with the commit + # message "set linker flag --export-all-symbols for all targets, otherwise + # some depending targets could not be build" + # FIXME: do our export macros not deal with this properly? + set (CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--export-all-symbols") + set (CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -Wl,--export-all-symbols") +endif() + +include("${ECM_MODULE_DIR}/ECMEnableSanitizers.cmake") +include("${ECM_MODULE_DIR}/ECMCoverageOption.cmake") diff --git a/deps/extra-cmake-modules/kde-modules/KDEFrameworkCompilerSettings.cmake b/deps/extra-cmake-modules/kde-modules/KDEFrameworkCompilerSettings.cmake new file mode 100644 index 0000000..038ddc3 --- /dev/null +++ b/deps/extra-cmake-modules/kde-modules/KDEFrameworkCompilerSettings.cmake @@ -0,0 +1,71 @@ +#.rst: +# KDEFrameworkCompilerSettings +# ---------------------------- +# +# Set stricter compile and link flags for KDE Frameworks modules. +# +# The KDECompilerSettings module is included and, in addition, various +# defines that affect the Qt libraries are set to enforce certain +# conventions. +# +# For example, constructions like QString("foo") are prohibited, instead +# forcing the use of QLatin1String or QStringLiteral, and some +# Qt-defined keywords like signals and slots will not be defined. +# +# NB: it is recommended to include this module with the NO_POLICY_SCOPE +# flag, otherwise you may get spurious warnings with some versions of CMake. +# +# Since pre-1.0.0. + +#============================================================================= +# Copyright 2013 Albert Astals Cid +# Copyright 2007 Matthias Kretz +# Copyright 2006-2007 Laurent Montel +# Copyright 2006-2013 Alex Neundorf +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# 1. Redistributions of source code must retain the copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. 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. + +include(KDECompilerSettings NO_POLICY_SCOPE) + +add_definitions(-DQT_NO_CAST_TO_ASCII + -DQT_NO_CAST_FROM_ASCII + -DQT_NO_URL_CAST_FROM_STRING + -DQT_NO_CAST_FROM_BYTEARRAY + -DQT_NO_SIGNALS_SLOTS_KEYWORDS + -DQT_USE_FAST_OPERATOR_PLUS + -DQT_USE_QSTRINGBUILDER + ) + +if (CMAKE_BUILD_TYPE STREQUAL "Debug") + add_definitions(-DQT_STRICT_ITERATORS) +endif() + +if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pedantic") +elseif (CMAKE_CXX_COMPILER_ID STREQUAL "Clang") + # -Wgnu-zero-variadic-macro-arguments is triggered by every qCDebug() call and therefore results + # in a lot of noise. This warning is only notifying us that clang is emulating the GCC behaviour + # instead of the exact standard wording so we can safely ignore it + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pedantic -Wno-gnu-zero-variadic-macro-arguments") +endif() diff --git a/deps/extra-cmake-modules/kde-modules/KDEInstallDirs.cmake b/deps/extra-cmake-modules/kde-modules/KDEInstallDirs.cmake new file mode 100644 index 0000000..7f5e447 --- /dev/null +++ b/deps/extra-cmake-modules/kde-modules/KDEInstallDirs.cmake @@ -0,0 +1,663 @@ +#.rst: +# KDEInstallDirs +# -------------- +# +# Define KDE standard installation directories. +# +# Note that none of the variables defined by this module provide any +# information about the location of already-installed KDE software. +# +# Inclusion of this module defines the following variables: +# +# ``KDE_INSTALL_`` +# destination for files of a given type +# ``KDE_INSTALL_FULL_`` +# corresponding absolute path +# +# where ```` is one of (default values in parentheses and alternative, +# deprecated variable name in square brackets): +# +# ``BUNDLEDIR`` +# application bundles (``/Applications/KDE``) [``BUNDLE_INSTALL_DIR``] +# ``EXECROOTDIR`` +# executables and libraries (````) [``EXEC_INSTALL_PREFIX``] +# ``BINDIR`` +# user executables (``EXECROOTDIR/bin``) [``BIN_INSTALL_DIR``] +# ``SBINDIR`` +# system admin executables (``EXECROOTDIR/sbin``) [``SBIN_INSTALL_DIR``] +# ``LIBDIR`` +# object code libraries (``EXECROOTDIR/lib``, ``EXECROOTDIR/lib64`` or +# ``EXECROOTDIR/lib/`` variables (or their ``CMAKE_INSTALL_`` or +# deprecated counterparts) may be passed to the DESTINATION options of +# ``install()`` commands for the corresponding file type. They are set in the +# CMake cache, and so the defaults above can be overridden by users. +# +# Note that the ``KDE_INSTALL_``, ``CMAKE_INSTALL_`` or deprecated +# form of the variable can be changed using CMake command line variable +# definitions; in either case, all forms of the variable will be affected. The +# effect of passing multiple forms of the same variable on the command line +# (such as ``KDE_INSTALL_BINDIR`` and ``CMAKE_INSTALL_BINDIR`` is undefined. +# +# The variable ``KDE_INSTALL_TARGETS_DEFAULT_ARGS`` is also defined (along with +# the deprecated form ``INSTALL_TARGETS_DEFAULT_ARGS``). This should be used +# when libraries or user-executable applications are installed, in the +# following manner: +# +# .. code-block:: cmake +# +# install(TARGETS mylib myapp ${KDE_INSTALL_TARGETS_DEFAULT_ARGS}) +# +# It MUST NOT be used for installing plugins, system admin executables or +# executables only intended for use internally by other code. Those should use +# ``KDE_INSTALL_PLUGINDIR``, ``KDE_INSTALL_SBINDIR`` or +# ``KDE_INSTALL_LIBEXECDIR`` respectively. +# +# Additionally, ``CMAKE_INSTALL_DEFAULT_COMPONENT_NAME`` will be set to +# ``${PROJECT_NAME}`` to provide a sensible default for this CMake option. +# +# Note that mixing absolute and relative paths, particularly for ``BINDIR``, +# ``LIBDIR`` and ``INCLUDEDIR``, can cause issues with exported targets. Given +# that the default values for these are relative paths, relative paths should +# be used on the command line when possible (eg: use +# ``-DKDE_INSTALL_LIBDIR=lib64`` instead of +# ``-DKDE_INSTALL_LIBDIR=/usr/lib/lib64`` to override the library directory). +# +# Since pre-1.0.0. +# +# NB: The variables starting ``KDE_INSTALL_`` are only available since 1.6.0. +# The ``APPDIR`` install variable is available since 1.1.0. + +#============================================================================= +# Copyright 2014-2015 Alex Merry +# Copyright 2013 Stephen Kelly +# Copyright 2012 David Faure +# Copyright 2007 Matthias Kretz +# Copyright 2006-2007 Laurent Montel +# Copyright 2006-2013 Alex Neundorf +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# 1. Redistributions of source code must retain the copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. 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. + +# Figure out what the default install directory for libraries should be. +# This is based on the logic in GNUInstallDirs, but simplified (the +# GNUInstallDirs code deals with re-configuring, but that is dealt with +# by the _define_* macros in this module). +set(_LIBDIR_DEFAULT "lib") +# Override this default 'lib' with 'lib64' iff: +# - we are on a Linux, kFreeBSD or Hurd system but NOT cross-compiling +# - we are NOT on debian +# - we are on a 64 bits system +# reason is: amd64 ABI: http://www.x86-64.org/documentation/abi.pdf +# For Debian with multiarch, use 'lib/${CMAKE_LIBRARY_ARCHITECTURE}' if +# CMAKE_LIBRARY_ARCHITECTURE is set (which contains e.g. "i386-linux-gnu" +# See http://wiki.debian.org/Multiarch +if((CMAKE_SYSTEM_NAME MATCHES "Linux|kFreeBSD" OR CMAKE_SYSTEM_NAME STREQUAL "GNU") + AND NOT CMAKE_CROSSCOMPILING) + if (EXISTS "/etc/debian_version") # is this a debian system ? + if(CMAKE_LIBRARY_ARCHITECTURE) + set(_LIBDIR_DEFAULT "lib/${CMAKE_LIBRARY_ARCHITECTURE}") + endif() + else() # not debian, rely on CMAKE_SIZEOF_VOID_P: + if(NOT DEFINED CMAKE_SIZEOF_VOID_P) + message(AUTHOR_WARNING + "Unable to determine default LIB_INSTALL_LIBDIR directory because no target architecture is known. " + "Please enable at least one language before including KDEInstallDirs.") + else() + if("${CMAKE_SIZEOF_VOID_P}" EQUAL "8") + set(_LIBDIR_DEFAULT "lib64") + endif() + endif() + endif() +endif() + +set(_gnu_install_dirs_vars + BINDIR + SBINDIR + LIBEXECDIR + SYSCONFDIR + SHAREDSTATEDIR + LOCALSTATEDIR + LIBDIR + INCLUDEDIR + OLDINCLUDEDIR + DATAROOTDIR + DATADIR + INFODIR + LOCALEDIR + MANDIR + DOCDIR) + +# Macro for variables that are relative to another variable. We store an empty +# value in the cache (for documentation/GUI cache editor purposes), and store +# the default value in a local variable. If the cache variable is ever set to +# something non-empty, the local variable will no longer be set. However, if +# the cache variable remains (or is set to be) empty, the value will be +# relative to that of the parent variable. +# +# varname: the variable name suffix (eg: BINDIR for KDE_INSTALL_BINDIR) +# parent: the variable suffix of the variable this is relative to +# (eg: DATAROOTDIR for KDE_INSTALL_DATAROOTDIR) +# subdir: the path of the default value of KDE_INSTALL_${varname} +# relative to KDE_INSTALL_${parent}: no leading / +# docstring: documentation about the variable (not including the default value) +# oldstylename (optional): the old-style name of the variable +macro(_define_relative varname parent subdir docstring) + set(_oldstylename) + if(NOT KDE_INSTALL_DIRS_NO_DEPRECATED AND ${ARGC} GREATER 4) + set(_oldstylename "${ARGV4}") + endif() + set(_cmakename) + if(NOT KDE_INSTALL_DIRS_NO_CMAKE_VARIABLES) + list(FIND _gnu_install_dirs_vars "${varname}" _list_offset) + set(_cmakename_is_deprecated FALSE) + if(NOT KDE_INSTALL_DIRS_NO_DEPRECATED OR NOT _list_offset EQUAL -1) + set(_cmakename CMAKE_INSTALL_${varname}) + if(_list_offset EQUAL -1) + set(_cmakename_is_deprecated TRUE) + endif() + endif() + endif() + + # Surprisingly complex logic to deal with joining paths. + # Note that we cannot use arg vars directly in if() because macro args are + # not proper variables. + set(_parent "${parent}") + set(_subdir "${subdir}") + if(_parent AND _subdir) + set(_docpath "${_parent}/${_subdir}") + if(KDE_INSTALL_${_parent}) + set(_realpath "${KDE_INSTALL_${_parent}}/${_subdir}") + else() + set(_realpath "${_subdir}") + endif() + elseif(_parent) + set(_docpath "${_parent}") + set(_realpath "${KDE_INSTALL_${_parent}}") + else() + set(_docpath "${_subdir}") + set(_realpath "${_subdir}") + endif() + + if(KDE_INSTALL_${varname}) + # make sure the cache documentation is set correctly + get_property(_iscached CACHE KDE_INSTALL_${varname} PROPERTY VALUE SET) + if (_iscached) + # make sure the docs are still set if it was passed on the command line + set_property(CACHE KDE_INSTALL_${varname} + PROPERTY HELPSTRING "${docstring} (${_docpath})") + # make sure the type is correct if it was passed on the command line + set_property(CACHE KDE_INSTALL_${varname} + PROPERTY TYPE PATH) + endif() + elseif(${_oldstylename}) + if(NOT CMAKE_VERSION VERSION_LESS 3.0.0) + message(DEPRECATION "${_oldstylename} is deprecated, use KDE_INSTALL_${varname} instead.") + endif() + # The old name was given (probably on the command line): move + # it to the new name + set(KDE_INSTALL_${varname} "${${_oldstylename}}" + CACHE PATH + "${docstring} (${_docpath})" + FORCE) + elseif(${_cmakename}) + if(_cmakename_is_deprecated AND NOT CMAKE_VERSION VERSION_LESS 3.0.0) + message(DEPRECATION "${_cmakename} is deprecated, use KDE_INSTALL_${varname} instead.") + endif() + # The CMAKE_ name was given (probably on the command line): move + # it to the new name + set(KDE_INSTALL_${varname} "${${_cmakename}}" + CACHE PATH + "${docstring} (${_docpath})" + FORCE) + else() + # insert an empty value into the cache, indicating the default + # should be used (including compatibility vars above) + set(KDE_INSTALL_${varname} "" + CACHE PATH "${docstring} (${_docpath})") + set(KDE_INSTALL_${varname} "${_realpath}") + endif() + + mark_as_advanced(KDE_INSTALL_${varname}) + + if(NOT IS_ABSOLUTE ${KDE_INSTALL_${varname}}) + set(KDE_INSTALL_FULL_${varname} + "${CMAKE_INSTALL_PREFIX}/${KDE_INSTALL_${varname}}") + else() + set(KDE_INSTALL_FULL_${varname} "${KDE_INSTALL_${varname}}") + endif() + + # Override compatibility vars at runtime, even though we don't touch + # them in the cache; this way, we keep the variables in sync where + # KDEInstallDirs is included, but don't interfere with, say, + # GNUInstallDirs in a parallel part of the CMake tree. + if(_cmakename) + set(${_cmakename} "${KDE_INSTALL_${varname}}") + set(CMAKE_INSTALL_FULL_${varname} "${KDE_INSTALL_FULL_${varname}}") + endif() + + if(_oldstylename) + set(${_oldstylename} "${KDE_INSTALL_${varname}}") + endif() +endmacro() + +# varname: the variable name suffix (eg: BINDIR for KDE_INSTALL_BINDIR) +# dir: the relative path of the default value of KDE_INSTALL_${varname} +# relative to CMAKE_INSTALL_PREFIX: no leading / +# docstring: documentation about the variable (not including the default value) +# oldstylename (optional): the old-style name of the variable +macro(_define_absolute varname dir docstring) + _define_relative("${varname}" "" "${dir}" "${docstring}" ${ARGN}) +endmacro() + +macro(_define_non_cache varname value) + set(KDE_INSTALL_${varname} "${value}") + if(NOT IS_ABSOLUTE ${KDE_INSTALL_${varname}}) + set(KDE_INSTALL_FULL_${varname} + "${CMAKE_INSTALL_PREFIX}/${KDE_INSTALL_${varname}}") + else() + set(KDE_INSTALL_FULL_${varname} "${KDE_INSTALL_${varname}}") + endif() + + if(NOT KDE_INSTALL_DIRS_NO_CMAKE_VARIABLES) + list(FIND _gnu_install_dirs_vars "${varname}" _list_offset) + if(NOT KDE_INSTALL_DIRS_NO_DEPRECATED OR NOT _list_offset EQUAL -1) + set(CMAKE_INSTALL_${varname} "${KDE_INSTALL_${varname}}") + set(CMAKE_INSTALL_FULL_${varname} "${KDE_INSTALL_FULL_${varname}}") + endif() + endif() +endmacro() + +if(APPLE) + _define_absolute(BUNDLEDIR "/Applications/KDE" + "application bundles" + BUNDLE_INSTALL_DIR) +endif() + + + +_define_absolute(EXECROOTDIR "" + "executables and libraries" + EXEC_INSTALL_PREFIX) + +_define_relative(BINDIR EXECROOTDIR "bin" + "user executables" + BIN_INSTALL_DIR) +_define_relative(SBINDIR EXECROOTDIR "sbin" + "system admin executables" + SBIN_INSTALL_DIR) +_define_relative(LIBDIR EXECROOTDIR "${_LIBDIR_DEFAULT}" + "object code libraries" + LIB_INSTALL_DIR) + +if(WIN32) + _define_relative(LIBEXECDIR BINDIR "" + "executables for internal use by programs and libraries" + LIBEXEC_INSTALL_DIR) + _define_non_cache(LIBEXECDIR_KF5 "${CMAKE_INSTALL_LIBEXECDIR}") +else() + _define_relative(LIBEXECDIR LIBDIR "libexec" + "executables for internal use by programs and libraries" + LIBEXEC_INSTALL_DIR) + _define_non_cache(LIBEXECDIR_KF5 "${CMAKE_INSTALL_LIBEXECDIR}/kf5") +endif() +if(NOT KDE_INSTALL_DIRS_NO_DEPRECATED) + set(KF5_LIBEXEC_INSTALL_DIR "${CMAKE_INSTALL_LIBEXECDIR_KF5}") +endif() +_define_relative(CMAKEPACKAGEDIR LIBDIR "cmake" + "CMake packages, including config files" + CMAKECONFIG_INSTALL_PREFIX) + +include("${ECM_MODULE_DIR}/ECMQueryQmake.cmake") + +set(_default_KDE_INSTALL_USE_QT_SYS_PATHS OFF) +if(NOT DEFINED KDE_INSTALL_USE_QT_SYS_PATHS) + query_qmake(qt_install_prefix_dir QT_INSTALL_PREFIX) + if(qt_install_prefix_dir STREQUAL "${CMAKE_INSTALL_PREFIX}") + message(STATUS "Installing in the same prefix as Qt, adopting their path scheme.") + set(_default_KDE_INSTALL_USE_QT_SYS_PATHS ON) + endif() +endif() + +option (KDE_INSTALL_USE_QT_SYS_PATHS "Install mkspecs files, Plugins and Imports to the Qt 5 install dir" "${_default_KDE_INSTALL_USE_QT_SYS_PATHS}") +if(KDE_INSTALL_USE_QT_SYS_PATHS) + # Qt-specific vars + query_qmake(qt_plugins_dir QT_INSTALL_PLUGINS) + + _define_absolute(QTPLUGINDIR ${qt_plugins_dir} + "Qt plugins" + QT_PLUGIN_INSTALL_DIR) + + query_qmake(qt_imports_dir QT_INSTALL_IMPORTS) + + _define_absolute(QTQUICKIMPORTSDIR ${qt_imports_dir} + "QtQuick1 imports" + IMPORTS_INSTALL_DIR) + + query_qmake(qt_qml_dir QT_INSTALL_QML) + + _define_absolute(QMLDIR ${qt_qml_dir} + "QtQuick2 imports" + QML_INSTALL_DIR) +else() + _define_relative(QTPLUGINDIR LIBDIR "plugins" + "Qt plugins" + QT_PLUGIN_INSTALL_DIR) + + _define_relative(QTQUICKIMPORTSDIR QTPLUGINDIR "imports" + "QtQuick1 imports" + IMPORTS_INSTALL_DIR) + + _define_relative(QMLDIR LIBDIR "qml" + "QtQuick2 imports" + QML_INSTALL_DIR) +endif() + +_define_relative(PLUGINDIR QTPLUGINDIR "" + "Plugins" + PLUGIN_INSTALL_DIR) + +_define_absolute(INCLUDEDIR "include" + "C and C++ header files" + INCLUDE_INSTALL_DIR) +_define_non_cache(INCLUDEDIR_KF5 "${CMAKE_INSTALL_INCLUDEDIR}/KF5") +if(NOT KDE_INSTALL_DIRS_NO_DEPRECATED) + set(KF5_INCLUDE_INSTALL_DIR "${CMAKE_INSTALL_INCLUDEDIR_KF5}") +endif() + +_define_absolute(LOCALSTATEDIR "var" + "modifiable single-machine data") + +_define_absolute(SHAREDSTATEDIR "com" + "modifiable architecture-independent data") + + + +if (WIN32) + _define_relative(DATAROOTDIR BINDIR "data" + "read-only architecture-independent data root" + SHARE_INSTALL_PREFIX) +else() + _define_absolute(DATAROOTDIR "share" + "read-only architecture-independent data root" + SHARE_INSTALL_PREFIX) +endif() + +_define_relative(DATADIR DATAROOTDIR "" + "read-only architecture-independent data" + DATA_INSTALL_DIR) +_define_non_cache(DATADIR_KF5 "${CMAKE_INSTALL_DATADIR}/kf5") +if(NOT KDE_INSTALL_DIRS_NO_DEPRECATED) + set(KF5_DATA_INSTALL_DIR "${CMAKE_INSTALL_DATADIR_KF5}") +endif() + +# KDE Framework-specific things +_define_relative(DOCBUNDLEDIR DATAROOTDIR "doc/HTML" + "documentation bundles generated using kdoctools" + HTML_INSTALL_DIR) +_define_relative(KCFGDIR DATAROOTDIR "config.kcfg" + "kconfig description files" + KCFG_INSTALL_DIR) +_define_relative(KCONFUPDATEDIR DATAROOTDIR "kconf_update" + "kconf_update scripts" + KCONF_UPDATE_INSTALL_DIR) +_define_relative(KSERVICES5DIR DATAROOTDIR "kservices5" + "services for KDE Frameworks 5" + SERVICES_INSTALL_DIR) +_define_relative(KSERVICETYPES5DIR DATAROOTDIR "kservicetypes5" + "service types for KDE Frameworks 5" + SERVICETYPES_INSTALL_DIR) +_define_relative(KNOTIFY5RCDIR DATAROOTDIR "knotifications5" + "knotify description files" + KNOTIFYRC_INSTALL_DIR) +_define_relative(KXMLGUI5DIR DATAROOTDIR "kxmlgui5" + "kxmlgui .rc files" + KXMLGUI_INSTALL_DIR) +_define_relative(KTEMPLATESDIR DATAROOTDIR "kdevappwizard/templates" + "Kapptemplate and Kdevelop templates") + +# Cross-desktop or other system things +_define_relative(ICONDIR DATAROOTDIR "icons" + "icons" + ICON_INSTALL_DIR) +_define_relative(LOCALEDIR DATAROOTDIR "locale" + "knotify description files" + LOCALE_INSTALL_DIR) +_define_relative(SOUNDDIR DATAROOTDIR "sounds" + "sound files" + SOUND_INSTALL_DIR) +_define_relative(TEMPLATEDIR DATAROOTDIR "templates" + "templates" + TEMPLATES_INSTALL_DIR) +_define_relative(WALLPAPERDIR DATAROOTDIR "wallpapers" + "desktop wallpaper images" + WALLPAPER_INSTALL_DIR) +_define_relative(APPDIR DATAROOTDIR "applications" + "application desktop files" + XDG_APPS_INSTALL_DIR) +_define_relative(DESKTOPDIR DATAROOTDIR "desktop-directories" + "desktop directories" + XDG_DIRECTORY_INSTALL_DIR) +_define_relative(MIMEDIR DATAROOTDIR "mime/packages" + "mime description files" + XDG_MIME_INSTALL_DIR) +_define_relative(METAINFODIR DATAROOTDIR "metainfo" + "AppStream component metadata") +_define_relative(MANDIR DATAROOTDIR "man" + "man documentation" + MAN_INSTALL_DIR) +_define_relative(INFODIR DATAROOTDIR "info" + "info documentation") +_define_relative(DBUSDIR DATAROOTDIR "dbus-1" + "D-Bus") +_define_relative(DBUSINTERFACEDIR DBUSDIR "interfaces" + "D-Bus interfaces" + DBUS_INTERFACES_INSTALL_DIR) +_define_relative(DBUSSERVICEDIR DBUSDIR "services" + "D-Bus session services" + DBUS_SERVICES_INSTALL_DIR) +_define_relative(DBUSSYSTEMSERVICEDIR DBUSDIR "system-services" + "D-Bus system services" + DBUS_SYSTEM_SERVICES_INSTALL_DIR) + + + + +set(_default_sysconf_dir "etc") +if (CMAKE_INSTALL_PREFIX STREQUAL "/usr") + set(_default_sysconf_dir "/etc") +endif() + + +_define_absolute(SYSCONFDIR "${_default_sysconf_dir}" + "read-only single-machine data" + SYSCONF_INSTALL_DIR) +_define_relative(CONFDIR SYSCONFDIR "xdg" + "application configuration files" + CONFIG_INSTALL_DIR) +_define_relative(AUTOSTARTDIR CONFDIR "autostart" + "autostart files" + AUTOSTART_INSTALL_DIR) + +set(_mixed_core_path_styles FALSE) +if (IS_ABSOLUTE "${KDE_INSTALL_BINDIR}") + if (NOT IS_ABSOLUTE "${KDE_INSTALL_LIBDIR}" OR NOT IS_ABSOLUTE "${KDE_INSTALL_INCLUDEDIR}") + set(_mixed_core_path_styles ) + endif() +else() + if (IS_ABSOLUTE "${KDE_INSTALL_LIBDIR}" OR IS_ABSOLUTE "${KDE_INSTALL_INCLUDEDIR}") + set(_mixed_core_path_styles TRUE) + endif() +endif() +if (_mixed_core_path_styles) + message(WARNING "KDE_INSTALL_BINDIR, KDE_INSTALL_LIBDIR and KDE_INSTALL_INCLUDEDIR should either all be absolute paths or all be relative paths.") +endif() + + +# For more documentation see above. +# Later on it will be possible to extend this for installing OSX frameworks +# The COMPONENT Devel argument has the effect that static libraries belong to the +# "Devel" install component. If we use this also for all install() commands +# for header files, it will be possible to install +# -everything: make install OR cmake -P cmake_install.cmake +# -only the development files: cmake -DCOMPONENT=Devel -P cmake_install.cmake +# -everything except the development files: cmake -DCOMPONENT=Unspecified -P cmake_install.cmake +# This can then also be used for packaging with cpack. +# FIXME: why is INCLUDES (only) set for ARCHIVE targets? +set(KDE_INSTALL_TARGETS_DEFAULT_ARGS RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" + LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" + ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}" COMPONENT Devel + INCLUDES DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}" +) +set(KF5_INSTALL_TARGETS_DEFAULT_ARGS RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" + LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" + ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}" COMPONENT Devel + INCLUDES DESTINATION "${CMAKE_INSTALL_INCLUDEDIR_KF5}" +) + +# on the Mac support an extra install directory for application bundles +if(APPLE) + set(KDE_INSTALL_TARGETS_DEFAULT_ARGS ${KDE_INSTALL_TARGETS_DEFAULT_ARGS} + BUNDLE DESTINATION "${BUNDLE_INSTALL_DIR}" ) + set(KF5_INSTALL_TARGETS_DEFAULT_ARGS ${KF5_INSTALL_TARGETS_DEFAULT_ARGS} + BUNDLE DESTINATION "${BUNDLE_INSTALL_DIR}" ) +endif() + +if(NOT KDE_INSTALL_DIRS_NO_DEPRECATED) + set(INSTALL_TARGETS_DEFAULT_ARGS ${KDE_INSTALL_TARGETS_DEFAULT_ARGS}) +endif() + +# new in cmake 2.8.9: this is used for all installed files which do not have a component set +# so set the default component name to the name of the project, if a project name has been set: +if(NOT "${PROJECT_NAME}" STREQUAL "Project") + set(CMAKE_INSTALL_DEFAULT_COMPONENT_NAME "${PROJECT_NAME}") +endif() diff --git a/deps/extra-cmake-modules/kde-modules/KDEPackageAppTemplates.cmake b/deps/extra-cmake-modules/kde-modules/KDEPackageAppTemplates.cmake new file mode 100644 index 0000000..7946a4a --- /dev/null +++ b/deps/extra-cmake-modules/kde-modules/KDEPackageAppTemplates.cmake @@ -0,0 +1,137 @@ +#.rst: +# KDETemplateGenerator +# -------------------- +# +# Packages KApptemplate/KDevelop compatible application templates +# +# This module provides a functionality to package in a tarball and +# install project templates compatible with the format used by +# KApptemplate and KDevelop. Useful for providing minimal examples +# for the usage of the KDE Frameworks. +# +# This module provides the following function: +# +# kde_package_app_templates( TEMPLATES template1 [template2] [...] INSTALL_DIR directory) +# +# INSTALL_DIR is the directory to install the template package to. +# In most cases you will want to use the variable KDE_INSTALL_KTEMPLATESDIR +# from :kde-module:`KDEInstallDirs`. +# +# TEMPLATES lists subdirectories containing template files; +# each ``