Try better handling CMAKE_BUILD_TYPE if xcode (supports multi-configurations, unlike Unix Makefiles)
Rename linux build directory from viewer-* to build-*. Also have mac use the unix run_build if not using Xcode