Unable to get Urho3D built on Mac

Unfortunately it looks like it’s still failing using the fix you suggested.

Ok. Thanks for testing it. In that case we will have to investigate it further later.

If you’re looking to just play around a bit while the XCode build system is fixed, you could try the cmake_generic.sh build process. That’s what I use since I’ve never been able to get the official XCode Mac build script to work for me. I’m using a 2011 Macbook w/ Yosemite and build using the following steps. Anyone who knows better, suggestions please! Note, this is for the current development version of Urho3D available from the github repository (date of this post).

EDIT: I’ve facepalm figured out how to build the xcode version of the latest github code. I’ve modified the steps below to account for this.

  1. Install Homebrew (it makes life easier)

2a) Install rake and cmake (using homebrew)

brew install rake cmake

2b) Optionally, install doxygen and graphviz to generate beautiful local documentation

brew install doxygen graphviz
  1. Download the Urho3D source either using git or manually.
git clone https://github.com/urho3d/Urho3D.git urho
  1. Build the SDK, samples, documentation, extra tools, etc. Set to 0 anything you don’t want. Note, when you later want to simply update the sdk based on updated Urho3D source, you won’t necessarily need to generate samples, docs, and extras again.
cd urho
./cmake_generic.sh . -DURHO3D_SAMPLES=1 -DURHO3D_DOCS=1 -DURHO3D_EXTRAS=1
  1. Use the make command to build Urho3D, specifying the number of cores you can allocate to the task (which helps a lot). I have 4 cores, so…
make -j4
  1. Let’s copy the sdk portion (include and lib dirs) of what we’ve built to a folder called ‘sdk’ just to be clear.
mkdir sdk
cp -r include lib sdk/
  1. Create a new dir for your new project, let’s call it ‘test’.
rake scaffolding dir=test project=Test target=test
  1. Your project dir called ‘test’ should now exist. Now the automated scaffolding has placed the Urho3DPlayer source files as working placeholders in your new project dir. Any source files you place in this dir will be included in a build for your project. In other words, if you add or remove source files, then you need to rerun step 8 commands. Let’s create a mac build target for your project, leaving the placeholder code there for now (or replace it with something you’re equally confident will work).
cd test
./cmake_macosx.sh mac-build -DURHO3D_HOME=$PWD/../ -DURHO3D_INCLUDE_DIRS=$PWD/../sdk/include/Urho3D -DURHO3D_LIBRARIES=$PWD/../sdk/lib/libUrho3D.a
  1. Compile your build for mac.
cd mac-build
make -j4
  1. Before running your executable, you’ll need the CoreData and Data dirs. Copy (or symbolically link) the bin/CoreData and bin/Data dirs from the base urho dir to your project bin dir.
cp -r ../../bin/CoreData bin/CoreData
cp -r ../../bin/Data bin/Data
  1. You will find your executable in the bin dir. The path in total from the root urho dir should be urho/test/mac-build/bin/

I’m still a bumbling noob myself, so hope to get some useful feedback here too (like “why didn’t you see obvious thread xyz describing this?” probably)

Nice! Thank you very much. I will try this method out.