cmake: Modernize use of Qt Linguist Tools
[quassel.git] / po / CMakeLists.txt
index 03a6d05..1d95aa6 100644 (file)
@@ -1,7 +1,7 @@
 # Generate and add translations
 # The LINGUAS variable can be used to limit that set
 
-if(QT_LCONVERT_EXECUTABLE)
+if (TARGET Qt5::lconvert)
   # get environment variable for translations
   set(LINGUAS "$ENV{LINGUAS}")
   string(REGEX REPLACE "[ \t]+" \; output "${LINGUAS}")
@@ -33,9 +33,9 @@ else()
   message(STATUS "WARNING: lconvert not found, you won't have translations!")
 endif()
 
-# For a static or win32 build, we need to include Qt translations if available
+# For a Win32 build, we need to include Qt translations if available
 if(QT_TRANSLATIONS_DIR)
-  if(STATIC OR WIN32)
+  if(WIN32)
     foreach(LANG ${gen_linguas})
       file(GLOB lang_files ${QT_TRANSLATIONS_DIR}/qt_${LANG}*.qm)
       foreach(absfile ${lang_files})