diff options
| author | ruki <[email protected]> | 2025-06-18 00:54:25 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2025-06-18 00:54:25 +0800 |
| commit | a92bcb8f105d6692d0ef7186bd3d8fc9a12d9b88 (patch) | |
| tree | 48105bbc94d3ade19bdcc405f6c246892e076347 | |
| parent | 0d9bbf140f453a6736620cf90a77fad7d175b6ef (diff) | |
fix conan profile
| -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 |
