Bladeren bron

Add --with-physx option

Daniele Bartolini 10 jaren geleden
bovenliggende
commit
acc0dafcff
2 gewijzigde bestanden met toevoegingen van 217 en 188 verwijderingen
  1. 174 170
      genie/crown.lua
  2. 43 18
      genie/genie.lua

+ 174 - 170
genie/crown.lua

@@ -37,48 +37,6 @@ function crown_project(_name, _kind, _defines)
 			CROWN_DIR .. "third/stb_vorbis",
 		}
 
-		if _OPTIONS["with-bullet"] then
-			includedirs {
-				CROWN_DIR .. "third/bullet3/src",
-				CROWN_DIR .. "third/bullet3/src/Bullet3Collision",
-				CROWN_DIR .. "third/bullet3/src/Bullet3Collision/BroadPhaseCollision",
-				CROWN_DIR .. "third/bullet3/src/Bullet3Collision/NarrowPhaseCollision",
-				CROWN_DIR .. "third/bullet3/src/Bullet3Common",
-				CROWN_DIR .. "third/bullet3/src/Bullet3Dynamics",
-				CROWN_DIR .. "third/bullet3/src/Bullet3Dynamics/ConstraintSover",
-				CROWN_DIR .. "third/bullet3/src/Bullet3Geometry",
-				CROWN_DIR .. "third/bullet3/src/Bullet3OpenCL",
-				CROWN_DIR .. "third/bullet3/src/Bullet3OpenCL/BroadphaseCollision",
-				CROWN_DIR .. "third/bullet3/src/Bullet3OpenCL/initialize",
-				CROWN_DIR .. "third/bullet3/src/Bullet3OpenCL/NarrowPhaseCollision",
-				CROWN_DIR .. "third/bullet3/src/Bullet3OpenCL/ParallelPrimitives",
-				CROWN_DIR .. "third/bullet3/src/Bullet3OpenCL/Raycast",
-				CROWN_DIR .. "third/bullet3/src/Bullet3OpenCL/RigidBody",
-				CROWN_DIR .. "third/bullet3/src/Bullet3Serialize",
-				CROWN_DIR .. "third/bullet3/src/Bullet3Serialize/Bullet2FileLoader",
-				CROWN_DIR .. "third/bullet3/src/BulletCollision",
-				CROWN_DIR .. "third/bullet3/src/BulletCollision/BroadphaseCollision",
-				CROWN_DIR .. "third/bullet3/src/BulletCollision/CollisionDispatch",
-				CROWN_DIR .. "third/bullet3/src/BulletCollision/CollisionShapes",
-				CROWN_DIR .. "third/bullet3/src/BulletCollision/Gimpact",
-				CROWN_DIR .. "third/bullet3/src/BulletCollision/NarrowPhaseCollision",
-				CROWN_DIR .. "third/bullet3/src/BulletDynamics",
-				CROWN_DIR .. "third/bullet3/src/BulletDynamics/Character",
-				CROWN_DIR .. "third/bullet3/src/BulletDynamics/ConstraintSolver",
-				CROWN_DIR .. "third/bullet3/src/BulletDynamics/Dynamics",
-				CROWN_DIR .. "third/bullet3/src/BulletDynamics/Featherstone",
-				CROWN_DIR .. "third/bullet3/src/BulletDynamics/MLCPSolvers",
-				CROWN_DIR .. "third/bullet3/src/BulletDynamics/Vehicle",
-				CROWN_DIR .. "third/bullet3/src/BulletSoftBody",
-				CROWN_DIR .. "third/bullet3/src/LinearMath",
-				CROWN_DIR .. "third/bullet3/src/clew",
-			}
-
-			links {
-				"bullet",
-			}
-		end
-
 		defines {
 			_defines,
 		}
@@ -134,6 +92,48 @@ function crown_project(_name, _kind, _defines)
 			configuration {}
 		end
 
