diff options
Diffstat (limited to 'meta')
| -rw-r--r-- | meta/classes/cmake.bbclass | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/meta/classes/cmake.bbclass b/meta/classes/cmake.bbclass index 3f670919a8..20d8a61069 100644 --- a/meta/classes/cmake.bbclass +++ b/meta/classes/cmake.bbclass | |||
| @@ -43,12 +43,12 @@ def map_target_arch_to_uname_arch(target_arch): | |||
| 43 | 43 | ||
| 44 | cmake_do_generate_toolchain_file() { | 44 | cmake_do_generate_toolchain_file() { |
| 45 | if [ "${BUILD_SYS}" = "${HOST_SYS}" ]; then | 45 | if [ "${BUILD_SYS}" = "${HOST_SYS}" ]; then |
| 46 | CMAKE_CROSSCOMPILING="set( CMAKE_CROSSCOMPILING FALSE )" | 46 | cmake_crosscompiling="set( CMAKE_CROSSCOMPILING FALSE )" |
| 47 | fi | 47 | fi |
| 48 | cat > ${WORKDIR}/toolchain.cmake <<EOF | 48 | cat > ${WORKDIR}/toolchain.cmake <<EOF |
| 49 | # CMake system name must be something like "Linux". | 49 | # CMake system name must be something like "Linux". |
| 50 | # This is important for cross-compiling. | 50 | # This is important for cross-compiling. |
| 51 | ${CMAKE_CROSSCOMPILING} | 51 | $cmake_crosscompiling |
| 52 | set( CMAKE_SYSTEM_NAME `echo ${TARGET_OS} | sed -e 's/^./\u&/' -e 's/^\(Linux\).*/\1/'` ) | 52 | set( CMAKE_SYSTEM_NAME `echo ${TARGET_OS} | sed -e 's/^./\u&/' -e 's/^\(Linux\).*/\1/'` ) |
| 53 | set( CMAKE_SYSTEM_PROCESSOR ${@map_target_arch_to_uname_arch(d.getVar('TARGET_ARCH'))} ) | 53 | set( CMAKE_SYSTEM_PROCESSOR ${@map_target_arch_to_uname_arch(d.getVar('TARGET_ARCH'))} ) |
| 54 | set( CMAKE_C_COMPILER ${OECMAKE_C_COMPILER} ) | 54 | set( CMAKE_C_COMPILER ${OECMAKE_C_COMPILER} ) |
| @@ -107,13 +107,13 @@ cmake_do_configure() { | |||
| 107 | 107 | ||
| 108 | # Just like autotools cmake can use a site file to cache result that need generated binaries to run | 108 | # Just like autotools cmake can use a site file to cache result that need generated binaries to run |
| 109 | if [ -e ${WORKDIR}/site-file.cmake ] ; then | 109 | if [ -e ${WORKDIR}/site-file.cmake ] ; then |
| 110 | OECMAKE_SITEFILE=" -C ${WORKDIR}/site-file.cmake" | 110 | oecmake_sitefile="-C ${WORKDIR}/site-file.cmake" |
| 111 | else | 111 | else |
| 112 | OECMAKE_SITEFILE="" | 112 | oecmake_sitefile= |
| 113 | fi | 113 | fi |
| 114 | 114 | ||
| 115 | cmake \ | 115 | cmake \ |
| 116 | ${OECMAKE_SITEFILE} \ | 116 | $oecmake_sitefile \ |
| 117 | ${OECMAKE_SOURCEPATH} \ | 117 | ${OECMAKE_SOURCEPATH} \ |
| 118 | -DCMAKE_INSTALL_PREFIX:PATH=${prefix} \ | 118 | -DCMAKE_INSTALL_PREFIX:PATH=${prefix} \ |
| 119 | -DCMAKE_INSTALL_BINDIR:PATH=${@os.path.relpath(d.getVar('bindir'), d.getVar('prefix'))} \ | 119 | -DCMAKE_INSTALL_BINDIR:PATH=${@os.path.relpath(d.getVar('bindir'), d.getVar('prefix'))} \ |
