qt: Fix windows clang & vcpkg build

This commit is contained in:
ts-korhonen
2021-12-19 23:49:47 +02:00
parent 61563bea57
commit 3b16136142
5 changed files with 14 additions and 3 deletions

View File

@@ -107,6 +107,11 @@ add_library(ui STATIC
../qt_resources.qrc
)
if(NOT MINGW)
target_sources(plat PRIVATE ../win/win_opendir.c)
target_sources(plat PRIVATE ../nvr.c)
endif()
if (APPLE)
target_sources(ui PRIVATE macos_event_filter.mm)
endif()

View File

@@ -2,8 +2,9 @@
* C functionality for Qt platform, where the C equivalent is not easily
* implemented in Qt
*/
#ifdef __MINGW32__
#include <strings.h>
#endif
#include <stdint.h>
#include <wchar.h>

View File

@@ -33,10 +33,13 @@ Q_IMPORT_PLUGIN(QWindowsVistaStylePlugin)
#define VC(x) const_cast<wchar_t*>(x)
extern QElapsedTimer elapsed_timer;
extern int nvr_dosave;
extern MainWindow* main_window;
extern "C" {
#define new not_new
#include <86box/timer.h>
#include <86box/nvr.h>
#undef new
extern int qt_nvr_save(void);
}

View File

@@ -48,6 +48,7 @@ private:
extern "C" {
#ifdef Q_OS_WINDOWS
#define NOMINMAX
#include <windows.h>
#endif
#include <86box/86box.h>

View File

@@ -9,6 +9,7 @@
"libpng",
"openal-soft",
"sdl2",
"rtmidi"
"rtmidi",
"qt5"
]
}