Last change
on this file since 418 was 324, checked in by Sanahuja Guillaume, 5 years ago |
removing opencv dependency
|
-
Property svn:executable
set to
*
|
File size:
1.3 KB
|
Rev | Line | |
---|
[324] | 1 | #!/bin/bash
|
---|
| 2 |
|
---|
| 3 | function info () {
|
---|
| 4 | echo -e "\033[32m$1\033[0m"
|
---|
| 5 | }
|
---|
| 6 |
|
---|
| 7 | function warn () {
|
---|
| 8 | echo -e "\033[33m$1\033[0m"
|
---|
| 9 | }
|
---|
| 10 |
|
---|
| 11 | function err () {
|
---|
| 12 | echo -e "\033[31m$1\033[0m"
|
---|
| 13 | exit 1
|
---|
| 14 | }
|
---|
| 15 |
|
---|
| 16 | if [ $(uname -m) != "x86_64" ]; then
|
---|
| 17 | err "unsupported host architecture, you need a x86_64 cpu"
|
---|
| 18 | fi
|
---|
| 19 |
|
---|
| 20 | if ! [ -f ${1}/CMakeLists.txt ]; then
|
---|
| 21 | err "${1} directory does not contain CMakeLists.txt"
|
---|
| 22 | fi
|
---|
| 23 |
|
---|
| 24 | #get cmake
|
---|
| 25 | CMAKE=${OECORE_HOST_NATIVE_SYSROOT}/usr/bin/cmake
|
---|
| 26 |
|
---|
| 27 | #verifie l'existence du lien symbolique build
|
---|
| 28 | if [ -d build ];then
|
---|
| 29 | if ! readlink build > /dev/null ; then
|
---|
| 30 | #it is a directory, exit to do not erase anything
|
---|
| 31 | err "Error: build already exsits and is a directory; it should be a symlink."
|
---|
| 32 | fi
|
---|
| 33 | if ! readlink build | grep -w build_core2_64 >/dev/null; then
|
---|
| 34 | warn "Warning, build was pointing to another directory."
|
---|
| 35 | fi
|
---|
| 36 | rm build
|
---|
| 37 | fi
|
---|
| 38 |
|
---|
| 39 | #iterate over available toolchains
|
---|
| 40 | toolchains=($OECORE_CMAKE_TOOLCHAINS)
|
---|
| 41 | for arch in ${toolchains[@]}; do
|
---|
| 42 | info "************* Creating project for $arch *************"
|
---|
| 43 | toolchain=$(eval "echo \"\$OECORE_CMAKE_${arch^^}_TOOLCHAIN\"")
|
---|
| 44 | mkdir -p build_${arch}
|
---|
| 45 | cd build_${arch}
|
---|
| 46 | rm -f CMakeCache.txt
|
---|
| 47 | rm -rf CMakeFiles
|
---|
| 48 | ${CMAKE} ${1} -G "CodeLite - Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE=${toolchain} -DCMAKE_CODELITE_USE_TARGETS=ON
|
---|
| 49 | cd ..
|
---|
| 50 | done
|
---|
| 51 |
|
---|
| 52 | #creation du lien symbolique
|
---|
| 53 | ln -s build_core2_64 build
|
---|
Note:
See
TracBrowser
for help on using the repository browser.