package/qt6/qt6tools: add option to build host linguist tools

According to src/linguist/CMakeLists.txt we need to enable the linguist
feature:

...
if(NOT QT_FEATURE_linguist)
    return()
endif()
add_subdirectory(lconvert)
add_subdirectory(lprodump)
add_subdirectory(lrelease)
add_subdirectory(lrelease-pro)
add_subdirectory(lupdate)
add_subdirectory(lupdate-pro)
if(QT_FEATURE_process AND QT_FEATURE_pushbutton AND QT_FEATURE_toolbutton AND TARGET Qt::Widgets AND NOT no-png)
    add_subdirectory(linguist)
endif()
...

And according to configure.cmake we need to select print support:
...
qt_feature("linguist" PRIVATE
    LABEL "Qt Linguist"
    PURPOSE "Qt Linguist can be used by translator to translate text in Qt applications."
    CONDITION TARGET Qt::PrintSupport
)
...

Signed-off-by: Roy Kollen Svendsen <roykollensvendsen@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
This commit is contained in:
Roy Kollen Svendsen
2024-09-04 23:10:46 +02:00
committed by Thomas Petazzoni
parent 322e64ead4
commit 989c7493e7
2 changed files with 17 additions and 0 deletions

View File

@@ -13,3 +13,14 @@ config BR2_PACKAGE_HOST_QT6TOOLS
and design of applications.
https://github.com/qt/qttools
if BR2_PACKAGE_HOST_QT6TOOLS
config BR2_PACKAGE_HOST_QT6TOOLS_LINGUIST_TOOLS
bool "host linguist tools"
select BR2_PACKAGE_HOST_QT6BASE_PRINTSUPPORT
help
Translate Qt C++ and Qt Quick applications into local
languages.
endif

View File

@@ -43,5 +43,11 @@ endif
HOST_QT6TOOLS_DEPENDENCIES = host-qt6base
ifeq ($(BR2_PACKAGE_HOST_QT6TOOLS_LINGUIST_TOOLS),y)
HOST_QT6TOOLS_CONF_OPTS += -DFEATURE_linguist=ON
else
HOST_QT6TOOLS_CONF_OPTS += -DFEATURE_linguist=OFF
endif
$(eval $(cmake-package))
$(eval $(host-cmake-package))