diff options
| author | Tudor Florea <tudor.florea@enea.com> | 2015-10-09 22:59:03 +0200 |
|---|---|---|
| committer | Tudor Florea <tudor.florea@enea.com> | 2015-10-09 22:59:03 +0200 |
| commit | 972dcfcdbfe75dcfeb777150c136576cf1a71e99 (patch) | |
| tree | 97a61cd7e293d7ae9d56ef7ed0f81253365bb026 /meta/recipes-devtools/cmake | |
| download | poky-972dcfcdbfe75dcfeb777150c136576cf1a71e99.tar.gz | |
initial commit for Enea Linux 5.0 arm
Signed-off-by: Tudor Florea <tudor.florea@enea.com>
Diffstat (limited to 'meta/recipes-devtools/cmake')
12 files changed, 426 insertions, 0 deletions
diff --git a/meta/recipes-devtools/cmake/cmake-native_2.8.12.2.bb b/meta/recipes-devtools/cmake/cmake-native_2.8.12.2.bb new file mode 100644 index 0000000000..cd6b1d8845 --- /dev/null +++ b/meta/recipes-devtools/cmake/cmake-native_2.8.12.2.bb | |||
| @@ -0,0 +1,18 @@ | |||
| 1 | require cmake.inc | ||
| 2 | inherit native | ||
| 3 | |||
| 4 | # Using cmake's internal libarchive, so some dependencies are needed | ||
| 5 | DEPENDS += "bzip2-native zlib-native" | ||
| 6 | |||
| 7 | SRC_URI += "\ | ||
| 8 | file://cmlibarchive-disable-ext2fs.patch \ | ||
| 9 | " | ||
| 10 | |||
| 11 | SRC_URI[md5sum] = "17c6513483d23590cbce6957ec6d1e66" | ||
| 12 | SRC_URI[sha256sum] = "8c6574e9afabcb9fc66f463bb1f2f051958d86c85c37fccf067eb1a44a120e5e" | ||
| 13 | |||
| 14 | # Disable ccmake since we don't depend on ncurses | ||
| 15 | CMAKE_EXTRACONF = "\ | ||
| 16 | -DBUILD_CursesDialog=0 \ | ||
| 17 | -DENABLE_ACL=0 -DHAVE_ACL_LIBACL_H=0 \ | ||
| 18 | " | ||
diff --git a/meta/recipes-devtools/cmake/cmake.inc b/meta/recipes-devtools/cmake/cmake.inc new file mode 100644 index 0000000000..8592a23046 --- /dev/null +++ b/meta/recipes-devtools/cmake/cmake.inc | |||
| @@ -0,0 +1,51 @@ | |||
| 1 | # Copyright (C) 2005, Koninklijke Philips Electronics NV. All Rights Reserved | ||
| 2 | # Released under the MIT license (see packages/COPYING) | ||
| 3 | |||
| 4 | SUMMARY = "Cross-platform, open-source make system" | ||
| 5 | HOMEPAGE = "http://www.cmake.org/" | ||
| 6 | BUGTRACKER = "http://public.kitware.com/Bug/my_view_page.php" | ||
| 7 | SECTION = "console/utils" | ||
| 8 | LICENSE = "BSD" | ||
| 9 | LIC_FILES_CHKSUM = "file://Copyright.txt;md5=bb2fa3a08736b842556f6171bb9e8ae1 \ | ||
| 10 | file://Source/cmake.h;beginline=1;endline=10;md5=341736dae83c9e344b53eeb1bc7d7bc2" | ||
| 11 | |||
| 12 | CMAKE_MAJOR_VERSION = "${@'.'.join(d.getVar('PV',1).split('.')[0:2])}" | ||
| 13 | |||
| 14 | SRC_URI = "http://www.cmake.org/files/v${CMAKE_MAJOR_VERSION}/cmake-${PV}.tar.gz \ | ||
| 15 | file://support-oe-qt4-tools-names.patch \ | ||
| 16 | file://aarch64-cmake.patch \ | ||
| 17 | file://aarch64-kwsys.patch \ | ||
| 18 | file://qt4-fail-silent.patch \ | ||
| 19 | file://cmake-2.8.11.2-FindFreetype.patch \ | ||
| 20 | " | ||
| 21 | |||
| 22 | inherit autotools-brokensep | ||
| 23 | |||
| 24 | # Ugly hack to work around undefined OE_QMAKE_PATH_EXTERNAL_HOST_BINS variable | ||
| 25 | # and possibly missing qmake binary (qtbase-native can be removed from sysroot | ||
| 26 | # e.g. in order to upgrade it, even when there is target qtbase) | ||
| 27 | |||
| 28 | # Fixes errors like this in cmake(-native).do_configure: | ||
| 29 | #| -- Performing Test run_pic_test - Success | ||
| 30 | #| CMake Error at tmp-eglibc/sysroots/qemuarm/usr/lib/cmake/Qt5Core/Qt5CoreConfig.cmake:27 (message): | ||
| 31 | #| The imported target "Qt5::Core" references the file | ||
| 32 | #| | ||
| 33 | #| "/qmake" | ||
| 34 | #| | ||
| 35 | #| but this file does not exist. Possible reasons include: | ||
| 36 | |||
| 37 | do_configure_prepend() { | ||
| 38 | sed -i 's/^find_package(Qt5Core QUIET)$/#find_package(Qt5Core QUIET)/g' ${S}/Tests/RunCMake/CMakeLists.txt | ||
| 39 | sed -i 's/^find_package(Qt5Core REQUIRED)/#find_package(Qt5Core REQUIRED)/g' ${S}/Tests/RunCMake/IncompatibleQt/IncompatibleQt.cmake | ||
| 40 | sed -i 's/^ find_package(Qt5Widgets REQUIRED)/# find_package(Qt5Widgets REQUIRED)/g' ${S}/Tests/QtAutomoc/CMakeLists.txt | ||
| 41 | sed -i 's/^find_package(Qt5Core REQUIRED)/#find_package(Qt5Core REQUIRED)/g' ${S}/Tests/Qt4And5Automoc/CMakeLists.txt | ||
| 42 | sed -i 's/^ find_package(Qt5Widgets QUIET NO_MODULE)/# find_package(Qt5Widgets QUIET NO_MODULE)/g' ${S}/Tests/CMakeLists.txt | ||
| 43 | sed -i 's/^find_package(Qt5Widgets QUIET)/#find_package(Qt5Widgets QUIET)/g' ${S}/Source/QtDialog/CMakeLists.txt | ||
| 44 | } | ||
| 45 | |||
| 46 | # Extra flags to pass to cmake invoked by bootstrap | ||
| 47 | CMAKE_EXTRACONF = "" | ||
| 48 | |||
| 49 | do_configure () { | ||
| 50 | ./configure --prefix=${prefix} -- ${CMAKE_EXTRACONF} | ||
| 51 | } | ||
diff --git a/meta/recipes-devtools/cmake/cmake/OEToolchainConfig.cmake b/meta/recipes-devtools/cmake/cmake/OEToolchainConfig.cmake new file mode 100644 index 0000000000..60014bbf2b --- /dev/null +++ b/meta/recipes-devtools/cmake/cmake/OEToolchainConfig.cmake | |||
| @@ -0,0 +1,18 @@ | |||
| 1 | set( CMAKE_SYSTEM_NAME Linux ) | ||
| 2 | set( CMAKE_C_FLAGS $ENV{CFLAGS} CACHE STRING "" FORCE ) | ||
| 3 | set( CMAKE_CXX_FLAGS $ENV{CXXFLAGS} CACHE STRING "" FORCE ) | ||
| 4 | set( CMAKE ASM_FLAGS ${CMAKE_C_FLAGS} CACHE STRING "" FORCE ) | ||
| 5 | set( CMAKE_LDFLAGS_FLAGS ${CMAKE_CXX_FLAGS} CACHE STRING "" FORCE ) | ||
| 6 | set( CMAKE_FIND_ROOT_PATH $ENV{OECORE_TARGET_SYSROOT} $ENV{OECORE_NATIVE_SYSROOT} ) | ||
| 7 | set( CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER ) | ||
| 8 | set( CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY ) | ||
| 9 | set( CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY ) | ||
| 10 | |||
| 11 | string(REGEX MATCH "sysroots/([a-zA-Z0-9]+)" CMAKE_SYSTEM_PROCESSOR $ENV{SDKTARGETSYSROOT}) | ||
| 12 | string(REGEX REPLACE "sysroots/" "" CMAKE_SYSTEM_PROCESSOR ${CMAKE_SYSTEM_PROCESSOR}) | ||
| 13 | |||
| 14 | # Include the toolchain configuration subscripts | ||
| 15 | file( GLOB toolchain_config_files "${CMAKE_TOOLCHAIN_FILE}.d/*.cmake" ) | ||
| 16 | foreach(config ${toolchain_config_files}) | ||
| 17 | include(${config}) | ||
| 18 | endforeach() | ||
diff --git a/meta/recipes-devtools/cmake/cmake/aarch64-cmake.patch b/meta/recipes-devtools/cmake/cmake/aarch64-cmake.patch new file mode 100644 index 0000000000..3e26d58267 --- /dev/null +++ b/meta/recipes-devtools/cmake/cmake/aarch64-cmake.patch | |||
| @@ -0,0 +1,37 @@ | |||
| 1 | From: Riku Voipio <riku.voipio@linaro.org> | ||
| 2 | Date: Fri, 21 Dec 2012 11:20:02 +0000 (+0200) | ||
| 3 | Subject: KWIML: Teach ABI.h about Aarch64 | ||
| 4 | X-Git-Url: http://cmake.org/gitweb?p=cmake.git;a=commitdiff_plain;h=34916522 | ||
| 5 | |||
| 6 | KWIML: Teach ABI.h about Aarch64 | ||
| 7 | |||
| 8 | The __aarch64__ defines Aarch64, while __AARCH64EB__ defines bigendian | ||
| 9 | and __AARCH64EL__ little endian. Only little endian tested, no big | ||
| 10 | endian toolchain exists yet. | ||
| 11 | |||
| 12 | Signed-off-by: Riku Voipio <riku.voipio@linaro.org> | ||
| 13 | |||
| 14 | Hand edited by: Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org> to get it applied in OE | ||
| 15 | |||
| 16 | Upstream-Status: Backport | ||
| 17 | --- | ||
| 18 | |||
| 19 | diff --git a/ABI.h.in b/ABI.h.in | ||
| 20 | index f93ddba..7f4772a 100644 | ||
| 21 | --- a/Utilities/KWIML/ABI.h.in | ||
| 22 | +++ b/Utilities/KWIML/ABI.h.in | ||
| 23 | @@ -418,6 +418,14 @@ suppression macro @KWIML@_ABI_NO_VERIFY was defined. | ||
| 24 | #elif defined(__vax__) | ||
| 25 | # define @KWIML@_ABI_ENDIAN_ID @KWIML@_ABI_ENDIAN_ID_BIG | ||
| 26 | |||
| 27 | +/* Aarch64 */ | ||
| 28 | +#elif defined(__aarch64__) | ||
| 29 | +# if !defined(__AARCH64EB__) | ||
| 30 | +# define @KWIML@_ABI_ENDIAN_ID @KWIML@_ABI_ENDIAN_ID_LITTLE | ||
| 31 | +# else | ||
| 32 | +# define @KWIML@_ABI_ENDIAN_ID @KWIML@_ABI_ENDIAN_ID_BIG | ||
| 33 | +# endif | ||
| 34 | + | ||
| 35 | /* Unknown CPU */ | ||
| 36 | #elif !defined(@KWIML@_ABI_NO_ERROR_ENDIAN) | ||
| 37 | # error "Byte order of target CPU unknown." | ||
diff --git a/meta/recipes-devtools/cmake/cmake/aarch64-kwsys.patch b/meta/recipes-devtools/cmake/cmake/aarch64-kwsys.patch new file mode 100644 index 0000000000..2b68eae6c2 --- /dev/null +++ b/meta/recipes-devtools/cmake/cmake/aarch64-kwsys.patch | |||
| @@ -0,0 +1,40 @@ | |||
| 1 | From: KWSys Robot <kwrobot@kitware.com> | ||
| 2 | Date: Fri, 21 Dec 2012 13:29:37 +0000 (-0500) | ||
| 3 | Subject: KWSys 2012-12-21 (8ce09af5) | ||
| 4 | X-Git-Url: http://cmake.org/gitweb?p=cmake.git;a=commitdiff_plain;h=567e7d94 | ||
| 5 | |||
| 6 | KWSys 2012-12-21 (8ce09af5) | ||
| 7 | |||
| 8 | Extract upstream KWSys using the following shell commands. | ||
| 9 | |||
| 10 | $ git archive --prefix=upstream-kwsys/ 8ce09af5 | tar x | ||
| 11 | $ git shortlog --no-merges --abbrev=8 --format='%h %s' 933eb822..8ce09af5 | ||
| 12 | Riku Voipio (1): | ||
| 13 | 8ce09af5 CPU: Add Aarch64 support | ||
| 14 | |||
| 15 | Change-Id: I4bd0a97abaa0f958e2679afe2d4ad4bcc37434a0 | ||
| 16 | |||
| 17 | Hand edited by: Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org> to get it applied in OE | ||
| 18 | |||
| 19 | Upstream-Status: Backport | ||
| 20 | --- | ||
| 21 | |||
| 22 | diff --git a/CPU.h.in b/CPU.h.in | ||
| 23 | index ecd29d1..2e1a584 100644 | ||
| 24 | --- a/Source/kwsys/CPU.h.in | ||
| 25 | +++ b/Source/kwsys/CPU.h.in | ||
| 26 | @@ -98,6 +98,14 @@ | ||
| 27 | #elif defined(__SYSC_ZARCH__) | ||
| 28 | # define @KWSYS_NAMESPACE@_CPU_ENDIAN_ID @KWSYS_NAMESPACE@_CPU_ENDIAN_ID_BIG | ||
| 29 | |||
| 30 | +/* Aarch64 */ | ||
| 31 | +#elif defined(__aarch64__) | ||
| 32 | +# if !defined(__AARCH64EB__) | ||
| 33 | +# define @KWSYS_NAMESPACE@_CPU_ENDIAN_ID @KWSYS_NAMESPACE@_CPU_ENDIAN_ID_LITTLE | ||
| 34 | +# else | ||
| 35 | +# define @KWSYS_NAMESPACE@_CPU_ENDIAN_ID @KWSYS_NAMESPACE@_CPU_ENDIAN_ID_BIG | ||
| 36 | +# endif | ||
| 37 | + | ||
| 38 | /* Unknown CPU */ | ||
| 39 | #else | ||
| 40 | # define @KWSYS_NAMESPACE@_CPU_ENDIAN_ID 0 | ||
diff --git a/meta/recipes-devtools/cmake/cmake/cmake-2.8.11.2-FindFreetype.patch b/meta/recipes-devtools/cmake/cmake/cmake-2.8.11.2-FindFreetype.patch new file mode 100644 index 0000000000..1b523c057b --- /dev/null +++ b/meta/recipes-devtools/cmake/cmake/cmake-2.8.11.2-FindFreetype.patch | |||
| @@ -0,0 +1,47 @@ | |||
| 1 | From: Julian Ospald <hasufell@gentoo.org> | ||
| 2 | Date: Sun Dec 8 13:38:06 UTC 2013 | ||
| 3 | Subject: fix check for freetype-2.5.1 | ||
| 4 | |||
| 5 | Upstream-Status: Submitted http://www.cmake.org/Bug/view.php?id=14601 | ||
| 6 | |||
| 7 | Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> | ||
| 8 | |||
| 9 | --- old/Modules/FindFreetype.cmake | ||
| 10 | +++ new/Modules/FindFreetype.cmake | ||
| 11 | @@ -64,6 +64,19 @@ | ||
| 12 | PATH_SUFFIXES include/freetype2 include | ||
| 13 | ) | ||
| 14 | |||
| 15 | +if(NOT FREETYPE_INCLUDE_DIR_freetype2) | ||
| 16 | + find_path(FREETYPE_INCLUDE_DIR_freetype2 config/ftheader.h | ||
| 17 | + HINTS | ||
| 18 | + ENV FREETYPE_DIR | ||
| 19 | + PATHS | ||
| 20 | + /usr/X11R6 | ||
| 21 | + /usr/local/X11R6 | ||
| 22 | + /usr/local/X11 | ||
| 23 | + /usr/freeware | ||
| 24 | + PATH_SUFFIXES include/freetype2 include | ||
| 25 | + ) | ||
| 26 | +endif() | ||
| 27 | + | ||
| 28 | find_library(FREETYPE_LIBRARY | ||
| 29 | NAMES freetype libfreetype freetype219 | ||
| 30 | HINTS | ||
| 31 | @@ -82,8 +95,14 @@ | ||
| 32 | endif() | ||
| 33 | set(FREETYPE_LIBRARIES "${FREETYPE_LIBRARY}") | ||
| 34 | |||
| 35 | -if(FREETYPE_INCLUDE_DIR_freetype2 AND EXISTS "${FREETYPE_INCLUDE_DIR_freetype2}/freetype/freetype.h") | ||
| 36 | - file(STRINGS "${FREETYPE_INCLUDE_DIR_freetype2}/freetype/freetype.h" freetype_version_str | ||
| 37 | +if(EXISTS "${FREETYPE_INCLUDE_DIR_freetype2}/freetype/freetype.h") | ||
| 38 | + set(FREETYPE_H "${FREETYPE_INCLUDE_DIR_freetype2}/freetype/freetype.h") | ||
| 39 | +elseif(EXISTS "${FREETYPE_INCLUDE_DIR_freetype2}/freetype.h") | ||
| 40 | + set(FREETYPE_H "${FREETYPE_INCLUDE_DIR_freetype2}/freetype.h") | ||
| 41 | +endif() | ||
| 42 | + | ||
| 43 | +if(FREETYPE_INCLUDE_DIR_freetype2 AND FREETYPE_H) | ||
| 44 | + file(STRINGS "${FREETYPE_H}" freetype_version_str | ||
| 45 | REGEX "^#[\t ]*define[\t ]+FREETYPE_(MAJOR|MINOR|PATCH)[\t ]+[0-9]+$") | ||
| 46 | |||
| 47 | unset(FREETYPE_VERSION_STRING) | ||
diff --git a/meta/recipes-devtools/cmake/cmake/cmlibarchive-disable-ext2fs.patch b/meta/recipes-devtools/cmake/cmake/cmlibarchive-disable-ext2fs.patch new file mode 100644 index 0000000000..bf3671259e --- /dev/null +++ b/meta/recipes-devtools/cmake/cmake/cmlibarchive-disable-ext2fs.patch | |||
| @@ -0,0 +1,26 @@ | |||
| 1 | Disable use of ext2fs/ext2_fs.h by cmake's internal libarchive copy | ||
| 2 | |||
| 3 | We don't want to add a dependency on e2fsprogs-native for cmake-native, | ||
| 4 | and we don't use CPack so just disable this functionality. | ||
| 5 | |||
| 6 | Upstream-Status: Inappropriate [config] | ||
| 7 | |||
| 8 | Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> | ||
| 9 | |||
| 10 | --- a/Utilities/cmlibarchive/CMakeLists.txt | ||
| 11 | +++ b/Utilities/cmlibarchive/CMakeLists.txt | ||
| 12 | @@ -237,12 +237,8 @@ LA_CHECK_INCLUDE_FILE("copyfile.h" HAVE_COPYFILE_H) | ||
| 13 | LA_CHECK_INCLUDE_FILE("direct.h" HAVE_DIRECT_H) | ||
| 14 | LA_CHECK_INCLUDE_FILE("dlfcn.h" HAVE_DLFCN_H) | ||
| 15 | LA_CHECK_INCLUDE_FILE("errno.h" HAVE_ERRNO_H) | ||
| 16 | -LA_CHECK_INCLUDE_FILE("ext2fs/ext2_fs.h" HAVE_EXT2FS_EXT2_FS_H) | ||
| 17 | - | ||
| 18 | -CHECK_C_SOURCE_COMPILES("#include <sys/ioctl.h> | ||
| 19 | -#include <ext2fs/ext2_fs.h> | ||
| 20 | -int main(void) { return EXT2_IOC_GETFLAGS; }" HAVE_WORKING_EXT2_IOC_GETFLAGS) | ||
| 21 | - | ||
| 22 | +SET(HAVE_EXT2FS_EXT2_FS_H 0) | ||
| 23 | +SET(HAVE_WORKING_EXT2_IOC_GETFLAGS 0) | ||
| 24 | LA_CHECK_INCLUDE_FILE("fcntl.h" HAVE_FCNTL_H) | ||
| 25 | LA_CHECK_INCLUDE_FILE("grp.h" HAVE_GRP_H) | ||
| 26 | LA_CHECK_INCLUDE_FILE("inttypes.h" HAVE_INTTYPES_H) | ||
diff --git a/meta/recipes-devtools/cmake/cmake/dont-run-cross-binaries.patch b/meta/recipes-devtools/cmake/cmake/dont-run-cross-binaries.patch new file mode 100644 index 0000000000..0c059f12ed --- /dev/null +++ b/meta/recipes-devtools/cmake/cmake/dont-run-cross-binaries.patch | |||
| @@ -0,0 +1,23 @@ | |||
| 1 | cmake: don't run cross-binaries on host machine | ||
| 2 | |||
| 3 | When doing the cross build we obviously cannot run those binaries on | ||
| 4 | host since they can be binary incompatible. | ||
| 5 | |||
| 6 | Upstream-Status: Inappropriate [embedded specific] | ||
| 7 | |||
| 8 | Signed-off-by: Otavio Salvador <otavio@ossystems.com.br> | ||
| 9 | |||
| 10 | Index: cmake-2.8.10.1/CMakeLists.txt | ||
| 11 | =================================================================== | ||
| 12 | --- cmake-2.8.10.1.orig/CMakeLists.txt | ||
| 13 | +++ cmake-2.8.10.1/CMakeLists.txt | ||
| 14 | @@ -588,7 +588,8 @@ mark_as_advanced(CMAKE_STRICT) | ||
| 15 | |||
| 16 | # build the remaining subdirectories | ||
| 17 | add_subdirectory(Source) | ||
| 18 | -add_subdirectory(Utilities) | ||
| 19 | +# Come on! Running the cross-binaries on host is not a good idea. | ||
| 20 | +#add_subdirectory(Utilities) | ||
| 21 | add_subdirectory(Tests) | ||
| 22 | |||
| 23 | if(BUILD_TESTING) | ||
diff --git a/meta/recipes-devtools/cmake/cmake/environment.d-cmake.sh b/meta/recipes-devtools/cmake/cmake/environment.d-cmake.sh new file mode 100644 index 0000000000..0eb56b66fa --- /dev/null +++ b/meta/recipes-devtools/cmake/cmake/environment.d-cmake.sh | |||
| @@ -0,0 +1 @@ | |||
| alias cmake="cmake -DCMAKE_TOOLCHAIN_FILE=$OECORE_NATIVE_SYSROOT/usr/share/cmake/OEToolchainConfig.cmake" | |||
diff --git a/meta/recipes-devtools/cmake/cmake/qt4-fail-silent.patch b/meta/recipes-devtools/cmake/cmake/qt4-fail-silent.patch new file mode 100644 index 0000000000..fd39f3f9e7 --- /dev/null +++ b/meta/recipes-devtools/cmake/cmake/qt4-fail-silent.patch | |||
| @@ -0,0 +1,55 @@ | |||
| 1 | Fail silently if system Qt installation is broken | ||
| 2 | |||
| 3 | Fixes a regression in behaviour from 2.8.10 to 2.8.11 resulting in the | ||
| 4 | following error if the system Qt installation is broken: | ||
| 5 | |||
| 6 | CMake Error at Modules/FindQt4.cmake:1028 (set_property): | ||
| 7 | set_property could not find TARGET Qt4::QtCore. Perhaps it has not yet | ||
| 8 | been created. | ||
| 9 | Call Stack (most recent call first): | ||
| 10 | Tests/RunCMake/CMakeLists.txt:79 (find_package) | ||
| 11 | |||
| 12 | Upstream-Status: Pending | ||
| 13 | |||
| 14 | Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> | ||
| 15 | |||
| 16 | --- cmake-2.8.11/Modules/FindQt4.cmake 2013-07-04 10:20:42.092848274 +0100 | ||
| 17 | +++ cmake-2.8.11/Modules/FindQt4.cmake 2013-07-04 10:52:15.693380555 +0100 | ||
| 18 | @@ -1025,21 +1025,22 @@ | ||
| 19 | set(_configs) | ||
| 20 | endmacro() | ||
| 21 | |||
| 22 | - | ||
| 23 | - # Set QT_xyz_LIBRARY variable and add | ||
| 24 | - # library include path to QT_INCLUDES | ||
| 25 | - _QT4_ADJUST_LIB_VARS(QtCore) | ||
| 26 | - set_property(TARGET Qt4::QtCore APPEND PROPERTY | ||
| 27 | - INTERFACE_INCLUDE_DIRECTORIES | ||
| 28 | - "${QT_MKSPECS_DIR}/default" | ||
| 29 | - ${QT_INCLUDE_DIR} | ||
| 30 | - ) | ||
| 31 | - set_property(TARGET Qt4::QtCore PROPERTY | ||
| 32 | - INTERFACE_QT_MAJOR_VERSION 4 | ||
| 33 | - ) | ||
| 34 | - set_property(TARGET Qt4::QtCore APPEND PROPERTY | ||
| 35 | - COMPATIBLE_INTERFACE_STRING QT_MAJOR_VERSION | ||
| 36 | - ) | ||
| 37 | + if(QT_QTCORE_FOUND) | ||
| 38 | + # Set QT_xyz_LIBRARY variable and add | ||
| 39 | + # library include path to QT_INCLUDES | ||
| 40 | + _QT4_ADJUST_LIB_VARS(QtCore) | ||
| 41 | + set_property(TARGET Qt4::QtCore APPEND PROPERTY | ||
| 42 | + INTERFACE_INCLUDE_DIRECTORIES | ||
| 43 | + "${QT_MKSPECS_DIR}/default" | ||
| 44 | + ${QT_INCLUDE_DIR} | ||
| 45 | + ) | ||
| 46 | + set_property(TARGET Qt4::QtCore PROPERTY | ||
| 47 | + INTERFACE_QT_MAJOR_VERSION 4 | ||
| 48 | + ) | ||
| 49 | + set_property(TARGET Qt4::QtCore APPEND PROPERTY | ||
| 50 | + COMPATIBLE_INTERFACE_STRING QT_MAJOR_VERSION | ||
| 51 | + ) | ||
| 52 | + endif() | ||
| 53 | |||
| 54 | foreach(QT_MODULE ${QT_MODULES}) | ||
| 55 | _QT4_ADJUST_LIB_VARS(${QT_MODULE}) | ||
diff --git a/meta/recipes-devtools/cmake/cmake/support-oe-qt4-tools-names.patch b/meta/recipes-devtools/cmake/cmake/support-oe-qt4-tools-names.patch new file mode 100644 index 0000000000..0e311f70e3 --- /dev/null +++ b/meta/recipes-devtools/cmake/cmake/support-oe-qt4-tools-names.patch | |||
| @@ -0,0 +1,58 @@ | |||
| 1 | cmake: support OpenEmbedded Qt4 tool binary names | ||
| 2 | |||
| 3 | The FindQt4 module looks for Qt4 binaries to be able to gather the | ||
| 4 | paths used for compilation and also to be using during other processes | ||
| 5 | (translation update, translation binary generating and like) however | ||
| 6 | OpenEmbedded has renamed those to allow old QMake to be used in | ||
| 7 | parallel with the current one. This patch adds support for the | ||
| 8 | OpenEmbedded specific binary names. | ||
| 9 | |||
| 10 | Upstream-Status: Inappropriate [embedded specific] | ||
| 11 | |||
| 12 | Signed-off-by: Otavio Salvador <otavio@ossystems.com.br> | ||
| 13 | |||
| 14 | Index: cmake-2.8.11/Modules/FindQt4.cmake | ||
| 15 | =================================================================== | ||
| 16 | --- cmake-2.8.11.orig/Modules/FindQt4.cmake | ||
| 17 | +++ cmake-2.8.11/Modules/FindQt4.cmake | ||
| 18 | @@ -569,7 +569,7 @@ endfunction() | ||
| 19 | |||
| 20 | set(QT4_INSTALLED_VERSION_TOO_OLD FALSE) | ||
| 21 | |||
| 22 | -set(_QT4_QMAKE_NAMES qmake qmake4 qmake-qt4 qmake-mac) | ||
| 23 | +set(_QT4_QMAKE_NAMES qmake qmake2 qmake4 qmake-qt4 qmake-mac) | ||
| 24 | _qt4_find_qmake("${_QT4_QMAKE_NAMES}" QT_QMAKE_EXECUTABLE QTVERSION) | ||
| 25 | |||
| 26 | if (QT_QMAKE_EXECUTABLE AND QTVERSION) | ||
| 27 | @@ -1157,19 +1157,19 @@ if (QT_QMAKE_EXECUTABLE AND QTVERSION) | ||
| 28 | ) | ||
| 29 | |||
| 30 | find_program(QT_RCC_EXECUTABLE | ||
| 31 | - NAMES rcc | ||
| 32 | + NAMES rcc4 rcc | ||
| 33 | PATHS ${QT_BINARY_DIR} | ||
| 34 | NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH | ||
| 35 | ) | ||
| 36 | |||
| 37 | find_program(QT_DBUSCPP2XML_EXECUTABLE | ||
| 38 | - NAMES qdbuscpp2xml | ||
| 39 | + NAMES qdbuscpp2xml4 qdbuscpp2xml | ||
| 40 | PATHS ${QT_BINARY_DIR} | ||
| 41 | NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH | ||
| 42 | ) | ||
| 43 | |||
| 44 | find_program(QT_DBUSXML2CPP_EXECUTABLE | ||
| 45 | - NAMES qdbusxml2cpp | ||
| 46 | + NAMES qdbusxml2cp4 qdbusxml2cpp | ||
| 47 | PATHS ${QT_BINARY_DIR} | ||
| 48 | NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH | ||
| 49 | ) | ||
| 50 | @@ -1187,7 +1187,7 @@ if (QT_QMAKE_EXECUTABLE AND QTVERSION) | ||
| 51 | ) | ||
| 52 | |||
| 53 | find_program(QT_QCOLLECTIONGENERATOR_EXECUTABLE | ||
| 54 | - NAMES qcollectiongenerator-qt4 qcollectiongenerator | ||
| 55 | + NAMES qcollectiongenerator-qt4 qcollectiongenerator qcollectiongenerator4 | ||
| 56 | PATHS ${QT_BINARY_DIR} | ||
| 57 | NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH | ||
| 58 | ) | ||
diff --git a/meta/recipes-devtools/cmake/cmake_2.8.12.2.bb b/meta/recipes-devtools/cmake/cmake_2.8.12.2.bb new file mode 100644 index 0000000000..66a6af629c --- /dev/null +++ b/meta/recipes-devtools/cmake/cmake_2.8.12.2.bb | |||
| @@ -0,0 +1,52 @@ | |||
| 1 | require cmake.inc | ||
| 2 | |||
| 3 | inherit cmake | ||
| 4 | |||
| 5 | DEPENDS += "curl expat zlib libarchive" | ||
| 6 | |||
| 7 | SRC_URI += "file://dont-run-cross-binaries.patch" | ||
| 8 | |||
| 9 | SRC_URI_append_class-nativesdk = " \ | ||
| 10 | file://OEToolchainConfig.cmake \ | ||
| 11 | file://environment.d-cmake.sh" | ||
| 12 | |||
| 13 | SRC_URI[md5sum] = "17c6513483d23590cbce6957ec6d1e66" | ||
| 14 | SRC_URI[sha256sum] = "8c6574e9afabcb9fc66f463bb1f2f051958d86c85c37fccf067eb1a44a120e5e" | ||
| 15 | |||
| 16 | # Strip ${prefix} from ${docdir}, set result into docdir_stripped | ||
| 17 | python () { | ||
| 18 | prefix=d.getVar("prefix", True) | ||
| 19 | docdir=d.getVar("docdir", True) | ||
| 20 | |||
| 21 | if not docdir.startswith(prefix): | ||
| 22 | raise bb.build.FuncFailed('docdir must contain prefix as its prefix') | ||
| 23 | |||
| 24 | docdir_stripped = docdir[len(prefix):] | ||
| 25 | if len(docdir_stripped) > 0 and docdir_stripped[0] == '/': | ||
| 26 | docdir_stripped = docdir_stripped[1:] | ||
| 27 | |||
| 28 | d.setVar("docdir_stripped", docdir_stripped) | ||
| 29 | } | ||
| 30 | |||
| 31 | EXTRA_OECMAKE=" \ | ||
| 32 | -DCMAKE_DOC_DIR=${docdir_stripped}/cmake-${CMAKE_MAJOR_VERSION} \ | ||
| 33 | -DCMAKE_USE_SYSTEM_LIBRARIES=1 \ | ||
| 34 | -DKWSYS_CHAR_IS_SIGNED=1 \ | ||
| 35 | -DBUILD_CursesDialog=0 \ | ||
| 36 | ${@bb.utils.contains('DISTRO_FEATURES', 'largefile', '-DKWSYS_LFS_WORKS=1', '-DKWSYS_LFS_DISABLE=1', d)} \ | ||
| 37 | " | ||
| 38 | |||
| 39 | do_install_append_class-nativesdk() { | ||
| 40 | mkdir -p ${D}${datadir}/cmake | ||
| 41 | install -m 644 ${WORKDIR}/OEToolchainConfig.cmake ${D}${datadir}/cmake/ | ||
| 42 | |||
| 43 | mkdir -p ${D}${SDKPATHNATIVE}/environment-setup.d | ||
| 44 | install -m 644 ${WORKDIR}/environment.d-cmake.sh ${D}${SDKPATHNATIVE}/environment-setup.d/cmake.sh | ||
| 45 | } | ||
| 46 | |||
| 47 | FILES_${PN}_append_class-nativesdk = " ${SDKPATHNATIVE}" | ||
| 48 | |||
| 49 | FILES_${PN} += "${datadir}/cmake-${CMAKE_MAJOR_VERSION}" | ||
| 50 | FILES_${PN}-doc += "${docdir}/cmake-${CMAKE_MAJOR_VERSION}" | ||
| 51 | |||
| 52 | BBCLASSEXTEND = "nativesdk" | ||
