summaryrefslogtreecommitdiff
path: root/xmake/plugins/check/checkers/api/target/frameworkdirs.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2023-02-02 22:39:09 +0800
committerruki <[email protected]>2023-02-02 22:39:09 +0800
commit18737c1434786ebf43d37191c52ddb24847bae6d (patch)
tree9a568be9a2b51ed2552c42a3a5f6e6461346b969 /xmake/plugins/check/checkers/api/target/frameworkdirs.lua
parent7f8eefb8a113cdf8881aa3ed1c4cd4caa1ffb981 (diff)
add includedirs checker
Diffstat (limited to 'xmake/plugins/check/checkers/api/target/frameworkdirs.lua')
-rw-r--r--xmake/plugins/check/checkers/api/target/frameworkdirs.lua31
1 files changed, 31 insertions, 0 deletions
diff --git a/xmake/plugins/check/checkers/api/target/frameworkdirs.lua b/xmake/plugins/check/checkers/api/target/frameworkdirs.lua
new file mode 100644
index 000000000..f21629fe5
--- /dev/null
+++ b/xmake/plugins/check/checkers/api/target/frameworkdirs.lua
@@ -0,0 +1,31 @@
+--!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 frameworkdirs.lua
+--
+
+-- imports
+import(".api_checker")
+
+function main()
+ api_checker.check_targets("frameworkdirs", {check = function(target, value)
+ if not os.isdir(value) then
+ return false, string.format("frameworkdir '%s' not found", value)
+ end
+ return true
+ end})
+end