-
Notifications
You must be signed in to change notification settings - Fork 32
/
Copy pathpremake5.lua
77 lines (67 loc) · 2.08 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
77
sources = {
"main.cc",
"../viewer/imgui.cpp",
"../viewer/imgui_draw.cpp",
"../viewer/imgui_impl_btgui.cpp",
}
-- premake4.lua
solution "TiffViewerSolution"
configurations { "Release", "Debug" }
if os.is("Windows") then
platforms { "x64", "x32" }
else
platforms { "native", "x64", "x32" }
end
projectRootDir = os.getcwd() .. "/../viewer/"
dofile ("../viewer/findOpenGLGlewGlut.lua")
initOpenGL()
initGlew()
-- Use c++11
flags { "c++11" }
-- A project defines one build target
project "viwewer"
kind "ConsoleApp"
language "C++"
files { sources, "../../miniz.c" }
includedirs { "./", "../../" }
includedirs { "../viewer/" }
if os.is("Windows") then
defines { "NOMINMAX" }
defines { "USE_NATIVEFILEDIALOG" }
flags { "FatalCompileWarnings" }
warnings "Extra" -- /W4
files{
"../viewer/OpenGLWindow/Win32OpenGLWindow.cpp",
"../viewer/OpenGLWindow/Win32OpenGLWindow.h",
"../viewer/OpenGLWindow/Win32Window.cpp",
"../viewer/OpenGLWindow/Win32Window.h",
}
end
if os.is("Linux") then
defines { "TINY_DNG_LOADER_ENABLE_ZIP" }
buildoptions { "-fsanitize=address" }
linkoptions { "-fsanitize=address" }
files {
"../viewer/OpenGLWindow/X11OpenGLWindow.cpp",
"../viewer/OpenGLWindow/X11OpenGLWindows.h"
}
links {"X11", "pthread", "dl"}
end
if os.is("MacOSX") then
buildoptions { "-fsanitize=address" }
linkoptions { "-fsanitize=address" }
links {"Cocoa.framework"}
files {
"../viewer/OpenGLWindow/MacOpenGLWindow.h",
"../viewer/OpenGLWindow/MacOpenGLWindow.mm",
}
end
configuration "Debug"
defines { "DEBUG" } -- -DDEBUG
symbols "On"
targetname "tiff_view_debug"
configuration "Release"
-- defines { "NDEBUG" } -- -NDEBUG
symbols "On"
optimize "On"
targetname "tiff_view"