1
0
Fork 0

Adjust build scripts to set FG_BUILD_TYPE

Cmake now has a standard variable to indicate the build type we are
creating. Map the existing settings on each platform to that value
(with varying degrees of nice-ness, further clean-up possible)
This commit is contained in:
James Turner 2017-02-28 16:25:58 +00:00
parent 8e22064b71
commit b350cd9827
3 changed files with 20 additions and 6 deletions

View file

@ -38,7 +38,7 @@ cp simgear-*.tar.bz2 ../output/.
#####################################################################################
echo "Starting on FlightGear"
cd ../fgBuild
cmake -DCMAKE_INSTALL_PREFIX:PATH=$WORKSPACE/dist -DSIMGEAR_SHARED:BOOL="ON" ../flightgear
cmake -DCMAKE_INSTALL_PREFIX:PATH=$WORKSPACE/dist -DSIMGEAR_SHARED:BOOL="ON" -DFG_BUILD_TYPE=Release ../flightgear
# compile
make
@ -60,4 +60,3 @@ echo "Assembling base package"
cd $WORKSPACE
tar cjf output/FlightGear-$VERSION-data.tar.bz2 fgdata/

View file

@ -1,6 +1,12 @@
IF NOT DEFINED WORKSPACE SET WORKSPACE=%~dp0
IF %IS_NIGHTLY_BUILD% EQU 1 (
SET FGBUILDTYPE=Nightly
) ELSE (
SET FGBUILDTYPE=Release
)
REM following are for testing the script locally
REM SET PATH=%PATH%;%ProgramFiles%\CMake\bin;%ProgramFiles(x86)%\"Inno Setup 5"\
REM SET QT5SDK32=C:\Qt\5.6\msvc2015
@ -27,7 +33,8 @@ cmake ..\flightgear -G "Visual Studio 14" ^
-DCMAKE_INSTALL_PREFIX:PATH=%WORKSPACE%/install/msvc140 ^
-DCMAKE_PREFIX_PATH:PATH=%WORKSPACE%/install/msvc140/OpenSceneGraph ^
-DBOOST_ROOT=%WORKSPACE%/windows-3rd-party ^
-DCMAKE_PREFIX_PATH=%QT5SDK32%;%OSG32%
-DCMAKE_PREFIX_PATH=%QT5SDK32%;%OSG32% ^
-DFG_BUILD_TYPE=%FGBUILDTYPE%
cmake --build . --config RelWithDebInfo --target INSTALL
cd ..
@ -49,7 +56,8 @@ cmake ..\flightgear -G "Visual Studio 14 Win64" ^
-DMSVC_3RDPARTY_ROOT=%WORKSPACE%/windows-3rd-party/msvc140 ^
-DBOOST_ROOT=%WORKSPACE%/windows-3rd-party ^
-DCMAKE_INSTALL_PREFIX:PATH=%WORKSPACE%/install/msvc140-64 ^
-DCMAKE_PREFIX_PATH=%QT5SDK64%;%OSG64%
-DCMAKE_PREFIX_PATH=%QT5SDK64%;%OSG64% ^
-DFG_BUILD_TYPE=%FGBUILDTYPE%
cmake --build . --config RelWithDebInfo --target INSTALL
cd ..

View file

@ -21,7 +21,7 @@ echo "Build path is: $PATH"
###############################################################################
echo "Starting on SimGear"
pushd sgBuild
cmake -DCMAKE_INSTALL_PREFIX:PATH=$WORKSPACE/dist -DENABLE_CURL:BOOL="ON" -DCMAKE_BUILD_TYPE=RelWithDebInfo ../simgear
cmake -DCMAKE_INSTALL_PREFIX:PATH=$WORKSPACE/dist -DCMAKE_BUILD_TYPE=RelWithDebInfo ../simgear
# compile
make
@ -39,7 +39,14 @@ popd
################################################################################
echo "Starting on FlightGear"
pushd fgBuild
cmake -DFG_NIGHTLY=1 -DCMAKE_INSTALL_PREFIX:PATH=$WORKSPACE/dist -DCMAKE_BUILD_TYPE=RelWithDebInfo ../flightgear
if [ $FG_IS_RELEASE == '1' ]; then
FGBUILDTYPE=Release
else
FGBUILDTYPE=Nightly
fi
cmake -DFG_BUILD_TYPE=$FGBUILDTYPE -DCMAKE_INSTALL_PREFIX:PATH=$WORKSPACE/dist -DCMAKE_BUILD_TYPE=RelWithDebInfo ../flightgear
make