Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix mingw build #108

Merged
merged 2 commits into from
Jul 9, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -514,6 +514,10 @@ endif(NOT BUILD_FRAMEWORK)
target_precompile_headers(shell PRIVATE ${PROJECT_SOURCE_DIR}/Samples/shell/src/precompiled.h)
endif()

if (WIN32)
target_link_libraries(shell PUBLIC shlwapi)
endif()

# Build and install the basic samples
foreach(sample ${samples})
bl_sample(${sample} ${sample_LIBRARIES})
Expand Down
4 changes: 2 additions & 2 deletions Samples/basic/treeview/src/FileSystem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
#include <cstdio>
#include <string.h>

#ifdef WIN32
#ifdef RMLUI_PLATFORM_WIN32
#include <io.h>
#else
#include <dirent.h>
Expand Down Expand Up @@ -72,7 +72,7 @@ struct FileSystemNode
// Build the list of files and directories within this directory.
void BuildTree(const Rml::String& root = "")
{
#ifdef WIN32
#ifdef RMLUI_PLATFORM_WIN32
_finddata_t find_data;
intptr_t find_handle = _findfirst((root + name + "/*.*").c_str(), &find_data);
if (find_handle != -1)
Expand Down
2 changes: 2 additions & 0 deletions Samples/shell/include/win32/IncludeWindows.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,9 @@
#define UNICODE
#define _UNICODE
#define WIN32_LEAN_AND_MEAN
#ifndef NOMINMAX
#define NOMINMAX
#endif

#include <windows.h>

Expand Down
1 change: 0 additions & 1 deletion Samples/shell/src/win32/ShellWin32.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
#include <stdio.h>
#include <stdarg.h>
#include <shlwapi.h>
#pragma comment( lib , "Shlwapi.lib" )

static LRESULT CALLBACK WindowProcedure(HWND window_handle, UINT message, WPARAM w_param, LPARAM l_param);

Expand Down