@@ -364,7 +364,7 @@ def get_windows_args():
364364 cmake args for windows platform.
365365 """
366366 result_args = []
367- result_args .append ('-G \" Visual Studio 16 2019\" ' )
367+ result_args .append ('-G Visual Studio 16 2019' )
368368 result_args .append ('-A x64' ) # TODO flexibily for x32
369369 result_args .append ("-DFIREBASE_PYTHON_HOST_EXECUTABLE:FILEPATH=%s" % sys .executable )
370370 return result_args
@@ -537,15 +537,22 @@ def main(argv):
537537 os .chdir (build_path )
538538 cmake_setup_args = [
539539 "cmake" ,
540- source_path ,
541- "-DFIREBASE_INCLUDE_UNITY=ON" ,
542- "-DFIREBASE_UNITY_BUILD_TESTS=ON" ,
543- "-DFIREBASE_CPP_BUILD_STUB_TESTS=ON" ,
540+ source_path
544541 ]
545542
546543 if FLAGS .verbose :
547544 cmake_setup_args .append ('-DCMAKE_VERBOSE_MAKEFILE=1' )
548545
546+ if is_windows_build ():
547+ # windows args need to happen right after target path
548+ cmake_setup_args .extend (get_windows_args ())
549+
550+ cmake_setup_args .extend ([
551+ "-DFIREBASE_INCLUDE_UNITY=ON" ,
552+ "-DFIREBASE_UNITY_BUILD_TESTS=ON" ,
553+ "-DFIREBASE_CPP_BUILD_STUB_TESTS=ON" ,
554+ ])
555+
549556 unity_root_args = get_unity_engine_folder_args (FLAGS .unity_root )
550557 if unity_root_args :
551558 cmake_setup_args .append (unity_root_args )
@@ -566,8 +573,6 @@ def main(argv):
566573 cmake_setup_args .extend (get_ios_args (source_path ))
567574 elif is_android_build ():
568575 cmake_setup_args .extend (get_android_args ())
569- elif is_windows_build ():
570- cmake_setup_args .extend (get_windows_args ())
571576 elif is_macos_build ():
572577 cmake_setup_args .extend (get_macos_args ())
573578
@@ -585,7 +590,11 @@ def main(argv):
585590 make_macos_multi_arch_build (cmake_setup_args )
586591 else :
587592 subprocess .call (cmake_setup_args )
588- subprocess .call ("make" )
593+ if is_windows_build ():
594+ # no make command in windows. TODO make config passable
595+ subprocess .call ("cmake --build . --config Release" )
596+ else :
597+ subprocess .call ("make" )
589598
590599 cmake_pack_args = [
591600 "cpack" ,
0 commit comments