@@ -601,9 +601,6 @@ function _get_configs_for_mingw(package, configs, opt)
601
601
if is_subhost (" windows" ) and opt .cmake_generator ~= " Ninja" then
602
602
envs .CMAKE_MAKE_PROGRAM = _get_mingw32_make (package )
603
603
end
604
- if opt .cmake_generator == " Ninja" then
605
- envs .CMAKE_MAKE_PROGRAM = " ninja"
606
- end
607
604
_fix_cxx_compiler_cmake (package , envs )
608
605
_insert_configs_from_envs (configs , envs , opt )
609
606
end
@@ -618,12 +615,7 @@ function _get_configs_for_wasm(package, configs, opt)
618
615
assert (emscripten_cmakefile , " Emscripten.cmake not found!" )
619
616
table.insert (configs , " -DCMAKE_TOOLCHAIN_FILE=" .. emscripten_cmakefile )
620
617
if is_subhost (" windows" ) then
621
- if opt .cmake_generator == " Ninja" then
622
- local ninja = _get_ninja (package )
623
- if ninja then
624
- table.insert (configs , " -DCMAKE_MAKE_PROGRAM=" .. ninja )
625
- end
626
- else
618
+ if opt .cmake_generator ~= " Ninja" then
627
619
local mingw_make = _get_mingw32_make (package )
628
620
if mingw_make then
629
621
table.insert (configs , " -DCMAKE_MAKE_PROGRAM=" .. mingw_make )
@@ -783,6 +775,10 @@ function _get_configs_for_generator(package, configs, opt)
783
775
table.insert (configs , " -DCMAKE_JOB_POOL_LINK:STRING=link" )
784
776
table.insert (configs , (" -DCMAKE_JOB_POOLS:STRING=compile=%s;link=%s" ):format (jobs , linkjobs ))
785
777
end
778
+ local ninja = _get_ninja (package )
779
+ if ninja then
780
+ table.insert (configs , " -DCMAKE_MAKE_PROGRAM=" .. ninja )
781
+ end
786
782
end
787
783
elseif package :is_plat (" mingw" ) and is_subhost (" msys" ) then
788
784
table.insert (configs , " -G" )
0 commit comments