Skip to content

Commit

Permalink
fix compile for windows msys2
Browse files Browse the repository at this point in the history
  • Loading branch information
mrgaturus committed Jun 13, 2024
1 parent 87b1977 commit 810b728
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
nopack
nopack.exe
data
pack
11 changes: 9 additions & 2 deletions src/nopack.nim
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,16 @@ from os import
fileExists, `/`, copyDir,
removeDir, createDir, dirExists
from strutils import parseInt, split

proc gorge0(cmd: string): string {.compileTime.} =
result = gorge(cmd)
# Remove Extra New Line
let l = result.len
if l > 0 and result[l - 1] == '\n':
result[l - 1] = ' ';
# Include GDKPixbuf from pkg-config
{.passC: gorge("pkg-config --cflags gdk-pixbuf-2.0").}
{.passL: gorge("pkg-config --libs gdk-pixbuf-2.0").}
{.passC: gorge0("pkg-config --cflags gdk-pixbuf-2.0").}
{.passL: gorge0("pkg-config --libs gdk-pixbuf-2.0").}

{.compile: "nopack.c".}
{.push header: "nopack.h".}
Expand Down

0 comments on commit 810b728

Please sign in to comment.