mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 21:21:32 +00:00
1.) some white spaces removed
2.) Using direct call to uic-qt4. This was needed to enable translated strings to appear in many dialogs. I needed some time to find out, why strings form autocof-build made it into the dialogs, but strings from cmake-build did not. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@29234 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
d6819bf658
commit
5378f44032
@ -48,16 +48,12 @@ macro(LYX_ADD_UI_FILES _sources _ui)
|
|||||||
set(_header ${CMAKE_CURRENT_BINARY_DIR}/ui_${_basename}.h)
|
set(_header ${CMAKE_CURRENT_BINARY_DIR}/ui_${_basename}.h)
|
||||||
|
|
||||||
# we need to run uic and replace some things in the generated file
|
# we need to run uic and replace some things in the generated file
|
||||||
# this is done by executing the cmake script kde4uic.cmake
|
# this is done by executing the cmake script LyXuic.cmake
|
||||||
|
# ######
|
||||||
|
# Latest test showed on linux and windows show no bad consequeces,
|
||||||
|
# so we removed the call to LyXuic.cmake
|
||||||
add_custom_command(OUTPUT ${_header}
|
add_custom_command(OUTPUT ${_header}
|
||||||
COMMAND ${CMAKE_COMMAND}
|
COMMAND ${QT_UIC_EXECUTABLE} -tr lyx::qt_ ${_tmp_FILE} -o ${_header}
|
||||||
ARGS
|
|
||||||
-DKDE4_HEADER:BOOL=ON
|
|
||||||
-DKDE_UIC_EXECUTABLE:FILEPATH=${QT_UIC_EXECUTABLE}
|
|
||||||
-DKDE_UIC_FILE:FILEPATH=${_tmp_FILE}
|
|
||||||
-DKDE_UIC_H_FILE:FILEPATH=${_header}
|
|
||||||
-DKDE_UIC_BASENAME:STRING=${_basename}
|
|
||||||
-P ${CMAKE_MODULE_PATH}/LyXuic.cmake
|
|
||||||
MAIN_DEPENDENCY ${_tmp_FILE}
|
MAIN_DEPENDENCY ${_tmp_FILE}
|
||||||
)
|
)
|
||||||
set(${_ui} ${${_ui}} ${_header})
|
set(${_ui} ${${_ui}} ${_header})
|
||||||
@ -90,16 +86,16 @@ macro(LYX_AUTOMOC)
|
|||||||
|
|
||||||
get_filename_component(_abs_PATH ${_abs_FILE} PATH)
|
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)
|
if (_match)
|
||||||
foreach (_current_MOC_INC ${_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)
|
get_filename_component(_basename ${_current_MOC} NAME_WE)
|
||||||
|
|
||||||
string(LENGTH ${_basename} _length)
|
string(LENGTH ${_basename} _length)
|
||||||
MATH(EXPR _mocless_length ${_length}-4)
|
MATH(EXPR _mocless_length ${_length}-4)
|
||||||
STRING(SUBSTRING ${_basename} 4 ${_mocless_length} _mocless_name )
|
STRING(SUBSTRING ${_basename} 0 ${_mocless_length} _mocless_name)
|
||||||
|
|
||||||
set(_header ${_abs_PATH}/${_mocless_name}.h)
|
set(_header ${_abs_PATH}/${_mocless_name}.h)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user