+		if _OPTIONS["with-bullet"] then
+			includedirs {
+				CROWN_DIR .. "third/bullet3/src",
+				CROWN_DIR .. "third/bullet3/src/Bullet3Collision",
+				CROWN_DIR .. "third/bullet3/src/Bullet3Collision/BroadPhaseCollision",
+				CROWN_DIR .. "third/bullet3/src/Bullet3Collision/NarrowPhaseCollision",
+				CROWN_DIR .. "third/bullet3/src/Bullet3Common",
+				CROWN_DIR .. "third/bullet3/src/Bullet3Dynamics",
+				CROWN_DIR .. "third/bullet3/src/Bullet3Dynamics/ConstraintSover",
+				CROWN_DIR .. "third/bullet3/src/Bullet3Geometry",
+				CROWN_DIR .. "third/bullet3/src/Bullet3OpenCL",
+				CROWN_DIR .. "third/bullet3/src/Bullet3OpenCL/BroadphaseCollision",
+				CROWN_DIR .. "third/bullet3/src/Bullet3OpenCL/initialize",
+				CROWN_DIR .. "third/bullet3/src/Bullet3OpenCL/NarrowPhaseCollision",
+				CROWN_DIR .. "third/bullet3/src/Bullet3OpenCL/ParallelPrimitives",
+				CROWN_DIR .. "third/bullet3/src/Bullet3OpenCL/Raycast",
+				CROWN_DIR .. "third/bullet3/src/Bullet3OpenCL/RigidBody",
+				CROWN_DIR .. "third/bullet3/src/Bullet3Serialize",
+				CROWN_DIR .. "third/bullet3/src/Bullet3Serialize/Bullet2FileLoader",
+				CROWN_DIR .. "third/bullet3/src/BulletCollision",
+				CROWN_DIR .. "third/bullet3/src/BulletCollision/BroadphaseCollision",
+				CROWN_DIR .. "third/bullet3/src/BulletCollision/CollisionDispatch",
+				CROWN_DIR .. "third/bullet3/src/BulletCollision/CollisionShapes",
+				CROWN_DIR .. "third/bullet3/src/BulletCollision/Gimpact",
+				CROWN_DIR .. "third/bullet3/src/BulletCollision/NarrowPhaseCollision",
+				CROWN_DIR .. "third/bullet3/src/BulletDynamics",
+				CROWN_DIR .. "third/bullet3/src/BulletDynamics/Character",
+				CROWN_DIR .. "third/bullet3/src/BulletDynamics/ConstraintSolver",
+				CROWN_DIR .. "third/bullet3/src/BulletDynamics/Dynamics",
+				CROWN_DIR .. "third/bullet3/src/BulletDynamics/Featherstone",
+				CROWN_DIR .. "third/bullet3/src/BulletDynamics/MLCPSolvers",
+				CROWN_DIR .. "third/bullet3/src/BulletDynamics/Vehicle",
+				CROWN_DIR .. "third/bullet3/src/BulletSoftBody",
+				CROWN_DIR .. "third/bullet3/src/LinearMath",
+				CROWN_DIR .. "third/bullet3/src/clew",
+			}
+
+			links {
+				"bullet",
+			}
+		end
+
 		configuration { "debug or development" }
 			flags {
 				"Symbols"
@@ -142,6 +142,9 @@ function crown_project(_name, _kind, _defines)
 				"_DEBUG",
 				"CROWN_DEBUG=1"
 			}
+			linkoptions {
+				"-rdynamic"
+			}
 
 		configuration { "release" }
 			defines {
@@ -176,164 +179,165 @@ function crown_project(_name, _kind, _defines)
 				"xinput",
 			}
 
-		-- PhysX
-		local function includedirs_physx(prefix)
-			includedirs {
-				prefix .. "Include",
-				prefix .. "Include/common",
-				prefix .. "Include/characterkinematic",
-				prefix .. "Include/cloth",
-				prefix .. "Include/common",
-				prefix .. "Include/cooking",
-				prefix .. "Include/extensions",
-				prefix .. "Include/foundation",
-				prefix .. "Include/geometry",
-				prefix .. "Include/particles",
-				prefix .. "Include/physxprofilesdk",
-				prefix .. "Include/physxvisualdebuggersdk",
-				prefix .. "Include/pvd",
-				prefix .. "Include/pxtask",
-				prefix .. "Include/RepX",
-				prefix .. "Include/RepXUpgrader",
-				prefix .. "Include/vehicle",
-			}
-		end
+		if _OPTIONS["with-physx"] then
+			local function includedirs_physx(prefix)
+				includedirs {
+					prefix .. "Include",
+					prefix .. "Include/common",
+					prefix .. "Include/characterkinematic",
+					prefix .. "Include/cloth",
+					prefix .. "Include/common",
+					prefix .. "Include/cooking",
+					prefix .. "Include/extensions",
+					prefix .. "Include/foundation",
+					prefix .. "Include/geometry",
+					prefix .. "Include/particles",
+					prefix .. "Include/physxprofilesdk",
+					prefix .. "Include/physxvisualdebuggersdk",
+					prefix .. "Include/pvd",
+					prefix .. "Include/pxtask",
+					prefix .. "Include/RepX",
+					prefix .. "Include/RepXUpgrader",
+					prefix .. "Include/vehicle",
+				}
+			end
+
+			local function links_physx(config, os, platform)
+				if os == "linux" then
+					if config == "CHECKED" or config == "PROFILE" then
+						linkoptions {
+							"-rdynamic",
+						}
+					end
 
