Merge pull request #1557 from erwincoumans/master

fix premake build for linux, thanks to @consultit
This commit is contained in:
erwincoumans 2018-02-10 07:48:19 -08:00 committed by GitHub
commit e87060dcf4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
34 changed files with 116 additions and 12 deletions

View File

@ -3,6 +3,9 @@
kind "StaticLib"
includedirs {".","../../src"}
if os.is("Linux") then
buildoptions{"-fPIC"}
end
files {
"**.cpp",
"**.h"

View File

@ -3,6 +3,9 @@
kind "StaticLib"
includedirs {"."}
if os.is("Linux") then
buildoptions{"-fPIC"}
end
files {
"**.cpp",
"**.h"

View File

@ -6,6 +6,9 @@
"../../src"
}
if os.is("Linux") then
buildoptions{"-fPIC"}
end
files {
"*.cpp",
"*.hpp"

View File

@ -2,6 +2,10 @@
kind "StaticLib"
if os.is("Linux") then
buildoptions{"-fPIC"}
end
includedirs {
"../../../src"
}

View File

@ -6,7 +6,11 @@
"../BulletFileLoader",
"../../../src"
}
if os.is("Linux") then
buildoptions{"-fPIC"}
end
files {
"**.cpp",
"**.h"

View File

@ -1,7 +1,7 @@
project "BulletXmlWorldImporter"
kind "StaticLib"
targetdir "../../lib"
--targetdir "../../lib"
includedirs {
"../BulletWorldImporter",
"../BulletFileLoader",
@ -11,4 +11,4 @@
files {
"**.cpp",
"**.h"
}
}

View File

@ -1,6 +1,9 @@
project "vhacd"
kind "StaticLib"
if os.is("Linux") then
buildoptions{"-fPIC"}
end
includedirs {
"../inc","../public",
}

Binary file not shown.

View File

@ -3,7 +3,11 @@ project "App_BulletExampleBrowser"
language "C++"
kind "ConsoleApp"
if os.is("Linux") then
buildoptions{"-fPIC"}
end
hasCL = findOpenCL("clew")
if (hasCL) then
@ -209,6 +213,10 @@ project "BulletExampleBrowserLib"
"../../src",
"../ThirdPartyLibs",
}
if os.is("Linux") then
buildoptions{"-fPIC"}
end
if _OPTIONS["lua"] then
includedirs{"../ThirdPartyLibs/lua-5.2.3/src"}

View File

@ -12,7 +12,11 @@
"../ThirdPartyLibs",
"../../src",
}
if os.is("Linux") then
buildoptions{"-fPIC"}
end
--links {
--}

View File

