forked from hunter-packages/opencv
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added the Qt backend with static link support
When static linking, Qt resources must the initialized manually The file static_opencv_qt_resources.cpp initializes the resources for the highgui icons. This patch uses the QtCMakeExtra Hunter project to add it as an interface source file.
- Loading branch information
Showing
4 changed files
with
67 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
/** | ||
* Part of the Hunter patch for static linking OpenCV with Qt | ||
* Initializes the resources for the highgui window icons | ||
*/ | ||
|
||
#include <QtCore> | ||
|
||
inline void static_opencv_qt_resources() { | ||
Q_INIT_RESOURCE(window_QT); | ||
} | ||
|
||
namespace { | ||
|
||
struct static_opencv_qt_resources_initializer{ | ||
static_opencv_qt_resources_initializer() { | ||
static_opencv_qt_resources(); | ||
} | ||
}; | ||
|
||
static_opencv_qt_resources_initializer global_instance; | ||
} | ||
|