# #Ninja lightweight build system # #Build process requires Python # #Verify that all the tools required are available. #Checking for the existence of the tools with find_package() should have been done by now. #if (NOT PYTHON_FOUND) #Requires >= version 2.7 # message (FATAL_ERROR "To build the Ninja package, please first find_package(PythonInterp REQUIRED).") #endif (NOT PYTHON_FOUND) ExternalProject_Add ( ninja PREFIX ${CMAKE_INSTALL_PREFIX} BUILD_IN_SOURCE 1 URL https://github.com/ninja-build/ninja/archive/v1.8.2.zip URL_MD5 37d8e43f336a838b9c7d6280ba10a9fa PATCH_COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_LIST_DIR}/patch . CONFIGURE_COMMAND /python2/bin/python ./configure.py --bootstrap COMMAND ${CMAKE_COMMAND} -DCMAKE_INSTALL_PREFIX= . BUILD_COMMAND "" INSTALL_COMMAND ${CMAKE_COMMAND} --build . --target install DEPENDS python2 )