@@ -620,32 +620,29 @@ def generate_build_tree(
620620 )
621621 generate_vcpkg_triplets_for_emscripten (
622622 build_dir ,
623+ configs ,
623624 emscripten_root_path ,
624625 not args .disable_rtti ,
625626 not args .disable_wasm_exception_catching ,
626627 args .minimal_build is not None ,
627628 args .enable_address_sanitizer ,
628629 )
629630 elif args .android :
630- generate_android_triplets (build_dir , args .android_cpp_shared , args .android_api )
631+ generate_android_triplets (build_dir , configs , args .android_cpp_shared , args .android_api )
631632 elif is_windows ():
632- generate_windows_triplets (build_dir , args .msvc_toolset )
633+ generate_windows_triplets (build_dir , configs , args .msvc_toolset )
633634 elif is_macOS ():
634635 osx_target = args .apple_deploy_target
635636 if args .apple_deploy_target is None :
636637 osx_target = os .environ .get ("MACOSX_DEPLOYMENT_TARGET" )
637638 if osx_target is not None :
638639 log .info (f"Setting VCPKG_OSX_DEPLOYMENT_TARGET to { osx_target } " )
639- generate_macos_triplets (build_dir , osx_target )
640+ generate_macos_triplets (build_dir , configs , osx_target )
640641 else :
641642 # Linux, *BSD, AIX or other platforms
642- generate_linux_triplets (build_dir )
643+ generate_linux_triplets (build_dir , configs )
643644 add_default_definition (cmake_extra_defines , "CMAKE_TOOLCHAIN_FILE" , str (vcpkg_toolchain_path ))
644645
645- vcpkg_install_options = generate_vcpkg_install_options (build_dir , args )
646- # VCPKG_INSTALL_OPTIONS is a CMake list. It must be joined by semicolons
647- # Therefore, if any of the option string contains a semicolon, it must be escaped
648- add_default_definition (cmake_extra_defines , "VCPKG_INSTALL_OPTIONS" , ";" .join (vcpkg_install_options ))
649646 # Choose the cmake triplet
650647 triplet = None
651648 if args .build_wasm :
@@ -1251,6 +1248,16 @@ def generate_build_tree(
12511248 ]
12521249 env = {}
12531250 if args .use_vcpkg :
1251+ # append VCPKG_INSTALL_OPTIONS
1252+ #
1253+ # VCPKG_INSTALL_OPTIONS is a CMake list. It must be joined by semicolons
1254+ # Therefore, if any of the option string contains a semicolon, it must be escaped
1255+ temp_cmake_args += [
1256+ "-DVCPKG_INSTALL_OPTIONS={}" .format (
1257+ ";" .join (generate_vcpkg_install_options (Path (build_dir ) / config , args ))
1258+ )
1259+ ]
1260+
12541261 vcpkg_keep_env_vars = ["TRT_UPLOAD_AUTH_TOKEN" ]
12551262
12561263 if args .build_wasm :
0 commit comments