diff options
| -rw-r--r-- | xmake/modules/package/manager/conan/v2/install_package.lua | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/xmake/modules/package/manager/conan/v2/install_package.lua b/xmake/modules/package/manager/conan/v2/install_package.lua index 3c4c07da7..45faca2eb 100644 --- a/xmake/modules/package/manager/conan/v2/install_package.lua +++ b/xmake/modules/package/manager/conan/v2/install_package.lua @@ -191,6 +191,9 @@ function _conan_generate_compiler_profile(profile, configs, opt) end conf = {} conf["tools.android:ndk_path"] = ndk:config("ndk") + elseif plat == "wasm" then + conf = {} + conf["tools.build:compiler_executables"] = "{'c':'emcc', 'cpp':'em++'}" else local program, toolname = platform.tool("cc", plat, arch) if toolname == "gcc" or toolname == "clang" then @@ -223,10 +226,10 @@ end function _conan_generate_build_profile(configs, opt) local profile = io.open("profile_build.txt", "w") profile:print("[settings]") - profile:print("arch=%s", configurations.arch(os.arch())) + profile:print("arch=%s", configurations.arch(opt.arch)) profile:print("build_type=%s", configurations.build_type(opt.mode)) - profile:print("os=%s", configurations.plat(os.host())) - _conan_generate_compiler_profile(profile, configs, {plat = os.host(), arch = os.arch()}) + profile:print("os=%s", configurations.plat(opt.plat)) + _conan_generate_compiler_profile(profile, configs, opt) profile:close() end @@ -234,10 +237,10 @@ end function _conan_generate_host_profile(configs, opt) local profile = io.open("profile_host.txt", "w") profile:print("[settings]") - profile:print("arch=%s", configurations.arch(opt.arch)) + profile:print("arch=%s", configurations.arch(os.arch())) profile:print("build_type=%s", configurations.build_type(opt.mode)) - profile:print("os=%s", configurations.plat(opt.plat)) - _conan_generate_compiler_profile(profile, configs, opt) + profile:print("os=%s", configurations.plat(os.host())) + _conan_generate_compiler_profile(profile, configs, {plat = os.host(), arch = os.arch()}) profile:close() end |
