-
Notifications
You must be signed in to change notification settings - Fork 0
/
premake5.lua
57 lines (47 loc) · 1.01 KB
/
premake5.lua
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
workspace "premakeExample"
location "prj"
language "C++"
architecture "x64"
configurations {"Debug","Release"}
filter {"configurations:Debug"}
symbols "On"
filter {"configurations:Release"}
optimize "On"
filter {}
targetdir ("build/target/%{prj.name}/%{cfg.longname}")
objdir ("build/obj/%{prj.name}/%{cfg.longname}")
postbuildcommands
{
("{COPY} %{cfg.buildtarget.relpath} \"../bin/\"")
}
function includeGLFW()
includedirs "3rd/glfw/include"
end
function linkGLFW()
libdirs "3rd/glfw/lib-vc2019"
links "glfw3dll"
end
project "ExampleDll"
kind "SharedLib"
files "src/ExampleDll/**"
includeGLFW()
linkGLFW()
function useExampleDLL()
includedirs "src/ExampleDll"
links "ExampleDll"
end
project "App"
kind "ConsoleApp"
files "src/App/**"
useExampleDLL()
filter "system:windows"
links {"OpenGL32"}
function includeCatch()
includedirs "3rd/Catch/Include"
defines "CATCH_CPP11_OR_GREATER"
end
project "UnitTests"
kind "ConsoleApp"
files "src/UnitTests/**"
includeCatch()
useExampleDLL()