From acc9bb9db03fc0848d262c95742b8e7143cbba95 Mon Sep 17 00:00:00 2001 From: Joey Yakimowich-Payne Date: Tue, 21 Aug 2018 12:20:27 +0900 Subject: [PATCH] Make unix builds work --- nimui.cfg | 9 +++++++-- nimui.nimble | 3 +++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/nimui.cfg b/nimui.cfg index a2a3248..38aa774 100644 --- a/nimui.cfg +++ b/nimui.cfg @@ -19,7 +19,9 @@ compile = "nimui/common/*.c" compile-win = "nimui/windows/*.cpp" compile-lin = "nimui/unix/*.c" -pragma.passC = "passC: \"--std=c++11\"" +pragma-lin.passC = "passC: \"$(pkg-config --cflags-only-I gtk+-3.0) --std=c99\"" +pragma-lin.passL = "passL: \"$(pkg-config --libs gtk+-3.0)\"" +pragma-win.passC = "passC: \"--std=c++11\"" pragma-win.passL = "passL: \"-luser32 -lkernel32 -lgdi32 -lcomctl32 -luxtheme -lmsimg32 -lcomdlg32 -ld2d1 -ldwrite -lole32 -loleaut32 -loleacc -luuid -lwindowscodecs -lstdc++\"" pragma-win.rc = "link: \"nimui/examples/resources.o\"" @@ -52,4 +54,7 @@ search.8 = "type\nconst\n" replace.8 = "const\n" search.9 = "{.compile: \"nimui/common/OLD_table.c\".}" -comment.9 = 1 \ No newline at end of file +comment.9 = 1 + +search.10 = "{.compile: (\"../nimui/unix/OLD_table.c\", \"OLD_table1.o\").}" +comment.10 = 1 diff --git a/nimui.nimble b/nimui.nimble index bdf8ffd..acc6d7d 100644 --- a/nimui.nimble +++ b/nimui.nimble @@ -20,6 +20,9 @@ if detectOs(Windows): cmd = "cmd /c " ext = ".exe" +if not detectOs(Windows): + foreignDep "libgtk-3-dev" + task setup, "Download and generate": exec cmd & "nimgen nimui.cfg"