1
0
forked from 0ad/0ad

Bundle miniUPnPc with 0AD.

This was SVN commit r14333.
This commit is contained in:
JoshuaJB 2013-12-13 02:59:35 +00:00
parent 667537ee49
commit 8dab478691
3 changed files with 13 additions and 2 deletions

View File

@ -266,10 +266,14 @@ extern_lib_defs = {
},
miniupnpc = {
compile_settings = function()
add_source_include_paths("miniupnpc")
if not _OPTIONS["with-system-miniupnpc"] then
add_source_include_paths("miniupnpc")
end
end,
link_settings = function()
add_source_lib_paths("miniupnpc")
if not _OPTIONS["with-system-miniupnpc"] then
add_source_lib_paths("miniupnpc")
end
add_default_links({
win_names = { "miniupnpc" },
unix_names = { "miniupnpc" },

View File

@ -13,6 +13,7 @@ newoption { trigger = "without-pch", description = "Disable generation and usage
newoption { trigger = "without-lobby", description = "Disable the use of gloox and the multiplayer lobby" }
newoption { trigger = "with-system-nvtt", description = "Search standard paths for nvidia-texture-tools library, instead of using bundled copy" }
newoption { trigger = "with-system-enet", description = "Search standard paths for libenet, instead of using bundled copy" }
newoption { trigger = "with-system-miniupnpc", description = "Search standard paths for libminiupnpc, instead of using bundled copy" }
newoption { trigger = "with-system-mozjs185", description = "Search standard paths for libmozjs185, instead of using bundled copy" }
newoption { trigger = "with-c++11", description = "Enable C++11 on GCC" }
newoption { trigger = "sysroot", description = "Set compiler system root path, used for building against a non-system SDK. For example /usr/local becomes SYSROOT/user/local" }

View File

@ -36,6 +36,7 @@ premake_args=""
without_nvtt=false
with_system_nvtt=false
with_system_enet=false
with_system_miniupnpc=false
with_system_mozjs185=false
enable_atlas=true
@ -45,6 +46,7 @@ do
--without-nvtt ) without_nvtt=true; premake_args="${premake_args} --without-nvtt" ;;
--with-system-nvtt ) with_system_nvtt=true; premake_args="${premake_args} --with-system-nvtt" ;;
--with-system-enet ) with_system_enet=true; premake_args="${premake_args} --with-system-enet" ;;
--with-system-miniupnpc ) with_system_miniupnpc=true; premake_args="${premake_args} --with-system-miniupnpc" ;;
--with-system-mozjs185 ) with_system_mozjs185=true; premake_args="${premake_args} --with-system-mozjs185" ;;
--enable-atlas ) enable_atlas=true ;;
--disable-atlas ) enable_atlas=false ;;
@ -91,6 +93,10 @@ if [ "`uname -s`" != "Darwin" ]; then
(cd ../../libraries/source/enet && MAKE=${MAKE} JOBS=${JOBS} ./build.sh) || die "ENet build failed"
fi
echo
if [ "$with_system_miniupnpc" = "false" ]; then
(cd ../../libraries/source/miniupnpc && MAKE=${MAKE} JOBS=${JOBS} ./build.sh) || die "MiniUPnPc build failed"
fi
echo
fi
# Now build premake and run it to create the makefiles