summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2021-03-23 00:35:48 +0800
committerruki <[email protected]>2021-03-23 00:35:48 +0800
commitd93735db9696932fdff5a8f0db268eba9ac50a5b (patch)
tree7bcd2fe71da93e6b8bfb113db2819a2fa9201fa3
parent046d618e805ae02750b70321f73dac48d1003361 (diff)
add cmake importfiles stub
-rw-r--r--xmake/modules/target/action/install/cmake_importfiles.lua29
-rw-r--r--xmake/modules/target/action/install/pkgconfig_importfiles.lua (renamed from xmake/modules/target/action/install/pkgconfig.lua)6
-rw-r--r--xmake/rules/utils/install_importfiles/xmake.lua7
3 files changed, 38 insertions, 4 deletions
diff --git a/xmake/modules/target/action/install/cmake_importfiles.lua b/xmake/modules/target/action/install/cmake_importfiles.lua
new file mode 100644
index 000000000..56e995373
--- /dev/null
+++ b/xmake/modules/target/action/install/cmake_importfiles.lua
@@ -0,0 +1,29 @@
+--!A cross-platform build utility based on Lua
+--
+-- Licensed under the Apache License, Version 2.0 (the "License");
+-- you may not use this file except in compliance with the License.
+-- You may obtain a copy of the License at
+--
+-- http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
+-- Copyright (C) 2015-present, TBOOX Open Source Group.
+--
+-- @author ruki
+-- @file cmake_importfiles.lua
+--
+
+-- install .cmake import files
+function main(target, opt)
+
+ -- check
+ opt = opt or {}
+ assert(target:is_library(), 'cmake_importfiles: only support for library target(%s)!', target:name())
+
+end
+
diff --git a/xmake/modules/target/action/install/pkgconfig.lua b/xmake/modules/target/action/install/pkgconfig_importfiles.lua
index 46dfb9389..2a10358a8 100644
--- a/xmake/modules/target/action/install/pkgconfig.lua
+++ b/xmake/modules/target/action/install/pkgconfig_importfiles.lua
@@ -15,15 +15,15 @@
-- Copyright (C) 2015-present, TBOOX Open Source Group.
--
-- @author ruki
--- @file pkgconfig.lua
+-- @file pkgconfig_importfiles.lua
--
--- install pkgconfig/.pc files
+-- install pkgconfig/.pc import files
function main(target, opt)
-- check
opt = opt or {}
- assert(target:is_library(), 'rule("utils.install.pkgconfig_files"): only support for library target!')
+ assert(target:is_library(), 'pkgconfig_importfiles: only support for library target(%s)!', target:name())
-- only for unix platform
local installdir = target:installdir()
diff --git a/xmake/rules/utils/install_importfiles/xmake.lua b/xmake/rules/utils/install_importfiles/xmake.lua
index 97187901a..45e6616f8 100644
--- a/xmake/rules/utils/install_importfiles/xmake.lua
+++ b/xmake/rules/utils/install_importfiles/xmake.lua
@@ -21,6 +21,11 @@
-- install pkg-config/*.pc import files
rule("utils.install.pkgconfig_importfiles")
after_install(function (target, opt)
- import("target.action.install.pkgconfig")(target, opt)
+ import("target.action.install.pkgconfig_importfiles")(target, opt)
end)
+-- install *.cmake import files
+rule("utils.install.cmake_importfiles")
+ after_install(function (target, opt)
+ import("target.action.install.cmake_importfiles")(target, opt)
+ end)