mirror of
https://github.com/bulletphysics/bullet3
synced 2024-12-13 05:10:08 +00:00
fix premake4 script when X11 is missing
This commit is contained in:
parent
89328def0f
commit
6af885aa12
@ -44,6 +44,22 @@
|
||||
end
|
||||
|
||||
|
||||
function initX11()
|
||||
if os.is("Linux") then
|
||||
if _OPTIONS["enable_system_x11"] and (os.isdir("/usr/include") and os.isfile("/usr/include/X11/X.h")) then
|
||||
links{"X11","pthread"}
|
||||
else
|
||||
print("No X11/X.h found, using dynamic loading of X11")
|
||||
includedirs {
|
||||
projectRootDir .. "examples/ThirdPartyLibs/optionalX11"
|
||||
}
|
||||
defines {"DYNAMIC_LOAD_X11_FUNCTIONS"}
|
||||
links {"dl","pthread"}
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
function initGlew()
|
||||
configuration {}
|
||||
if os.is("Windows") then
|
||||
@ -63,8 +79,9 @@
|
||||
|
||||
if os.is("Linux") then
|
||||
configuration{"Linux"}
|
||||
initX11()
|
||||
if _OPTIONS["enable_system_glx"] then --# and (os.isdir("/usr/include") and os.isfile("/usr/include/GL/glx.h")) then
|
||||
links{"X11","pthread"}
|
||||
links{"pthread"}
|
||||
print("Using system GL/glx.h")
|
||||
else
|
||||
print("Using glad_glx")
|
||||
@ -86,18 +103,3 @@
|
||||
configuration{}
|
||||
end
|
||||
|
||||
function initX11()
|
||||
if os.is("Linux") then
|
||||
if _OPTIONS["enable_system_x11"] and (os.isdir("/usr/include") and os.isfile("/usr/include/X11/X.h")) then
|
||||
links{"X11","pthread"}
|
||||
else
|
||||
print("No X11/X.h found, using dynamic loading of X11")
|
||||
includedirs {
|
||||
projectRootDir .. "examples/ThirdPartyLibs/optionalX11"
|
||||
}
|
||||
defines {"DYNAMIC_LOAD_X11_FUNCTIONS"}
|
||||
links {"dl","pthread"}
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user