← Back to team overview

widelands-dev team mailing list archive

[Merge] lp:~widelands-dev/widelands/macos_build_app_ICU into lp:widelands

 

Toni Förster has proposed merging lp:~widelands-dev/widelands/macos_build_app_ICU into lp:widelands.

Commit message:
check for minor version of CMake

only export ICU_ROOT if CMake version is lower than 3.12


Requested reviews:
  Widelands Developers (widelands-dev)

For more details, see:
https://code.launchpad.net/~widelands-dev/widelands/macos_build_app_ICU/+merge/354490

This eliminates the errors when using CMake 3.12 or newer and doesn't brake SirVer's nightlies.
-- 
Your team Widelands Developers is requested to review the proposed merge of lp:~widelands-dev/widelands/macos_build_app_ICU into lp:widelands.
=== modified file 'utils/macos/build_app.sh'
--- utils/macos/build_app.sh	2018-08-20 21:11:01 +0000
+++ utils/macos/build_app.sh	2018-09-07 15:15:13 +0000
@@ -58,6 +58,9 @@
    exit 1
 fi
 
+# We asume CMake 3.x is used and check for the minor version
+CMAKE_VERSION=$(cmake --version | grep -Eo '3.*' | cut -d . -f 2)
+
 # Check if the SDK for the minimum build target is available.
 # If not, use the one for the installed macOS Version
 OSX_MIN_VERSION="10.7"
@@ -183,7 +186,9 @@
    # However Mac OS X nighlies cannot upgrade to a newer cmake version than
    # 3.9.4 since nothing newer compiles on Mac OS X 10.7 which is used to build
    # the nightlies.
-   export ICU_ROOT="$(brew --prefix icu4c)"
+   if [ "$CMAKE_VERSION" -lt "12" ]; then
+      export ICU_ROOT="$(brew --prefix icu4c)"
+   fi
 
    cmake $SOURCE_DIR -G Ninja \
       -DCMAKE_C_COMPILER:FILEPATH="$C_COMPILER" \


Follow ups