message: Add support for Ninja generator
  Fixes baldurk/renderdoc#1126
diff: @@ -84,6 +84,12 @@ if(APPLE)
  set(SWIG_CONFIGURE_CXX "")
  endif()
  +set( GENERATOR_MAKE "$(MAKE)" )
  +if( CMAKE_MAKE_PROGRAM MATCHES "ninja$" )
  + message( "Ninja detected. Some projects compiled using add_custom_command like swig and QRenderDoc target will still be using make" )
  + set( GENERATOR_MAKE "make" )
  +endif()
  +
  # Compile our custom SWIG that will do scoped/strong enum classes
  ExternalProject_Add(custom_swig
  # using an URL to a zip directly so we don't clone the history etc
  @@ -91,8 +97,8 @@ ExternalProject_Add(custom_swig
  BUILD_IN_SOURCE 1
  CONFIGURE_COMMAND ./autogen.sh > /dev/null 2>&1
  COMMAND CC=${SWIG_CONFIGURE_CC} CXX=${SWIG_CONFIGURE_CXX} CFLAGS=-fPIC CXXFLAGS=-fPIC ./configure --with-pcre=yes --prefix=${CMAKE_BINARY_DIR} > /dev/null
  - BUILD_COMMAND $(MAKE) > /dev/null 2>&1
  - INSTALL_COMMAND $(MAKE) install > /dev/null 2>&1)
  + BUILD_COMMAND ${GENERATOR_MAKE} > /dev/null 2>&1
  + INSTALL_COMMAND ${GENERATOR_MAKE} install > /dev/null 2>&1)
  # Lastly find PySide 2, optionally, for Qt5 Python bindings
  list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}")
  @@ -235,7 +241,7 @@ if(ENABLE_QRENDERDOC)
  # can do dependency checking and rebuild anything necessary.
  add_custom_command(OUTPUT QRenderDoc
  COMMAND ${QMAKE_QT5_COMMAND} "CMAKE_DIR=${CMAKE_BINARY_DIR}" ${CMAKE_CURRENT_SOURCE_DIR}
  - COMMAND $(MAKE)
  + COMMAND ${GENERATOR_MAKE}
  DEPENDS RenderDoc.icns)
  add_custom_target(build-qrenderdoc ALL DEPENDS QRenderDoc DEPENDS renderdoc DEPENDS swig-bindings)
  