Adds SDL2 to build-osx-libs.sh, but leave SDL1 as the default while we test, refs #2041.
Note: SDL2_CONFIG is now the variable to override the path to sdl2-config, SDL_CONFIG remains to override the path to sdl-config This was SVN commit r15774.
This commit is contained in:
parent
a8d8c6d101
commit
8f61e36352
@ -576,18 +576,19 @@ extern_lib_defs = {
|
|||||||
includedirs { libraries_dir .. "sdl/include/SDL" }
|
includedirs { libraries_dir .. "sdl/include/SDL" }
|
||||||
end
|
end
|
||||||
elseif not _OPTIONS["android"] then
|
elseif not _OPTIONS["android"] then
|
||||||
-- Support SDL_CONFIG for overriding for the default PATH-based sdl-config
|
-- Support SDL*_CONFIG for overriding the default PATH-based sdl*-config
|
||||||
sdl_config_path = os.getenv("SDL_CONFIG")
|
if _OPTIONS["sdl2"] then
|
||||||
if not sdl_config_path then
|
sdl_config_path = os.getenv("SDL2_CONFIG")
|
||||||
if _OPTIONS["sdl2"] then
|
if not sdl_config_path then
|
||||||
sdl_config_path = "sdl2-config"
|
sdl_config_path = "sdl2-config"
|
||||||
else
|
end
|
||||||
|
else
|
||||||
|
sdl_config_path = os.getenv("SDL_CONFIG")
|
||||||
|
if not sdl_config_path then
|
||||||
sdl_config_path = "sdl-config"
|
sdl_config_path = "sdl-config"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
-- "pkg-config sdl --libs" appears to include both static and dynamic libs
|
|
||||||
-- when on MacPorts, which is bad, so use sdl-config instead
|
|
||||||
pkgconfig_cflags(nil, sdl_config_path.." --cflags")
|
pkgconfig_cflags(nil, sdl_config_path.." --cflags")
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
@ -599,11 +600,14 @@ extern_lib_defs = {
|
|||||||
add_default_lib_paths("sdl")
|
add_default_lib_paths("sdl")
|
||||||
end
|
end
|
||||||
elseif not _OPTIONS["android"] then
|
elseif not _OPTIONS["android"] then
|
||||||
sdl_config_path = os.getenv("SDL_CONFIG")
|
if _OPTIONS["sdl2"] then
|
||||||
if not sdl_config_path then
|
sdl_config_path = os.getenv("SDL2_CONFIG")
|
||||||
if _OPTIONS["sdl2"] then
|
if not sdl_config_path then
|
||||||
sdl_config_path = "sdl2-config"
|
sdl_config_path = "sdl2-config"
|
||||||
else
|
end
|
||||||
|
else
|
||||||
|
sdl_config_path = os.getenv("SDL_CONFIG")
|
||||||
|
if not sdl_config_path then
|
||||||
sdl_config_path = "sdl-config"
|
sdl_config_path = "sdl-config"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -73,6 +73,7 @@ if [ "`uname -s`" = "Darwin" ]; then
|
|||||||
export GLOOX_CONFIG=${GLOOX_CONFIG:="$(pwd)/../../libraries/osx/gloox/bin/gloox-config"}
|
export GLOOX_CONFIG=${GLOOX_CONFIG:="$(pwd)/../../libraries/osx/gloox/bin/gloox-config"}
|
||||||
export ICU_CONFIG=${ICU_CONFIG:="$(pwd)/../../libraries/osx/icu/bin/icu-config"}
|
export ICU_CONFIG=${ICU_CONFIG:="$(pwd)/../../libraries/osx/icu/bin/icu-config"}
|
||||||
export SDL_CONFIG=${SDL_CONFIG:="$(pwd)/../../libraries/osx/sdl/bin/sdl-config"}
|
export SDL_CONFIG=${SDL_CONFIG:="$(pwd)/../../libraries/osx/sdl/bin/sdl-config"}
|
||||||
|
export SDL2_CONFIG=${SDL2_CONFIG:="$(pwd)/../../libraries/osx/sdl2/bin/sdl2-config"}
|
||||||
export WX_CONFIG=${WX_CONFIG:="$(pwd)/../../libraries/osx/wxwidgets/bin/wx-config"}
|
export WX_CONFIG=${WX_CONFIG:="$(pwd)/../../libraries/osx/wxwidgets/bin/wx-config"}
|
||||||
export XML2_CONFIG=${XML2_CONFIG:="$(pwd)/../../libraries/osx/libxml2/bin/xml2-config"}
|
export XML2_CONFIG=${XML2_CONFIG:="$(pwd)/../../libraries/osx/libxml2/bin/xml2-config"}
|
||||||
fi
|
fi
|
||||||
|
@ -26,6 +26,7 @@ ICONV_VERSION="libiconv-1.14"
|
|||||||
XML2_VERSION="libxml2-2.9.1"
|
XML2_VERSION="libxml2-2.9.1"
|
||||||
# * SDL 1.2.15+ required for Lion support
|
# * SDL 1.2.15+ required for Lion support
|
||||||
SDL_VERSION="SDL-1.2.15"
|
SDL_VERSION="SDL-1.2.15"
|
||||||
|
SDL2_VERSION="SDL2-2.0.3"
|
||||||
BOOST_VERSION="boost_1_52_0"
|
BOOST_VERSION="boost_1_52_0"
|
||||||
# * wxWidgets 2.9+ is necessary for 64-bit OS X build w/ OpenGL support
|
# * wxWidgets 2.9+ is necessary for 64-bit OS X build w/ OpenGL support
|
||||||
WXWIDGETS_VERSION="wxWidgets-3.0.1"
|
WXWIDGETS_VERSION="wxWidgets-3.0.1"
|
||||||
@ -295,6 +296,39 @@ else
|
|||||||
fi
|
fi
|
||||||
popd > /dev/null
|
popd > /dev/null
|
||||||
|
|
||||||
|
# --------------------------------------------------------------
|
||||||
|
|
||||||
|
echo -e "Building SDL2..."
|
||||||
|
|
||||||
|
LIB_VERSION="${SDL2_VERSION}"
|
||||||
|
LIB_ARCHIVE="$LIB_VERSION.tar.gz"
|
||||||
|
LIB_DIRECTORY=$LIB_VERSION
|
||||||
|
LIB_URL="http://www.libsdl.org/release/"
|
||||||
|
|
||||||
|
mkdir -p sdl2
|
||||||
|
pushd sdl2 > /dev/null
|
||||||
|
|
||||||
|
if [[ "$force_rebuild" = "true" ]] || [[ ! -e .already-built ]] || [[ .already-built -ot $LIB_DIRECTORY ]]
|
||||||
|
then
|
||||||
|
INSTALL_DIR="$(pwd)"
|
||||||
|
|
||||||
|
rm -f .already-built
|
||||||
|
download_lib $LIB_URL $LIB_ARCHIVE
|
||||||
|
|
||||||
|
rm -rf $LIB_DIRECTORY bin include lib share
|
||||||
|
tar -xf $LIB_ARCHIVE
|
||||||
|
pushd $LIB_DIRECTORY
|
||||||
|
|
||||||
|
# We don't want SDL2 to pull in system iconv, force it to detect ours with flags.
|
||||||
|
# Don't use X11 - we don't need it and Mountain Lion removed it
|
||||||
|
(./configure CPPFLAGS="-I${ICONV_DIR}/include" CFLAGS="$CFLAGS" CXXFLAGS="$CXXFLAGS" LDFLAGS="$LDFLAGS -L${ICONV_DIR}/lib" --prefix="$INSTALL_DIR" --disable-video-x11 --without-x --enable-shared=no && make $JOBS && make install) || die "SDL build failed"
|
||||||
|
popd
|
||||||
|
touch .already-built
|
||||||
|
else
|
||||||
|
already_built
|
||||||
|
fi
|
||||||
|
popd > /dev/null
|
||||||
|
|
||||||
# --------------------------------------------------------------
|
# --------------------------------------------------------------
|
||||||
echo -e "Building Boost..."
|
echo -e "Building Boost..."
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user