diff options
Diffstat (limited to 'modules/ECMCreateQmFromPoFiles.cmake')
| -rw-r--r-- | modules/ECMCreateQmFromPoFiles.cmake | 19 | 
1 files changed, 12 insertions, 7 deletions
| diff --git a/modules/ECMCreateQmFromPoFiles.cmake b/modules/ECMCreateQmFromPoFiles.cmake index 3f134fbb..afd6f786 100644 --- a/modules/ECMCreateQmFromPoFiles.cmake +++ b/modules/ECMCreateQmFromPoFiles.cmake @@ -110,13 +110,18 @@ endfunction()  function(_ECM_QM_CREATE_TARGET install_destination catalog_name)      # Find lconvert -    get_target_property(lrelease_location Qt5::lrelease LOCATION) -    get_filename_component(lrelease_path ${lrelease_location} PATH) -    find_program(lconvert_executable -        NAMES lconvert-qt5 lconvert -        PATHS ${lrelease_path} -        NO_DEFAULT_PATH -        ) +    if(TARGET Qt5::lconvert) +        set(lconvert_executable Qt5::lconvert) +    else() +        # Qt < 5.3.1 does not define Qt5::lconvert +        get_target_property(lrelease_location Qt5::lrelease LOCATION) +        get_filename_component(lrelease_path ${lrelease_location} PATH) +        find_program(lconvert_executable +            NAMES lconvert-qt5 lconvert +            PATHS ${lrelease_path} +            NO_DEFAULT_PATH +            ) +    endif()      if (catalog_name)          set(install_args RENAME ${catalog_name}.qm) | 