-		local function links_physx(config, os, platform)
-			if os == "linux" then
-				if config == "CHECKED" or config == "PROFILE" then
 					linkoptions {
-						"-rdynamic",
+						"-Wl,--start-group $(addprefix -l," ..
+						"	PhysX3"                   .. config .. "_" .. platform ..
+						"	PhysX3Common"             .. config .. "_" .. platform ..
+						"	PhysX3Cooking"            .. config .. "_" .. platform ..
+						"	PhysX3CharacterKinematic" .. config .. "_" .. platform ..
+						"	PhysX3Extensions"         .. config ..
+						"	PhysX3Vehicle"            .. config ..
+						"	PhysXProfileSDK"          .. config ..
+						"	PhysXVisualDebuggerSDK"   .. config ..
+						"	PxTask"                   .. config ..
+						") -Wl,--end-group"
 					}
 				end
 
-				linkoptions {
-					"-Wl,--start-group $(addprefix -l," ..
-					"	PhysX3"                   .. config .. "_" .. platform ..
-					"	PhysX3Common"             .. config .. "_" .. platform ..
-					"	PhysX3Cooking"            .. config .. "_" .. platform ..
-					"	PhysX3CharacterKinematic" .. config .. "_" .. platform ..
-					"	PhysX3Extensions"         .. config ..
-					"	PhysX3Vehicle"            .. config ..
-					"	PhysXProfileSDK"          .. config ..
-					"	PhysXVisualDebuggerSDK"   .. config ..
-					"	PxTask"                   .. config ..
-					") -Wl,--end-group"
-				}
-			end
-
-			if os == "android" then
-				linkoptions {
-					"-Wl,--start-group $(addprefix -l," ..
-					"	LowLevelCloth"            .. config ..
-					"	PhysX3 "                  .. config ..
-					"	PhysX3Common"             .. config ..
-					"	PxTask"                   .. config ..
-					"	LowLevel"                 .. config ..
-					"	PhysX3CharacterKinematic" .. config ..
-					"	PhysX3Cooking"            .. config ..
-					"	PhysX3Extensions"         .. config ..
-					"	PhysX3Vehicle"            .. config ..
-					"	PhysXProfileSDK"          .. config ..
-					"	PhysXVisualDebuggerSDK"   .. config ..
-					"	PvdRuntime"               .. config ..
-					"	SceneQuery"               .. config ..
-					"	SimulationController"     .. config ..
-					") -Wl,--end-group"
-				}
-			end
+				if os == "android" then
+					linkoptions {
+						"-Wl,--start-group $(addprefix -l," ..
+						"	LowLevelCloth"            .. config ..
+						"	PhysX3 "                  .. config ..
+						"	PhysX3Common"             .. config ..
+						"	PxTask"                   .. config ..
+						"	LowLevel"                 .. config ..
+						"	PhysX3CharacterKinematic" .. config ..
+						"	PhysX3Cooking"            .. config ..
+						"	PhysX3Extensions"         .. config ..
+						"	PhysX3Vehicle"            .. config ..
+						"	PhysXProfileSDK"          .. config ..
+						"	PhysXVisualDebuggerSDK"   .. config ..
+						"	PvdRuntime"               .. config ..
+						"	SceneQuery"               .. config ..
+						"	SimulationController"     .. config ..
+						") -Wl,--end-group"
+					}
+				end
 
-			if os == "windows" then
-				links {
-					"PhysX3CharacterKinematic" .. config .. "_" .. platform,
-					"PhysX3"                   .. config .. "_" .. platform,
-					"PhysX3Common"             .. config .. "_" .. platform,
-					"PhysX3Cooking"            .. config .. "_" .. platform,
-					"PhysX3Extensions",
-				}
+				if os == "windows" then
+					links {
+						"PhysX3CharacterKinematic" .. config .. "_" .. platform,
+						"PhysX3"                   .. config .. "_" .. platform,
+						"PhysX3Common"             .. config .. "_" .. platform,
+						"PhysX3Cooking"            .. config .. "_" .. platform,
+						"PhysX3Extensions",
+					}
+				end
 			end
