Add nvtt to build system
This was SVN commit r8093.
This commit is contained in:
parent
933fb2dc9f
commit
aadbf53a2a
@ -15,7 +15,12 @@ local function add_extern_lib_paths(extern_lib)
|
|||||||
-- Often, the headers in libraries/ are windows-specific (always, except
|
-- Often, the headers in libraries/ are windows-specific (always, except
|
||||||
-- for cxxtest and fcollada). So don't add the include dir unless on
|
-- for cxxtest and fcollada). So don't add the include dir unless on
|
||||||
-- windows or processing one of those libs.
|
-- windows or processing one of those libs.
|
||||||
if OS == "windows" or extern_lib == "cxxtest" or extern_lib == "fcollada" or extern_lib == "valgrind" then
|
if OS == "windows" or
|
||||||
|
extern_lib == "cxxtest" or
|
||||||
|
extern_lib == "fcollada" or
|
||||||
|
extern_lib == "valgrind" or
|
||||||
|
(extern_lib == "nvtt" and not options["with-system-nvtt"])
|
||||||
|
then
|
||||||
tinsert(package.includepaths, libraries_dir .. extern_lib .. "/include")
|
tinsert(package.includepaths, libraries_dir .. extern_lib .. "/include")
|
||||||
-- Insert libs at pos=1 (i.e. the front of the list) so they take
|
-- Insert libs at pos=1 (i.e. the front of the list) so they take
|
||||||
-- precedence over system libraries
|
-- precedence over system libraries
|
||||||
@ -157,6 +162,12 @@ extern_lib_defs = {
|
|||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
|
nvtt = {
|
||||||
|
win_names = { "nvtt" },
|
||||||
|
unix_names = { "nvtt" },
|
||||||
|
defines = { "NVTT_SHARED=1" },
|
||||||
|
dbg_suffix = "", -- for performance we always use the Release-mode version
|
||||||
|
},
|
||||||
openal = {
|
openal = {
|
||||||
win_names = { "openal32" },
|
win_names = { "openal32" },
|
||||||
unix_names = { "openal" },
|
unix_names = { "openal" },
|
||||||
|
@ -6,6 +6,7 @@ addoption("icc", "Use Intel C++ Compiler (Linux only; should use either \"--cc i
|
|||||||
addoption("outpath", "Location for generated project files")
|
addoption("outpath", "Location for generated project files")
|
||||||
addoption("without-tests", "Disable generation of test projects")
|
addoption("without-tests", "Disable generation of test projects")
|
||||||
addoption("without-pch", "Disable generation and usage of precompiled headers")
|
addoption("without-pch", "Disable generation and usage of precompiled headers")
|
||||||
|
addoption("with-system-nvtt", "Search standard paths for nvidia-texture-tools library, instead of using bundled copy")
|
||||||
addoption("bindir", "Directory for executables (typically '/usr/games'); default is to be relocatable")
|
addoption("bindir", "Directory for executables (typically '/usr/games'); default is to be relocatable")
|
||||||
addoption("datadir", "Directory for data files (typically '/usr/share/games/0ad'); default is ../data/ relative to executable")
|
addoption("datadir", "Directory for data files (typically '/usr/share/games/0ad'); default is ../data/ relative to executable")
|
||||||
addoption("libdir", "Directory for libraries (typically '/usr/lib/games/0ad'); default is ./ relative to executable")
|
addoption("libdir", "Directory for libraries (typically '/usr/lib/games/0ad'); default is ./ relative to executable")
|
||||||
@ -466,6 +467,7 @@ function setup_all_libs ()
|
|||||||
"renderer"
|
"renderer"
|
||||||
}
|
}
|
||||||
extern_libs = {
|
extern_libs = {
|
||||||
|
"nvtt",
|
||||||
"opengl",
|
"opengl",
|
||||||
"sdl", -- key definitions
|
"sdl", -- key definitions
|
||||||
"spidermonkey", -- for graphics/scripting
|
"spidermonkey", -- for graphics/scripting
|
||||||
@ -615,6 +617,8 @@ used_extern_libs = {
|
|||||||
"enet",
|
"enet",
|
||||||
|
|
||||||
"valgrind",
|
"valgrind",
|
||||||
|
|
||||||
|
"nvtt",
|
||||||
}
|
}
|
||||||
|
|
||||||
-- Bundles static libs together with main.cpp and builds game executable.
|
-- Bundles static libs together with main.cpp and builds game executable.
|
||||||
|
@ -6,6 +6,14 @@ die()
|
|||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
with_system_nvtt=false
|
||||||
|
for i in "$@"
|
||||||
|
do
|
||||||
|
case $i in
|
||||||
|
--with-system-nvtt ) with_system_nvtt=true ;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
cd "$(dirname $0)"
|
cd "$(dirname $0)"
|
||||||
# Now in build/workspaces/ (where we assume this script resides)
|
# Now in build/workspaces/ (where we assume this script resides)
|
||||||
|
|
||||||
@ -14,7 +22,13 @@ echo
|
|||||||
|
|
||||||
# Build/update bundled external libraries
|
# Build/update bundled external libraries
|
||||||
(cd ../../libraries/fcollada/src && make) || die "FCollada build failed"
|
(cd ../../libraries/fcollada/src && make) || die "FCollada build failed"
|
||||||
|
echo
|
||||||
(cd ../../libraries/spidermonkey-tip && ./build.sh) || die "SpiderMonkey build failed"
|
(cd ../../libraries/spidermonkey-tip && ./build.sh) || die "SpiderMonkey build failed"
|
||||||
|
echo
|
||||||
|
if [ "$with_system_nvtt" = "false" ]; then
|
||||||
|
(cd ../../libraries/nvtt && ./build.sh) || die "NVTT build failed"
|
||||||
|
fi
|
||||||
|
echo
|
||||||
|
|
||||||
# Make sure workspaces/gcc exists.
|
# Make sure workspaces/gcc exists.
|
||||||
mkdir -p gcc
|
mkdir -p gcc
|
||||||
|
Loading…
Reference in New Issue
Block a user