diff options
| author | ruki <[email protected]> | 2021-02-21 16:49:45 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2021-02-21 16:49:45 +0800 |
| commit | 01d5ccfc69f1475826fa01a0269cb9a7419d2c73 (patch) | |
| tree | 4642961e6aaee70e9b9c931450b474919377b143 | |
| parent | 923489f49a9a83a5f1325ef84b48bb6e15d9972f (diff) | |
rename prefix: pkg-config to pkgconfig
| -rw-r--r-- | xmake/modules/lib/detect/pkgconfig.lua (renamed from xmake/modules/lib/detect/pkg_config.lua) | 24 | ||||
| -rw-r--r-- | xmake/modules/package/manager/brew/find_package.lua | 8 | ||||
| -rw-r--r-- | xmake/modules/package/manager/find_package.lua | 2 | ||||
| -rw-r--r-- | xmake/modules/package/manager/pacman/find_package.lua | 2 | ||||
| -rw-r--r-- | xmake/modules/package/manager/pkgconfig/find_package.lua (renamed from xmake/modules/package/manager/pkg_config/find_package.lua) | 6 | ||||
| -rw-r--r-- | xmake/modules/package/manager/system/find_package.lua | 4 |
6 files changed, 23 insertions, 23 deletions
diff --git a/xmake/modules/lib/detect/pkg_config.lua b/xmake/modules/lib/detect/pkgconfig.lua index f9e1e9aeb..98f9eae68 100644 --- a/xmake/modules/lib/detect/pkg_config.lua +++ b/xmake/modules/lib/detect/pkgconfig.lua @@ -15,7 +15,7 @@ -- Copyright (C) 2015-present, TBOOX Open Source Group. -- -- @author ruki --- @file pkg_config.lua +-- @file pkgconfig.lua -- -- imports @@ -34,8 +34,8 @@ import("detect.tools.find_pkg_config") function version(name, opt) -- attempt to add search paths from pkg-config - local pkg_config = find_pkg_config() - if not pkg_config then + local pkgconfig = find_pkgconfig() + if not pkgconfig then return end @@ -50,7 +50,7 @@ function version(name, opt) end -- get version - local version = try { function() return os.iorunv(pkg_config, {"--modversion", name}) end } + local version = try { function() return os.iorunv(pkgconfig, {"--modversion", name}) end } if version then version = version:trim() end @@ -73,8 +73,8 @@ end function variables(name, variables, opt) -- attempt to add search paths from pkg-config - local pkg_config = find_pkg_config() - if not pkg_config then + local pkgconfig = find_pkgconfig() + if not pkgconfig then return end @@ -92,7 +92,7 @@ function variables(name, variables, opt) local result = nil if variables then for _, variable in ipairs(table.wrap(variables)) do - local value = try { function () return os.iorunv(pkg_config, {"--variable=" .. variable, name}) end } + local value = try { function () return os.iorunv(pkgconfig, {"--variable=" .. variable, name}) end } if value ~= nil then result = result or {} result[variable] = value:trim() @@ -118,15 +118,15 @@ end -- -- @code -- --- local libinfo = pkg_config.libinfo("openssl") +-- local libinfo = pkgconfig.libinfo("openssl") -- -- @endcode -- function libinfo(name, opt) -- attempt to add search paths from pkg-config - local pkg_config = find_pkg_config() - if not pkg_config then + local pkgconfig = find_pkg_config() + if not pkgconfig then return end @@ -142,7 +142,7 @@ function libinfo(name, opt) -- get libs and cflags local result = nil - local flags = try { function () return os.iorunv(pkg_config, {"--libs", "--cflags", name}) end } + local flags = try { function () return os.iorunv(pkgconfig, {"--libs", "--cflags", name}) end } if flags then -- init result @@ -172,7 +172,7 @@ function libinfo(name, opt) end -- get version - local version = try { function() return os.iorunv(pkg_config, {"--modversion", name}) end } + local version = try { function() return os.iorunv(pkgconfig, {"--modversion", name}) end } if version then result = result or {} result.version = version:trim() diff --git a/xmake/modules/package/manager/brew/find_package.lua b/xmake/modules/package/manager/brew/find_package.lua index df0737a06..f3677282a 100644 --- a/xmake/modules/package/manager/brew/find_package.lua +++ b/xmake/modules/package/manager/brew/find_package.lua @@ -22,7 +22,7 @@ import("lib.detect.find_tool") import("lib.detect.find_file") import("lib.detect.find_path") -import("lib.detect.pkg_config") +import("lib.detect.pkgconfig") import("core.project.target") import("package.manager.find_package") @@ -79,13 +79,13 @@ function main(name, opt) end if pcfile then opt.configdirs = path.directory(pcfile) - result = find_package("pkg_config::" .. pcname, opt) + result = find_package("pkgconfig::" .. pcname, opt) if not result then -- attempt to get includedir variable from pkg-config/xx.pc - local varinfo = pkg_config.variables(pcname, "includedir", opt) + local varinfo = pkgconfig.variables(pcname, "includedir", opt) if varinfo and varinfo.includedir then result = result or {} - result.version = pkg_config.version(pcname, opt) + result.version = pkgconfig.version(pcname, opt) result.includedirs = varinfo.includedir end end diff --git a/xmake/modules/package/manager/find_package.lua b/xmake/modules/package/manager/find_package.lua index 0f98106aa..f188d92d1 100644 --- a/xmake/modules/package/manager/find_package.lua +++ b/xmake/modules/package/manager/find_package.lua @@ -62,7 +62,7 @@ function _find_package_with_builtin_rule(package_name, opt) end -- find it from pkg-config - table.insert(managers, "pkg_config") + table.insert(managers, "pkgconfig") -- find it from system table.insert(managers, "system") diff --git a/xmake/modules/package/manager/pacman/find_package.lua b/xmake/modules/package/manager/pacman/find_package.lua index b34f8eff0..ba5b58c21 100644 --- a/xmake/modules/package/manager/pacman/find_package.lua +++ b/xmake/modules/package/manager/pacman/find_package.lua @@ -21,7 +21,7 @@ -- imports import("core.base.option") import("lib.detect.find_tool") -import("package.manager.pkg_config.find_package", {alias = "find_package_from_pkgconfig"}) +import("package.manager.pkgconfig.find_package", {alias = "find_package_from_pkgconfig"}) -- find package from the system directories -- diff --git a/xmake/modules/package/manager/pkg_config/find_package.lua b/xmake/modules/package/manager/pkgconfig/find_package.lua index 752307e34..a7dbf377a 100644 --- a/xmake/modules/package/manager/pkg_config/find_package.lua +++ b/xmake/modules/package/manager/pkgconfig/find_package.lua @@ -19,7 +19,7 @@ -- -- imports -import("lib.detect.pkg_config") +import("lib.detect.pkgconfig") import("lib.detect.find_library") import("package.manager.system.find_package", {alias = "find_package_from_system"}) @@ -34,10 +34,10 @@ function main(name, opt) opt = opt or {} -- get library info - local libinfo = pkg_config.libinfo(name, opt) + local libinfo = pkgconfig.libinfo(name, opt) if not libinfo and name:startswith("lib") then -- libxxx? attempt to find xxx without `lib` prefix - libinfo = pkg_config.libinfo(name:sub(4), opt) + libinfo = pkgconfig.libinfo(name:sub(4), opt) end if not libinfo then return diff --git a/xmake/modules/package/manager/system/find_package.lua b/xmake/modules/package/manager/system/find_package.lua index 1298a3e5d..9bb04566d 100644 --- a/xmake/modules/package/manager/system/find_package.lua +++ b/xmake/modules/package/manager/system/find_package.lua @@ -22,7 +22,7 @@ import("lib.detect.find_file") import("lib.detect.find_path") import("lib.detect.find_library") -import("lib.detect.pkg_config") +import("lib.detect.pkgconfig") import("detect.sdks.find_xcode") import("core.project.config") @@ -148,7 +148,7 @@ function main(name, opt) local version = nil local links = table.wrap(opt.links) if #links == 0 then - pkginfo = pkg_config.libinfo(name) + pkginfo = pkgconfig.libinfo(name) if pkginfo then links = table.wrap(pkginfo.links) version = pkginfo.version |
