aboutsummaryrefslogtreecommitdiff
path: root/find-modules
AgeCommit message (Collapse)Author
2020-09-26Introduce plausibility check for outbound licenesAndreas Cord-Landwehr
When creating a library or executable, several source files are combined into a binary artifact that has an outbound license of its own. This test generator allows to check if the combined source files are compatible with the desired outbound license. Requirements for using these tests: - input source files must contain the SPDX-License-Information tag - python3 must be available - the "reuse spdx" tool must be available
2020-09-14Correct a typo in FindKF5.cmakeFelix Yan
2020-08-27Add WaylandProtocols find moduleVlad Zahorodnii
An intended use case is to generate client-side and server-side code for protocols shipped in the wayland-protocols package with qtwaylandscanner.
2020-08-07invoke update-mime-database with -nHarald Sitter
it only updates the database iff there's new files and is specifically meant for post-install invocation. since cmake only installs files when they actually changed this effectively turns repeated cmake --install calls noop as far as database updates are concerned this stops all sources with mimetype definitions from rebuilding the mime database on every install even when nothing changed. it saves literal seconds every install call -n was introduced in 1.4 which is like 6 years old and there are no pratcically relevant distribution versions around with older versions
2020-07-10Fix inline literal formattingivan tkachenko
2020-07-06Export Wayland_DATADIRDavid Edmundson
This is useful if a library intends to reparse the original wayland.xml file instead of using the pregenerated headers.
2020-06-24Remove support for png2icoHannah von Reth
Png2Ico provides lower quality icons compared to icoutils as png2ico predates the current icon standard. Still lloking for png2ico prints * Png2Ico, Executable that converts a collection of PNG files into a Windows icon file, <https://www.winterdrache.de/freeware/png2ico/ or https://commits.kde.org/kdewin> which confuses new users.
2020-06-24Fix the ECM doc generationChristophe Giboudeaux
Without this simple space, FindTaglib doesn't appear on the generated ecm-find-modules.7.html page.
2020-06-17Add FindTaglib find moduleElvis Angelaccio
Based on https://phabricator.kde.org/D21695 Several KDE projects use taglib, so we really need to provide a proper find module in ECM. AFAIK taglib-config should not be portable, so we don't try to run it on WIN32. See also: https://invent.kde.org/network/kio-extras/-/commit/548f525f4308810888c85f42a570139029c40618
2020-06-14extra-cmake-modules: Convert to SPDX license statementsAndreas Cord-Landwehr
2020-04-22Adapt FindKF5 to stricter checks in newer find_package_handle_standard_argsFriedrich W. H. Kossebau
Test Plan: KF modules configure build as before, same some apps. Reviewers: #frameworks, #build_system, cgiboudeaux Reviewed By: cgiboudeaux Subscribers: apol, kde-frameworks-devel, kde-buildsystem Tags: #frameworks, #build_system Differential Revision: https://phabricator.kde.org/D29097
2020-04-18Fix wayland scanner warningsAleix Pol
Summary: Tells cmake not to automoc certain files that don't need it, which would become a big fuss on the cmake output. Test Plan: No warnings Reviewers: #build_system, #kwin, #frameworks, davidedmundson Reviewed By: #kwin, davidedmundson Subscribers: kde-frameworks-devel, kde-buildsystem Tags: #frameworks, #build_system Differential Revision: https://phabricator.kde.org/D28900
2019-12-15Support PyQt5 compiled with SIP 5Antonio Rojas
When PyQt5 is compiled with SIP 5, the sip files are installed to ${python-site-packages}/PyQt5/bindings, so search for them there too. This doesn't add support for compiling KF5 bindings themselves with sip5, that requires more work. Differential Revision: https://phabricator.kde.org/D25972
2019-12-05EBN extra-cmake-modules transport cleanupv5.65.0-rc1v5.65.0John Hayes
Summary: Change transport protocol from http to https Reviewers: apol, cgiboudeaux Reviewed By: apol, cgiboudeaux Subscribers: cgiboudeaux, kde-frameworks-devel, kde-buildsystem Tags: #frameworks, #build_system Differential Revision: https://phabricator.kde.org/D25753
2019-12-05EBN extra-cmake-modules comments spelling cleanupJohn Hayes
Summary: Correct spelling in extra-cmake-modules comments. Reviewers: apol Reviewed By: apol Subscribers: kde-frameworks-devel, kde-buildsystem Tags: #frameworks, #build_system Differential Revision: https://phabricator.kde.org/D25752
2019-09-24Fix FindEGL when using EmscriptenSimon Hausmann
When using the Emscripten toolchain, there is no library linkage necessary (there is no library) and the system include search paths provide EGL headers. Reviewed By: vkrause Differential Revision: https://phabricator.kde.org/D24182
2019-06-29Small API docs fixesv5.60.0-rc1v5.60.0Pino Toscano
2019-03-29ecm_add_wayland_client_protocol: Improve error messagesAleix Pol
Summary: Instead of passing the data from stdin, pass the path, this way if there's an error wayland-scanner will be able to tell us the file and line where it's failing. Test Plan: Built kwayland and kwin with it Reviewers: #kwin, #frameworks, zzag Reviewed By: #kwin, zzag Subscribers: kde-frameworks-devel, kde-buildsystem Tags: #frameworks, #build_system Differential Revision: https://phabricator.kde.org/D20105
2019-03-04Add UDev find moduleVolker Krause
Summary: This one is originally coming from Solid, but there are several more copies in our repositories (plasma-desktop, kwin, powerdevil, etc). Reviewers: cgiboudeaux Reviewed By: cgiboudeaux Subscribers: cgiboudeaux, kde-frameworks-devel, kde-buildsystem Tags: #frameworks, #build_system Differential Revision: https://phabricator.kde.org/D19486
2019-03-04Fix harmless warnings when creating the doc.Christophe Giboudeaux
GIT_SILENT
2019-03-04Restore FindFontconfig backward compatibility for plasma-desktopVolker Krause
Summary: I don't understand where plasma-desktop actually finds that old find module, but this fixes the build at least. Reviewers: cgiboudeaux Reviewed By: cgiboudeaux Subscribers: kde-frameworks-devel, kde-buildsystem Tags: #frameworks, #build_system Differential Revision: https://phabricator.kde.org/D19499
2019-03-03Add Fontconfig find modudleVolker Krause
Summary: Originally coming from KWin, but now also needed by qtbase. Reviewers: cgiboudeaux Reviewed By: cgiboudeaux Subscribers: kossebau, apol, cgiboudeaux, kde-frameworks-devel, kde-buildsystem Tags: #frameworks, #build_system Differential Revision: https://phabricator.kde.org/D18943
2019-02-21Fix a typo in the compatibility vars.Christophe Giboudeaux
2019-02-19Fix FindEGLTobias C. Berner
Summary: ${EGL_INCLUDE_DIR} is the path up to 'egl.h' -- so the header is ${EGL_INCLUDE_DIR}/egl.h The compile test on the other hand includes 'EGL/egl.h', so the path that needs to be passed to the compile test is "${EGL_INCLUDE_DIR}/..". Reviewers: #automotive, hausmann, #freebsd, apol Reviewed By: #automotive, hausmann, apol Subscribers: bcooksley, kde-frameworks-devel, kde-buildsystem Tags: #frameworks, #build_system Differential Revision: https://phabricator.kde.org/D19075
2019-02-19new find module for CanberraHarald Sitter
Summary: used by: - knotification - (possibly also knotifyconfig at some point) - plasma-pa - kmix Reviewers: cgiboudeaux Reviewed By: cgiboudeaux Subscribers: aacid, apol, kde-frameworks-devel, kde-buildsystem Tags: #frameworks, #build_system Differential Revision: https://phabricator.kde.org/D18952
2019-02-12Add compile check to FindEGLSimon Hausmann
Perform additional sanity checking by doing a compile test. Differential Revision: https://phabricator.kde.org/D18960
2019-01-25FindGperf: in ecm_gperf_generate set SKIP_AUTOMOC for generated fileFriedrich W. H. Kossebau
Summary: Avoids to have manually set the property on the generated source file to deal with changed CMake policy CMP0071. Reviewers: #frameworks, pino, apol Reviewed By: apol Subscribers: kde-frameworks-devel, kde-buildsystem Tags: #frameworks, #build_system Differential Revision: https://phabricator.kde.org/D18088
2019-01-18Fix python binding generation for classes with deleted copy constructorsAlbert Astals Cid
Test Plan: kcoreaddons compiles again Reviewers: lbeltrame Reviewed By: lbeltrame Subscribers: cgiboudeaux, skelly, kde-frameworks-devel, kde-buildsystem Tags: #frameworks, #build_system Differential Revision: https://phabricator.kde.org/D18345
2019-01-09Use more https in linksFriedrich W. H. Kossebau
2019-01-08FindGperf: improve api dox: mark-up usage exampleFriedrich W. H. Kossebau
2019-01-08FindInotify: fix api dox .rst tag, add missing "Since"Friedrich W. H. Kossebau
2018-12-04Add find module for Google's libphonenumberVolker Krause
Summary: This is currently in use by plasma-phone-components, but will also be needed by KItinerary. Reviewers: #build_system, #frameworks, cgiboudeaux Reviewed By: cgiboudeaux Subscribers: cgiboudeaux, kde-frameworks-devel, kde-buildsystem Tags: #frameworks, #build_system Differential Revision: https://phabricator.kde.org/D16954
2018-11-20Rename FindExiv2 to FindLibExiv2.v5.53.0-rc1v5.53.0Christophe Giboudeaux
New users can use this module instead of adding a copy of the old FindExiv2.cmake module.
2018-11-20Add FindExiv2.cmake to ECMChristophe Giboudeaux
According to lxr, we have 8 copies of this module in different repositories (+kdelib4support and a playground repo).
2018-11-18FindQHelpGenerator: try to find Qt5Help instead of Qt5CorePino Toscano
Summary: The Qt5Help CMake modules contain the Qt5::qhelpgenerator target, so look for that instead of Qt5Core. Otherwise, the Qt5::qhelpgenerator is available only if Qt5Help was searched previously (which does not happen often). Using the Qt5::qhelpgenerator is more reliable than the search for the qhelpgenerator executable based on the qmake path. Test Plan: build some framework with -DBUILD_QCH=ON, and notice that the right path of qhelpgenerator is found directly with the Qt5::qhelpgenerator target. Reviewers: kossebau Reviewed By: kossebau Subscribers: kde-frameworks-devel, kde-buildsystem Tags: #frameworks, #build_system Differential Revision: https://phabricator.kde.org/D16938
2018-10-28Bindings: Support using sys paths for python install directoryStefan Brüns
Summary: The correct install directory is distro and arch specific, and should match the configuration of the python installation the binding is generated for. These directories can be queried using pythons distutils.sysconfig. When determining the install directory, it mimics the logic from KDE_INSTALL_USE_QT_SYS_PATHS. When the python PREFIX is the same as CMAKE_INSTALL_PREFIX, it defaults to using the path from distutils.sysconfig, otherwise it keeps the current scheme, installing below CMAKE_INSTALL_PREFIX. The default behaviour can be changed by setting KDE_INSTALL_PYTHON{2,3}DIR or by switching KDE_INSTALL_USE_PYTHON{2,3}_SYS_PATH ON or OFF. Test Plan: On a distro where sitearch is not below /usr/lib/pythonM.m/, but /usr/lib64/pythonM.m/ (e.g. RH, SUSE 64bit), try to do: cmake ..; make; install Without the patch, the binding are installed into the wrong directory, afterwards the correct path is used. This should also yield the correct path on Debian and derivatives, where dist-packages instead of site-packages is used (untested). other test cases: Keep current scheme: `cmake -DCMAKE_INSTALL_PREFIX=/opt ..` Default to sys path: `cmake -DCMAKE_INSTALL_PREFIX=/usr ..` Force sys path: `cmake -DCMAKE_INSTALL_PREFIX=/opt -DKDE_INSTALL_USE_PYTHON3_SYS_PATHS=ON ..` Reviewers: #frameworks Subscribers: bcooksley, kde-frameworks-devel, kde-buildsystem Tags: #frameworks, #build_system Differential Revision: https://phabricator.kde.org/D15070
2018-10-16Bindings: Remove INSTALL_DIR_SUFFIX from ecm_generate_python_bindingStefan Brüns
Summary: The option is no longer used from any framework, and was always defaulting to site-packages previously, as INSTALL_DIR_SUFFIX was empty. Also see D15558, D15845. Test Plan: build e.g kcoreaddons Reviewers: #frameworks, apol, lbeltrame Reviewed By: lbeltrame Subscribers: lbeltrame, kde-frameworks-devel, kde-buildsystem Tags: #frameworks, #build_system Differential Revision: https://phabricator.kde.org/D15867
2018-09-30Compile python bindings with the same sip flags used by PyQtv5.51.0-rc1v5.51.0Antonio Rojas
PyQt>=5.11 is compiled with the 'PyQt5.sip' sipname by default. This causes a sipname mismatch with KF5 bindings and prevents them from loading: To fix this, we compile KF5 bindings using the same sip flags (name and tags) that PyQt was compiled with. This ensures that we always use the correct sip name. We also stop setting the sip tags in FindPythonModuleGeneration.cmake to avoid duplication, and remove a (seemingly) unnecessary check for the Qt version that was forcing PyQt to be rebuilt for every patch Qt update. Differential Revision: https://phabricator.kde.org/D15091
2018-09-20Python bindings: use cmake_parse_arguments, fix documentationStefan Brüns
Summary: Use of positional arguments is error prone, as e.g. switching order of NAMESPACE and MODULENAME wont have the desired effect, as the keywords are ignored for the first three arguments. Parse all arguments with cmake_parse_arguments, and fix the documentation (list supported arguments) and example (add TARGET keyword). Test Plan: build bindings Reviewers: #frameworks, dfaure Reviewed By: dfaure Subscribers: kde-frameworks-devel, kde-buildsystem Tags: #frameworks, #build_system Differential Revision: https://phabricator.kde.org/D15559
2018-09-14Bindings: Correct handling of sources containing utf-8Stefan Brüns
Summary: Depending on the locale, python3 may try to decode the source as ASCII when the file is opened in text mode. This will fail as soon as the code contains utf-8, e.g. (c) symbols. While it is possible to specify the encoding when reading the file, this is bad for several reasons: - only a very small part of the source is processed via _read_source, no need to decode the complete source and store it as string objects - the clang Cursor.extent.{start,end}.column refers to bytes, not multibyte characters. While python2 processes utf-8 containing sources without error messages, wrong extent borders are also an issue. The practical impact is low, as the issue only manifests if there is a multibyte character in front of *and* on the same line as the read token. Test Plan: Python3: Build any bindings which contains sources with non-ASCII codepoints, e.g. kcoreaddons. Unpatched version fails when using e.g. LANG=C. Python2: Both versions generate sources successfully. Bytes vs characters test: ``` #define Q_SLOTS class foo { /* a */ public Q_SLOTS: /* ä */ public Q_SLOTS: }; ``` `sip_generator.py --flags "" /usr/lib64/libclang.so Qt5Ruleset.py test.h out.sip` Obviously, both lines should result in the same code, the unfixed version generates `public Q_SLOTS:` vs `public:`. Reviewers: #frameworks, lbeltrame Reviewed By: lbeltrame Subscribers: lbeltrame, bcooksley, jtamate, kde-frameworks-devel, kde-buildsystem Tags: #frameworks, #build_system Differential Revision: https://phabricator.kde.org/D15068
2018-09-07Fix minor EBN issuesYuri Chornoivan
2018-08-31Bindings: Check if bindings can be generated for a specific python versionStefan Brüns
Summary: The generated C++ sources include <sip.h>, so it must be available. Check for it in the version specific directories and fall back to the default include directories. Test Plan: install python2-devel and python3-devel install one of python{x}-sip-devel bindings should be generated for the matching python version. Reviewers: #frameworks, arojas Reviewed By: arojas Subscribers: arojas, kde-frameworks-devel, kde-buildsystem Tags: #frameworks, #build_system Differential Revision: https://phabricator.kde.org/D14915
2018-08-31Bindings: Use python version matching the found clang python moduleStefan Brüns
Summary: In case both python 2.7 and 3 are installed, but clang python bindings are only installed for python 3, there will be no error message but the self check will fail. Check for clang bindings for both python2 and python3 (if installed), and use the first one found to generate the sip bindings files. Note, it is possible to e.g. use python2 to generate the sip binding files (requires clang bindings), but generate bindings for python 2, 3, or both (requires matching python-devel and python-sip-devel packages). Test Plan: install python3-clang bindings install python2-clang bindings or one of the above the matching python version is used to run sip_generator.py Reviewers: #frameworks, arojas Reviewed By: arojas Subscribers: kde-frameworks-devel, kde-buildsystem Tags: #frameworks, #build_system Differential Revision: https://phabricator.kde.org/D14914
2018-08-31Bindings: Make generator forward compatible with Python 3Stefan Brüns
Summary: iteritems is no longer an available method for dict in Python 3. Using dict.items() is functionally identical, although it creates some overhead for Python 2.7 (creation of a temporary list). As this is only called when tracing, this is not a big issue. For Python 3, there is no overhead (dict.items() returns an iterator). Test Plan: Run python3 sip_generator.py ... Run python2 sip_generator.py ... Both generate the same code Reviewers: #frameworks, arojas Reviewed By: arojas Subscribers: arojas, kde-frameworks-devel, kde-buildsystem Tags: #frameworks, #build_system Differential Revision: https://phabricator.kde.org/D14912
2018-08-25Bindings: Add support for scoped enumsStefan Brüns
Summary: Keep the enum intact by emitting the class keyword in case the enum is scoped. Use the complete enum scope for parameter values, the enclosing scope is only correct to use for unscoped enums. The python Cursor.is_scoped_enum() method has been added with LLVM/Clang version 5.0. BUG: 397154 Test Plan: build kcoreaddons Reviewers: #frameworks, mpyne Reviewed By: mpyne Subscribers: mpyne, kde-frameworks-devel, kde-buildsystem Tags: #frameworks, #build_system Differential Revision: https://phabricator.kde.org/D14908
2018-08-18Bindings: Check for libclang without version suffix alsoStefan Brüns
Summary: The canonical name is libclang.so, which seems to be available on all distributions (RH, SUSE, Ubuntu, Debian, ...) while the symlinks with version suffix (e.g. libclang-6.0) are specific to Debian and derivatives. Keep the current checks, but fallback to the unversioned library name. Test Plan: on openSUSE TW/Leap: run cmake -> libclang is found Reviewers: #frameworks, dfaure Reviewed By: dfaure Subscribers: kde-frameworks-devel, kde-buildsystem Tags: #frameworks, #build_system Differential Revision: https://phabricator.kde.org/D14909
2018-07-16Change the 'since' version.Christophe Giboudeaux
These changes are not available in ECM 5.48.0.
2018-07-08Improve ECMAddAppIconMacro.Dominik Schmidt
Summary: - Add support for SIDEBAR_ICONS on macOS - Allow specifying a basename for the icon file via OUTFILE_BASENAME - Add support for HiRes icons on Windows via icotool I'm sorry this went all into one big change. I see that it's not optimal, but it's really hard to rip it apart... Also to me the whole code with support for two flavors of png2ico and icotool seems very spaghetti-ish. IMHO there's no good reason to keep supporting all three, icotool is the only maintained project and the only one supporting more than 128px wide icons. That's why I would suggest to simplify the whole code by only supporting icotool in one of the next releases. Test Plan: We use this version of ECMAddAppIconMacro in ownCloud client and it works... I tested icotool natively and while cross-compiling on linux. SIDEBAR_ICONS are also working... If you want to test this with the ownCloud client, it's best to use https://github.com/dschmidt/owncloud-client/tree/fix-app-icon-macro because that contains a small fix I just PR'ed and which is not in master yet. (We maintain a fork of the module there, so compiling it for Windows or macOS will automatically use the version of the module that I'm submitting) Reviewers: vonreth, vpinon, apol, alexmerry, cgiboudeaux Reviewed By: cgiboudeaux Subscribers: cgiboudeaux, kde-frameworks-devel, kde-buildsystem Tags: #frameworks, #build_system Differential Revision: https://phabricator.kde.org/D13698
2018-06-05skip automoc hereLaurent Montel
2018-04-18Include FeatureSummary before calling set_package_properties.Christophe Giboudeaux