add preliminary premake4 support (next to cmake) mainly to auto-generate Visual Studio projectfiles that can be redistributed (with no dependency on cmake, premake)
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
// This file is generated automatically.
|
||||
|
||||
1 VERSIONINFO
|
||||
FILEVERSION 2, 76, 0, 0
|
||||
PRODUCTVERSION 2, 76, 0, 0
|
||||
FILEVERSION 2, 79, 0, 0
|
||||
PRODUCTVERSION 2, 79, 0, 0
|
||||
#ifdef CS_DEBUG
|
||||
FILEFLAGS 0x1
|
||||
#else
|
||||
@@ -14,9 +14,9 @@ FILEFLAGS 0x0
|
||||
BLOCK "040904E4"
|
||||
{
|
||||
VALUE "ProductName", "Bullet Continuous Collision Detection and Physics Library"
|
||||
VALUE "ProductVersion", "2.76"
|
||||
VALUE "FileVersion", "2.76"
|
||||
VALUE "LegalCopyright", "Copyright (c) 2005-2010 Erwin Coumans"
|
||||
VALUE "ProductVersion", "2.79"
|
||||
VALUE "FileVersion", "2.79"
|
||||
VALUE "LegalCopyright", "Copyright (c) 2005-2011 Erwin Coumans"
|
||||
#ifdef CS_DEBUG
|
||||
VALUE "Comments", "Debug build"
|
||||
#else
|
||||
|
||||
36
msvc/findDirectX11.lua
Normal file
36
msvc/findDirectX11.lua
Normal file
@@ -0,0 +1,36 @@
|
||||
function findDirectX11()
|
||||
local dx11path = os.getenv("DXSDK_DIR")
|
||||
if (dx11path) then
|
||||
local filepath = string.format("%s%s",dx11path,"Include/D3D11.h")
|
||||
headerdx11 = io.open(filepath, "r")
|
||||
if (headerdx11) then
|
||||
printf("Found DX11: '%s'", filepath)
|
||||
return true
|
||||
end
|
||||
end
|
||||
return false
|
||||
end
|
||||
|
||||
function initDirectX11()
|
||||
configuration {}
|
||||
|
||||
local dx11path = os.getenv("DXSDK_DIR")
|
||||
defines { "ADL_ENABLE_DX11"}
|
||||
includedirs {"$(DXSDK_DIR)/include"}
|
||||
|
||||
configuration "x32"
|
||||
libdirs {"$(DXSDK_DIR)/Lib/x86"}
|
||||
configuration "x64"
|
||||
libdirs {"$(DXSDK_DIR)/Lib/x64"}
|
||||
configuration {}
|
||||
links {"d3dcompiler",
|
||||
"dxerr",
|
||||
"dxguid",
|
||||
"d3dx9",
|
||||
"d3d9",
|
||||
"winmm",
|
||||
"comctl32",
|
||||
"d3dx11"
|
||||
}
|
||||
return true
|
||||
end
|
||||
84
msvc/findOpenCL.lua
Normal file
84
msvc/findOpenCL.lua
Normal file
@@ -0,0 +1,84 @@
|
||||
-- todo: add Apple OpenCL environment vars
|
||||
|
||||
function findOpenCL_AMD()
|
||||
local amdopenclpath = os.getenv("AMDAPPSDKROOT")
|
||||
if (amdopenclpath) then
|
||||
return true
|
||||
end
|
||||
return false
|
||||
end
|
||||
|
||||
function findOpenCL_NVIDIA()
|
||||
local nvidiaopenclpath = os.getenv("CUDA_PATH")
|
||||
if (nvidiaopenclpath) then
|
||||
return true
|
||||
end
|
||||
return false
|
||||
end
|
||||
|
||||
function findOpenCL_Intel()
|
||||
local intelopenclpath = os.getenv("INTELOCLSDKROOT")
|
||||
if (intelopenclpath) then
|
||||
return true
|
||||
end
|
||||
return false
|
||||
end
|
||||
|
||||
function initOpenCL_AMD()
|
||||
configuration {}
|
||||
local amdopenclpath = os.getenv("AMDAPPSDKROOT")
|
||||
if (amdopenclpath) then
|
||||
defines { "ADL_ENABLE_CL" , "CL_PLATFORM_AMD"}
|
||||
includedirs {
|
||||
"$(AMDAPPSDKROOT)/include"
|
||||
}
|
||||
configuration "x32"
|
||||
libdirs {"$(AMDAPPSDKROOT)/lib/x86"}
|
||||
configuration "x64"
|
||||
libdirs {"$(AMDAPPSDKROOT)/lib/x86_64"}
|
||||
configuration {}
|
||||
links {"OpenCL"}
|
||||
return true
|
||||
end
|
||||
return false
|
||||
end
|
||||
|
||||
|
||||
function initOpenCL_NVIDIA()
|
||||
configuration {}
|
||||
local nvidiaopenclpath = os.getenv("CUDA_PATH")
|
||||
if (nvidiaopenclpath) then
|
||||
defines { "ADL_ENABLE_CL" , "CL_PLATFORM_NVIDIA"}
|
||||
includedirs {
|
||||
"$(CUDA_PATH)/include"
|
||||
}
|
||||
configuration "x32"
|
||||
libdirs {"$(CUDA_PATH)/lib/Win32"}
|
||||
configuration "x64"
|
||||
libdirs {"$(CUDA_PATH)/lib/x64"}
|
||||
configuration {}
|
||||
links {"OpenCL"}
|
||||
return true
|
||||
end
|
||||
return false
|
||||
end
|
||||
|
||||
function initOpenCL_Intel()
|
||||
configuration {}
|
||||
local intelopenclpath = os.getenv("INTELOCLSDKROOT")
|
||||
if (intelopenclpath) then
|
||||
defines { "ADL_ENABLE_CL" , "CL_PLATFORM_INTEL"}
|
||||
includedirs {
|
||||
"$(INTELOCLSDKROOT)/include"
|
||||
}
|
||||
configuration "x32"
|
||||
libdirs {"$(INTELOCLSDKROOT)/lib/x86"}
|
||||
configuration "x64"
|
||||
libdirs {"$(INTELOCLSDKROOT)/lib/x64"}
|
||||
configuration {}
|
||||
links {"OpenCL"}
|
||||
return true
|
||||
end
|
||||
return false
|
||||
end
|
||||
|
||||
BIN
msvc/premake4.exe
Normal file
BIN
msvc/premake4.exe
Normal file
Binary file not shown.
77
msvc/premake4.lua
Normal file
77
msvc/premake4.lua
Normal file
@@ -0,0 +1,77 @@
|
||||
--add the 0 so the solution comes first in the directory (when sorted on name)
|
||||
|
||||
solution "0BulletSolution"
|
||||
|
||||
-- Multithreaded compiling
|
||||
if _ACTION == "vs2010" or _ACTION=="vs2008" then
|
||||
buildoptions { "/MP" }
|
||||
end
|
||||
|
||||
newoption {
|
||||
trigger = "with-nacl",
|
||||
description = "Enable Native Client build"
|
||||
}
|
||||
|
||||
newoption {
|
||||
trigger = "with-dx11",
|
||||
description = "Enable DirectX11 build"
|
||||
}
|
||||
|
||||
|
||||
configurations {"Release", "Debug"}
|
||||
configuration "Release"
|
||||
flags { "Optimize", "StaticRuntime", "NoMinimalRebuild", "FloatFast"}
|
||||
configuration "Debug"
|
||||
flags { "Symbols", "StaticRuntime" , "NoMinimalRebuild", "NoEditAndContinue" ,"FloatFast"}
|
||||
|
||||
platforms {"x32", "x64"}
|
||||
|
||||
configuration "x64"
|
||||
targetsuffix "_64"
|
||||
configuration {"x64", "debug"}
|
||||
targetsuffix "_x64_debug"
|
||||
configuration {"x64", "release"}
|
||||
targetsuffix "_x64"
|
||||
configuration {"x32", "debug"}
|
||||
targetsuffix "_debug"
|
||||
|
||||
configuration {"Windows"}
|
||||
defines { "_CRT_SECURE_NO_WARNINGS","_CRT_SECURE_NO_DEPRECATE"}
|
||||
|
||||
configuration{}
|
||||
|
||||
|
||||
|
||||
if not _OPTIONS["with-nacl"] then
|
||||
flags { "NoRTTI", "NoExceptions"}
|
||||
defines { "_HAS_EXCEPTIONS=0" }
|
||||
targetdir "../bin"
|
||||
else
|
||||
targetdir "../bin_html"
|
||||
end
|
||||
|
||||
|
||||
dofile ("findOpenCL.lua")
|
||||
dofile ("findDirectX11.lua")
|
||||
|
||||
language "C++"
|
||||
|
||||
location("./" .. _ACTION)
|
||||
|
||||
if _OPTIONS["with-dx11"] then
|
||||
include "../Demos/DX11ClothDemo"
|
||||
include "../src/BulletMultiThreaded/GpuSoftBodySolvers/DX11"
|
||||
end
|
||||
|
||||
if not _OPTIONS["with-dx11"] and not _OPTIONS["with-nacl"] then
|
||||
include "../Demos"
|
||||
include "../Extras"
|
||||
end
|
||||
|
||||
include "../src/LinearMath"
|
||||
include "../src/BulletCollision"
|
||||
include "../src/BulletDynamics"
|
||||
include "../src/BulletSoftBody"
|
||||
|
||||
|
||||
|
||||
4
msvc/vs2005.bat
Normal file
4
msvc/vs2005.bat
Normal file
@@ -0,0 +1,4 @@
|
||||
|
||||
premake4 vs2005
|
||||
|
||||
pause
|
||||
10
msvc/vs2008.bat
Normal file
10
msvc/vs2008.bat
Normal file
@@ -0,0 +1,10 @@
|
||||
|
||||
rem premake4 --no-pelibs vs2008
|
||||
rem premake4 --no-pedemos vs2008
|
||||
rem premake4 --no-bulletlibs --no-pelibs vs2008
|
||||
rem premake4 --with-nacl vs2008
|
||||
|
||||
premake4 vs2008
|
||||
|
||||
|
||||
pause
|
||||
4
msvc/vs2008_dx11.bat
Normal file
4
msvc/vs2008_dx11.bat
Normal file
@@ -0,0 +1,4 @@
|
||||
|
||||
premake4 --with-dx11 vs2008
|
||||
|
||||
pause
|
||||
8
msvc/vs2008_nacl.bat
Normal file
8
msvc/vs2008_nacl.bat
Normal file
@@ -0,0 +1,8 @@
|
||||
|
||||
rem premake4 --no-pelibs vs2008
|
||||
rem premake4 --no-pedemos vs2008
|
||||
rem premake4 --no-bulletlibs --no-pelibs vs2008
|
||||
premake4 --with-nacl vs2008
|
||||
|
||||
|
||||
pause
|
||||
4
msvc/vs2010.bat
Normal file
4
msvc/vs2010.bat
Normal file
@@ -0,0 +1,4 @@
|
||||
|
||||
premake4 vs2010
|
||||
|
||||
pause
|
||||
Reference in New Issue
Block a user