From 24c335069300ece4de76f480dd4bebc9bc95445c Mon Sep 17 00:00:00 2001 From: Aleix Pol Date: Wed, 2 Nov 2016 13:43:25 +0100 Subject: Don't be fatal on File field not being properly parsed 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 --- KF5ConfigMacros.cmake | 1 + 1 file changed, 1 insertion(+) (limited to 'KF5ConfigMacros.cmake') diff --git a/KF5ConfigMacros.cmake b/KF5ConfigMacros.cmake index e92f4a31..17861a74 100644 --- a/KF5ConfigMacros.cmake +++ b/KF5ConfigMacros.cmake @@ -71,6 +71,7 @@ function (KCONFIG_ADD_KCFG_FILES _sources ) string(REGEX MATCH "File=([^\n]+\\.kcfg)\n" "" "${_contents}") set(_kcfg_FILENAME "${CMAKE_MATCH_1}") if (NOT _kcfg_FILENAME) + set(_kcfg_FILENAME "${_basename}.kcfg") message(WARNING "Couldn't read the \"File\" field in ${_tmp_FILE}") endif() set(_src_FILE ${CMAKE_CURRENT_BINARY_DIR}/${_basename}.cpp) -- cgit v1.2.1