From 517f8dc1d03dc854325d0cc308960016de82a86c Mon Sep 17 00:00:00 2001 From: Kornel Benko Date: Thu, 16 Apr 2009 10:48:32 +0000 Subject: [PATCH] Fix error in creating moc-files due to last commit. Again: prepend moc_ instead of appending _moc in cmake git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@29258 a592a061-630c-0410-9148-cb99ea01b6c8 --- development/cmake/modules/LyXMacros.cmake | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/development/cmake/modules/LyXMacros.cmake b/development/cmake/modules/LyXMacros.cmake index 10797b3f28..37b612b83b 100644 --- a/development/cmake/modules/LyXMacros.cmake +++ b/development/cmake/modules/LyXMacros.cmake @@ -86,16 +86,16 @@ macro(LYX_AUTOMOC) get_filename_component(_abs_PATH ${_abs_FILE} PATH) - string(REGEX MATCHALL "#include +[^ ]+_moc\\.cpp[\">]" _match "${_contents}") + string(REGEX MATCHALL "#include +[\"<]moc_[^ ]+\\.cpp[\">]" _match "${_contents}") if (_match) foreach (_current_MOC_INC ${_match}) - string(REGEX MATCH "[^ <\"]+_moc\\.cpp" _current_MOC "${_current_MOC_INC}") + string(REGEX MATCH "moc_[^ <\"]+\\.cpp" _current_MOC "${_current_MOC_INC}") get_filename_component(_basename ${_current_MOC} NAME_WE) string(LENGTH ${_basename} _length) MATH(EXPR _mocless_length ${_length}-4) - STRING(SUBSTRING ${_basename} 0 ${_mocless_length} _mocless_name) + STRING(SUBSTRING ${_basename} 4 ${_mocless_length} _mocless_name ) set(_header ${_abs_PATH}/${_mocless_name}.h) -- 2.39.2