mirror of
https://github.com/Lime3DS/Lime3DS.git
synced 2026-04-17 16:21:28 -06:00
lime_qt: Fixed Qt resources (.qrc) not linking correctly after the change to a static library
This commit is contained in:
parent
8d937c0924
commit
3042090227
@ -88,10 +88,13 @@ option(ENABLE_LTO "Enable link time optimization" ${DEFAULT_ENABLE_LTO})
|
||||
option(LIME3DS_USE_PRECOMPILED_HEADERS "Use precompiled headers" ON)
|
||||
option(LIME3DS_WARNINGS_AS_ERRORS "Enable warnings as errors" ON)
|
||||
|
||||
# Pass ENABLE_QT and ENABLE_SDL2_FRONTEND to C++ land
|
||||
# Pass the following values to C++ land
|
||||
if (ENABLE_QT)
|
||||
add_definitions(-DENABLE_QT)
|
||||
endif()
|
||||
if (ENABLE_QT_TRANSLATION)
|
||||
add_definitions(-DENABLE_QT_TRANSLATION)
|
||||
endif()
|
||||
if (ENABLE_SDL2_FRONTEND)
|
||||
add_definitions(-DENABLE_SDL2_FRONTEND)
|
||||
endif()
|
||||
|
||||
@ -3755,6 +3755,19 @@ void LaunchQtFrontend(int argc, char* argv[]) {
|
||||
|
||||
QApplication app(argc, argv);
|
||||
|
||||
// Required when using .qrc resources from within a static library.
|
||||
// See https://doc.qt.io/qt-5/resources.html#using-resources-in-a-library
|
||||
Q_INIT_RESOURCE(compatibility_list);
|
||||
Q_INIT_RESOURCE(theme_colorful);
|
||||
Q_INIT_RESOURCE(theme_colorful_dark);
|
||||
Q_INIT_RESOURCE(theme_colorful_midnight_blue);
|
||||
Q_INIT_RESOURCE(theme_default);
|
||||
Q_INIT_RESOURCE(theme_qdarkstyle);
|
||||
Q_INIT_RESOURCE(theme_qdarkstyle_midnight_blue);
|
||||
#ifdef ENABLE_QT_TRANSLATION
|
||||
Q_INIT_RESOURCE(languages);
|
||||
#endif
|
||||
|
||||
// Qt changes the locale and causes issues in float conversion using std::to_string() when
|
||||
// generating shaders
|
||||
setlocale(LC_ALL, "C");
|
||||
|
||||
Loading…
Reference in New Issue
Block a user