-		end
 
-		configuration { "android*" }
-			includedirs_physx("$(PHYSX_SDK_ANDROID)/")
+			configuration { "android*" }
+				includedirs_physx("$(PHYSX_SDK_ANDROID)/")
 
-		configuration { "linux*" }
-			includedirs_physx("$(PHYSX_SDK_LINUX)/")
+			configuration { "linux*" }
+				includedirs_physx("$(PHYSX_SDK_LINUX)/")
 
-		configuration { "vs*" }
-			includedirs_physx("$(PHYSX_SDK_WINDOWS)/")
+			configuration { "vs*" }
+				includedirs_physx("$(PHYSX_SDK_WINDOWS)/")
 
-		configuration { "android-arm" }
-			libdirs {
-				"$(PHYSX_SDK_ANDROID)/Lib/android9_neon",
-			}
+			configuration { "android-arm" }
+				libdirs {
+					"$(PHYSX_SDK_ANDROID)/Lib/android9_neon",
+				}
 
-		configuration { "x32", "linux-*" }
-			libdirs {
-				"$(PHYSX_SDK_LINUX)/Lib/linux32",
-				"$(PHYSX_SDK_LINUX)/Bin/linux32",
-			}
+			configuration { "x32", "linux-*" }
+				libdirs {
+					"$(PHYSX_SDK_LINUX)/Lib/linux32",
+					"$(PHYSX_SDK_LINUX)/Bin/linux32",
+				}
 
-		configuration { "x64", "linux-*" }
-			libdirs {
-				"$(PHYSX_SDK_LINUX)/Lib/linux64",
-				"$(PHYSX_SDK_LINUX)/Bin/linux64",
-			}
+			configuration { "x64", "linux-*" }
+				libdirs {
+					"$(PHYSX_SDK_LINUX)/Lib/linux64",
+					"$(PHYSX_SDK_LINUX)/Bin/linux64",
+				}
 
-		configuration { "x32", "vs*" }
-			libdirs {
-				"$(PHYSX_SDK_WINDOWS)/Lib/win32",
-			}
+			configuration { "x32", "vs*" }
+				libdirs {
+					"$(PHYSX_SDK_WINDOWS)/Lib/win32",
+				}
 
-		configuration { "x64", "vs*" }
-			libdirs {
-				"$(PHYSX_SDK_WINDOWS)/Lib/win64",
-			}
+			configuration { "x64", "vs*" }
+				libdirs {
+					"$(PHYSX_SDK_WINDOWS)/Lib/win64",
+				}
 
-		configuration { "x32", "debug", "linux-*" }
-			links_physx("CHECKED", "linux", "x86")
+			configuration { "x32", "debug", "linux-*" }
+				links_physx("CHECKED", "linux", "x86")
 
-		configuration { "x64", "debug", "linux-*" }
-			links_physx("CHECKED", "linux", "x64")
+			configuration { "x64", "debug", "linux-*" }
+				links_physx("CHECKED", "linux", "x64")
 
-		configuration { "x32", "development", "linux-*" }
-			links_physx("PROFILE", "linux", "x86")
+			configuration { "x32", "development", "linux-*" }
+				links_physx("PROFILE", "linux", "x86")
 
-		configuration { "x64", "development", "linux-*" }
-			links_physx("PROFILE", "linux", "x64")
+			configuration { "x64", "development", "linux-*" }
+				links_physx("PROFILE", "linux", "x64")
 
-		configuration { "x32", "release", "linux-*" }
-			links_physx("", "linux", "x86")
+			configuration { "x32", "release", "linux-*" }
+				links_physx("", "linux", "x86")
 
-		configuration { "x64", "release", "linux-*" }
-			links_physx("", "linux", "x64")
+			configuration { "x64", "release", "linux-*" }
+				links_physx("", "linux", "x64")
 
-		configuration { "debug", "android-arm" }
-			links_physx("CHECKED", "android", "")
+			configuration { "debug", "android-arm" }
+				links_physx("CHECKED", "android", "")
 
-		configuration { "development", "android-arm" }
-			links_physx("PROFILE", "android", "")
+			configuration { "development", "android-arm" }
+				links_physx("PROFILE", "android", "")
 
-		configuration { "release", "android-arm" }
-			links_physx("", "android", "")
+			configuration { "release", "android-arm" }
+				links_physx("", "android", "")
 
