This repository has been archived by the owner on Jun 13, 2023. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
premake5.lua
63 lines (52 loc) · 1.39 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
58
59
60
61
62
63
newoption {
trigger = "opencv",
value = "path",
description = "OpenCV installation path"
}
workspace "FogBuddy"
configurations { "Release" }
startproject "FogBuddy"
architecture "x86_64"
project "imgui"
location ("deps/imgui")
kind "StaticLib"
targetdir "bin/%{cfg.buildcfg}/%{prj.name}"
objdir "bin-int/%{cfg.buildcfg}/%{prj.name}"
files {
"%{prj.location}/*.cpp",
"%{prj.location}/backends/imgui_impl_win32.cpp",
"%{prj.location}/backends/imgui_impl_dx11.cpp",
"%{prj.location}/misc/cpp/imgui_stdlib.cpp"
}
includedirs {
"%{prj.location}"
}
project "FogBuddy"
kind "ConsoleApp"
language "C++"
location "FogBuddy"
targetdir "bin/%{cfg.buildcfg}/%{prj.name}"
objdir "bin-int/%{cfg.buildcfg}/%{prj.name}"
debugdir "%{cfg.targetdir}"
files { "%{prj.location}/**.h", "%{prj.location}/**.cpp", "%{prj.location}/**.hpp", "%{prj.location}/**.rc" }
cppdialect "C++17"
if _OPTIONS["opencv"] == nil then
error("You must pass opencv dir")
else
_OPTIONS["opencv"] = path.getabsolute(_OPTIONS["opencv"])
print(_OPTIONS["opencv"])
end
includedirs {
_OPTIONS["opencv"].."/build/include",
"deps/imgui"
}
libdirs { _OPTIONS["opencv"].."/build/x64/vc15/lib" }
links {
"opencv_world460",
"imgui",
"d3d11"
}
postbuildcommands {
"{COPY} ".._OPTIONS["opencv"].."/build/x64/vc15/bin/opencv_world460.dll %{cfg.targetdir}",
"{COPY} ../data %{cfg.targetdir}/data"
}