71 lines · 1.9 KB · Text
RawDownload
This file is part of MXE. See LICENSE.md for licensing information. Contains ad hoc patches for cross building. From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001From: Boris Nagaev <bnagaev@gmail.com>Date: Sun, 11 Oct 2015 22:47:50 +0200Subject: [PATCH 1/2] use Unix file functions on MinGW  diff --git a/src/rapidjson.cpp b/src/rapidjson.cppindex 1111111..2222222 100644--- a/src/rapidjson.cpp+++ b/src/rapidjson.cpp@@ -54,7 +54,7 @@ static void setfuncs(lua_State* L, const luaL_Reg *funcs) FILE* openForRead(const char* filename) { 	FILE* fp = NULL;-#if WIN32+#if WIN32 && !defined(__MINGW32__) 	fopen_s(&fp, filename, "rb"); #else 	fp = fopen(filename, "r");@@ -66,7 +66,7 @@ FILE* openForRead(const char* filename) FILE* openForWrite(const char* filename) { 	FILE* fp = NULL;-#if WIN32+#if WIN32 && !defined(__MINGW32__) 	fopen_s(&fp, filename, "wb"); #else 	fp = fopen(filename, "w"); From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001From: Boris Nagaev <bnagaev@gmail.com>Date: Sun, 11 Oct 2015 22:48:26 +0200Subject: [PATCH 2/2] link with Lua libraries on MinGW and MXE  diff --git a/rapidjson-0.2.2-1.rockspec b/rapidjson-0.2.2-1.rockspecindex 1111111..2222222 100644--- a/rapidjson-0.2.2-1.rockspec+++ b/rapidjson-0.2.2-1.rockspec@@ -27,6 +27,13 @@ dependencies = {   "lua >= 5.1" } +-- windows DLL needs link with importlib.+local link = {+  variables = {+    LUA_LIBRARIES = "$(LUA_LIBDIR)/$(LUALIB)",+  }+}+ -- cmake -Bbuild -H. -DBUILD_SHARED_LIBS=ON -- cmake --build build --target install --config Release build = {@@ -39,10 +46,8 @@ build = {   },   -- Override default build options   platforms = {-    windows = {-      variables = {-        LUA_LIBRARIES = "$(LUA_LIBDIR)/$(LUALIB)", -- windows DLL needs link with importlib.-      }-    }+    windows = link,+    mingw = link,+    mxe = link,   } }

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t