From e8f1344bad8a30c504fdb4c678affec8e13649d4 Mon Sep 17 00:00:00 2001 From: jonforums Date: Fri, 1 Jun 2012 12:02:22 -0700 Subject: [PATCH] Add CMake Xcode build notes --- Building-mruby.md | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/Building-mruby.md b/Building-mruby.md index 511bbab..16544c1 100644 --- a/Building-mruby.md +++ b/Building-mruby.md @@ -21,10 +21,11 @@ toolchain they're most productive with. **Prerequisites:** * CMake 2.8.8, Bison, and a build toolchain on `PATH` -* CMake configuration and command line builds must be performed _outside_ the project root - directory, e.g - the `build` subirectory. If you mistakenly ran `cmake` in the root - dir, delete the generated `CMakeFiles/` directory and `CMakeCache.txt` file, `cd` to - another dir (hint: the included `build` subdir), and run `cmake` again. +* Except when generating Xcode or Visual Studio project files for IDE-based builds, CMake + configuration and command line builds must be performed _outside_ mruby's project root + directory. If you accidentally ran `cmake` in the root directory, delete the generated + `CMakeFiles/` subdirectory and `CMakeCache.txt` file, `cd` to another dir (hint: the included + `build` subdir), and re-run `cmake`. ### Native builds from the command line @@ -36,4 +37,8 @@ _in process_, see this [basic cross compiling post](http://jonforums.github.com/ ### Native OS X builds from Xcode IDE -_in process_, do not edit source that's been copied into the build directory (**TODO** elaborate!) \ No newline at end of file +From mruby's root directory, run `cmake -G Xcode .` to generate Xcode project files. Open the +`mruby.xcodeproj` file in Xcode and hack away as you would with any other project. **Note:** do not +run CMake outside the root directory in another build directory because mruby's source files will +be _copied_ to the build directory. Any edits will occur to the _copied_ source files rather than +the real mruby source files, resulting in a very awkward, and potentially broken, workflow. \ No newline at end of file