mirror of
https://github.com/scratchfoundation/bgfx.git
synced 2025-02-17 20:31:57 -05:00
Merge pull request #269 from beevik/fix-genie-paths
bgfx genie scripts: use path.join to compose paths
This commit is contained in:
commit
2be9d52c95
7 changed files with 97 additions and 97 deletions
|
@ -29,8 +29,8 @@ function bgfxProject(_name, _kind, _defines)
|
||||||
end
|
end
|
||||||
|
|
||||||
includedirs {
|
includedirs {
|
||||||
BGFX_DIR .. "3rdparty",
|
path.join(BGFX_DIR, "3rdparty"),
|
||||||
BGFX_DIR .. "../bx/include",
|
path.join(BGFX_DIR, "../bx/include"),
|
||||||
}
|
}
|
||||||
|
|
||||||
defines {
|
defines {
|
||||||
|
@ -69,7 +69,7 @@ function bgfxProject(_name, _kind, _defines)
|
||||||
|
|
||||||
configuration { "xcode4 or osx or ios*" }
|
configuration { "xcode4 or osx or ios*" }
|
||||||
files {
|
files {
|
||||||
BGFX_DIR .. "src/**.mm",
|
path.join(BGFX_DIR, "src/**.mm"),
|
||||||
}
|
}
|
||||||
|
|
||||||
configuration { "osx" }
|
configuration { "osx" }
|
||||||
|
@ -80,7 +80,7 @@ function bgfxProject(_name, _kind, _defines)
|
||||||
configuration { "not nacl" }
|
configuration { "not nacl" }
|
||||||
includedirs {
|
includedirs {
|
||||||
--nacl has GLES2 headers modified...
|
--nacl has GLES2 headers modified...
|
||||||
BGFX_DIR .. "3rdparty/khronos",
|
path.join(BGFX_DIR, "3rdparty/khronos"),
|
||||||
}
|
}
|
||||||
|
|
||||||
configuration { "x64", "vs* or mingw*" }
|
configuration { "x64", "vs* or mingw*" }
|
||||||
|
@ -91,17 +91,17 @@ function bgfxProject(_name, _kind, _defines)
|
||||||
configuration {}
|
configuration {}
|
||||||
|
|
||||||
includedirs {
|
includedirs {
|
||||||
BGFX_DIR .. "include",
|
path.join(BGFX_DIR, "include"),
|
||||||
}
|
}
|
||||||
|
|
||||||
files {
|
files {
|
||||||
BGFX_DIR .. "include/**.h",
|
path.join(BGFX_DIR, "include/**.h"),
|
||||||
BGFX_DIR .. "src/**.cpp",
|
path.join(BGFX_DIR, "src/**.cpp"),
|
||||||
BGFX_DIR .. "src/**.h",
|
path.join(BGFX_DIR, "src/**.h"),
|
||||||
}
|
}
|
||||||
|
|
||||||
excludes {
|
excludes {
|
||||||
BGFX_DIR .. "src/**.bin.h",
|
path.join(BGFX_DIR, "src/**.bin.h"),
|
||||||
}
|
}
|
||||||
|
|
||||||
configuration {}
|
configuration {}
|
||||||
|
|
|
@ -8,18 +8,18 @@ project ("example-common")
|
||||||
kind "StaticLib"
|
kind "StaticLib"
|
||||||
|
|
||||||
includedirs {
|
includedirs {
|
||||||
BX_DIR .. "include",
|
path.join(BX_DIR, "include"),
|
||||||
BGFX_DIR .. "include",
|
path.join(BGFX_DIR, "include"),
|
||||||
BGFX_DIR .. "3rdparty",
|
path.join(BGFX_DIR, "3rdparty"),
|
||||||
}
|
}
|
||||||
|
|
||||||
files {
|
files {
|
||||||
BGFX_DIR .. "3rdparty/ib-compress/**.cpp",
|
path.join(BGFX_DIR, "3rdparty/ib-compress/**.cpp"),
|
||||||
BGFX_DIR .. "3rdparty/ib-compress/**.h",
|
path.join(BGFX_DIR, "3rdparty/ib-compress/**.h"),
|
||||||
BGFX_DIR .. "3rdparty/ocornut-imgui/**.cpp",
|
path.join(BGFX_DIR, "3rdparty/ocornut-imgui/**.cpp"),
|
||||||
BGFX_DIR .. "3rdparty/ocornut-imgui/**.h",
|
path.join(BGFX_DIR, "3rdparty/ocornut-imgui/**.h"),
|
||||||
BGFX_DIR .. "examples/common/**.cpp",
|
path.join(BGFX_DIR, "examples/common/**.cpp"),
|
||||||
BGFX_DIR .. "examples/common/**.h",
|
path.join(BGFX_DIR, "examples/common/**.h"),
|
||||||
}
|
}
|
||||||
|
|
||||||
if _OPTIONS["with-sdl"] then
|
if _OPTIONS["with-sdl"] then
|
||||||
|
|
|
@ -45,16 +45,16 @@ solution "bgfx"
|
||||||
language "C++"
|
language "C++"
|
||||||
startproject "example-00-helloworld"
|
startproject "example-00-helloworld"
|
||||||
|
|
||||||
BGFX_DIR = (path.getabsolute("..") .. "/")
|
BGFX_DIR = path.getabsolute("..")
|
||||||
local BGFX_BUILD_DIR = (BGFX_DIR .. ".build/")
|
local BGFX_BUILD_DIR = path.join(BGFX_DIR, ".build")
|
||||||
local BGFX_THIRD_PARTY_DIR = (BGFX_DIR .. "3rdparty/")
|
local BGFX_THIRD_PARTY_DIR = path.join(BGFX_DIR, "3rdparty")
|
||||||
BX_DIR = (BGFX_DIR .. "../bx/")
|
BX_DIR = path.getabsolute(path.join(BGFX_DIR, "../bx"))
|
||||||
|
|
||||||
defines {
|
defines {
|
||||||
"BX_CONFIG_ENABLE_MSVC_LEVEL4_WARNINGS=1"
|
"BX_CONFIG_ENABLE_MSVC_LEVEL4_WARNINGS=1"
|
||||||
}
|
}
|
||||||
|
|
||||||
dofile (BX_DIR .. "scripts/toolchain.lua")
|
dofile (path.join(BX_DIR, "scripts/toolchain.lua"))
|
||||||
if not toolchain(BGFX_BUILD_DIR, BGFX_THIRD_PARTY_DIR) then
|
if not toolchain(BGFX_BUILD_DIR, BGFX_THIRD_PARTY_DIR) then
|
||||||
return -- no action specified
|
return -- no action specified
|
||||||
end
|
end
|
||||||
|
@ -80,19 +80,19 @@ function exampleProject(_name)
|
||||||
|
|
||||||
-- don't output debugdir for winphone builds
|
-- don't output debugdir for winphone builds
|
||||||
if "winphone81" ~= _OPTIONS["vs"] then
|
if "winphone81" ~= _OPTIONS["vs"] then
|
||||||
debugdir (BGFX_DIR .. "examples/runtime/")
|
debugdir (path.join(BGFX_DIR, "examples/runtime"))
|
||||||
end
|
end
|
||||||
|
|
||||||
includedirs {
|
includedirs {
|
||||||
BX_DIR .. "include",
|
path.join(BX_DIR, "include"),
|
||||||
BGFX_DIR .. "include",
|
path.join(BGFX_DIR, "include"),
|
||||||
BGFX_DIR .. "3rdparty",
|
path.join(BGFX_DIR, "3rdparty"),
|
||||||
BGFX_DIR .. "examples/common",
|
path.join(BGFX_DIR, "examples/common"),
|
||||||
}
|
}
|
||||||
|
|
||||||
files {
|
files {
|
||||||
BGFX_DIR .. "examples/" .. _name .. "/**.cpp",
|
path.join(BGFX_DIR, "examples", _name, "**.cpp"),
|
||||||
BGFX_DIR .. "examples/" .. _name .. "/**.h",
|
path.join(BGFX_DIR, "examples", _name, "**.h"),
|
||||||
}
|
}
|
||||||
|
|
||||||
links {
|
links {
|
||||||
|
@ -120,10 +120,10 @@ function exampleProject(_name)
|
||||||
}
|
}
|
||||||
|
|
||||||
configuration { "x32" }
|
configuration { "x32" }
|
||||||
libdirs { "$(OVR_DIR)/LibOVR/Lib/Win32/" .. _ACTION }
|
libdirs { path.join("$(OVR_DIR)/LibOVR/Lib/Win32", _ACTION) }
|
||||||
|
|
||||||
configuration { "x64" }
|
configuration { "x64" }
|
||||||
libdirs { "$(OVR_DIR)/LibOVR/Lib/x64/" .. _ACTION }
|
libdirs { path.join("$(OVR_DIR)/LibOVR/Lib/x64", _ACTION) }
|
||||||
|
|
||||||
configuration { "x32", "Debug" }
|
configuration { "x32", "Debug" }
|
||||||
links { "libovrd" }
|
links { "libovrd" }
|
||||||
|
@ -177,8 +177,8 @@ function exampleProject(_name)
|
||||||
"/ignore:4264" -- LNK4264: archiving object file compiled with /ZW into a static library; note that when authoring Windows Runtime types it is not recommended to link with a static library that contains Windows Runtime metadata
|
"/ignore:4264" -- LNK4264: archiving object file compiled with /ZW into a static library; note that when authoring Windows Runtime types it is not recommended to link with a static library that contains Windows Runtime metadata
|
||||||
}
|
}
|
||||||
-- WinRT targets need their own output directories are build files stomp over each other
|
-- WinRT targets need their own output directories are build files stomp over each other
|
||||||
targetdir (BGFX_BUILD_DIR .. "arm_" .. _ACTION .. "/bin/" .. _name)
|
targetdir (path.join(BGFX_BUILD_DIR, "arm_" .. _ACTION, "bin", _name))
|
||||||
objdir (BGFX_BUILD_DIR .. "arm_" .. _ACTION .. "/obj/" .. _name)
|
objdir (path.join(BGFX_BUILD_DIR, "arm_" .. _ACTION, "obj", _name))
|
||||||
|
|
||||||
configuration { "mingw-clang" }
|
configuration { "mingw-clang" }
|
||||||
kind "ConsoleApp"
|
kind "ConsoleApp"
|
||||||
|
@ -236,7 +236,7 @@ function exampleProject(_name)
|
||||||
|
|
||||||
configuration { "osx" }
|
configuration { "osx" }
|
||||||
files {
|
files {
|
||||||
BGFX_DIR .. "examples/common/**.mm",
|
path.join(BGFX_DIR, "examples/common/**.mm"),
|
||||||
}
|
}
|
||||||
links {
|
links {
|
||||||
"Cocoa.framework",
|
"Cocoa.framework",
|
||||||
|
@ -246,7 +246,7 @@ function exampleProject(_name)
|
||||||
configuration { "ios*" }
|
configuration { "ios*" }
|
||||||
kind "ConsoleApp"
|
kind "ConsoleApp"
|
||||||
files {
|
files {
|
||||||
BGFX_DIR .. "examples/common/**.mm",
|
path.join(BGFX_DIR, "examples/common/**.mm"),
|
||||||
}
|
}
|
||||||
linkoptions {
|
linkoptions {
|
||||||
"-framework CoreFoundation",
|
"-framework CoreFoundation",
|
||||||
|
@ -259,7 +259,7 @@ function exampleProject(_name)
|
||||||
configuration { "xcode4", "ios" }
|
configuration { "xcode4", "ios" }
|
||||||
kind "WindowedApp"
|
kind "WindowedApp"
|
||||||
files {
|
files {
|
||||||
BGFX_DIR .. "examples/runtime/iOS-Info.plist"
|
path.join(BGFX_DIR, "examples/runtime/iOS-Info.plist"),
|
||||||
}
|
}
|
||||||
|
|
||||||
configuration { "qnx*" }
|
configuration { "qnx*" }
|
||||||
|
|
|
@ -8,21 +8,21 @@ project "geometryc"
|
||||||
kind "ConsoleApp"
|
kind "ConsoleApp"
|
||||||
|
|
||||||
includedirs {
|
includedirs {
|
||||||
BX_DIR .. "include",
|
path.join(BX_DIR, "include"),
|
||||||
BGFX_DIR .. "include",
|
path.join(BGFX_DIR, "include"),
|
||||||
BGFX_DIR .. "3rdparty",
|
path.join(BGFX_DIR, "3rdparty"),
|
||||||
BGFX_DIR .. "examples/common",
|
path.join(BGFX_DIR, "examples/common"),
|
||||||
}
|
}
|
||||||
|
|
||||||
files {
|
files {
|
||||||
BGFX_DIR .. "3rdparty/forsyth-too/**.cpp",
|
path.join(BGFX_DIR, "3rdparty/forsyth-too/**.cpp"),
|
||||||
BGFX_DIR .. "3rdparty/forsyth-too/**.h",
|
path.join(BGFX_DIR, "3rdparty/forsyth-too/**.h"),
|
||||||
BGFX_DIR .. "3rdparty/ib-compress/**.cpp",
|
path.join(BGFX_DIR, "3rdparty/ib-compress/**.cpp"),
|
||||||
BGFX_DIR .. "3rdparty/ib-compress/**.h",
|
path.join(BGFX_DIR, "3rdparty/ib-compress/**.h"),
|
||||||
BGFX_DIR .. "src/vertexdecl.**",
|
path.join(BGFX_DIR, "src/vertexdecl.**"),
|
||||||
BGFX_DIR .. "tools/geometryc/**.cpp",
|
path.join(BGFX_DIR, "tools/geometryc/**.cpp"),
|
||||||
BGFX_DIR .. "tools/geometryc/**.h",
|
path.join(BGFX_DIR, "tools/geometryc/**.h"),
|
||||||
BGFX_DIR .. "examples/common/bounds.**",
|
path.join(BGFX_DIR, "examples/common/bounds.**"),
|
||||||
}
|
}
|
||||||
|
|
||||||
configuration { "osx" }
|
configuration { "osx" }
|
||||||
|
|
|
@ -8,12 +8,12 @@ project "makedisttex"
|
||||||
kind "ConsoleApp"
|
kind "ConsoleApp"
|
||||||
|
|
||||||
includedirs {
|
includedirs {
|
||||||
BX_DIR .. "include",
|
path.join(BX_DIR, "include"),
|
||||||
BGFX_DIR .. "3rdparty",
|
path.join(BGFX_DIR, "3rdparty"),
|
||||||
}
|
}
|
||||||
|
|
||||||
files {
|
files {
|
||||||
BGFX_DIR .. "3rdparty/edtaa3/**.cpp",
|
path.join(BGFX_DIR, "3rdparty/edtaa3/**.cpp"),
|
||||||
BGFX_DIR .. "3rdparty/edtaa3/**.h",
|
path.join(BGFX_DIR, "3rdparty/edtaa3/**.h"),
|
||||||
BGFX_DIR .. "tools/makedisttex.cpp",
|
path.join(BGFX_DIR, "tools/makedisttex.cpp"),
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,16 +7,16 @@ project "shaderc"
|
||||||
uuid "f3cd2e90-52a4-11e1-b86c-0800200c9a66"
|
uuid "f3cd2e90-52a4-11e1-b86c-0800200c9a66"
|
||||||
kind "ConsoleApp"
|
kind "ConsoleApp"
|
||||||
|
|
||||||
local GLSL_OPTIMIZER = (BGFX_DIR .. "3rdparty/glsl-optimizer/")
|
local GLSL_OPTIMIZER = path.join(BGFX_DIR, "3rdparty/glsl-optimizer")
|
||||||
local FCPP_DIR = (BGFX_DIR .. "3rdparty/fcpp/")
|
local FCPP_DIR = path.join(BGFX_DIR, "3rdparty/fcpp")
|
||||||
|
|
||||||
includedirs {
|
includedirs {
|
||||||
GLSL_OPTIMIZER .. "src",
|
path.join(GLSL_OPTIMIZER, "src"),
|
||||||
}
|
}
|
||||||
|
|
||||||
configuration { "vs*" }
|
configuration { "vs*" }
|
||||||
includedirs {
|
includedirs {
|
||||||
GLSL_OPTIMIZER .. "src/glsl/msvc",
|
path.join(GLSL_OPTIMIZER, "src/glsl/msvc"),
|
||||||
}
|
}
|
||||||
|
|
||||||
defines { -- glsl-optimizer
|
defines { -- glsl-optimizer
|
||||||
|
@ -43,7 +43,7 @@ project "shaderc"
|
||||||
|
|
||||||
configuration { "windows", "vs*" }
|
configuration { "windows", "vs*" }
|
||||||
includedirs {
|
includedirs {
|
||||||
GLSL_OPTIMIZER .. "include/c99",
|
path.join(GLSL_OPTIMIZER, "include/c99"),
|
||||||
}
|
}
|
||||||
|
|
||||||
configuration { "windows" }
|
configuration { "windows" }
|
||||||
|
@ -67,49 +67,49 @@ project "shaderc"
|
||||||
}
|
}
|
||||||
|
|
||||||
includedirs {
|
includedirs {
|
||||||
BX_DIR .. "include",
|
path.join(BX_DIR, "include"),
|
||||||
BGFX_DIR .. "include",
|
path.join(BGFX_DIR, "include"),
|
||||||
|
|
||||||
FCPP_DIR,
|
FCPP_DIR,
|
||||||
|
|
||||||
GLSL_OPTIMIZER .. "include",
|
path.join(GLSL_OPTIMIZER, "include"),
|
||||||
GLSL_OPTIMIZER .. "src/mesa",
|
path.join(GLSL_OPTIMIZER, "src/mesa"),
|
||||||
GLSL_OPTIMIZER .. "src/mapi",
|
path.join(GLSL_OPTIMIZER, "src/mapi"),
|
||||||
GLSL_OPTIMIZER .. "src/glsl",
|
path.join(GLSL_OPTIMIZER, "src/glsl"),
|
||||||
}
|
}
|
||||||
|
|
||||||
files {
|
files {
|
||||||
BGFX_DIR .. "tools/shaderc/**.cpp",
|
path.join(BGFX_DIR, "tools/shaderc/**.cpp"),
|
||||||
BGFX_DIR .. "tools/shaderc/**.h",
|
path.join(BGFX_DIR, "tools/shaderc/**.h"),
|
||||||
BGFX_DIR .. "src/vertexdecl.**",
|
path.join(BGFX_DIR, "src/vertexdecl.**"),
|
||||||
|
|
||||||
FCPP_DIR .. "**.h",
|
path.join(FCPP_DIR, "**.h"),
|
||||||
FCPP_DIR .. "cpp1.c",
|
path.join(FCPP_DIR, "cpp1.c"),
|
||||||
FCPP_DIR .. "cpp2.c",
|
path.join(FCPP_DIR, "cpp2.c"),
|
||||||
FCPP_DIR .. "cpp3.c",
|
path.join(FCPP_DIR, "cpp3.c"),
|
||||||
FCPP_DIR .. "cpp4.c",
|
path.join(FCPP_DIR, "cpp4.c"),
|
||||||
FCPP_DIR .. "cpp5.c",
|
path.join(FCPP_DIR, "cpp5.c"),
|
||||||
FCPP_DIR .. "cpp6.c",
|
path.join(FCPP_DIR, "cpp6.c"),
|
||||||
FCPP_DIR .. "cpp6.c",
|
path.join(FCPP_DIR, "cpp6.c"),
|
||||||
|
|
||||||
GLSL_OPTIMIZER .. "src/mesa/**.c",
|
path.join(GLSL_OPTIMIZER, "src/mesa/**.c"),
|
||||||
GLSL_OPTIMIZER .. "src/glsl/**.cpp",
|
path.join(GLSL_OPTIMIZER, "src/glsl/**.cpp"),
|
||||||
GLSL_OPTIMIZER .. "src/mesa/**.h",
|
path.join(GLSL_OPTIMIZER, "src/mesa/**.h"),
|
||||||
GLSL_OPTIMIZER .. "src/glsl/**.c",
|
path.join(GLSL_OPTIMIZER, "src/glsl/**.c"),
|
||||||
GLSL_OPTIMIZER .. "src/glsl/**.cpp",
|
path.join(GLSL_OPTIMIZER, "src/glsl/**.cpp"),
|
||||||
GLSL_OPTIMIZER .. "src/glsl/**.h",
|
path.join(GLSL_OPTIMIZER, "src/glsl/**.h"),
|
||||||
GLSL_OPTIMIZER .. "src/util/**.c",
|
path.join(GLSL_OPTIMIZER, "src/util/**.c"),
|
||||||
GLSL_OPTIMIZER .. "src/util/**.h",
|
path.join(GLSL_OPTIMIZER, "src/util/**.h"),
|
||||||
}
|
}
|
||||||
|
|
||||||
excludes {
|
excludes {
|
||||||
GLSL_OPTIMIZER .. "src/glsl/glcpp/glcpp.c",
|
path.join(GLSL_OPTIMIZER, "src/glsl/glcpp/glcpp.c"),
|
||||||
GLSL_OPTIMIZER .. "src/glsl/glcpp/tests/**",
|
path.join(GLSL_OPTIMIZER, "src/glsl/glcpp/tests/**"),
|
||||||
GLSL_OPTIMIZER .. "src/glsl/glcpp/**.l",
|
path.join(GLSL_OPTIMIZER, "src/glsl/glcpp/**.l"),
|
||||||
GLSL_OPTIMIZER .. "src/glsl/glcpp/**.y",
|
path.join(GLSL_OPTIMIZER, "src/glsl/glcpp/**.y"),
|
||||||
GLSL_OPTIMIZER .. "src/glsl/ir_set_program_inouts.cpp",
|
path.join(GLSL_OPTIMIZER, "src/glsl/ir_set_program_inouts.cpp"),
|
||||||
GLSL_OPTIMIZER .. "src/glsl/main.cpp",
|
path.join(GLSL_OPTIMIZER, "src/glsl/main.cpp"),
|
||||||
GLSL_OPTIMIZER .. "src/glsl/builtin_stubs.cpp",
|
path.join(GLSL_OPTIMIZER, "src/glsl/builtin_stubs.cpp"),
|
||||||
}
|
}
|
||||||
|
|
||||||
strip()
|
strip()
|
||||||
|
|
|
@ -8,15 +8,15 @@ project "texturec"
|
||||||
kind "ConsoleApp"
|
kind "ConsoleApp"
|
||||||
|
|
||||||
includedirs {
|
includedirs {
|
||||||
BX_DIR .. "include",
|
path.join(BX_DIR, "include"),
|
||||||
BGFX_DIR .. "include",
|
path.join(BGFX_DIR, "include"),
|
||||||
BGFX_DIR .. "src",
|
path.join(BGFX_DIR, "src"),
|
||||||
}
|
}
|
||||||
|
|
||||||
files {
|
files {
|
||||||
BGFX_DIR .. "src/image.*",
|
path.join(BGFX_DIR, "src/image.*"),
|
||||||
BGFX_DIR .. "tools/texturec/**.cpp",
|
path.join(BGFX_DIR, "tools/texturec/**.cpp"),
|
||||||
BGFX_DIR .. "tools/texturec/**.h",
|
path.join(BGFX_DIR, "tools/texturec/**.h"),
|
||||||
}
|
}
|
||||||
|
|
||||||
links {
|
links {
|
||||||
|
|
Loading…
Reference in a new issue