diff options
| author | ruki <[email protected]> | 2020-11-21 22:07:28 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2020-11-21 22:07:28 +0800 |
| commit | 1eb2ac7dc458eca00f72173e3ec4a971e3edc790 (patch) | |
| tree | 2516077acc5b2e6a4608d9916f47f9dc2afa91a9 | |
| parent | 287d1e2ca2bd376d488f91d58dd36f45d2a3cf6a (diff) | |
fix external packages
| -rw-r--r-- | xmake/core/package/package.lua | 2 | ||||
| -rw-r--r-- | xmake/modules/lib/detect/find_package.lua | 4 | ||||
| -rw-r--r-- | xmake/modules/package/tools/cmake.lua | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/xmake/core/package/package.lua b/xmake/core/package/package.lua index 4361cb29d..12732b613 100644 --- a/xmake/core/package/package.lua +++ b/xmake/core/package/package.lua @@ -859,7 +859,7 @@ function _instance:fetch(opt) -- attempt to get it from cache local fetchinfo = self._FETCHINFO - if not opt.force and fetchinfo then + if not opt.force and opt.external == nil and fetchinfo then return fetchinfo end diff --git a/xmake/modules/lib/detect/find_package.lua b/xmake/modules/lib/detect/find_package.lua index 24abcb8ad..446abc432 100644 --- a/xmake/modules/lib/detect/find_package.lua +++ b/xmake/modules/lib/detect/find_package.lua @@ -66,8 +66,8 @@ function main(name, opt) if opt.mode then key = key .. "_" .. opt.mode end - if opt.isystem then - key = key .. "_isystem" + if opt.external then + key = key .. "_external" end -- attempt to get result from cache first diff --git a/xmake/modules/package/tools/cmake.lua b/xmake/modules/package/tools/cmake.lua index 05695afa3..f561c9f9f 100644 --- a/xmake/modules/package/tools/cmake.lua +++ b/xmake/modules/package/tools/cmake.lua @@ -42,7 +42,7 @@ function _get_cflags_from_packagedeps(package, opt) if dep then local fetchinfo = dep:fetch({external = false}) if fetchinfo then - table.join2(result, compiler.map_flags("cxx", "define", fetchinfo.includedirs)) + table.join2(result, compiler.map_flags("cxx", "define", fetchinfo.defines)) table.join2(result, compiler.map_flags("cxx", "includedir", fetchinfo.includedirs)) table.join2(result, compiler.map_flags("cxx", "sysincludedir", fetchinfo.sysincludedirs)) end |
