Slightly hacky attempt to fix OS X include path order so it hopefully doesn't get confused by a MacPorts SpiderMonkey
This was SVN commit r7419.
This commit is contained in:
parent
e1c6249eab
commit
f4c8225dd4
@ -337,4 +337,18 @@ function package_add_extern_libs(extern_libs)
|
||||
add_extern_lib(extern_lib, def)
|
||||
end
|
||||
end
|
||||
|
||||
if OS == "macosx" then
|
||||
-- MacPorts uses /opt/local as the prefix for most of its libraries,
|
||||
-- which isn't on the default compiler's default include path.
|
||||
-- This needs to come after we add our own external libraries, so that
|
||||
-- our versions take precedence over the system versions (especially
|
||||
-- for SpiderMonkey), which means we have to do it per-config
|
||||
tinsert(package.config["Debug" ].includepaths, "/opt/local/include")
|
||||
tinsert(package.config["Testing"].includepaths, "/opt/local/include")
|
||||
tinsert(package.config["Release"].includepaths, "/opt/local/include")
|
||||
tinsert(package.config["Debug" ].libpaths, "/opt/local/lib")
|
||||
tinsert(package.config["Testing"].libpaths, "/opt/local/lib")
|
||||
tinsert(package.config["Release"].libpaths, "/opt/local/lib")
|
||||
end
|
||||
end
|
||||
|
@ -173,6 +173,7 @@ function package_set_build_flags()
|
||||
"-Wredundant-decls", -- (useful for finding some multiply-included header files)
|
||||
-- "-Wformat=2", -- (useful sometimes, but a bit noisy, so skip it by default)
|
||||
-- "-Wcast-qual", -- (useful for checking const-correctness, but a bit noisy, so skip it by default)
|
||||
"-Wnon-virtual-dtor", -- (sometimes noisy but finds real bugs)
|
||||
|
||||
-- enable security features (stack checking etc) that shouldn't have
|
||||
-- a significant effect on performance and can catch bugs
|
||||
@ -218,25 +219,19 @@ function package_set_build_flags()
|
||||
"-fvisibility=hidden",
|
||||
})
|
||||
|
||||
if OS == "macosx" then
|
||||
-- MacPorts uses /opt/local as its prefix
|
||||
package.includepaths = { "/opt/local/include" }
|
||||
package.libpaths = { "/opt/local/lib" }
|
||||
else
|
||||
-- X11 includes may be installed in one of a gadzillion of three places
|
||||
-- Famous last words: "You can't include too much! ;-)"
|
||||
package.includepaths = {
|
||||
"/usr/X11R6/include/X11",
|
||||
"/usr/X11R6/include",
|
||||
"/usr/include/X11"
|
||||
}
|
||||
package.libpaths = {
|
||||
"/usr/X11R6/lib"
|
||||
}
|
||||
end
|
||||
-- X11 includes may be installed in one of a gadzillion of three places
|
||||
-- Famous last words: "You can't include too much! ;-)"
|
||||
package.includepaths = {
|
||||
"/usr/X11R6/include/X11",
|
||||
"/usr/X11R6/include",
|
||||
"/usr/include/X11"
|
||||
}
|
||||
package.libpaths = {
|
||||
"/usr/X11R6/lib"
|
||||
}
|
||||
|
||||
if OS == "linux" and options["icc"] then
|
||||
tinsert(package.libpaths,
|
||||
"/usr/i686-pc-linux-gnu/lib") -- needed for ICC to find libbfd
|
||||
tinsert(package.libpaths, "/usr/i686-pc-linux-gnu/lib") -- needed for ICC to find libbfd
|
||||
end
|
||||
|
||||
package.defines = {
|
||||
|
Loading…
Reference in New Issue
Block a user