Skip to content

Commit

Permalink
CMake: Include WIL headers
Browse files Browse the repository at this point in the history
MSBuild does this, so CMake should too. Fixes a Windows build error.
  • Loading branch information
JosJuice committed Mar 4, 2021
1 parent 858f00b commit 2cb3f66
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 14 deletions.
1 change: 1 addition & 0 deletions CMakeLists.txt
Expand Up @@ -805,6 +805,7 @@ else()
endif()

if (WIN32)
include_directories(Externals/WIL/include)
include_directories(Externals/OpenAL/include)
endif()

Expand Down
26 changes: 12 additions & 14 deletions Source/Core/DolphinQt/GameList/GameList.cpp
Expand Up @@ -2,6 +2,18 @@
// Licensed under GPLv2+
// Refer to the license.txt file included.

#ifdef _WIN32
#include <QCoreApplication>
#include <shlobj.h>
#include <wil/com.h>

// This file uses some identifiers which are defined as macros in Windows headers.
// Include and undefine the macros first thing we do to solve build errors.
#ifdef DeleteFile
#undef DeleteFile
#endif
#endif

#include "DolphinQt/GameList/GameList.h"

#include <algorithm>
Expand Down Expand Up @@ -53,20 +65,6 @@

#include "UICommon/GameFile.h"

#ifdef _WIN32
#include <QCoreApplication>
#include <shlobj.h>
#include <wil/com.h>

// This file uses some identifiers which are defined as macros in Windows headers.
// Undefine them for the intellisense parser to solve some red squiggles.
#ifdef __INTELLISENSE__
#ifdef DeleteFile
#undef DeleteFile
#endif
#endif
#endif

GameList::GameList(QWidget* parent) : QStackedWidget(parent), m_model(this)
{
m_list_proxy = new ListProxyModel(this);
Expand Down

0 comments on commit 2cb3f66

Please sign in to comment.