aboutsummaryrefslogtreecommitdiff
path: root/KF5ConfigMacros.cmake
AgeCommit message (Collapse)Author
2021-12-16WIP: Change the build system to enable building with Qt 6Ahmad Samir
This was built with: -DQT_MAJOR_VERSION=6 \ -DEXCLUDE_DEPRECATED_BEFORE_AND_AT=5.90.0 \ -DKF_DISABLE_DEPRECATED_BEFORE_AND_AT=0x055a00 Move the include(KDEInstallDirs) call before the first find_package(Qt*, the former is what auto-detects the Qt version, and defaults to 5. This is needed to be able to build against Qt5 by default. All unit tests still pass.
2021-05-29kconfig_add_kcfg_files: catch alias targets before failing internallyFriedrich W. H. Kossebau
target_sources() as used internally does not take alias targets.
2020-09-18CMake: Also set SKIP_AUTOUIC on generated filesKevin Funk
Otherwise we get a CMake warning, just as: ``` CMake Warning (dev) in resources/sugarcrm/CMakeLists.txt: Policy CMP0071 is not set: Let AUTOMOC and AUTOUIC process GENERATED files. Run "cmake --help-policy CMP0071" for policy details. Use the cmake_policy command to set the policy and suppress this warning. For compatibility, CMake is excluding the GENERATED source file(s): "/home/kfunk/devel/build/kdab/FatCRM/resources/sugarcrm/settings.cpp" "/home/kfunk/devel/build/kdab/FatCRM/resources/sugarcrm/settings.h" from processing by AUTOMOC and AUTOUIC. (...) ``` Also merge calls to set_source_files_properties() as it can handle multiple files at once.
2020-03-22KConfig: Convert to SPDX license statementsAndreas Cord-Landwehr
Summary: Convert license headers to SPDX statements and add license files as required by REUSE specification. Reviewers: cgiboudeaux Reviewed By: cgiboudeaux Subscribers: ognarb, cgiboudeaux, kde-frameworks-devel Tags: #frameworks Maniphest Tasks: T11550 Differential Revision: https://phabricator.kde.org/D27601
2020-01-19KCONFIG_ADD_KCFG_FILES: regenerate also on new version of kconfig_compilerFriedrich W. H. Kossebau
Test Plan: "touch"ing kconfig_compiler results in regeneration now. Reviewers: #frameworks, vkrause Reviewed By: vkrause Subscribers: kde-frameworks-devel Tags: #frameworks Differential Revision: https://phabricator.kde.org/D26723
2020-01-13Add since for target variant of kconfig_add_kcfg_filesDavid Redondo
GIT_SILENT
2020-01-13Include CMakeParseArgumentsDavid Redondo
Makes this file self contained GIT_SILENT
2020-01-13Allow to also pass a target instead of list of sources to KCONFIG_ADD_KCFG_FILESDavid Redondo
Summary: Brings us one step to closer to not needing to create lists of source files Reviewers: #frameworks, #build_system, apol Reviewed By: apol Subscribers: apol, kossebau, kde-frameworks-devel Tags: #frameworks Differential Revision: https://phabricator.kde.org/D26626
2019-03-15kconfig_compiler: new kcfgc args HeaderExtension & SourceExtensionFriedrich W. H. Kossebau
Summary: When using kconfig_compiler generated sources in projects where the used file extensions for C++ files are not ".h" and/or ".cpp", the include for the generated header looks a bit alien to the project, as well as the generated source file if one looks closer at it. This code adds new optional flags HeaderExtension & SourceExtension which can be used to control the file extensions used for the generated files. Test Plan: All unit tests and the new test_fileextensions pass, existing projects using kcfg without & with the new flags build fine. Reviewers: #frameworks, apol Reviewed By: apol Subscribers: apol, kde-frameworks-devel Tags: #frameworks Differential Revision: https://phabricator.kde.org/D19565
2019-03-06KCONFIG_ADD_KCFG_FILES macro: ensure a change of File= in kcfg is picked upFriedrich W. H. Kossebau
Summary: The build configuration depends on the value of the "File=" entry in the kcfg file, as this file name is used in the build instructions. So if the name is changed, cmake would need to be rerun. Adding the kcfgc file to CMAKE_CONFIGURE_DEPENDS makes cmake know about that dependency. While this will also result in a reconfiguarion if non-File entries are edited, this should not happen too often, so the extra costs outweighs the unexpected and confusing behaviour due to outdated build instructions in case the File= entry is changed. Test Plan: Before this change renaming a kcfg file before did not trigger a rerun of cmake, resulting in outdated builds instructions and unexpected behaviour. With this change cmake is rerun once the kcgc file is edited, so build instructions are always up-to-date. Reviewers: #frameworks, apol Reviewed By: apol Subscribers: apol, kde-frameworks-devel Tags: #frameworks Differential Revision: https://phabricator.kde.org/D19567
2017-12-14Remove cmake warning about generating moc fileMontel Laurent
Test Plan: compile kmail without cmake warning Reviewers: kfunk, dfaure Reviewed By: kfunk Subscribers: mpyne, apol, aacid, #frameworks Tags: #frameworks Differential Revision: https://phabricator.kde.org/D9277
2017-07-01Fix for CMake 3.9.Sebastian Holtermann
AUTOMOC now applies to generated headers too, so we need to skip it when using qt5_generate_moc.
2016-11-07Make sure we don't break compilation with past broken unitsAleix Pol
Summary: Show a warning together with the old broken behavior Reviewers: #frameworks, dfaure Reviewed By: dfaure Differential Revision: https://phabricator.kde.org/D3287
2016-11-07Properly parse function keywordsAleix Pol
Summary: Use cmake_parse_arguments() instead of roughly implementing it locally CCBUG: 371562 Test Plan: recompiled everything, nothing broke Reviewers: #frameworks, dfaure Reviewed By: dfaure Differential Revision: https://phabricator.kde.org/D3251
2016-11-03Don't be fatal on File field not being properly parsedAleix Pol
Summary: Fallback on trying the same filename as the actual file. There were some regressions due to the former matching expression: string(REGEX REPLACE "^(.*\n)?File=([^\n]+kcfg).*\n.*$" "\\2" _kcfg_FILENAME "${_contents}") This one would allow for the File field to be the kcfgc file (which doesn't make sense). With this patch we're not reproducing this behaviour, but we're allowing for the things that aren't building to work. After all, most kcfg and kcfgc files share the same name. Reviewers: #frameworks, davidedmundson Reviewed By: davidedmundson Subscribers: aacid, kfunk Differential Revision: https://phabricator.kde.org/D3226
2016-10-31Make kconfig_compiler autotests use the KCONFIG_ADD_KCFG_FILESAleix Pol
Summary: Instead of having an odd fake of it. Will help some required refactorings and already showed some issues, fixed by this patch, namely: - don't use string(regex replace) to extract a string from another string. in case it doesn't match it will offer the whole content which is never what we want. - messages(ERROR), the correct parameter is FATAL_ERROR, cmake understands "ERROR" as mere output string - turn the macro into a function, otherwise 2 calls in the same subdirectory are dangerous. CCBUG: 371562 Test Plan: tests still pass, projects that use the macro still build Reviewers: #frameworks, dfaure Reviewed By: dfaure Subscribers: dfaure Differential Revision: https://phabricator.kde.org/D3178
2015-04-23replace reference to licence with inline licenceJonathan Riddell
2014-03-24Rename the kconfig_compiler_kf5 target to kconfig_compilerAlex Merry
Just because the executable has the "_kf5" suffix, that does not mean the target should have it. This is ugly API, and will be unnecessary porting effort for KF6. REVIEW: 116995
2014-03-24Remove references to ${_KDE4_KCONFIG_COMPILER_DEP}Alex Merry
Not sure why it would be unset and then used, instead of just not used at all. LXR says it's not used anywhere else, though. REVIEW: 116962
2014-01-09rename kconfig_compiler to kconfig_compiler_kf5Jonathan Riddell
2013-12-18Move kconfig code to the root directory.Jenkins CI