diff options
| author | Arthur LAURENT <[email protected]> | 2025-05-05 17:13:25 +0200 |
|---|---|---|
| committer | Arthur LAURENT <[email protected]> | 2025-05-09 15:56:33 +0200 |
| commit | 5d6d36e0db45d90dfa7f0cdf2937d989de683833 (patch) | |
| tree | 2d1fbb82ee8d38921af1863fd3ce968f7c5cea75 /xmake/rules/c++/modules/install.lua | |
| parent | d88bd9c5ace6c64981420569fb886f7c646135c0 (diff) | |
(C++ module support) improve jobgraph support
Diffstat (limited to 'xmake/rules/c++/modules/install.lua')
| -rw-r--r-- | xmake/rules/c++/modules/install.lua | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/xmake/rules/c++/modules/install.lua b/xmake/rules/c++/modules/install.lua new file mode 100644 index 000000000..0381433a7 --- /dev/null +++ b/xmake/rules/c++/modules/install.lua @@ -0,0 +1,40 @@ +--!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, Arthapz +-- @file install.lua +-- + +import("support") +import("scanner") +import("builder") + +function install(target) + -- we cannot use target:data("cxx.has_modules"), + -- because on_config will be not called when installing targets + if support.contains_modules(target) then + local modules = scanner.get_modules(target) + builder.generate_metadata(target, modules) + support.add_installfiles_for_modules(target, modules) + end +end + +function uninstall(target) + if support.contains_modules(target) then + local modules = scanner.get_modules(target) + support.add_installfiles_for_modules(target, modules) + end +end |
