Commit ad9eea4d by Carolina Galvão

Adding GeographicLib and fixing 3rdparty scripts

1 parent d7a64bb3
......@@ -527,6 +527,19 @@ else
fi
#
# GeographicLib
#
geolib_test=`dpkg -s libgeographic-dev | grep Status`
if [ "$geolib_test" != "Status: install ok installed" ]; then
sudo apt-get -y install libgeographic-dev
valid $? "Error: could not install geographiclib! Please, install readline: sudo apt-get -y install libgeographic-dev"
echo "geographiclib installed!"
else
echo "geographiclib already installed!"
fi
#
# Install dpkg debian packages
#
......
......@@ -539,6 +539,19 @@ else
echo "debhelper already installed!"
fi
#
# GeographicLib
#
geolib_test=`dpkg -s libgeographic-dev | grep Status`
if [ "$geolib_test" != "Status: install ok installed" ]; then
sudo apt-get -y install libgeographic-dev
valid $? "Error: could not install geographiclib! Please, install readline: sudo apt-get -y install libgeographic-dev"
echo "geographiclib installed!"
else
echo "geographiclib already installed!"
fi
#
# Install dpkg debian packages
......
......@@ -1000,7 +1000,9 @@ if [ ! -f "$TERRALIB_DEPENDENCIES_DIR/lib/liblua.dylib" ]; then
cmake --build . --target install --config Release > /dev/null 2>> ../build.log
valid $? "Error: could not install Lua!"
cd ../.. > /dev/null
cd ../.. > /dev/null
fixRPath "`ls $TERRALIB_DEPENDENCIES_DIR/lib/liblua.dylib`" > /dev/null
fi
......@@ -1032,6 +1034,8 @@ if [ ! -f "$TERRALIB_DEPENDENCIES_DIR/lib/libqtlua.dylib" ]; then
valid $? "Error: could not copy QtLua internal folder!"
cd ..
fixRPath "`ls $TERRALIB_DEPENDENCIES_DIR/lib/libqtlua*.dylib`" > /dev/null
fi
......@@ -1173,6 +1177,35 @@ if [ ! -f "$TERRALIB_DEPENDENCIES_DIR/lib/libwtss_cxx_client.dylib" ]; then
fi
#
# GeographicLib version 1.48
#
if [ ! -f "$TERRALIB_DEPENDENCIES_DIR/lib/libGeographic.dylib" ]; then
echo "installing GeographicLib..."
log_lib "GeographicLib"
sleep 1s
tar xzvf GeographicLib-1.48.tar.gz > /dev/null 2> /dev/null
valid $? "Error: could not uncompress GeographicLib-1.48.tar.gz!"
cd GeographicLib-1.48 > /dev/null
valid $? "Error: could not change dir to GeographicLib-1.48!"
cmake -G "Unix Makefiles" -DCMAKE_PREFIX_PATH:PATH=${TERRALIB_DEPENDENCIES_DIR} -DCMAKE_INSTALL_PREFIX:PATH=${TERRALIB_DEPENDENCIES_DIR} -DCMAKE_BUILD_TYPE:STRING="Release" > /dev/null 2>> ../build.log
valid $? "Error: could not configure GeographicLib!"
make -j 4 > /dev/null 2>> ../build.log
valid $? "Error: could not make GeographicLib"
make install > /dev/null 2>> ../build.log
valid $? "Error: could not copy GeographicLib internal folder!"
cd .. > /dev/null
fixRPath "`ls $TERRALIB_DEPENDENCIES_DIR/lib/libGeographic*.dylib`" > /dev/null
fi
#
# Finished!
#
clear
......
......@@ -158,10 +158,60 @@ IF NOT EXIST %LIBS_DIR% (
goto begin_build
)
goto swig_deps
goto geolib_deps
:begin_build
:geolib
:: ====
:: Geographic Lib
set GEOLIB_DIR=%ROOT_DIR%\GeographicLib-1.48
set GEOLIB_INCLUDE_DIR=%TERRALIB_DEPENDENCIES_DIR%\include
set GEOLIB_LIBRARY=%TERRALIB_DEPENDENCIES_DIR%\lib\Geographic.lib
:: Check dependencies
goto end_geolib_deps
:geolib_deps
goto swig_deps
:end_geolib_deps
echo | set /p="Installing geographic lib... "<nul
IF EXIST %GEOLIB_LIBRARY% call :skip_build && goto swig
call :append_log_begin geolib
:begin_geolib
cd %GEOLIB_DIR% >nul 2>nul
IF EXIST building%_X86% del /s /Q building%_X86% >nul 2>nul
mkdir building%_X86% >nul 2>nul
cd building%_X86% >nul 2>nul
( cmake -G %_CMAKE_GENERATOR% -DCMAKE_INSTALL_PREFIX=%TERRALIB_DEPENDENCIES_DIR% %GEOLIB_DIR% >>%CONFIG_LOG% 2>nul ) || call :buildFailLog geolib "configuring geolib" && goto swig
( msbuild /m INSTALL.vcxproj /t:clean /p:Configuration=Release >>%BUILD_LOG% 2>nul ) || call :buildFailLog geolib "clean release geolib" && goto swig
( msbuild /m INSTALL.vcxproj /p:Configuration=Release >>%BUILD_LOG% 2>nul ) || call :buildFailLog geolib "build release geolib" && goto icoswignv
( msbuild /m INSTALL.vcxproj /t:clean >>%BUILD_LOG% 2>nul ) || call :buildFailLog geolib "clean debug geolib" && goto swig
( msbuild /m INSTALL.vcxproj >>%BUILD_LOG% 2>nul ) || call :buildFailLog geolib "build debug geolib" && goto swig
call :append_log_end geolib
:end_geolib
echo done.
cd %ROOT_DIR%
:: ====
:swig
:: ====
......
......@@ -155,10 +155,59 @@ IF NOT EXIST %LIBS_DIR% (
goto begin_build
)
goto swig_deps
goto geolib_deps
:begin_build
:geolib
:: ====
:: Geographic Lib
set GEOLIB_DIR=%ROOT_DIR%\GeographicLib-1.48
set GEOLIB_INCLUDE_DIR=%TERRALIB_DEPENDENCIES_DIR%\include
set GEOLIB_LIBRARY=%TERRALIB_DEPENDENCIES_DIR%\lib\Geographic.lib
:: Check dependencies
goto end_geolib_deps
:geolib_deps
goto swig_deps
:end_geolib_deps
echo | set /p="Installing geographic lib... "<nul
IF EXIST %GEOLIB_LIBRARY% call :skip_build && goto swig
call :append_log_begin geolib
:begin_geolib
cd %GEOLIB_DIR% >nul 2>nul
IF EXIST building%_X86% del /s /Q building%_X86% >nul 2>nul
mkdir building%_X86% >nul 2>nul
cd building%_X86% >nul 2>nul
( cmake -G %_CMAKE_GENERATOR% -DCMAKE_INSTALL_PREFIX=%TERRALIB_DEPENDENCIES_DIR% %GEOLIB_DIR% >>%CONFIG_LOG% 2>nul ) || call :buildFailLog geolib "configuring geolib" && goto swig
( msbuild /m INSTALL.vcxproj /t:clean /p:Configuration=Release >>%BUILD_LOG% 2>nul ) || call :buildFailLog geolib "clean release geolib" && goto swig
( msbuild /m INSTALL.vcxproj /p:Configuration=Release >>%BUILD_LOG% 2>nul ) || call :buildFailLog geolib "build release geolib" && goto icoswignv
( msbuild /m INSTALL.vcxproj /t:clean >>%BUILD_LOG% 2>nul ) || call :buildFailLog geolib "clean debug geolib" && goto swig
( msbuild /m INSTALL.vcxproj >>%BUILD_LOG% 2>nul ) || call :buildFailLog geolib "build debug geolib" && goto swig
call :append_log_end geolib
:end_geolib
echo done.
cd %ROOT_DIR%
:: ====
:swig
:: ====
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!