forked from thejustinwalsh/libbulletml
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathpremake.lua
66 lines (47 loc) · 1.43 KB
/
premake.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
newoption {
trigger = "with-tests",
description = "Include test suite in project files",
}
-- Workspace
workspace "BulletML"
configurations { "Debug", "Release" }
filter { "action:xcode*" }
xcodebuildsettings {
["CLANG_CXX_LANGUAGE_STANDARD"] = "c++11",
["CLANG_CXX_LIBRARY"] = "libc++"
}
filter { "action:gmake*" }
flags { "C++11" }
filter "configurations:Debug"
defines { "DEBUG" }
flags { "Symbols" }
filter "configurations:Release"
defines { "NDEBUG" }
optimize "On"
-- Static Library
project "libbulletml"
kind "StaticLib"
language "C++"
targetdir "bin/%{cfg.buildcfg}"
targetname "bulletml"
includedirs { "include", "src" }
files { "include/**.h", "src/**.h", "src/**.cpp" }
-- Dynamic Library
project "libbulletml-shared"
kind "SharedLib"
language "C++"
targetdir "bin/%{cfg.buildcfg}"
targetname "bulletml-shared"
defines { "BULLETML_SHARED_LIB" }
includedirs { "include", "src" }
files { "include/**.h", "src/**.h", "src/**.cpp" }
-- Test Suite (googletest)
if (_OPTIONS["with-tests"]) then
project "libbulletml-tests"
kind "ConsoleApp"
language "C++"
targetdir "bin/%{cfg.buildcfg}"
includedirs { "include", "vendor/googletest/googletest/include", "vendor/googletest/googletest" }
files { "tests/**.cpp", "vendor/googletest/googletest/src/gtest_main.cc", "vendor/googletest/googletest/src/gtest-all.cc" }
links { "libbulletml" }
end