mirror of
https://github.com/ModOrganizer2/cmake_common.git
synced 2026-07-27 14:06:46 -07:00
Merge pull request #6 from isanae/python-ts
Fix for .ts files in python plugins
This commit is contained in:
+12
-1
@@ -4,13 +4,24 @@ macro(do_python_project)
|
||||
find_package(Qt5LinguistTools)
|
||||
|
||||
if(${create_translations})
|
||||
file(GLOB_RECURSE objects LIST_DIRECTORIES true ${CMAKE_SOURCE_DIR}/src/*)
|
||||
|
||||
set(dirs "")
|
||||
foreach(o ${objects})
|
||||
if(IS_DIRECTORY ${o})
|
||||
list(APPEND dirs ${o})
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
pyqt5_create_translation(
|
||||
qm_files
|
||||
${CMAKE_SOURCE_DIR}/src ${additional_translations}
|
||||
${CMAKE_SOURCE_DIR}/src ${dirs} ${additional_translations}
|
||||
${CMAKE_SOURCE_DIR}/src/${PROJECT_NAME}_en.ts
|
||||
)
|
||||
endif()
|
||||
|
||||
add_custom_target(translations ALL DEPENDS ${qm_files})
|
||||
|
||||
file(GLOB_RECURSE source_files CONFIGURE_DEPENDS *.py)
|
||||
|
||||
set(input_files
|
||||
|
||||
Reference in New Issue
Block a user