Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: downloads/ogreode/premake/functions.lua @ 53

Last change on this file since 53 was 21, checked in by nicolasc, 17 years ago

added ogreode and Colladaplugin

File size: 2.4 KB
Line 
1--require("functions.lua")
2
3---------------------------------------------------
4function setdefines()
5  if (windows) then
6 
7    -- disable VS2005 CRT security warnings
8    if (options["target"] == "vs2005") then
9        table.insert(package.defines, "_CRT_SECURE_NO_DEPRECATE")
10    end
11   
12    table.insert(package.defines, "WIN32")
13    table.insert(package.links, { "user32"})
14      --table.insert(package.files, "../..src/resources.rc")
15  end
16end 
17---------------------------------------------------
18function setfiles(path) 
19  core_files =
20  {
21      matchfiles(path .. "include/*.h"),
22      matchfiles (path .. "src/*.cpp")
23  }
24  package.files = { core_files } 
25 
26    --package.excludes = {
27    --  "dont_build_this.c"
28    --}   
29end
30---------------------------------------------------
31function setODElibpath()
32    if (windows) then   
33      table.insert(package.libpaths, "../../../ode/lib")
34    end
35end
36---------------------------------------------------
37function setDefaultPack()
38      if (not options["sdk"] and not options["source"] and not options["cvs"]) then
39        options["sdk"] = true
40      end   
41end
42---------------------------------------------------
43function setOGRElibpath()
44    if (windows) then   
45      if (options["sdk"]) then
46        table.insert(package.libpaths, "$(OGRE_HOME)")
47      elseif (options["source"]) then
48        table.insert(package.libpaths, "../../../../../OgreMain/lib")
49      elseif (options["cvs"]) then
50        table.insert(package.libpaths, "../../../../../../OgreHead/OgreMain/lib")
51      end
52    end
53end
54---------------------------------------------------
55function setbuildoptions()     
56  if (linux) then
57    package.buildoptions = { "-Wall" }
58 end
59 
60  package.config["Debug"].buildflags = 
61  { 
62 
63  }
64  package.config["Release"].buildflags = 
65  { 
66      "optimize-speed", 
67      "no-symbols", 
68      "no-frame-pointer" 
69  }     
70  package.config["Debug"].objdir = "../obj/Debug"
71  package.config["Release"].objdir = "../obj/Release"
72end
73---------------------------------------------------
74function getsubScriptFolder()
75  if (options["target"] == "vs6") then
76    return "/scripts/VC6"
77  end
78  if (options["target"] == "vs2002") then
79    return "/scripts/VC7"
80  end
81  if (options["target"] == "vs2003") then
82    return "/scripts/VC7.1"
83  end
84  if (options["target"] == "vs2005") then
85    return "/scripts/VC8"
86  end 
87  if (options["target"] == "vs2005") then
88    return "/scripts/VC8"
89  end 
90  return ""
91end
92 
93 
94 
Note: See TracBrowser for help on using the repository browser.