@ -92,13 +92,14 @@ INCLUDE_DIRECTORIES(
${BULLET_PHYSICS_SOURCE_DIR}/examples/ThirdPartyLibs
)
IF (USE_SOFT_BODY_MULTI_BODY_DYNAMICS_WORLD)
LINK_LIBRARIES(BulletSoftBody)
ENDIF()
LINK_LIBRARIES(
Bullet3Common BulletWorldImporter BulletFileLoader BulletInverseDynamicsUtils BulletInverseDynamics BulletDynamics BulletCollision LinearMath BussIK
)
IF (USE_SOFT_BODY_MULTI_BODY_DYNAMICS_WORLD)
LINK_LIBRARIES(BulletSoftBody)
ENDIF()
IF (WIN32)
ADD_EXECUTABLE(App_PhysicsServer_SharedMemory
@ -149,7 +150,7 @@ INCLUDE_DIRECTORIES(
ADD_DEFINITIONS(-DB3_USE_STANDALONE_EXAMPLE)
LINK_LIBRARIES(
Bullet3Common BulletWorldImporter BulletInverseDynamicsUtils BulletInverseDynamics BulletDynamics BulletCollision LinearMath BussIK OpenGLWindow
BulletSoftBody Bullet3Common BulletWorldImporter BulletInverseDynamicsUtils BulletInverseDynamics BulletDynamics BulletCollision LinearMath BussIK OpenGLWindow
)

View File

@ -12,6 +12,9 @@ includedirs {".","../../src", "../ThirdPartyLibs"}
links {
"BulletSoftBody", "Bullet3Common","BulletInverseDynamicsUtils", "BulletInverseDynamics", "BulletDynamics","BulletCollision", "LinearMath", "BussIK"
}
if os.is("Linux") then
links{"dl"}
end
language "C++"

View File

@ -73,6 +73,7 @@ links {
end
if os.is("Linux") then
defines {"_LINUX"}
links{"dl"}
end
if os.is("MacOSX") then
defines {"_DARWIN"}

View File

@ -14,6 +14,7 @@ project ("App_PhysicsServerSharedMemoryBridgeUDP")
links {"Ws2_32","Winmm"}
end
if os.is("Linux") then
links{"dl"}
end
if os.is("MacOSX") then
end
@ -68,6 +69,9 @@ if os.is("Windows") then
defines { "WIN32" }
links {"Ws2_32","Winmm"}
end
if os.is("Linux") then
links{"dl"}
end
language "C++"

View File

@ -5,6 +5,9 @@
includedirs {
"."
}
if os.is("Linux") then
buildoptions{"-fPIC"}
end
files {
"*.cpp",
"*.h",

View File

@ -11,6 +11,9 @@ end
defines { "GWEN_COMPILE_STATIC" }
defines { "DONT_USE_GLUT"}
if os.is("Linux") then
buildoptions{"-fPIC"}
end
includedirs {
".",".."
}

View File

@ -16,6 +16,9 @@
includedirs {
".","include","src"
}
if os.is("Linux") then
buildoptions{"-fPIC"}
end
files {
"src/SimpleSocket.cpp",
"src/ActiveSocket.cpp",

View File

@ -18,6 +18,9 @@
includedirs {
".","include"
}
if os.is("Linux") then
buildoptions{"-fPIC"}
end
files {
"callbacks.c",
"compress.c",

View File

@ -18,6 +18,9 @@
includedirs {
"src"
}
if os.is("Linux") then
buildoptions{"-fPIC"}
end
files {
"src/*.c",
"src/*.h"

View File

@ -4,6 +4,9 @@
includedirs {"include"}
if os.is("Linux") then
buildoptions{"-fPIC"}
end
if os.is("Windows") then
files{
"src/impl/win.cc",

View File

@ -6,6 +6,9 @@
includedirs {".."}
if os.is("Linux") then
buildoptions{"-fPIC"}
end
files {
"**.cpp",

View File

@ -4,6 +4,10 @@
kind "StaticLib"
if os.is("Linux") then
buildoptions{"-fPIC"}
end
includedirs {".."}
files {

View File

@ -8,6 +8,9 @@
".."
}
if os.is("Linux") then
buildoptions{"-fPIC"}
end
files {
"**.cpp",

View File

@ -6,6 +6,9 @@
includedirs {".."}
if os.is("Linux") then
buildoptions{"-fPIC"}
end
files {
"**.cpp",

View File

@ -9,6 +9,9 @@ function createProject(vendor)
kind "StaticLib"
if os.is("Linux") then
buildoptions{"-fPIC"}
end
includedirs {
".",".."

View File

@ -5,6 +5,10 @@
includedirs {
"../../../src"
}
if os.is("Linux") then
buildoptions{"-fPIC"}
end
files {
"**.cpp",

View File

@ -1,6 +1,9 @@
project "BulletCollision"
kind "StaticLib"
if os.is("Linux") then
buildoptions{"-fPIC"}
end
includedirs {
"..",
}

View File

@ -3,6 +3,9 @@
includedirs {
"..",
}
if os.is("Linux") then
buildoptions{"-fPIC"}
end
files {
"Dynamics/*.cpp",
"Dynamics/*.h",

View File

@ -1,6 +1,9 @@
project "BulletInverseDynamics"
kind "StaticLib"
if os.is("Linux") then
buildoptions{"-fPIC"}
end
includedirs {
"..",
}

View File

@ -5,6 +5,9 @@
includedirs {
"..",
}
if os.is("Linux") then
buildoptions{"-fPIC"}
end
files {
"**.cpp",
"**.h"

View File

@ -1,6 +1,9 @@
project "LinearMath"
kind "StaticLib"
if os.is("Linux") then
buildoptions{"-fPIC"}
end
includedirs {
"..",
}

View File

@ -11,13 +11,13 @@ INCLUDE_DIRECTORIES(
#ADD_DEFINITIONS(-DGTEST_HAS_PTHREAD=1)
ADD_DEFINITIONS(-DPHYSICS_LOOP_BACK -DPHYSICS_SERVER_DIRECT -DENABLE_GTEST -D_VARIADIC_MAX=10)
IF (USE_SOFT_BODY_MULTI_BODY_DYNAMICS_WORLD)
LINK_LIBRARIES(BulletSoftBody)
ENDIF()
LINK_LIBRARIES(
BulletInverseDynamicsUtils BulletInverseDynamics BulletFileLoader BulletWorldImporter Bullet3Common BulletDynamics BulletCollision LinearMath gtest BussIK
)
IF (USE_SOFT_BODY_MULTI_BODY_DYNAMICS_WORLD)
LINK_LIBRARIES(BulletSoftBody)
ENDIF()
IF (NOT WIN32)
LINK_LIBRARIES( pthread )

View File

@ -164,6 +164,9 @@ project ("Test_PhysicsServerLoopBack")
"BussIK",
"LinearMath"
}
if os.is("Linux") then
links{"dl"}
end
files {
"test.c",
@ -250,6 +253,9 @@ end
"BussIK",
"LinearMath"
}
if os.is("Linux") then
links{"dl"}
end
files {
"test.c",

View File

@ -16,3 +16,7 @@
includedirs {
".","include"
}
if os.is("Linux") then
buildoptions{"-fPIC"}
end