summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/cmake
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools/cmake')
-rw-r--r--meta/recipes-devtools/cmake/cmake-native_3.21.3.bb53
-rw-r--r--meta/recipes-devtools/cmake/cmake-native_3.3.1.bb16
-rw-r--r--meta/recipes-devtools/cmake/cmake.inc58
-rw-r--r--meta/recipes-devtools/cmake/cmake/0001-CMakeDetermineSystem-use-oe-environment-vars-to-load.patch44
-rw-r--r--meta/recipes-devtools/cmake/cmake/0003-cmake-support-OpenEmbedded-Qt4-tool-binary-names.patch (renamed from meta/recipes-devtools/cmake/cmake/support-oe-qt4-tools-names.patch)16
-rw-r--r--meta/recipes-devtools/cmake/cmake/0004-Fail-silently-if-system-Qt-installation-is-broken.patch (renamed from meta/recipes-devtools/cmake/cmake/qt4-fail-silent.patch)14
-rw-r--r--meta/recipes-devtools/cmake/cmake/0005-Disable-use-of-ext2fs-ext2_fs.h-by-cmake-s-internal-.patch (renamed from meta/recipes-devtools/cmake/cmake/cmlibarchive-disable-ext2fs.patch)19
-rw-r--r--meta/recipes-devtools/cmake/cmake/OEToolchainConfig.cmake17
-rw-r--r--meta/recipes-devtools/cmake/cmake/dont-run-cross-binaries.patch23
-rw-r--r--meta/recipes-devtools/cmake/cmake/environment.d-cmake.sh3
-rw-r--r--meta/recipes-devtools/cmake/cmake_3.21.3.bb (renamed from meta/recipes-devtools/cmake/cmake_3.3.1.bb)36
11 files changed, 180 insertions, 119 deletions
diff --git a/meta/recipes-devtools/cmake/cmake-native_3.21.3.bb b/meta/recipes-devtools/cmake/cmake-native_3.21.3.bb
new file mode 100644
index 0000000000..335097d387
--- /dev/null
+++ b/meta/recipes-devtools/cmake/cmake-native_3.21.3.bb
@@ -0,0 +1,53 @@
+require cmake.inc
+inherit native
+
+DEPENDS += "bzip2-replacement-native xz-native zlib-native curl-native ncurses-native zstd-native"
+
+SRC_URI += "file://OEToolchainConfig.cmake \
+ file://environment.d-cmake.sh \
+ file://0001-CMakeDetermineSystem-use-oe-environment-vars-to-load.patch \
+ file://0005-Disable-use-of-ext2fs-ext2_fs.h-by-cmake-s-internal-.patch \
+ "
+
+
+B = "${WORKDIR}/build"
+do_configure[cleandirs] = "${B}"
+
+CMAKE_EXTRACONF = "\
+ -DCMAKE_LIBRARY_PATH=${STAGING_LIBDIR_NATIVE} \
+ -DBUILD_CursesDialog=1 \
+ -DCMAKE_USE_SYSTEM_LIBRARIES=1 \
+ -DCMAKE_USE_SYSTEM_LIBRARY_JSONCPP=0 \
+ -DCMAKE_USE_SYSTEM_LIBRARY_LIBARCHIVE=0 \
+ -DCMAKE_USE_SYSTEM_LIBRARY_LIBUV=0 \
+ -DCMAKE_USE_SYSTEM_LIBRARY_LIBRHASH=0 \
+ -DCMAKE_USE_SYSTEM_LIBRARY_EXPAT=0 \
+ -DENABLE_ACL=0 -DHAVE_ACL_LIBACL_H=0 \
+ -DHAVE_SYS_ACL_H=0 \
+"
+
+do_configure () {
+ ${S}/configure --verbose --prefix=${prefix} \
+ ${@oe.utils.parallel_make_argument(d, '--parallel=%d')} \
+ ${@bb.utils.contains('CCACHE', 'ccache ', '--enable-ccache', '', d)} \
+ -- ${CMAKE_EXTRACONF}
+}
+
+do_compile() {
+ oe_runmake
+}
+
+do_install() {
+ oe_runmake 'DESTDIR=${D}' install
+
+ # The following codes are here because eSDK needs to provide compatibilty
+ # for SDK. That is, eSDK could also be used like traditional SDK.
+ mkdir -p ${D}${datadir}/cmake
+ install -m 644 ${WORKDIR}/OEToolchainConfig.cmake ${D}${datadir}/cmake/
+ mkdir -p ${D}${base_prefix}/environment-setup.d
+ install -m 644 ${WORKDIR}/environment.d-cmake.sh ${D}${base_prefix}/environment-setup.d/cmake.sh
+}
+
+do_compile[progress] = "percent"
+
+SYSROOT_DIRS_NATIVE += "${datadir}/cmake ${base_prefix}/environment-setup.d"
diff --git a/meta/recipes-devtools/cmake/cmake-native_3.3.1.bb b/meta/recipes-devtools/cmake/cmake-native_3.3.1.bb
deleted file mode 100644
index cb4e749d7a..0000000000
--- a/meta/recipes-devtools/cmake/cmake-native_3.3.1.bb
+++ /dev/null
@@ -1,16 +0,0 @@
-require cmake.inc
-inherit native
-
-# Using cmake's internal libarchive, so some dependencies are needed
-DEPENDS += "bzip2-native zlib-native"
-
-SRC_URI += "\
- file://cmlibarchive-disable-ext2fs.patch \
-"
-
-# Disable ccmake since we don't depend on ncurses
-CMAKE_EXTRACONF = "\
- -DBUILD_CursesDialog=0 \
- -DENABLE_ACL=0 -DHAVE_ACL_LIBACL_H=0 \
- -DHAVE_SYS_ACL_H=0 \
-"
diff --git a/meta/recipes-devtools/cmake/cmake.inc b/meta/recipes-devtools/cmake/cmake.inc
index 57e93ac070..43d4fe57fb 100644
--- a/meta/recipes-devtools/cmake/cmake.inc
+++ b/meta/recipes-devtools/cmake/cmake.inc
@@ -2,51 +2,29 @@
# Released under the MIT license (see packages/COPYING)
SUMMARY = "Cross-platform, open-source make system"
+DESCRIPTION = "CMake is used to control the software compilation process \
+using simple platform and compiler independent configuration files. CMake \
+generates native makefiles and workspaces that can be used in the compiler \
+environment of your choice."
HOMEPAGE = "http://www.cmake.org/"
BUGTRACKER = "http://public.kitware.com/Bug/my_view_page.php"
SECTION = "console/utils"
-LICENSE = "BSD"
-LIC_FILES_CHKSUM = "file://Copyright.txt;md5=3ba5a6c34481652ce573e5c4e1d707e4 \
- file://Source/cmake.h;beginline=1;endline=10;md5=341736dae83c9e344b53eeb1bc7d7bc2"
+LICENSE = "BSD-3-Clause"
+LIC_FILES_CHKSUM = "file://Copyright.txt;md5=31023e1d3f51ca90a58f55bcee8e2339 \
+ file://Source/cmake.h;beginline=1;endline=2;md5=a5f70e1fef8614734eae0d62b4f5891b \
+ "
-CMAKE_MAJOR_VERSION = "${@'.'.join(d.getVar('PV',1).split('.')[0:2])}"
+CMAKE_MAJOR_VERSION = "${@'.'.join(d.getVar('PV').split('.')[0:2])}"
-SRC_URI = "http://www.cmake.org/files/v${CMAKE_MAJOR_VERSION}/cmake-${PV}.tar.gz \
- file://support-oe-qt4-tools-names.patch \
- file://qt4-fail-silent.patch \
- "
+SRC_URI = "https://cmake.org/files/v${CMAKE_MAJOR_VERSION}/cmake-${PV}.tar.gz \
+ file://0003-cmake-support-OpenEmbedded-Qt4-tool-binary-names.patch \
+ file://0004-Fail-silently-if-system-Qt-installation-is-broken.patch \
+"
-SRC_URI[md5sum] = "52638576f4e1e621fed6c3410d3a1b12"
-SRC_URI[sha256sum] = "cd65022c6a0707f1c7112f99e9c981677fdd5518f7ddfa0f778d4cee7113e3d6"
+SRC_URI[sha256sum] = "d14d06df4265134ee42c4d50f5a60cb8b471b7b6a47da8e5d914d49dd783794f"
-inherit autotools
+UPSTREAM_CHECK_REGEX = "cmake-(?P<pver>\d+(\.\d+)+)\.tar"
-# Ugly hack to work around undefined OE_QMAKE_PATH_EXTERNAL_HOST_BINS variable
-# and possibly missing qmake binary (qtbase-native can be removed from sysroot
-# e.g. in order to upgrade it, even when there is target qtbase)
-
-# Fixes errors like this in cmake(-native).do_configure:
-#| -- Performing Test run_pic_test - Success
-#| CMake Error at tmp-eglibc/sysroots/qemuarm/usr/lib/cmake/Qt5Core/Qt5CoreConfig.cmake:27 (message):
-#| The imported target "Qt5::Core" references the file
-#|
-#| "/qmake"
-#|
-#| but this file does not exist. Possible reasons include:
-
-do_configure_prepend() {
- sed -i 's/^find_package(Qt5Core QUIET)$/#find_package(Qt5Core QUIET)/g' ${S}/Tests/RunCMake/CMakeLists.txt
- sed -i 's/^ find_package(Qt5Core REQUIRED)/# find_package(Qt5Core REQUIRED)/g' ${S}/Tests/Qt4And5Automoc/CMakeLists.txt
- sed -i 's/^ find_package(Qt5Widgets QUIET NO_MODULE)/# find_package(Qt5Widgets QUIET NO_MODULE)/g' ${S}/Tests/CMakeLists.txt
- sed -i 's/^find_package(Qt5Widgets QUIET)/#find_package(Qt5Widgets QUIET)/g' ${S}/Source/QtDialog/CMakeLists.txt
- sed -i 's/^ find_package(Qt5Widgets REQUIRED)/# find_package(Qt5Widgets REQUIRED)/g' ${S}/Tests/QtAutoUicInterface/CMakeLists.txt
- sed -i 's/^ find_package(Qt5Widgets REQUIRED)/# find_package(Qt5Widgets REQUIRED)/g' ${S}/Tests/QtAutogen/CMakeLists.txt
- sed -i 's/^ find_package(Qt5Core REQUIRED)/# find_package(Qt5Core REQUIRED)/g' ${S}/Tests/QtAutogen/autorcc_depends/CMakeLists.txt
-}
-
-# Extra flags to pass to cmake invoked by bootstrap
-CMAKE_EXTRACONF = ""
-
-do_configure () {
- ${S}/configure --prefix=${prefix} -- ${CMAKE_EXTRACONF}
-}
+# This is specific to the npm package that installs cmake, so isn't
+# relevant to OpenEmbedded
+CVE_CHECK_WHITELIST += "CVE-2016-10642"
diff --git a/meta/recipes-devtools/cmake/cmake/0001-CMakeDetermineSystem-use-oe-environment-vars-to-load.patch b/meta/recipes-devtools/cmake/cmake/0001-CMakeDetermineSystem-use-oe-environment-vars-to-load.patch
new file mode 100644
index 0000000000..9609f5f7c2
--- /dev/null
+++ b/meta/recipes-devtools/cmake/cmake/0001-CMakeDetermineSystem-use-oe-environment-vars-to-load.patch
@@ -0,0 +1,44 @@
+From e75f76b00cc9c1cfc231c5e731e975552f5dd13e Mon Sep 17 00:00:00 2001
+From: Cody P Schafer <dev@codyps.com>
+Date: Thu, 27 Apr 2017 11:35:05 -0400
+Subject: [PATCH] CMakeDetermineSystem: use oe environment vars to load default
+ toolchain file in sdk
+
+Passing the toolchain by:
+
+ - shell aliases does not work if cmake is called by a script
+ - unconditionally by a wrapper script causes cmake to believe it is
+ configuring things when it is not (for example, `cmake --build` breaks).
+
+The OE_CMAKE_TOOLCHAIN_FILE variable is only used as a default if no
+toolchain is explicitly specified.
+
+Setting the CMAKE_TOOLCHAIN_FILE cmake variable is marked as cached
+because '-D' options are cache entries themselves.
+
+Upstream-Status: Inappropriate [oe-core specific]
+Signed-off-by: Cody P Schafer <dev@codyps.com>
+Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
+
+---
+ Modules/CMakeDetermineSystem.cmake | 7 +++++++
+ 1 file changed, 7 insertions(+)
+
+diff --git a/Modules/CMakeDetermineSystem.cmake b/Modules/CMakeDetermineSystem.cmake
+index bae270de..5bb6bc0d 100644
+--- a/Modules/CMakeDetermineSystem.cmake
++++ b/Modules/CMakeDetermineSystem.cmake
+@@ -111,6 +111,13 @@ else()
+ endif()
+ endif()
+
++if(NOT DEFINED CMAKE_TOOLCHAIN_FILE)
++ if(DEFINED ENV{OE_CMAKE_TOOLCHAIN_FILE})
++ set(CMAKE_TOOLCHAIN_FILE "$ENV{OE_CMAKE_TOOLCHAIN_FILE}" CACHE FILEPATH "toolchain file")
++ message(STATUS "Toolchain file defaulted to '${CMAKE_TOOLCHAIN_FILE}'")
++ endif()
++endif()
++
+ # if a toolchain file is used, the user wants to cross compile.
+ # in this case read the toolchain file and keep the CMAKE_HOST_SYSTEM_*
+ # variables around so they can be used in CMakeLists.txt.
diff --git a/meta/recipes-devtools/cmake/cmake/support-oe-qt4-tools-names.patch b/meta/recipes-devtools/cmake/cmake/0003-cmake-support-OpenEmbedded-Qt4-tool-binary-names.patch
index 15cbca89d8..575a5cb7fb 100644
--- a/meta/recipes-devtools/cmake/cmake/support-oe-qt4-tools-names.patch
+++ b/meta/recipes-devtools/cmake/cmake/0003-cmake-support-OpenEmbedded-Qt4-tool-binary-names.patch
@@ -1,4 +1,7 @@
-cmake: support OpenEmbedded Qt4 tool binary names
+From 2d02ac91d5a5d72eaddba4894eaa6db3ed8fee62 Mon Sep 17 00:00:00 2001
+From: Otavio Salvador <otavio@ossystems.com.br>
+Date: Thu, 12 May 2011 15:36:03 +0000
+Subject: [PATCH] cmake: support OpenEmbedded Qt4 tool binary names
The FindQt4 module looks for Qt4 binaries to be able to gather the
paths used for compilation and also to be using during other processes
@@ -15,15 +18,17 @@ The patch was slightly adapted in order to match cmake 3.2.2:
Instead of find_program, _find_qt4_program is now used.
Signed-off-by: Moritz Blume <moritz.blume@bmw-carit.de>
+Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
+
---
Modules/FindQt4.cmake | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/Modules/FindQt4.cmake b/Modules/FindQt4.cmake
-index 11091b5..6704769 100644
+index 3993968..b2a8585 100644
--- a/Modules/FindQt4.cmake
+++ b/Modules/FindQt4.cmake
-@@ -522,7 +522,7 @@ endfunction()
+@@ -518,7 +518,7 @@ endfunction()
set(QT4_INSTALLED_VERSION_TOO_OLD FALSE)
@@ -32,7 +37,7 @@ index 11091b5..6704769 100644
_qt4_find_qmake("${_QT4_QMAKE_NAMES}" QT_QMAKE_EXECUTABLE QTVERSION)
if (QT_QMAKE_EXECUTABLE AND
-@@ -1148,12 +1148,12 @@ if (QT_QMAKE_EXECUTABLE AND
+@@ -1136,12 +1136,12 @@ if (QT_QMAKE_EXECUTABLE AND
_find_qt4_program(QT_MOC_EXECUTABLE Qt4::moc moc-qt4 moc4 moc)
_find_qt4_program(QT_UIC_EXECUTABLE Qt4::uic uic-qt4 uic4 uic)
_find_qt4_program(QT_UIC3_EXECUTABLE Qt4::uic3 uic3)
@@ -49,6 +54,3 @@ index 11091b5..6704769 100644
_find_qt4_program(QT_DESIGNER_EXECUTABLE Qt4::designer designer-qt4 designer4 designer)
_find_qt4_program(QT_LINGUIST_EXECUTABLE Qt4::linguist linguist-qt4 linguist4 linguist)
---
-1.9.1
-
diff --git a/meta/recipes-devtools/cmake/cmake/qt4-fail-silent.patch b/meta/recipes-devtools/cmake/cmake/0004-Fail-silently-if-system-Qt-installation-is-broken.patch
index 80fc277fa2..1b196db81a 100644
--- a/meta/recipes-devtools/cmake/cmake/qt4-fail-silent.patch
+++ b/meta/recipes-devtools/cmake/cmake/0004-Fail-silently-if-system-Qt-installation-is-broken.patch
@@ -1,4 +1,7 @@
-Fail silently if system Qt installation is broken
+From 60864efbe52cc12018efaafbc4e4c3c8b4af2b65 Mon Sep 17 00:00:00 2001
+From: Otavio Salvador <otavio@ossystems.com.br>
+Date: Thu, 5 Jul 2018 10:26:48 -0300
+Subject: [PATCH] Fail silently if system Qt installation is broken
Fixes a regression in behaviour from 2.8.10 to 2.8.11 resulting in the
following error if the system Qt installation is broken:
@@ -18,15 +21,17 @@ Another set_property was introduced which had to be included
within the if(QT_QTCORE_FOUND) statement.
Signed-off-by: Moritz Blume <moritz.blume@bmw-carit.de>
+Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
+
---
Modules/FindQt4.cmake | 39 ++++++++++++++++++++-------------------
1 file changed, 20 insertions(+), 19 deletions(-)
diff --git a/Modules/FindQt4.cmake b/Modules/FindQt4.cmake
-index 6704769..9048e35 100644
+index b2a8585..77c89aa 100644
--- a/Modules/FindQt4.cmake
+++ b/Modules/FindQt4.cmake
-@@ -1000,25 +1000,26 @@ if (QT_QMAKE_EXECUTABLE AND
+@@ -988,25 +988,26 @@ if (QT_QMAKE_EXECUTABLE AND
endif()
endmacro()
@@ -72,6 +77,3 @@ index 6704769..9048e35 100644
foreach(QT_MODULE ${QT_MODULES})
_QT4_ADJUST_LIB_VARS(${QT_MODULE})
---
-1.9.1
-
diff --git a/meta/recipes-devtools/cmake/cmake/cmlibarchive-disable-ext2fs.patch b/meta/recipes-devtools/cmake/cmake/0005-Disable-use-of-ext2fs-ext2_fs.h-by-cmake-s-internal-.patch
index bf3671259e..d6f7308fe0 100644
--- a/meta/recipes-devtools/cmake/cmake/cmlibarchive-disable-ext2fs.patch
+++ b/meta/recipes-devtools/cmake/cmake/0005-Disable-use-of-ext2fs-ext2_fs.h-by-cmake-s-internal-.patch
@@ -1,4 +1,10 @@
-Disable use of ext2fs/ext2_fs.h by cmake's internal libarchive copy
+From fd9a04c1434e12f21c043385e306e0b52d38d749 Mon Sep 17 00:00:00 2001
+From: Otavio Salvador <otavio@ossystems.com.br>
+Date: Thu, 5 Jul 2018 10:28:04 -0300
+Subject: [PATCH] Disable use of ext2fs/ext2_fs.h by cmake's internal
+
+ libarchive copy
+Organization: O.S. Systems Software LTDA.
We don't want to add a dependency on e2fsprogs-native for cmake-native,
and we don't use CPack so just disable this functionality.
@@ -6,10 +12,17 @@ and we don't use CPack so just disable this functionality.
Upstream-Status: Inappropriate [config]
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
+Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
+
+---
+ Utilities/cmlibarchive/CMakeLists.txt | 8 ++------
+ 1 file changed, 2 insertions(+), 6 deletions(-)
+diff --git a/Utilities/cmlibarchive/CMakeLists.txt b/Utilities/cmlibarchive/CMakeLists.txt
+index bfcaf30..2960683 100644
--- a/Utilities/cmlibarchive/CMakeLists.txt
+++ b/Utilities/cmlibarchive/CMakeLists.txt
-@@ -237,12 +237,8 @@ LA_CHECK_INCLUDE_FILE("copyfile.h" HAVE_COPYFILE_H)
+@@ -682,12 +682,8 @@ LA_CHECK_INCLUDE_FILE("copyfile.h" HAVE_COPYFILE_H)
LA_CHECK_INCLUDE_FILE("direct.h" HAVE_DIRECT_H)
LA_CHECK_INCLUDE_FILE("dlfcn.h" HAVE_DLFCN_H)
LA_CHECK_INCLUDE_FILE("errno.h" HAVE_ERRNO_H)
@@ -23,4 +36,4 @@ Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
+SET(HAVE_WORKING_EXT2_IOC_GETFLAGS 0)
LA_CHECK_INCLUDE_FILE("fcntl.h" HAVE_FCNTL_H)
LA_CHECK_INCLUDE_FILE("grp.h" HAVE_GRP_H)
- LA_CHECK_INCLUDE_FILE("inttypes.h" HAVE_INTTYPES_H)
+ LA_CHECK_INCLUDE_FILE("io.h" HAVE_IO_H)
diff --git a/meta/recipes-devtools/cmake/cmake/OEToolchainConfig.cmake b/meta/recipes-devtools/cmake/cmake/OEToolchainConfig.cmake
index 60014bbf2b..8f6f3a272d 100644
--- a/meta/recipes-devtools/cmake/cmake/OEToolchainConfig.cmake
+++ b/meta/recipes-devtools/cmake/cmake/OEToolchainConfig.cmake
@@ -1,18 +1,25 @@
set( CMAKE_SYSTEM_NAME Linux )
set( CMAKE_C_FLAGS $ENV{CFLAGS} CACHE STRING "" FORCE )
set( CMAKE_CXX_FLAGS $ENV{CXXFLAGS} CACHE STRING "" FORCE )
-set( CMAKE ASM_FLAGS ${CMAKE_C_FLAGS} CACHE STRING "" FORCE )
+set( CMAKE_ASM_FLAGS ${CMAKE_C_FLAGS} CACHE STRING "" FORCE )
set( CMAKE_LDFLAGS_FLAGS ${CMAKE_CXX_FLAGS} CACHE STRING "" FORCE )
-set( CMAKE_FIND_ROOT_PATH $ENV{OECORE_TARGET_SYSROOT} $ENV{OECORE_NATIVE_SYSROOT} )
+set( CMAKE_SYSROOT $ENV{OECORE_TARGET_SYSROOT} )
+
+set( CMAKE_FIND_ROOT_PATH $ENV{OECORE_TARGET_SYSROOT} )
set( CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER )
set( CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY )
set( CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY )
+set( CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY )
+
+set(CMAKE_FIND_LIBRARY_CUSTOM_LIB_SUFFIX "$ENV{OE_CMAKE_FIND_LIBRARY_CUSTOM_LIB_SUFFIX}")
-string(REGEX MATCH "sysroots/([a-zA-Z0-9]+)" CMAKE_SYSTEM_PROCESSOR $ENV{SDKTARGETSYSROOT})
-string(REGEX REPLACE "sysroots/" "" CMAKE_SYSTEM_PROCESSOR ${CMAKE_SYSTEM_PROCESSOR})
+# Set CMAKE_SYSTEM_PROCESSOR from the sysroot name (assuming processor-distro-os).
+if ($ENV{SDKTARGETSYSROOT} MATCHES "/sysroots/([a-zA-Z0-9_-]+)-.+-.+")
+ set(CMAKE_SYSTEM_PROCESSOR ${CMAKE_MATCH_1})
+endif()
# Include the toolchain configuration subscripts
-file( GLOB toolchain_config_files "${CMAKE_TOOLCHAIN_FILE}.d/*.cmake" )
+file( GLOB toolchain_config_files "${CMAKE_CURRENT_LIST_FILE}.d/*.cmake" )
foreach(config ${toolchain_config_files})
include(${config})
endforeach()
diff --git a/meta/recipes-devtools/cmake/cmake/dont-run-cross-binaries.patch b/meta/recipes-devtools/cmake/cmake/dont-run-cross-binaries.patch
deleted file mode 100644
index 0c059f12ed..0000000000
--- a/meta/recipes-devtools/cmake/cmake/dont-run-cross-binaries.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-cmake: don't run cross-binaries on host machine
-
-When doing the cross build we obviously cannot run those binaries on
-host since they can be binary incompatible.
-
-Upstream-Status: Inappropriate [embedded specific]
-
-Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
-
-Index: cmake-2.8.10.1/CMakeLists.txt
-===================================================================
---- cmake-2.8.10.1.orig/CMakeLists.txt
-+++ cmake-2.8.10.1/CMakeLists.txt
-@@ -588,7 +588,8 @@ mark_as_advanced(CMAKE_STRICT)
-
- # build the remaining subdirectories
- add_subdirectory(Source)
--add_subdirectory(Utilities)
-+# Come on! Running the cross-binaries on host is not a good idea.
-+#add_subdirectory(Utilities)
- add_subdirectory(Tests)
-
- 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
index 0eb56b66fa..7bdb19fb6c 100644
--- a/meta/recipes-devtools/cmake/cmake/environment.d-cmake.sh
+++ b/meta/recipes-devtools/cmake/cmake/environment.d-cmake.sh
@@ -1 +1,2 @@
-alias cmake="cmake -DCMAKE_TOOLCHAIN_FILE=$OECORE_NATIVE_SYSROOT/usr/share/cmake/OEToolchainConfig.cmake"
+export OE_CMAKE_TOOLCHAIN_FILE="$OECORE_NATIVE_SYSROOT/usr/share/cmake/OEToolchainConfig.cmake"
+export OE_CMAKE_FIND_LIBRARY_CUSTOM_LIB_SUFFIX="`echo $OECORE_BASELIB | sed -e s/lib//`"
diff --git a/meta/recipes-devtools/cmake/cmake_3.3.1.bb b/meta/recipes-devtools/cmake/cmake_3.21.3.bb
index 2f188f0712..36c6357dd8 100644
--- a/meta/recipes-devtools/cmake/cmake_3.3.1.bb
+++ b/meta/recipes-devtools/cmake/cmake_3.21.3.bb
@@ -1,20 +1,22 @@
require cmake.inc
-inherit cmake
+inherit cmake bash-completion
DEPENDS += "curl expat zlib libarchive xz ncurses bzip2"
-SRC_URI_append_class-nativesdk = " \
+SRC_URI:append:class-nativesdk = " \
file://OEToolchainConfig.cmake \
- file://environment.d-cmake.sh"
+ file://environment.d-cmake.sh \
+ file://0001-CMakeDetermineSystem-use-oe-environment-vars-to-load.patch \
+"
# Strip ${prefix} from ${docdir}, set result into docdir_stripped
python () {
- prefix=d.getVar("prefix", True)
- docdir=d.getVar("docdir", True)
+ prefix=d.getVar("prefix")
+ docdir=d.getVar("docdir")
if not docdir.startswith(prefix):
- raise bb.build.FuncFailed('docdir must contain prefix as its prefix')
+ bb.fatal('docdir must contain prefix as its prefix')
docdir_stripped = docdir[len(prefix):]
if len(docdir_stripped) > 0 and docdir_stripped[0] == '/':
@@ -25,19 +27,16 @@ python () {
EXTRA_OECMAKE=" \
-DCMAKE_DOC_DIR=${docdir_stripped}/cmake-${CMAKE_MAJOR_VERSION} \
- -DCMAKE_USE_SYSTEM_LIBRARY_BZIP2=1 \
- -DCMAKE_USE_SYSTEM_LIBRARY_CURL=1 \
- -DCMAKE_USE_SYSTEM_LIBRARY_EXPAT=1 \
- -DCMAKE_USE_SYSTEM_LIBRARY_FORM=1 \
- -DCMAKE_USE_SYSTEM_LIBRARY_LIBARCHIVE=1 \
- -DCMAKE_USE_SYSTEM_LIBRARY_LIBLZMA=1 \
- -DCMAKE_USE_SYSTEM_LIBRARY_ZLIB=1 \
+ -DCMAKE_USE_SYSTEM_LIBRARIES=1 \
+ -DCMAKE_USE_SYSTEM_LIBRARY_JSONCPP=0 \
+ -DCMAKE_USE_SYSTEM_LIBRARY_LIBUV=0 \
+ -DCMAKE_USE_SYSTEM_LIBRARY_LIBRHASH=0 \
-DKWSYS_CHAR_IS_SIGNED=1 \
-DBUILD_CursesDialog=0 \
- ${@bb.utils.contains('DISTRO_FEATURES', 'largefile', '-DKWSYS_LFS_WORKS=1', '-DKWSYS_LFS_DISABLE=1', d)} \
+ -DKWSYS_LFS_WORKS=1 \
"
-do_install_append_class-nativesdk() {
+do_install:append:class-nativesdk() {
mkdir -p ${D}${datadir}/cmake
install -m 644 ${WORKDIR}/OEToolchainConfig.cmake ${D}${datadir}/cmake/
@@ -45,9 +44,10 @@ do_install_append_class-nativesdk() {
install -m 644 ${WORKDIR}/environment.d-cmake.sh ${D}${SDKPATHNATIVE}/environment-setup.d/cmake.sh
}
-FILES_${PN}_append_class-nativesdk = " ${SDKPATHNATIVE}"
+FILES:${PN}:append:class-nativesdk = " ${SDKPATHNATIVE}"
-FILES_${PN} += "${datadir}/cmake-${CMAKE_MAJOR_VERSION}"
-FILES_${PN}-doc += "${docdir}/cmake-${CMAKE_MAJOR_VERSION}"
+FILES:${PN} += "${datadir}/cmake-${CMAKE_MAJOR_VERSION} ${datadir}/cmake ${datadir}/aclocal ${datadir}/emacs ${datadir}/vim"
+FILES:${PN}-doc += "${docdir}/cmake-${CMAKE_MAJOR_VERSION}"
+FILES:${PN}-dev = ""
BBCLASSEXTEND = "nativesdk"