compile BGFX for RPI as well (nw)

This commit is contained in:
Miodrag Milanovic 2016-03-19 16:09:00 +01:00
parent 6590600990
commit 95a2e4c2c6
5 changed files with 22 additions and 4 deletions

View File

@ -1128,6 +1128,13 @@ configuration { "rpi" }
links {
"SDL2",
"fontconfig",
"X11",
"GLESv2",
"EGL",
"bcm_host",
"vcos",
"vchiq_arm",
"pthread",
}
configuration { "osx* or xcode4" }

View File

@ -726,6 +726,14 @@ end
"-Wno-uninitialized",
"-Wno-unused-function",
}
configuration { "rpi" }
buildoptions {
"-Wno-unused-but-set-variable",
"-Wno-unused-variable",
}
defines {
"__STDC_VERSION__=199901L",
}
configuration { }

View File

@ -103,6 +103,9 @@ end
configuration { "mingw*" or "vs*" }
targetextension ".exe"
configuration { "rpi" }
targetextension ""
configuration { "asmjs" }
targetextension ".bc"
if os.getenv("EMSCRIPTEN") then

View File

@ -531,9 +531,9 @@ function toolchain(_buildDir, _subDir)
"$(RASPBERRY_SYSROOT)/opt/vc/include/interface/vcos/pthreads",
"$(RASPBERRY_SYSROOT)/opt/vc/include/interface/vmcs_host/linux",
}
links {
"rt",
}
defines {
"__VCCOREVER__=0x04000000", -- There is no special prefedined compiler symbol to detect RaspberryPi, faking it.
}
linkoptions {
"-Wl,--gc-sections",
}

View File

@ -84,7 +84,7 @@ static void* sdlNativeWindowHandle(SDL_Window* _window)
return nullptr;
}
# if BX_PLATFORM_LINUX || BX_PLATFORM_BSD
# if BX_PLATFORM_LINUX || BX_PLATFORM_BSD || BX_PLATFORM_RPI
return (void*)wmi.info.x11.window;
# elif BX_PLATFORM_OSX
return wmi.info.cocoa.window;