diff options
author | Konstantin Käfer <mail@kkaefer.com> | 2016-06-03 18:05:04 +0200 |
---|---|---|
committer | Konstantin Käfer <mail@kkaefer.com> | 2016-08-05 11:42:22 +0200 |
commit | 692fe1f3ffc8f4364b39c14aa7d90cec2ff5c0a6 (patch) | |
tree | 1d08af7d56e986dba2b548ff9b9a7e1a77c713ed /scripts/generate-core-files.sh | |
parent | e3ee55b28d0b230d054c9718f79a1f6d685cd62b (diff) | |
download | qtlocation-mapboxgl-692fe1f3ffc8f4364b39c14aa7d90cec2ff5c0a6.tar.gz |
[build] switch to CMake
This is very much a work in progress.
Diffstat (limited to 'scripts/generate-core-files.sh')
-rwxr-xr-x | scripts/generate-core-files.sh | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/scripts/generate-core-files.sh b/scripts/generate-core-files.sh new file mode 100755 index 0000000000..a14239b8f2 --- /dev/null +++ b/scripts/generate-core-files.sh @@ -0,0 +1,20 @@ +#!/usr/bin/env bash + +set -e +set -o pipefail + +echo "# Do not edit. Regenerate this with ./scripts/generate-core-files.sh" > cmake/core-files.cmake +echo "" >> cmake/core-files.cmake +echo "set(MBGL_CORE_FILES" >> cmake/core-files.cmake +PREFIX= +for FILE in $(find include src -type f -a \( -name "*.hpp" -o -name "*.cpp" -o -name "*.h" -o -name "*.c" \) | perl -p -e "s/^((src|include)\/(mbgl\/)?(.+)\/\w+\.\w+)$/\$4#\$1/g" | sort) ; do + CURRENT_PREFIX="${FILE%#*}" + if [ "${PREFIX}" != "${CURRENT_PREFIX}" ]; then + if [ ! -z "${PREFIX}" ]; then echo "" >> cmake/core-files.cmake ; fi + echo " # ${CURRENT_PREFIX}" >> cmake/core-files.cmake + PREFIX="${CURRENT_PREFIX}" + fi + echo " ${FILE#*#}" >> cmake/core-files.cmake +done +echo ")" >> cmake/core-files.cmake +git diff cmake/core-files.cmake |