Add iOS CMake build to Travis CI
Use the following CMake flags: -DCMAKE_SYSTEM_NAME=iOS - for specifying it is an iOS build -DCMAKE_FIND_ROOT_PATH=/usr/local - dir to search for the built wxWidgets libraries -DCMAKE_XCODE_ATTRIBUTE_CODE_SIGNING_ALLOWED=NO - don't require signing app packages -DCMAKE_OSX_DEPLOYMENT_TARGET=10.12 - specify a target so both the libraries and sample will use the same architecture Also use the code signing flag when testing precompiled header support. Don't build the default samples, widgets sample has features that are not supported by the iOS build. Xcode seems to rebuild the libraries when installing, so call CMake only once.
This commit is contained in:
@@ -11,6 +11,7 @@ wxBUILD_ARGS="-j$wxPROC_COUNT"
|
||||
case $wxTOOLSET in
|
||||
cmake)
|
||||
if [ -z $wxCMAKE_TESTS ]; then wxCMAKE_TESTS=CONSOLE_ONLY; fi
|
||||
if [ -z $wxCMAKE_SAMPLES ]; then wxCMAKE_SAMPLES=SOME; fi
|
||||
if [ "$wxCMAKE_GENERATOR" == "Xcode" ]; then
|
||||
wxBUILD_ARGS="-jobs $wxPROC_COUNT -quiet"
|
||||
fi
|
||||
@@ -20,13 +21,22 @@ case $wxTOOLSET in
|
||||
echo 'Configuring...'
|
||||
mkdir build_cmake
|
||||
pushd build_cmake
|
||||
cmake -G "$wxCMAKE_GENERATOR" $wxCMAKE_DEFINES -D wxBUILD_SAMPLES=SOME -D wxBUILD_TESTS=$wxCMAKE_TESTS ..
|
||||
cmake -G "$wxCMAKE_GENERATOR" $wxCMAKE_DEFINES -D wxBUILD_SAMPLES=$wxCMAKE_SAMPLES -D wxBUILD_TESTS=$wxCMAKE_TESTS ..
|
||||
echo 'travis_fold:end:configure'
|
||||
|
||||
echo 'travis_fold:start:building'
|
||||
echo 'Building...'
|
||||
cmake --build . -- $wxBUILD_ARGS
|
||||
echo 'travis_fold:end:building'
|
||||
if [ "$wxCMAKE_GENERATOR" != "Xcode" ]; then
|
||||
echo 'travis_fold:start:building'
|
||||
echo 'Building...'
|
||||
cmake --build . -- $wxBUILD_ARGS
|
||||
echo 'travis_fold:end:building'
|
||||
fi
|
||||
|
||||
echo 'travis_fold:start:install'
|
||||
if [ "$wxCMAKE_GENERATOR" == "Xcode" ]; then echo -n 'Building and '; fi
|
||||
echo 'Installing...'
|
||||
sudo env "PATH=$PATH" cmake --build . --target install -- $wxBUILD_ARGS
|
||||
popd
|
||||
echo 'travis_fold:end:install'
|
||||
|
||||
if [ "$wxCMAKE_TESTS" != "OFF" ]; then
|
||||
echo 'travis_fold:start:testing'
|
||||
@@ -35,12 +45,6 @@ case $wxTOOLSET in
|
||||
echo 'travis_fold:end:testing'
|
||||
fi
|
||||
|
||||
echo 'travis_fold:start:install'
|
||||
echo 'Installing...'
|
||||
sudo env "PATH=$PATH" cmake --build . --target install -- $wxBUILD_ARGS
|
||||
popd
|
||||
echo 'travis_fold:end:install'
|
||||
|
||||
echo 'travis_fold:start:testinstall'
|
||||
echo 'Testing installation...'
|
||||
mkdir build_cmake_install_test
|
||||
|
Reference in New Issue
Block a user