-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpremake5.lua
More file actions
87 lines (66 loc) · 1.76 KB
/
premake5.lua
File metadata and controls
87 lines (66 loc) · 1.76 KB
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
-- premake5.lua
require('scripts/amalgamate_headers')
require('scripts/generate_compile_commands')
workspace "wui"
configurations { "Debug", "Release" }
location "build"
filter "system:windows"
links { "ole32", "uuid", "version", "shell32" }
architecture "x86_64"
filter "system:macosx"
links { "WebKit.framework", "dl", "objc" }
if os.host() == "linux" then
local cflags = io.popen("pkg-config --cflags gtk+-3.0 webkit2gtk-4.1"):read("*a")
local libs = io.popen("pkg-config --libs gtk+-3.0 webkit2gtk-4.1"):read("*a")
filter "system:linux"
buildoptions { cflags }
linkoptions { libs }
end
filter "configurations:Debug"
defines { "DEBUG" }
symbols "On"
filter "configurations:Release"
defines { "NDEBUG" }
optimize "On"
filter {}
targetdir "bin/%{cfg.buildcfg}"
prebuildcommands {
"premake5 --file="..path.getabsolute("scripts/generate_embeds.lua"),
"premake5 --file="..path.getabsolute("scripts/minify_wui_script.lua")
}
includedirs {
"./include",
"."
}
project "wui-static"
language "C++"
cppdialect "C++17"
kind "StaticLib"
defines { "BUILD_STATIC" }
files {
"./src/library.cpp",
}
project "wui-dll"
language "C++"
cppdialect "C++17"
kind "SharedLib"
defines { "BUILD_SHARED" }
files {
"./src/library.cpp",
}
project "wui-testapp"
kind "ConsoleApp"
language "C++"
cppdialect "C++17"
files {
"./src/testapp.cpp",
"./include/**",
"./embed/files/*"
}
project "wui-testapp-c"
kind "ConsoleApp"
language "C"
files {
"./src/testapp.c",
}
links { "wui-dll" }