diff options
| author | ruki <[email protected]> | 2022-03-27 18:50:02 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2022-03-27 18:51:15 +0800 |
| commit | b178f763015779488df34e75990667eccb82521a (patch) | |
| tree | c4bf611e1876180198646f7c01e51af6e051484e | |
| parent | 0c51d82b9c4ed8762f11e6a52450c23918cfc49e (diff) | |
save installdir and remotedir
| -rw-r--r-- | xmake/core/package/package.lua | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/xmake/core/package/package.lua b/xmake/core/package/package.lua index 5c55850bb..c7ae4901b 100644 --- a/xmake/core/package/package.lua +++ b/xmake/core/package/package.lua @@ -292,6 +292,12 @@ function _instance:artifacts_set(artifacts_info) envs[k] = v end end + -- save the remote install directory to fix the install path in .cmake/.pc files for precompiled artifacts + -- + -- @see https://github.com/xmake-io/xmake/issues/2210 + -- + manifest.artifacts = manifest.artifacts or {} + manifest.artifacts.remotedir = manifest.artifacts.installdir end) self._IS_PRECOMPILED = true end @@ -731,6 +737,17 @@ function _instance:manifest_save() manifest.repo.commit = repo:commit() end + -- save artifacts information to fix the install path in .cmake/.pc files for precompiled artifacts + -- + -- @see https://github.com/xmake-io/xmake/issues/2210 + -- + manifest.artifacts = {} + manifest.artifacts.installdir = self:installdir() + local current_manifest = self:manifest_load() + if current_manifest and current_manifest.artifacts then + manifest.artifacts.remotedir = current_manifest.artifacts.remotedir + end + -- save manifest local ok, errors = io.save(self:manifest_file(), manifest) if not ok then |
