bx genie scripts: use path.join to compose paths

Using path.join instead of string concatenation makes the scripts more
OS-neutral. It also protects against missing or doubled "/" characters
in paths.
This commit is contained in:
Brett Vickers
2015-02-27 15:34:38 -08:00
parent b5a5f039e9
commit 2d41b75fde
2 changed files with 137 additions and 137 deletions

View File

@@ -17,9 +17,9 @@ solution "bx"
language "C++"
BX_DIR = (path.getabsolute("..") .. "/")
local BX_BUILD_DIR = (BX_DIR .. ".build/")
local BX_THIRD_PARTY_DIR = (BX_DIR .. "3rdparty/")
BX_DIR = path.getabsolute("..")
local BX_BUILD_DIR = path.join(BX_DIR, ".build")
local BX_THIRD_PARTY_DIR = path.join(BX_DIR, "3rdparty")
defines {
"BX_CONFIG_ENABLE_MSVC_LEVEL4_WARNINGS=1"
@@ -39,15 +39,15 @@ project "bx.test"
uuid "8a653da8-23d6-11e3-acb4-887628d43830"
kind "ConsoleApp"
debugdir (BX_DIR .. "tests")
debugdir (path.join(BX_DIR, "tests"))
removeflags {
"NoExceptions",
}
includedirs {
BX_DIR .. "include",
BX_THIRD_PARTY_DIR .. "UnitTest++/src/",
path.join(BX_DIR, "include"),
path.join(BX_THIRD_PARTY_DIR, "UnitTest++/src"),
}
links {
@@ -55,8 +55,8 @@ project "bx.test"
}
files {
BX_DIR .. "tests/**.cpp",
BX_DIR .. "tests/**.H",
path.join(BX_DIR, "tests/**.cpp"),
path.join(BX_DIR, "tests/**.H"),
}
configuration { "vs*" }