diff --git a/conanfile.py b/conanfile.py index 476d674..a6e4916 100644 --- a/conanfile.py +++ b/conanfile.py @@ -362,6 +362,11 @@ def generate(self): else: tc.variables["FEATURE_xml"] = False + if self.get_option("qttools") and self.get_option("qttranslations"): + tc.variables["QT_FEATURE_linguist"] = True # feature switch for lupdate, lrelease, lconvert + else: + tc.variables["QT_FEATURE_linguist"] = False + if self.get_option("qtmultimedia"): tc.variables["FFMPEG_DIR"] = self.dependencies["ffmpeg"].package_folder tc.variables["QT_DEFAULT_MEDIA_BACKEND"] = "ffmpeg" diff --git a/patches/linguist.patch b/patches/linguist.patch index bd4c674..a5125ed 100644 --- a/patches/linguist.patch +++ b/patches/linguist.patch @@ -12,15 +12,24 @@ index 9fbbe2c..afd5982 100644 if(TARGET WrapLibClang::WrapLibClang) diff --git a/src/linguist/CMakeLists.txt b/src/linguist/CMakeLists.txt -index d85254b..3434853 100644 +index ab2169dec..992399c4e 100644 --- a/src/linguist/CMakeLists.txt +++ b/src/linguist/CMakeLists.txt -@@ -14,7 +14,7 @@ add_subdirectory(lrelease) +@@ -5,16 +5,13 @@ qt_exclude_tool_directories_from_default_target( + linguist + ) + +-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) -+if(QT_FEATURE_printsupport AND QT_FEATURE_process AND QT_FEATURE_pushbutton AND QT_FEATURE_toolbutton AND TARGET Qt::Widgets AND NOT no-png) ++if(QT_FEATURE_linguist AND QT_FEATURE_printsupport AND QT_FEATURE_process AND QT_FEATURE_pushbutton AND QT_FEATURE_toolbutton AND TARGET Qt::Widgets AND NOT no-png) add_subdirectory(linguist) endif()