-
Notifications
You must be signed in to change notification settings - Fork 2
/
premake4.lua
87 lines (69 loc) · 2.03 KB
/
premake4.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
78
79
80
81
82
83
84
85
86
87
solution "luadata"
-- Configurations and platforms
configurations { "Debug", "Release" }
platforms { "x32", "x64" }
-- Start project
startproject "luadata-test"
-- Global configuration
location "projects"
objdir "bin"
-- Common configuration for 'Debug'
configuration "Debug"
defines { "DEBUG" }
flags { "Symbols" }
targetsuffix "_d"
-- Common configuration for 'Release'
configuration "Release"
defines { "NDEBUG" }
optimize "Full"
-- On Visual Studio 2012, the _VARIADIC_MAX is too low.
configuration "vs2012"
defines { "_VARIADIC_MAX=10" }
-- Output folders
configuration { "x32", "Debug" }
targetdir "bin/x32/Debug"
configuration { "x32", "Release" }
targetdir "bin/x32/Release"
configuration { "x64", "Debug" }
targetdir "bin/x64/Debug"
configuration { "x64", "Release" }
targetdir "bin/x64/Release"
-- Google Test dependency
gtest = "3rd-party/gtest-1.7.0"
project "gtest"
kind "StaticLib"
language "C++"
-- Project files
files { gtest .. "/**.h", gtest .. "/**.cc" }
excludes { gtest .. "/src/gtest-all.cc" }
includedirs { gtest, gtest .. "/include" }
-- Test project
project "luadata-test"
kind "ConsoleApp"
language "C++"
-- Project files
files { "test/**.h", "test/**.cc" }
debugdir "test/resources"
-- Lua-data dependency
includedirs { "include", gtest .. "/include" }
links { "luadata", "gtest" }
configuration "gmake"
-- Enabling the C++11 standard on Make
buildoptions { "-std=c++0x" }
-- Linking with pthread for gtest.
links { "pthread" }
-- Sample project
project "luadata-sample"
kind "ConsoleApp"
language "C++"
-- Project files
files { "sample/src/**.h", "sample/src/**.cc" }
debugdir "sample/assets"
-- Lua-data dependency
includedirs { "include" }
links { "luadata" }
configuration "gmake"
-- Enabling the C++11 standard on Make
buildoptions { "-std=c++0x" }
-- Link with the library.
dofile "library.lua"