Use pkg-config instead of sdl2-config
Resolves build issue on Arch Linux (and Arch-derivatives) (Also forms part of a fix for Slackware-current builds) Accepted By: echotangoecho (Arch) Confirmed as functional by: Imarok (Ubuntu 16.04, gcc5.4), wes-fole-dog (Parabola) Refs: #5157 Fixes: #5152 Differential Revision: https://code.wildfiregames.com/D1582 This was SVN commit r21865.
This commit is contained in:
parent
ecce63628c
commit
22791af91f
@ -584,13 +584,14 @@ extern_lib_defs = {
|
|||||||
if os.is("windows") then
|
if os.is("windows") then
|
||||||
includedirs { libraries_dir .. "sdl2/include/SDL" }
|
includedirs { libraries_dir .. "sdl2/include/SDL" }
|
||||||
elseif not _OPTIONS["android"] then
|
elseif not _OPTIONS["android"] then
|
||||||
-- Support SDL2_CONFIG for overriding the default PATH-based sdl2-config
|
-- Support SDL2_CONFIG for overriding the default (pkg-config sdl2)
|
||||||
|
-- i.e. on OSX where it gets set in update-workspaces.sh
|
||||||
sdl_config_path = os.getenv("SDL2_CONFIG")
|
sdl_config_path = os.getenv("SDL2_CONFIG")
|
||||||
if not sdl_config_path then
|
if sdl_config_path then
|
||||||
sdl_config_path = "sdl2-config"
|
pkgconfig_cflags(nil, sdl_config_path.." --cflags")
|
||||||
|
else
|
||||||
|
pkgconfig_cflags("sdl2")
|
||||||
end
|
end
|
||||||
|
|
||||||
pkgconfig_cflags(nil, sdl_config_path.." --cflags")
|
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
link_settings = function()
|
link_settings = function()
|
||||||
@ -598,10 +599,11 @@ extern_lib_defs = {
|
|||||||
add_default_lib_paths("sdl2")
|
add_default_lib_paths("sdl2")
|
||||||
elseif not _OPTIONS["android"] then
|
elseif not _OPTIONS["android"] then
|
||||||
sdl_config_path = os.getenv("SDL2_CONFIG")
|
sdl_config_path = os.getenv("SDL2_CONFIG")
|
||||||
if not sdl_config_path then
|
if sdl_config_path then
|
||||||
sdl_config_path = "sdl2-config"
|
pkgconfig_libs(nil, sdl_config_path.." --libs")
|
||||||
|
else
|
||||||
|
pkgconfig_libs("sdl2")
|
||||||
end
|
end
|
||||||
pkgconfig_libs(nil, sdl_config_path.." --libs")
|
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
|
@ -540,13 +540,14 @@ extern_lib_defs = {
|
|||||||
if os.istarget("windows") then
|
if os.istarget("windows") then
|
||||||
includedirs { libraries_dir .. "sdl2/include/SDL" }
|
includedirs { libraries_dir .. "sdl2/include/SDL" }
|
||||||
elseif not _OPTIONS["android"] then
|
elseif not _OPTIONS["android"] then
|
||||||
-- Support SDL2_CONFIG for overriding the default PATH-based sdl2-config
|
-- Support SDL2_CONFIG for overriding the default (pkg-config sdl2)
|
||||||
|
-- i.e. on OSX where it gets set in update-workspaces.sh
|
||||||
sdl_config_path = os.getenv("SDL2_CONFIG")
|
sdl_config_path = os.getenv("SDL2_CONFIG")
|
||||||
if not sdl_config_path then
|
if sdl_config_path then
|
||||||
sdl_config_path = "sdl2-config"
|
pkgconfig.add_includes(nil, sdl_config_path.." --cflags")
|
||||||
|
else
|
||||||
|
pkgconfig.add_includes("sdl2")
|
||||||
end
|
end
|
||||||
|
|
||||||
pkgconfig.add_includes(nil, sdl_config_path.." --cflags")
|
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
link_settings = function()
|
link_settings = function()
|
||||||
@ -554,10 +555,11 @@ extern_lib_defs = {
|
|||||||
add_default_lib_paths("sdl2")
|
add_default_lib_paths("sdl2")
|
||||||
elseif not _OPTIONS["android"] then
|
elseif not _OPTIONS["android"] then
|
||||||
sdl_config_path = os.getenv("SDL2_CONFIG")
|
sdl_config_path = os.getenv("SDL2_CONFIG")
|
||||||
if not sdl_config_path then
|
if sdl_config_path then
|
||||||
sdl_config_path = "sdl2-config"
|
pkgconfig.add_links(nil, sdl_config_path.." --libs")
|
||||||
|
else
|
||||||
|
pkgconfig.add_links("sdl2")
|
||||||
end
|
end
|
||||||
pkgconfig.add_links(nil, sdl_config_path.." --libs")
|
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user