1if not _ACTION then 2 _ACTION="vs2010" 3end 4 5isPOSIX = false 6isVisualStudio = false 7 8if _ACTION == "vs2002" or _ACTION == "vs2003" or _ACTION == "vs2005" or _ACTION == "vs2008" or _ACTION == "vs2010" then 9 isVisualStudio = true 10end 11 12if _ACTION == "codeblocks" 13then 14 isPosix = true 15end 16 17solution "TaskScheduler" 18 19 language "C++" 20 21 location ( "Build/" .. _ACTION ) 22 flags {"NoManifest", "ExtraWarnings", "StaticRuntime", "NoMinimalRebuild", "FloatFast", "EnableSSE2" } 23 optimization_flags = { "OptimizeSpeed" } 24 targetdir("Bin") 25 26 local config_list = { 27 "Release", 28 "Debug", 29 } 30 local platform_list = { 31 "x32", 32 "x64" 33 } 34 35 configurations(config_list) 36 platforms(platform_list) 37 38 39-- CONFIGURATIONS 40 41configuration "Release" 42 defines { "NDEBUG" } 43 flags { "Symbols", optimization_flags } 44 45configuration "Debug" 46 defines { "_DEBUG" } 47 flags { "Symbols" } 48 49configuration "x32" 50 libdirs { "$(DXSDK_DIR)/Lib/x86" } 51if isVisualStudio then 52 buildoptions { "/wd4127" } 53else 54 buildoptions { "-std=c++11" } 55end 56 57configuration "x64" 58 libdirs { "$(DXSDK_DIR)/Lib/x64" } 59if isVisualStudio then 60 buildoptions { "/wd4127" } 61else 62 buildoptions { "-std=c++11" } 63end 64 65 66-- give each configuration/platform a unique output directory 67 68for _, config in ipairs(config_list) do 69 for _, plat in ipairs(platform_list) do 70 configuration { config, plat } 71 objdir ( "build/" .. _ACTION .. "/tmp/" .. config .. "-" .. plat ) 72 end 73end 74 75-- SUBPROJECTS 76 77project "TaskScheduler" 78 flags {"NoPCH"} 79 kind "ConsoleApp" 80 files { 81 "Scheduler/**.*", 82 } 83 84 includedirs 85 { 86 "Squish", "Scheduler/Include", "TestFramework/UnitTest++" 87 } 88 89 if isPosix then 90 excludes { "Src/Platform/Windows/**.*" } 91 else 92 excludes { "Src/Platform/Posix/**.*" } 93 end 94 95 links { 96 "UnitTest++", "Squish" 97 } 98 99 if isPosix then 100 links { "pthread" } 101 end 102 103 104 105 106project "UnitTest++" 107 kind "StaticLib" 108 defines { "_CRT_SECURE_NO_WARNINGS" } 109 files { 110 "TestFramework/UnitTest++/**.*", 111 } 112 113if isPosix then 114 excludes { "TestFramework/UnitTest++/Win32/**.*" } 115else 116 excludes { "TestFramework/UnitTest++/Posix/**.*" } 117end 118 119 120project "Squish" 121 kind "StaticLib" 122 defines { "_CRT_SECURE_NO_WARNINGS" } 123 files { 124 "Squish/**.*", 125 } 126 127 includedirs 128 { 129 "Squish" 130 } 131 132 133