-		configuration { "debug", "x32", "vs*"}
-			links_physx("CHECKED", "windows", "x86")
+			configuration { "debug", "x32", "vs*"}
+				links_physx("CHECKED", "windows", "x86")
 
-		configuration { "debug", "x64", "vs*" }
-			links_physx("CHECKED", "windows", "x64")
+			configuration { "debug", "x64", "vs*" }
+				links_physx("CHECKED", "windows", "x64")
 
-		configuration { "development", "x32", "vs*" }
-			links_physx("PROFILE", "windows", "x86")
+			configuration { "development", "x32", "vs*" }
+				links_physx("PROFILE", "windows", "x86")
 
-		configuration { "development", "x64", "vs*" }
-			links_physx("PROFILE", "windows", "x64")
+			configuration { "development", "x64", "vs*" }
+				links_physx("PROFILE", "windows", "x64")
 
-		configuration { "release", "x32", "vs*" }
-			links_physx("", "windows", "x86")
+			configuration { "release", "x32", "vs*" }
+				links_physx("", "windows", "x86")
 
-		configuration { "release", "x64", "vs*" }
-			links_physx("", "windows", "x64")
+			configuration { "release", "x64", "vs*" }
+				links_physx("", "windows", "x64")
+		end
 
 		configuration {}
 

+ 43 - 18
genie/genie.lua

@@ -27,6 +27,11 @@ newoption {
 	description = "Build with Bullet support."
 }
 
