diff --git a/src/core/config/desktop_linux.pri b/src/core/config/desktop_linux.pri
index 500e0444807d4e83f81c1c6bf2cfaf3dee237369..041b094a17db649a51f8941a30c50eba540b9671 100644
--- a/src/core/config/desktop_linux.pri
+++ b/src/core/config/desktop_linux.pri
@@ -16,4 +16,6 @@ GYP_CONFIG += \
     host_clang=0 \
     clang=0 \
 
+contains(QT_CONFIG, system-jpeg): GYP_CONFIG += use_system_libjpeg=1
+
 !contains(QT_CONFIG, pulseaudio): GYP_CONFIG += use_pulseaudio=0