From a334cdc7afe285fbd0ed7f3c8ff6974528813552 Mon Sep 17 00:00:00 2001 From: Jon Date: Fri, 1 Jun 2012 11:12:07 -0400 Subject: Update CMake to enable normal Xcode workflows Similar to the existing CMake Visual Studio IDE support, allow CMake to generate Xcode project files in mruby's root directory. This enables workflows normally expected by Xcode IDE users. --- CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index ee97ad8b4..8e176c08a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -33,8 +33,8 @@ project(mruby C) # TODO stop polluting source tree with CMakeFiles/ and CMakeCache.txt # on build location check failure # Make sure we are not trying to generate in in-tree build unless building -# with a MSVC IDE where it's OK. -if(CMAKE_SOURCE_DIR STREQUAL CMAKE_BINARY_DIR AND NOT MSVC_IDE) +# with an MSVC or Xcode IDE where it's OK. +if(CMAKE_SOURCE_DIR STREQUAL CMAKE_BINARY_DIR AND NOT (MSVC_IDE OR XCODE)) message(FATAL_ERROR "\nIn-source builds are not allowed as CMake would overwrite the " "Makefiles distributed with mruby. Please change to the 'build' " -- cgit v1.2.3 From 84207b2e0f14d2a8fd1ccc435b0c27f30b2ecce8 Mon Sep 17 00:00:00 2001 From: Jon Date: Fri, 1 Jun 2012 11:20:28 -0400 Subject: Update in-source build error message --- CMakeLists.txt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 8e176c08a..c8b252d2d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -37,8 +37,9 @@ project(mruby C) if(CMAKE_SOURCE_DIR STREQUAL CMAKE_BINARY_DIR AND NOT (MSVC_IDE OR XCODE)) message(FATAL_ERROR "\nIn-source builds are not allowed as CMake would overwrite the " - "Makefiles distributed with mruby. Please change to the 'build' " - "subdirectory and run CMake from there.") + "Makefiles distributed with mruby. Delete any created 'CMakeFiles' " + "subdirectory and 'CMakeCache.txt' file from the current directory, " + "change to the 'build' subdirectory, and re-run CMake from there.") endif() if(COMMAND cmake_policy) -- cgit v1.2.3