diff options
| author | Saikari <[email protected]> | 2025-10-04 17:02:24 +0300 |
|---|---|---|
| committer | GitHub <[email protected]> | 2025-10-04 17:02:24 +0300 |
| commit | 0e69ae2a09410080ee90c053b5e46741020ea958 (patch) | |
| tree | 2c040099641d11924bf283e741a0371bbefae7c6 /xmake/modules | |
| parent | 05525e2450c8af5344bd1ace78d4b532955de76c (diff) | |
Update cmake_importfiles.lua
Diffstat (limited to 'xmake/modules')
| -rw-r--r-- | xmake/modules/target/action/install/cmake_importfiles.lua | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/xmake/modules/target/action/install/cmake_importfiles.lua b/xmake/modules/target/action/install/cmake_importfiles.lua index 6b3d97546..6293cfb39 100644 --- a/xmake/modules/target/action/install/cmake_importfiles.lua +++ b/xmake/modules/target/action/install/cmake_importfiles.lua @@ -38,12 +38,18 @@ end -- get the builtin variables function _get_builtinvars(target, installdir) + local target_ptrbytes + if target:is_plat("wasm") then + target_ptrbytes = target:is_arch("armeabi", "armeabi-v7a", "x86", "mips", "i386", "armv7", "armv7s", "mipsel", "wasm32") and "4" or "8" + else + target_ptrbytes = target:check_sizeof("void*") + end return {TARGETNAME = target:name(), PROJECTNAME = project.name() or target:name(), TARGETFILENAME = target:targetfile() and _get_libfile(target, installdir), TARGETKIND = target:is_headeronly() and "INTERFACE" or (target:is_shared() and "SHARED" or "STATIC"), PACKAGE_VERSION = target:get("version") or "1.0.0", - TARGET_PTRBYTES = target:check_sizeof("void*")} + TARGET_PTRBYTES = target_ptrbytes} end -- install cmake config file |
