forked from CryptoGraphics/lyclMiner
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathpremake5.lua
76 lines (61 loc) · 1.96 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
64
65
66
67
68
69
70
71
72
73
74
75
76
-- ----------------------------------------------------------------------------
-- Setup addional paths if headers and libs are in different place.(Optional)
function setupJansson()
includedirs { "" }
libdirs { "" }
links "jansson"
end
function setupCurl()
includedirs { "" }
libdirs { "" }
links "curl"
end
function setupOpenCL()
-- Alternative: opencl-headers package
includedirs { "/opt/rocm/opencl/include/" }
-- ROCm and/or AMDGPU-Pro
libdirs { "/opt/rocm/opencl/lib/x86_64/",
"/opt/amdgpu-pro/lib/x86_64-linux-gnu/" }
links "OpenCL"
end
-- ----------------------------------------------------------------------------
workspace "lyclMinerWorkspace"
architecture "x86_64"
location "build"
-- setup configurations
configurations { "Release", "Debug" }
filter { "configurations:Release" }
defines { "NDEBUG" }
optimize "On"
filter { "configurations:Debug" }
defines { "DEBUG" }
symbols "On"
filter { }
-- dependencies
setupOpenCL()
setupJansson()
setupCurl()
-- project configuration
project "lyclMiner"
kind "ConsoleApp"
language "C++"
location "build/lyclMiner"
targetdir "bin"
cppdialect "C++11"
includedirs { "src", "." }
filter { "system:Windows" }
system "windows"
-- mingw-w64
links { "Ws2_32" }
filter { "system:Linux" }
system "linux"
-- linux gcc
links { "crypto", "pthread" }
filter { }
files { "src/lyclApplets/*.hpp",
"src/lyclApplets/*.cpp",
"src/lyclCore/*.hpp",
"src/lyclCore/*.cpp",
"src/lyclHostValidators/*.hpp",
"src/lyclHostValidators/*.cpp",
"src/main.cpp" }