aboutsummaryrefslogtreecommitdiff
path: root/KF5ConfigMacros.cmake
diff options
context:
space:
mode:
authorAleix Pol <aleixpol@kde.org>2016-11-02 13:43:25 +0100
committerAleix Pol <aleixpol@kde.org>2016-11-03 15:24:49 +0100
commit24c335069300ece4de76f480dd4bebc9bc95445c (patch)
tree5d23d441292afe4f830eff40fb7066dcf62a730a /KF5ConfigMacros.cmake
parent91dbd2f5a30caf878f668e60b7c2ee5ca376b858 (diff)
downloadkconfig-24c335069300ece4de76f480dd4bebc9bc95445c.tar.gz
kconfig-24c335069300ece4de76f480dd4bebc9bc95445c.tar.bz2
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
Diffstat (limited to 'KF5ConfigMacros.cmake')
-rw-r--r--KF5ConfigMacros.cmake1
1 files changed, 1 insertions, 0 deletions
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)