I am trying to generate *.ts files with my CMake, but it does nothing. It even do not show any message. When I am trying directly with lupdate, it is working, so I don't know where the problem might be. Here my CMakeLists.txt:
cmake_minimum_required(VERSION 3.15 FATAL_ERROR)
project(Band VERSION 1.0.0 LANGUAGES CXX)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(Qt5_DIR "C:/QtOpen/5.13.2/msvc2017_64/lib/cmake/Qt5")
set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_AUTOUIC_SEARCH_PATHS Designer)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
set ( SOURCES
Data/Band.cpp
MainWindow.cpp
)
set ( MOC_HEADERS
Data/Band.h
MainWindow.h
)
set ( UIS Designer/band.ui)
set ( RESOURCES application.qrc )
find_package(Qt5 COMPONENTS Core Gui Widgets Xml Network PrintSupport LinguistTools REQUIRED)
qt5_create_translation(QM_FILES MainWindow.cpp english.ts)
add_executable( ${CMAKE_PROJECT_NAME} WIN32 ${SOURCES} ${MOC_HEADERS} ${RESOURCES} ${UIS} ${QM_FILES} icon.rc)
target_compile_definitions(${CMAKE_PROJECT_NAME} PUBLIC DEBUG_MODE)
target_link_libraries(${CMAKE_PROJECT_NAME} Qt5::Widgets Qt5::Gui Qt5::Xml Qt5::PrintSupport)
Can anyone help? I went through all the tutorials, documentation and answers about this topic, but found nothing that could explain why it does not generate .ts file for me. Thanks in advance.
ref: https://doc.qt.io/qt-5/qtlinguist-cmake-qt5-create-translation.html