build google on windows
This commit is contained in:
@@ -1,5 +1,15 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
unameOut="$(uname -s)"
|
||||||
|
case "${unameOut}" in
|
||||||
|
Linux*) machineArch=Linux;;
|
||||||
|
Darwin*) machineArch=MacOS;;
|
||||||
|
CYGWIN*) machineArch=Windows;;
|
||||||
|
MINGW*) machineArch=Windows;;
|
||||||
|
*) machineArch="UNKNOWN:${unameOut}"
|
||||||
|
esac
|
||||||
|
echo ${machineArch}
|
||||||
|
|
||||||
libVer=1.5.0
|
libVer=1.5.0
|
||||||
|
|
||||||
echo libVer=$libVer
|
echo libVer=$libVer
|
||||||
@@ -29,13 +39,39 @@ mkdir -p $libSrcPath
|
|||||||
|
|
||||||
tar zxvpf $libFilePath -C $buildPath
|
tar zxvpf $libFilePath -C $buildPath
|
||||||
|
|
||||||
unameOut="$(uname -s)"
|
if [ "${machineArch}" = "Linux" ]; then
|
||||||
case "${unameOut}" in
|
( cd $libBuildPath && \
|
||||||
Linux*) ( cd $libBuildPath && cmake -DCMAKE_BUILD_TYPE=Release -DBENCHMARK_DOWNLOAD_DEPENDENCIES=ON -DCMAKE_INSTALL_PREFIX:PATH=$libInstallPath $libSrcPath && make install -j);;
|
cmake \
|
||||||
Darwin*) ( cd $libBuildPath && cmake -DCMAKE_BUILD_TYPE=Release -DBENCHMARK_DOWNLOAD_DEPENDENCIES=ON -DCMAKE_INSTALL_PREFIX:PATH=$libInstallPath -DLLVMAR_EXECUTABLE:PATH=/usr/bin/ar -DLLVMNM_EXECUTABLE:PATH=/usr/bin/nm -DLLVMRANLIB_EXECUTABLE:PATH=/usr/bin/ranlib $libSrcPath && make install -j);;
|
-DCMAKE_BUILD_TYPE=Release \
|
||||||
CYGWIN*) ;;
|
-DBENCHMARK_DOWNLOAD_DEPENDENCIES=ON \
|
||||||
MINGW*) ;;
|
-DCMAKE_INSTALL_PREFIX:PATH=$libInstallPath \
|
||||||
*) ;;
|
$libSrcPath && \
|
||||||
esac
|
make install -j)
|
||||||
echo ${machine}
|
elif [ "${machineArch}" = "MacOS" ]; then
|
||||||
|
( cd $libBuildPath && \
|
||||||
|
cmake \
|
||||||
|
-DCMAKE_BUILD_TYPE=Release \
|
||||||
|
-DBENCHMARK_DOWNLOAD_DEPENDENCIES=ON \
|
||||||
|
-DCMAKE_INSTALL_PREFIX:PATH=$libInstallPath \
|
||||||
|
-DLLVMAR_EXECUTABLE:PATH=/usr/bin/ar \
|
||||||
|
-DLLVMNM_EXECUTABLE:PATH=/usr/bin/nm \
|
||||||
|
-DLLVMRANLIB_EXECUTABLE:PATH=/usr/bin/ranlib \
|
||||||
|
$libSrcPath && \
|
||||||
|
make install -j)
|
||||||
|
elif [ "${machineArch}" = "Windows" ]; then
|
||||||
|
( cd $libBuildPath && \
|
||||||
|
cmake \
|
||||||
|
-DCMAKE_BUILD_TYPE=Release \
|
||||||
|
-DBENCHMARK_DOWNLOAD_DEPENDENCIES=ON \
|
||||||
|
-DCMAKE_INSTALL_PREFIX:PATH=$libInstallPath \
|
||||||
|
-G "Visual Studio 16 2019" \
|
||||||
|
-A x64 \
|
||||||
|
$libSrcPath && \
|
||||||
|
cmake \
|
||||||
|
--build . \
|
||||||
|
--config Release \
|
||||||
|
--target INSTALL)
|
||||||
|
else
|
||||||
|
echo "unknown architecture"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|||||||
@@ -1,5 +1,15 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
unameOut="$(uname -s)"
|
||||||
|
case "${unameOut}" in
|
||||||
|
Linux*) machineArch=Linux;;
|
||||||
|
Darwin*) machineArch=MacOS;;
|
||||||
|
CYGWIN*) machineArch=Windows;;
|
||||||
|
MINGW*) machineArch=Windows;;
|
||||||
|
*) machineArch="UNKNOWN:${unameOut}"
|
||||||
|
esac
|
||||||
|
echo ${machineArch}
|
||||||
|
|
||||||
libVer=0.4.0
|
libVer=0.4.0
|
||||||
|
|
||||||
echo libVer=$libVer
|
echo libVer=$libVer
|
||||||
@@ -29,4 +39,36 @@ mkdir -p $libSrcPath
|
|||||||
|
|
||||||
tar zxvpf $libFilePath -C $buildPath
|
tar zxvpf $libFilePath -C $buildPath
|
||||||
|
|
||||||
( cd $libBuildPath && cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS:BOOL=TRUE -DCMAKE_INSTALL_PREFIX:PATH=$libInstallPath $libSrcPath && make install -j)
|
if [ "${machineArch}" = "Linux" ]; then
|
||||||
|
( cd $libBuildPath && \
|
||||||
|
cmake \
|
||||||
|
-DCMAKE_BUILD_TYPE=Release \
|
||||||
|
-DBUILD_SHARED_LIBS:BOOL=TRUE \
|
||||||
|
-DCMAKE_INSTALL_PREFIX:PATH=$libInstallPath \
|
||||||
|
$libSrcPath && \
|
||||||
|
make install -j)
|
||||||
|
elif [ "${machineArch}" = "MacOS" ]; then
|
||||||
|
( cd $libBuildPath && \
|
||||||
|
cmake \
|
||||||
|
-DCMAKE_BUILD_TYPE=Release \
|
||||||
|
-DBUILD_SHARED_LIBS:BOOL=TRUE \
|
||||||
|
-DCMAKE_INSTALL_PREFIX:PATH=$libInstallPath \
|
||||||
|
$libSrcPath && \
|
||||||
|
make install -j)
|
||||||
|
elif [ "${machineArch}" = "Windows" ]; then
|
||||||
|
( cd $libBuildPath && \
|
||||||
|
cmake \
|
||||||
|
-DCMAKE_BUILD_TYPE=Release \
|
||||||
|
-DBUILD_SHARED_LIBS:BOOL=TRUE \
|
||||||
|
-DCMAKE_INSTALL_PREFIX:PATH=$libInstallPath \
|
||||||
|
-G "Visual Studio 16 2019" \
|
||||||
|
-A x64 \
|
||||||
|
$libSrcPath && \
|
||||||
|
cmake \
|
||||||
|
--build . \
|
||||||
|
--config Release \
|
||||||
|
--target INSTALL)
|
||||||
|
else
|
||||||
|
echo "unknown architecture"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|||||||
@@ -1,5 +1,15 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
unameOut="$(uname -s)"
|
||||||
|
case "${unameOut}" in
|
||||||
|
Linux*) machineArch=Linux;;
|
||||||
|
Darwin*) machineArch=MacOS;;
|
||||||
|
CYGWIN*) machineArch=Windows;;
|
||||||
|
MINGW*) machineArch=Windows;;
|
||||||
|
*) machineArch="UNKNOWN:${unameOut}"
|
||||||
|
esac
|
||||||
|
echo ${machineArch}
|
||||||
|
|
||||||
libVer=1.8.1
|
libVer=1.8.1
|
||||||
|
|
||||||
echo libVer=$libVer
|
echo libVer=$libVer
|
||||||
@@ -29,4 +39,36 @@ mkdir -p $libSrcPath
|
|||||||
|
|
||||||
tar zxvpf $libFilePath -C $buildPath
|
tar zxvpf $libFilePath -C $buildPath
|
||||||
|
|
||||||
( cd $libBuildPath && cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS:BOOL=TRUE -DCMAKE_INSTALL_PREFIX:PATH=$libInstallPath $libSrcPath && make install -j)
|
if [ "${machineArch}" = "Linux" ]; then
|
||||||
|
( cd $libBuildPath && \
|
||||||
|
cmake \
|
||||||
|
-DCMAKE_BUILD_TYPE=Release \
|
||||||
|
-DBUILD_SHARED_LIBS:BOOL=TRUE \
|
||||||
|
-DCMAKE_INSTALL_PREFIX:PATH=$libInstallPath \
|
||||||
|
$libSrcPath && \
|
||||||
|
make install -j)
|
||||||
|
elif [ "${machineArch}" = "MacOS" ]; then
|
||||||
|
( cd $libBuildPath && \
|
||||||
|
cmake \
|
||||||
|
-DCMAKE_BUILD_TYPE=Release \
|
||||||
|
-DBUILD_SHARED_LIBS:BOOL=TRUE \
|
||||||
|
-DCMAKE_INSTALL_PREFIX:PATH=$libInstallPath \
|
||||||
|
$libSrcPath && \
|
||||||
|
make install -j)
|
||||||
|
elif [ "${machineArch}" = "Windows" ]; then
|
||||||
|
( cd $libBuildPath && \
|
||||||
|
cmake \
|
||||||
|
-DCMAKE_BUILD_TYPE=Release \
|
||||||
|
-DBUILD_SHARED_LIBS:BOOL=TRUE \
|
||||||
|
-DCMAKE_INSTALL_PREFIX:PATH=$libInstallPath \
|
||||||
|
-G "Visual Studio 16 2019" \
|
||||||
|
-A x64 \
|
||||||
|
$libSrcPath && \
|
||||||
|
cmake \
|
||||||
|
--build . \
|
||||||
|
--config Release \
|
||||||
|
--target INSTALL)
|
||||||
|
else
|
||||||
|
echo "unknown architecture"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user