deletes vendor/nim-nat-traversal/vendor/libnatpmp-upstream/VERSION on macOS

This commit is contained in:
Marcin Czenko 2024-12-20 04:47:20 +01:00
parent 0eddb6cf61
commit 42d61e38cc
No known key found for this signature in database
GPG Key ID: 33DEA0C8E30937C0
1 changed files with 10 additions and 0 deletions

View File

@ -4,6 +4,16 @@ import std/os except commandLineParams
### Helper functions
proc buildBinary(name: string, srcDir = "./", params = "", lang = "c") =
when defined(macosx):
# temporary fix for teh conflicting "VERSION" file in
# https://github.com/miniupnp/libnatpmp that causes a conflict
# with "#include <VERSION>" from the std library:
proc deleteVersionFile() =
let versionFilePath = "vendor/nim-nat-traversal/vendor/libnatpmp-upstream/VERSION"
echo "deleting " & versionFilePath
if fileExists(versionFilePath):
rmFile(versionFilePath)
deleteVersionFile()
if not dirExists "build":
mkDir "build"
# allow something like "nim nimbus --verbosity:0 --hints:off nimbus.nims"