Skip to content

Commit

Permalink
Set the minimum macOS version to 10.9 (#138)
Browse files Browse the repository at this point in the history
* Add macOS Minimum Version Configuration
  • Loading branch information
pfifer authored Nov 13, 2017
1 parent 1ef44ee commit 14f4cce
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
4 changes: 4 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ if(CMAKE_BUILD_TYPE MATCHES DEBUG)
endif (CMAKE_COMPILER_IS_GNUCXX)
endif(CMAKE_BUILD_TYPE MATCHES DEBUG)

if(APPLE)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mmacosx-version-min=10.9")
endif()

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++1y")
set(CMAKE_EXE_LINKER_FLAGS "-L${THIRD_PARTY_LIB_DIR} ${ADDL_LINK_CONFIG}")

Expand Down
13 changes: 7 additions & 6 deletions bootstrap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,12 @@ INSTALL_DIR=$(pwd)/third_party
mkdir -p $INSTALL_DIR

if [ $1 == "clang" ] || [ $(uname) == 'Darwin' ]; then
export MACOSX_DEPLOYMENT_TARGET='10.9'
export MACOSX_MIN_COMPILER_OPT="-mmacosx-version-min=${MACOSX_DEPLOYMENT_TARGET}"
export CC=$(which clang)
export CXX=$(which clang++)
export CXXFLAGS="-I$INSTALL_DIR/include -O3 -stdlib=libc++"
export CXXFLAGS="-I$INSTALL_DIR/include -O3 -stdlib=libc++ ${MACOSX_MIN_COMPILER_OPT} "
export CFLAGS="${MACOSX_MIN_COMPILER_OPT} "
export C_INCLUDE_PATH="$INSTALL_DIR/include"

if [ $(uname) == 'Linux' ]; then
Expand Down Expand Up @@ -101,7 +104,7 @@ if [ ! -d "boost_1_58_0" ]; then

if [[ $(uname) == 'Darwin' ]]; then
./bootstrap.sh --with-libraries=$LIBS
./b2 toolset=clang-darwin $OPTS
./b2 toolset=clang-darwin $OPTS cxxflags="$MACOSX_MIN_COMPILER_OPT"
elif [[ $(uname) == MINGW* ]]; then
./bootstrap.sh --with-libraries=$LIBS --with-toolset=mingw
sed -i 's/\bmingw\b/gcc/' project-config.jam
Expand All @@ -126,23 +129,20 @@ if [ ! -d "zlib-1.2.8" ]; then
rm zlib.tgz

cd zlib-1.2.8

./configure --static --prefix="$INSTALL_DIR"
make -j
make install

cd ..
fi


# Google Protocol Buffers
if [ ! -d "protobuf-2.6.1" ]; then
_curl "$LIB_MIRROR/protobuf-2.6.1.tar.gz" > protobuf.tgz
tar xf protobuf.tgz
rm protobuf.tgz

cd protobuf-2.6.1

conf --enable-shared=no
make -j
make install
Expand All @@ -157,10 +157,11 @@ if [ ! -d "curl-7.47.0" ]; then
tar xf curl.tgz
rm curl.tgz


cd curl-7.47.0

conf --disable-shared --disable-ldap --disable-ldaps \
--enable-threaded-resolver --disable-debug --without-libssh2 --without-ca-bundle --with-ssl="${INSTALL_DIR}" --without-libidn
--enable-threaded-resolver --disable-debug --without-libssh2 --without-ca-bundle --with-ssl="${INSTALL_DIR}" --without-libidn
make -j
make install

Expand Down

0 comments on commit 14f4cce

Please sign in to comment.