+newoption {
+	trigger = "with-physx",
+	description = "Build with PhysX support."
+}
+
 newoption {
 	trigger = "with-tools",
 	description = "Build with tools."
@@ -77,35 +82,55 @@ crown_project("", "ConsoleApp", {})
 configuration { "x32", "linux-*" }
 	postbuildcommands {
 		"cp    " .. CROWN_THIRD_DIR .. "luajit/pre/linux_x86/luajit " .. CROWN_BUILD_DIR .. "linux32/bin",
-		"cp -r " .. CROWN_THIRD_DIR .. "luajit/src/jit " ..              CROWN_BUILD_DIR .. "linux32/bin",
-		"cp -r " .. "$(PHYSX_SDK_LINUX)/Bin/linux32/libPhysX3* " ..      CROWN_BUILD_DIR .. "linux32/bin",
+		"cp -r " .. CROWN_THIRD_DIR .. "luajit/src/jit "              .. CROWN_BUILD_DIR .. "linux32/bin",
 	}
 
+	if _OPTIONS["with-physx"] then
+		postbuildcommands {
+			"cp -r " .. "$(PHYSX_SDK_LINUX)/Bin/linux32/libPhysX3* " .. CROWN_BUILD_DIR .. "linux32/bin",
+		}
+	end
+
 configuration { "x64", "linux-*" }
 	postbuildcommands {
 		"cp    " .. CROWN_THIRD_DIR .. "luajit/pre/linux_x64/luajit " .. CROWN_BUILD_DIR .. "linux64/bin",
-		"cp -r " .. CROWN_THIRD_DIR .. "luajit/src/jit " ..              CROWN_BUILD_DIR .. "linux64/bin",
-		"cp -r " .. "$(PHYSX_SDK_LINUX)/Bin/linux64/libPhysX3* " ..      CROWN_BUILD_DIR .. "linux64/bin",
+		"cp -r " .. CROWN_THIRD_DIR .. "luajit/src/jit "              .. CROWN_BUILD_DIR .. "linux64/bin",
 	}
 
+	if _OPTIONS["with-physx"] then
+		postbuildcommands {
+			"cp -r " .. "$(PHYSX_SDK_LINUX)/Bin/linux64/libPhysX3* " .. CROWN_BUILD_DIR .. "linux64/bin",
+		}
+	end
+
 configuration { "x32", "vs*" }
 	postbuildcommands {
-		"cp    " .. CROWN_THIRD_DIR .. "luajit/pre/win_x86/luajit.exe " ..  CROWN_BUILD_DIR .. "win32/bin",
-		"cp    " .. CROWN_THIRD_DIR .. "luajit/pre/win_x86/lua51.lib " ..   CROWN_BUILD_DIR .. "win32/bin",
-		"cp    " .. CROWN_THIRD_DIR .. "luajit/pre/win_x86/lua51.exp " ..   CROWN_BUILD_DIR .. "win32/bin",
-		"cp    " .. CROWN_THIRD_DIR .. "luajit/pre/win_x86/lua51.dll " ..   CROWN_BUILD_DIR .. "win32/bin",
-		"cp -r " .. CROWN_THIRD_DIR .. "luajit/src/jit " ..                 CROWN_BUILD_DIR .. "win32/bin",
-		"cp    " .. "$(PHYSX_SDK_WINDOWS)/bin/win32/PhysX3* " ..            CROWN_BUILD_DIR .. "win32/bin",
-		"cp    " .. "$(PHYSX_SDK_WINDOWS)/bin/win32/nvToolsExt32_1.dll " .. CROWN_BUILD_DIR .. "win32/bin",
+		"cp    " .. CROWN_THIRD_DIR .. "luajit/pre/win_x86/luajit.exe " .. CROWN_BUILD_DIR .. "win32/bin",
+		"cp    " .. CROWN_THIRD_DIR .. "luajit/pre/win_x86/lua51.lib "  .. CROWN_BUILD_DIR .. "win32/bin",
+		"cp    " .. CROWN_THIRD_DIR .. "luajit/pre/win_x86/lua51.exp "  .. CROWN_BUILD_DIR .. "win32/bin",
+		"cp    " .. CROWN_THIRD_DIR .. "luajit/pre/win_x86/lua51.dll "  .. CROWN_BUILD_DIR .. "win32/bin",
+		"cp -r " .. CROWN_THIRD_DIR .. "luajit/src/jit "                .. CROWN_BUILD_DIR .. "win32/bin",
 	}
 
+	if _OPTIONS["with-physx"] then
+		postbuildcommands {
+			"cp    " .. "$(PHYSX_SDK_WINDOWS)/bin/win32/PhysX3* "            .. CROWN_BUILD_DIR .. "win32/bin",
+			"cp    " .. "$(PHYSX_SDK_WINDOWS)/bin/win32/nvToolsExt32_1.dll " .. CROWN_BUILD_DIR .. "win32/bin",
+		}
+	end
+
 configuration { "x64", "vs*" }
 	postbuildcommands {
-		"cp    " .. CROWN_THIRD_DIR .. "luajit/pre/win_x64/luajit.exe " ..  CROWN_BUILD_DIR .. "win64/bin",
-		"cp    " .. CROWN_THIRD_DIR .. "luajit/pre/win_x64/lua51.lib " ..   CROWN_BUILD_DIR .. "win64/bin",
-		"cp    " .. CROWN_THIRD_DIR .. "luajit/pre/win_x64/lua51.exp " ..   CROWN_BUILD_DIR .. "win64/bin",
-		"cp    " .. CROWN_THIRD_DIR .. "luajit/pre/win_x64/lua51.dll " ..   CROWN_BUILD_DIR .. "win64/bin",
-		"cp -r " .. CROWN_THIRD_DIR .. "luajit/src/jit " ..                 CROWN_BUILD_DIR .. "win64/bin",
-		"cp    " .. "$(PHYSX_SDK_WINDOWS)/bin/win64/PhysX3* " ..            CROWN_BUILD_DIR .. "win64/bin",
-		"cp    " .. "$(PHYSX_SDK_WINDOWS)/bin/win64/nvToolsExt64_1.dll " .. CROWN_BUILD_DIR .. "win64/bin",
+		"cp    " .. CROWN_THIRD_DIR .. "luajit/pre/win_x64/luajit.exe " .. CROWN_BUILD_DIR .. "win64/bin",
+		"cp    " .. CROWN_THIRD_DIR .. "luajit/pre/win_x64/lua51.lib "  .. CROWN_BUILD_DIR .. "win64/bin",
+		"cp    " .. CROWN_THIRD_DIR .. "luajit/pre/win_x64/lua51.exp "  .. CROWN_BUILD_DIR .. "win64/bin",
+		"cp    " .. CROWN_THIRD_DIR .. "luajit/pre/win_x64/lua51.dll "  .. CROWN_BUILD_DIR .. "win64/bin",
+		"cp -r " .. CROWN_THIRD_DIR .. "luajit/src/jit "                .. CROWN_BUILD_DIR .. "win64/bin",
 	}
+
+	if _OPTIONS["with-physx"] then
+		postbuildcommands {
+			"cp    " .. "$(PHYSX_SDK_WINDOWS)/bin/win64/PhysX3* "            .. CROWN_BUILD_DIR .. "win64/bin",
+			"cp    " .. "$(PHYSX_SDK_WINDOWS)/bin/win64/nvToolsExt64_1.dll " .. CROWN_BUILD_DIR .. "win64/bin",
+		}
+	end