diff --git a/CMakeLists.txt b/CMakeLists.txt index 7674943..094e023 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -88,12 +88,11 @@ if(UNIX AND NOT APPLE) # Dependencies find_package(PythonInterp REQUIRED) - set(ninja_executable ${Ninja_SOURCE_DIR}/ninja${CMAKE_EXECUTABLE_SUFFIX}) - set(bootstrap_command ${PYTHON_EXECUTABLE} configure.py --bootstrap) - # Explicitly defining _BSD_SOURCE is required to support building the wheel on Alpine. See issue #22 - set(bootstrap_command ${CMAKE_COMMAND} -E env CXXFLAGS=-D_BSD_SOURCE ${bootstrap_command}) + #configure.py is deprecated by ninja-build project. + set(ninja_executable ${Ninja_SOURCE_DIR}/cmake-build/ninja${CMAKE_EXECUTABLE_SUFFIX}) + set(local_cmake_command ${CMAKE_COMMAND} -Bcmake-build -H. && ${CMAKE_COMMAND} --build cmake-build) add_custom_command( - COMMAND ${bootstrap_command} + COMMAND ${local_cmake_command} OUTPUT ${ninja_executable} WORKING_DIRECTORY ${Ninja_SOURCE_DIR} )