diff --git a/README.md b/README.md index 3cf550ca..676191c1 100644 --- a/README.md +++ b/README.md @@ -329,6 +329,15 @@ Visual Studio 2008 IDE: start .build/projects/vs2008/bgfx.sln +Xcode 5 IDE: + + open .build/projects/xcode4/bgfx.xcworkspace +Due to [inability](http://industriousone.com/debugdir) to set working directory for an Xcode project from premake configuration file, it has to be set manually for each example project: + +1. Open *"Edit scheme..."* dialog for a given project. +2. Select *"Run"* settings. +3. Check *"Use custom working directory"* and enter following path: `${PROJECT_DIR}/../../../examples/runtime`. + Linux 64-bit: make linux-release64 diff --git a/premake/bgfx.lua b/premake/bgfx.lua index 755fd703..21adc779 100644 --- a/premake/bgfx.lua +++ b/premake/bgfx.lua @@ -43,7 +43,7 @@ function bgfxProject(_name, _uuid, _kind, _defines) "gdi32", } - configuration { "osx or ios*" } + configuration { "xcode4 or osx or ios*" } files { BGFX_DIR .. "src/**.mm", } @@ -53,7 +53,7 @@ function bgfxProject(_name, _uuid, _kind, _defines) "Cocoa.framework", } - configuration { "vs* or linux or mingw or osx or ios*" } + configuration { "vs* or linux or mingw or osx or xcode4 or ios*" } includedirs { --nacl has GLES2 headers modified... BGFX_DIR .. "3rdparty/khronos", diff --git a/premake/example-common.lua b/premake/example-common.lua index 81846419..67a764d5 100644 --- a/premake/example-common.lua +++ b/premake/example-common.lua @@ -21,3 +21,8 @@ project ("example-common") BGFX_DIR .. "examples/common/**.cpp", BGFX_DIR .. "examples/common/**.h", } + + configuration { "xcode4" } + includedirs { + BX_DIR .. "include/compat/osx", + } diff --git a/premake/premake4.lua b/premake/premake4.lua index 7b680ae0..64384e03 100644 --- a/premake/premake4.lua +++ b/premake/premake4.lua @@ -134,6 +134,19 @@ function exampleProject(_name, _uuid) -- "SDL2", } + configuration { "xcode4" } + platforms { + "Universal" + } + files { + BGFX_DIR .. "examples/common/**.mm", + } + links { + "Cocoa.framework", + "Foundation.framework", + "OpenGL.framework", + } + configuration { "ios*" } kind "ConsoleApp" files {