mirror of
https://github.com/ModOrganizer2/modorganizer-preview_dds.git
synced 2026-07-27 14:06:05 -07:00
Updates to fix precompiled pyqt linguist functions
This commit is contained in:
@@ -77,8 +77,8 @@ function(PYQT5_CREATE_TRANSLATION _qm_files)
|
||||
endforeach()
|
||||
endif()
|
||||
add_custom_command(OUTPUT ${_ts_file}
|
||||
COMMAND ${PYTHON_ROOT}/pylupdate5.bat
|
||||
ARGS ${_lupdate_options} ${_lst_file_srcs} -ts ${_ts_file}
|
||||
COMMAND ${PYTHON_ROOT}/PCbuild/amd64/python.exe
|
||||
ARGS -m PyQt5.pylupdate_main ${_lupdate_options} ${_lst_file_srcs} -ts ${_ts_file}
|
||||
DEPENDS ${_my_sources}
|
||||
WORKING_DIRECTORY ${PYTHON_ROOT}
|
||||
VERBATIM)
|
||||
@@ -86,36 +86,3 @@ function(PYQT5_CREATE_TRANSLATION _qm_files)
|
||||
qt5_add_translation(${_qm_files} ${_my_tsfiles})
|
||||
set(${_qm_files} ${${_qm_files}} PARENT_SCOPE)
|
||||
endfunction()
|
||||
|
||||
|
||||
function(PYQT5_ADD_TRANSLATION _qm_files)
|
||||
set(options)
|
||||
set(oneValueArgs)
|
||||
set(multiValueArgs OPTIONS)
|
||||
|
||||
cmake_parse_arguments(_LRELEASE "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
|
||||
set(_lrelease_files ${_LRELEASE_UNPARSED_ARGUMENTS})
|
||||
|
||||
foreach(_current_FILE ${_lrelease_files})
|
||||
get_filename_component(_abs_FILE ${_current_FILE} ABSOLUTE)
|
||||
get_filename_component(qm ${_abs_FILE} NAME_WE)
|
||||
# everything before the last dot has to be considered the file name (including other dots)
|
||||
string(REGEX REPLACE "\\.[^.]*$" "" FILE_NAME ${qm})
|
||||
get_source_file_property(output_location ${_abs_FILE} OUTPUT_LOCATION)
|
||||
if(output_location)
|
||||
file(MAKE_DIRECTORY "${output_location}")
|
||||
set(qm "${output_location}/${FILE_NAME}.qm")
|
||||
else()
|
||||
set(qm "${CMAKE_CURRENT_BINARY_DIR}/${FILE_NAME}.qm")
|
||||
endif()
|
||||
|
||||
add_custom_command(OUTPUT ${qm}
|
||||
COMMAND ${PYTHON_ROOT}/pylrelease5.bat
|
||||
ARGS ${_LRELEASE_OPTIONS} ${_abs_FILE} -qm ${qm}
|
||||
WORKING_DIRECTORY ${PYTHON_ROOT}
|
||||
DEPENDS ${_abs_FILE} VERBATIM
|
||||
)
|
||||
list(APPEND ${_qm_files} ${qm})
|
||||
endforeach()
|
||||
set(${_qm_files} ${${_qm_files}} PARENT_SCOPE)
|
||||
endfunction()
|
||||
|
||||
Reference in New Issue
Block a user