@@ -601,10 +601,16 @@ function _get_configs_for_wasm(package, configs, opt)
601
601
local emscripten_cmakefile = find_file (" Emscripten.cmake" , path .join (emsdk .emscripten , " cmake/Modules/Platform" ))
602
602
assert (emscripten_cmakefile , " Emscripten.cmake not found!" )
603
603
table.insert (configs , " -DCMAKE_TOOLCHAIN_FILE=" .. emscripten_cmakefile )
604
- if is_subhost (" windows" ) and opt .cmake_generator ~= " Ninja" then
605
- local mingw_make = _get_mingw32_make (package )
606
- if mingw_make then
607
- table.insert (configs , " -DCMAKE_MAKE_PROGRAM=" .. mingw_make )
604
+ if is_subhost (" windows" ) then
605
+ if opt .cmake_generator ~= " Ninja" then
606
+ local mingw_make = _get_mingw32_make (package )
607
+ if mingw_make then
608
+ table.insert (configs , " -DCMAKE_MAKE_PROGRAM=" .. mingw_make )
609
+ end
610
+ else
611
+ local ninja = find_tool (" ninja" )
612
+ assert (ninja , " ninja not found!" )
613
+ table.insert (configs , " -DCMAKE_MAKE_PROGRAM=" .. ninja .program )
608
614
end
609
615
end
610
616
_get_configs_for_generic (package , configs , opt )
@@ -1214,8 +1220,9 @@ end
1214
1220
-- install package
1215
1221
function install (package , configs , opt )
1216
1222
opt = opt or {}
1217
- local cmake_generator = _get_cmake_generator (package , opt )
1223
+ _get_configs (package , configs , opt )
1218
1224
1225
+ local cmake_generator = _get_cmake_generator (package , opt )
1219
1226
-- enter build directory
1220
1227
local buildir = opt .buildir or package :buildir ()
1221
1228
os .mkdir (path .join (buildir , " install" ))
0 commit comments