summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--makefile5
-rw-r--r--scripts/extlib.lua6
-rw-r--r--scripts/src/lib.lua1
-rw-r--r--src/lib/util/unicode.cpp2
4 files changed, 13 insertions, 1 deletions
diff --git a/makefile b/makefile
index dd8e4fc7e03..5f1a1685c09 100644
--- a/makefile
+++ b/makefile
@@ -64,6 +64,7 @@
# USE_SYSTEM_LIB_PORTMIDI = 1
# USE_SYSTEM_LIB_PORTAUDIO = 1
# USE_BUNDLED_LIB_SDL2 = 1
+# USE_SYSTEM_LIB_UTF8PROC = 1
# MESA_INSTALL_ROOT = /opt/mesa
# SDL_INSTALL_ROOT = /opt/sdl2
@@ -460,6 +461,10 @@ ifdef USE_SYSTEM_LIB_PORTAUDIO
PARAMS += --with-system-portaudio='$(USE_SYSTEM_LIB_PORTAUDIO)'
endif
+ifdef USE_SYSTEM_LIB_UTF8PROC
+PARAMS += --with-system-utf8proc='$(USE_SYSTEM_LIB_UTF8PROC)'
+endif
+
# reverse logic for this one
ifdef USE_BUNDLED_LIB_SDL2
diff --git a/scripts/extlib.lua b/scripts/extlib.lua
index a3949e3447b..674f1b1d881 100644
--- a/scripts/extlib.lua
+++ b/scripts/extlib.lua
@@ -14,6 +14,7 @@ local extlibs = {
portmidi = { "portmidi", "3rdparty/portmidi/pm_common" },
portaudio = { "portaudio", "3rdparty/portaudio/include" },
lua = { "lua", "3rdparty/lua/src" },
+ utf8proc = { "utf8proc", "3rdparty/utf8proc" },
}
-- system lib options
@@ -57,6 +58,11 @@ newoption {
description = "Use system LUA library",
}
+newoption {
+ trigger = "with-system-utf8proc",
+ description = "Use system utf8proc library",
+}
+
-- build helpers
function ext_lib(lib)
local opt = _OPTIONS["with-system-" .. lib]
diff --git a/scripts/src/lib.lua b/scripts/src/lib.lua
index e102ba3cdcc..9c631aebbab 100644
--- a/scripts/src/lib.lua
+++ b/scripts/src/lib.lua
@@ -22,6 +22,7 @@ project "utils"
ext_includedir("expat"),
ext_includedir("zlib"),
ext_includedir("flac"),
+ ext_includedir("utf8proc"),
}
files {
diff --git a/src/lib/util/unicode.cpp b/src/lib/util/unicode.cpp
index 8f5295de4af..b48cef44c79 100644
--- a/src/lib/util/unicode.cpp
+++ b/src/lib/util/unicode.cpp
@@ -15,7 +15,7 @@
#define UTF8PROC_DLLEXPORT
#endif
-#include "utf8proc/utf8proc.h"
+#include <utf8proc.h>
#include <codecvt>
#include <locale>