-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpremake5.lua
More file actions
125 lines (111 loc) · 4.25 KB
/
premake5.lua
File metadata and controls
125 lines (111 loc) · 4.25 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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
workspace "HandPose"
architecture "x64"
staticruntime "on"
staticruntime "Off"
configurations { "Debug", "Release" }
project "HandPose"
kind "ConsoleApp"
language "C++"
cppdialect "C++17"
systemversion "latest"
outdir = "%{cfg.buildcfg}-%{cfg.system}-%{cfg.architecture}"
targetdir ("bin/" .. outdir)
objdir ("bin-int/" .. outdir)
OPENCV_DIR = "deps/OpenCV/install/"
OPENCV_VERSION = "453"
CV_LIB = iif(os.istarget("windows"), "x64/vc16/lib", "lib")
CV_INC = iif(os.istarget("windows"), "include", "include/opencv4")
OPENPOSE_DIR = "deps/OpenPose/"
EIGEN_DIR = "deps/Eigen/"
CERES_DIR = "deps/Ceres/"
GLOG_DIR = "deps/glog/"
filter "system:linux"
libdirs
{
OPENCV_DIR .. CV_LIB .. "/opencv4/3rdparty"
}
filter "system:windows"
includedirs
{
OPENPOSE_DIR .. "3rdparty/windows/caffe/include",
OPENPOSE_DIR .. "3rdparty/windows/caffe_cpu/include",
OPENPOSE_DIR .. "3rdparty/windows/caffe3rdparty/include"
}
libdirs
{
OPENPOSE_DIR .. "3rdparty/windows/caffe/lib",
OPENPOSE_DIR .. "3rdparty/windows/caffe_cpu/lib",
OPENPOSE_DIR .. "3rdparty/windows/caffe3rdparty/lib"
}
defines { "CERES_USE_CXX_THREADS" }
filter {} --reset
includedirs
{
"src",
OPENCV_DIR .. CV_INC,
OPENPOSE_DIR .. "include",
EIGEN_DIR,
CERES_DIR .. "include",
GLOG_DIR .. "include"
}
libdirs
{
OPENCV_DIR .. CV_LIB,
CERES_DIR .. "lib",
GLOG_DIR .. "lib"
}
files { "src/**.h", "src/**.hpp", "src/**.cpp"}
pchheader "pch.h"
pchsource "src/pch.cpp"
filter {"configurations:Debug"}
defines { "DEBUG", "_DEBUG" }
symbols "On"
libdirs
{
OPENPOSE_DIR .. "build/src/openpose/Debug"
}
filter {"configurations:Release"}
defines { "NDEBUG" }
optimize "On"
libdirs
{
OPENPOSE_DIR .. "build/src/openpose/Release"
}
filter {"system:windows"}
postbuildcommands
{
("{COPY} " .. OPENPOSE_DIR .. "build/bin/ bin/" .. outdir),
}
filter {"system:windows", "configurations:Debug"}
links
{
"opencv_world" .. OPENCV_VERSION .. "d",
--- "aded", "IlmImfd", "ippicvmt", "ippiwd", "ittnotifyd", "libjpeg-turbod", "libopenjp2d", "libpngd", "libprotobufd", "libtiffd", "libwebpd", "quircd", "zlibd",
"openposed", "caffe-d", "caffeproto-d", "snappyd", "lmdbd", "glogd", "gflagsd", "caffezlibd", "caffehdf5_D", "caffehdf5_hl_D",
"boost_date_time-vc142-mt-gd-x64-1_74", "boost_filesystem-vc142-mt-gd-x64-1_74", "boost_system-vc142-mt-gd-x64-1_74", "boost_thread-vc142-mt-gd-x64-1_74",
"ceres-debug", "glogd"
}
postbuildcommands
{
("{COPY} " .. OPENCV_DIR .. "x64/vc16/bin/opencv_world" .. OPENCV_VERSION .. "d.dll bin/" .. outdir),
("{COPY} " .. OPENPOSE_DIR .. "build/x64/Debug/openposed.dll bin/" .. outdir),
("{COPY} deps/misc/ bin/" .. outdir),
("{COPY} " .. GLOG_DIR .. "bin/glogd.dll bin/" .. outdir)
}
filter {"system:windows", "configurations:Release"}
links
{
"opencv_world" .. OPENCV_VERSION,
--- "ade", "IlmImf", "ippicvmt", "ippiw", "ittnotify", "libjpeg-turbo", "libopenjp2", "libpng", "libprotobuf", "libtiff", "libwebp", "quirc", "zlib",
"openpose", "caffe", "caffeproto", "snappy", "lmdb", "glog", "gflags", "caffezlib", "caffehdf5", "caffehdf5_hl",
"boost_date_time-vc142-mt-x64-1_74", "boost_filesystem-vc142-mt-x64-1_74", "boost_system-vc142-mt-x64-1_74", "boost_thread-vc142-mt-x64-1_74",
"ceres", "glog"
}
postbuildcommands
{
("{COPY} " .. OPENCV_DIR .. "x64/vc16/bin/opencv_world" .. OPENCV_VERSION .. ".dll bin/" .. outdir),
("{COPY} " .. OPENPOSE_DIR .. "build/x64/Release/openpose.dll bin/" .. outdir),
("{COPY} " .. GLOG_DIR .. "bin/glog.dll bin/" .. outdir)
}
filter {"system:linux"}
links {"opencv_world", "dl", "pthread", "ade", "ippiw", "ippicv", "ittnotify", "libopenjp2", "libprotobuf", "libwebp", "quirc", "z", "IlmImf", "tiff", "png", "jpeg"}