diff options
| author | ruki <[email protected]> | 2021-03-23 22:59:49 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2021-03-23 22:59:49 +0800 |
| commit | 5a05a357b8d12669d315fbb2a0e074fb2160e62c (patch) | |
| tree | 1407d6f2feafdda4f73b737a14d79dca99471ed8 /xmake/modules/target/action/install/cmake_importfiles.lua | |
| parent | 96b335a5fe5cd6d71a79776d63fa6f3eb2fa7379 (diff) | |
improve cmake path
Diffstat (limited to 'xmake/modules/target/action/install/cmake_importfiles.lua')
| -rw-r--r-- | xmake/modules/target/action/install/cmake_importfiles.lua | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/xmake/modules/target/action/install/cmake_importfiles.lua b/xmake/modules/target/action/install/cmake_importfiles.lua index ff15deba4..7bfb5d636 100644 --- a/xmake/modules/target/action/install/cmake_importfiles.lua +++ b/xmake/modules/target/action/install/cmake_importfiles.lua @@ -21,22 +21,13 @@ -- imports import("core.project.project") --- translate path -function _translate_path(p) - if is_host("windows") then - return (p:gsub("\\", "/")) - end - return p -end - -- get the builtin variables function _get_builtinvars(target, installdir) return {TARGETNAME = target:name(), PROJECTNAME = project.name() or target:name(), - TARGETFILE = _translate_path(path.absolute(target:targetfile())), + TARGETFILENAME = path.filename(target:targetfile()), TARGETKIND = target:is_shared() and "SHARED" or "STATIC", - PACKAGE_VERSION = target:get("version") or "1.0.0", - IMPORT_PREFIX = _translate_path(path.absolute(installdir))} + PACKAGE_VERSION = target:get("version") or "1.0.0"} end -- install cmake import file |
