From ada94c1607ab9be46556562e48e4e89d74ca117d Mon Sep 17 00:00:00 2001 From: "Thiago A. Correa" Date: Wed, 18 Feb 2015 14:16:47 -0200 Subject: [PATCH] Fix shader loading when the library is built statically Signed-off-by: Thiago A. Correa --- src/QtAV_Global.cpp | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/QtAV_Global.cpp b/src/QtAV_Global.cpp index 93308001..1ba55d4d 100644 --- a/src/QtAV_Global.cpp +++ b/src/QtAV_Global.cpp @@ -332,3 +332,21 @@ public: InitFFmpegLog fflog; } } + +// Initialize Qt Resource System when the library is built +// statically + +static void initResources() { + Q_INIT_RESOURCE(shaders); + Q_INIT_RESOURCE(QtAV); +} + +namespace { + class ResourceLoader { + public: + ResourceLoader() { initResources(); } + }; + + ResourceLoader QtAV_QRCLoader; +} +