Fix mingw build
@@ -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})
@@ -32,7 +32,7 @@
#include <cstdio>
#include <string.h>
-#ifdef WIN32
+#ifdef RMLUI_PLATFORM_WIN32
#include <io.h>
#else
#include <dirent.h>
@@ -72,7 +72,7 @@ struct FileSystemNode
// Build the list of files and directories within this directory.
void BuildTree(const Rml::String& root = "")
{
_finddata_t find_data;
intptr_t find_handle = _findfirst((root + name + "/*.*").c_str(), &find_data);
if (find_handle != -1)
@@ -36,7 +36,9 @@
#define UNICODE
#define _UNICODE
#define WIN32_LEAN_AND_MEAN
+#ifndef NOMINMAX
#define NOMINMAX
+#endif
#include <windows.h>
@@ -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);