forked from Gaztin/premake-qmake
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path_preload.lua
More file actions
53 lines (44 loc) · 849 Bytes
/
_preload.lua
File metadata and controls
53 lines (44 loc) · 849 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
local p = premake
-- Initialize extension
p.extensions.qmake = premake.extensions.qmake or {}
local qmake = p.extensions.qmake
qmake._VERSION = premake._VERSION
--
-- Create the qmake action
--
newaction {
-- Metadata
trigger = "qmake",
shortname = "qmake",
description = "Generate qmake files for Qt projects",
-- Capabilities
valid_kinds = {
"ConsoleApp",
"WindowedApp",
"StaticLib",
"SharedLib",
},
valid_languages = {
"C++",
},
valid_tools = {
cc = {
"msc",
"clang",
"gcc",
}
},
-- Workspace generation
onWorkspace = function(wks)
p.generate(wks, ".pro", qmake.workspace.generate)
end,
onProject = function(prj)
p.generate(prj, ".pro", qmake.project.generate)
end,
}
--
-- Decide when the full module should be loaded.
--
return function(cfg)
return (_ACTION == "qmake")
end