* [PATCH v3 1/2] cmake: Whitespace fix
@ 2015-06-10 7:36 Moritz Blume
2015-06-10 7:36 ` [PATCH v3 2/2] cmake: Upgrade 2.8.12.2 -> 3.2.2 Moritz Blume
0 siblings, 1 reply; 8+ messages in thread
From: Moritz Blume @ 2015-06-10 7:36 UTC (permalink / raw)
To: openembedded-core
Signed-off-by: Moritz Blume <moritz.blume@bmw-carit.de>
---
meta/classes/cmake.bbclass | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/meta/classes/cmake.bbclass b/meta/classes/cmake.bbclass
index 3549c38..1ebb936 100644
--- a/meta/classes/cmake.bbclass
+++ b/meta/classes/cmake.bbclass
@@ -82,7 +82,7 @@ cmake_do_configure() {
mkdir -p ${B}
cd ${B}
else
- find ${B} -name CMakeFiles -or -name Makefile -or -name cmake_install.cmake -or -name CMakeCache.txt -delete
+ find ${B} -name CMakeFiles -or -name Makefile -or -name cmake_install.cmake -or -name CMakeCache.txt -delete
fi
# Just like autotools cmake can use a site file to cache result that need generated binaries to run
--
1.9.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH v3 2/2] cmake: Upgrade 2.8.12.2 -> 3.2.2
2015-06-10 7:36 [PATCH v3 1/2] cmake: Whitespace fix Moritz Blume
@ 2015-06-10 7:36 ` Moritz Blume
2015-06-10 16:49 ` Burton, Ross
` (2 more replies)
0 siblings, 3 replies; 8+ messages in thread
From: Moritz Blume @ 2015-06-10 7:36 UTC (permalink / raw)
To: openembedded-core
Patches "qt4-fail-silent.patch" and "support-oe-qt4-tools-names.patch"
were adapted in order to fit to CMake 3.2.2 (refer to the commit
message in the respective patch for details).
Patch "cmake-2.8.11.2-FindFreetype.patch" was dropped since it was
rejected upstream and its functionality otherwise implemented in the
meantime.
Note that CMake 3 needs to have the full compiler path in the toolchain
file (see cmake.bbclass).
Signed-off-by: Moritz Blume <moritz.blume@bmw-carit.de>
---
meta/classes/cmake.bbclass | 8 ++-
.../cmake/cmake-native_2.8.12.2.bb | 19 ------
meta/recipes-devtools/cmake/cmake-native_3.2.2.bb | 19 ++++++
meta/recipes-devtools/cmake/cmake.inc | 12 ++--
.../cmake/cmake/cmake-2.8.11.2-FindFreetype.patch | 47 ---------------
.../cmake/cmake/qt4-fail-silent.patch | 30 ++++++++--
.../cmake/cmake/support-oe-qt4-tools-names.patch | 70 ++++++++++------------
meta/recipes-devtools/cmake/cmake_2.8.12.2.bb | 52 ----------------
meta/recipes-devtools/cmake/cmake_3.2.2.bb | 56 +++++++++++++++++
9 files changed, 144 insertions(+), 169 deletions(-)
delete mode 100644 meta/recipes-devtools/cmake/cmake-native_2.8.12.2.bb
create mode 100644 meta/recipes-devtools/cmake/cmake-native_3.2.2.bb
delete mode 100644 meta/recipes-devtools/cmake/cmake/cmake-2.8.11.2-FindFreetype.patch
delete mode 100644 meta/recipes-devtools/cmake/cmake_2.8.12.2.bb
create mode 100644 meta/recipes-devtools/cmake/cmake_3.2.2.bb
diff --git a/meta/classes/cmake.bbclass b/meta/classes/cmake.bbclass
index 1ebb936..c97fd02 100644
--- a/meta/classes/cmake.bbclass
+++ b/meta/classes/cmake.bbclass
@@ -10,9 +10,11 @@ CCACHE = ""
# We want the staging and installing functions from autotools
inherit autotools
-# C/C++ Compiler (without cpu arch/tune arguments)
-OECMAKE_C_COMPILER ?= "`echo ${CC} | sed 's/^\([^ ]*\).*/\1/'`"
-OECMAKE_CXX_COMPILER ?= "`echo ${CXX} | sed 's/^\([^ ]*\).*/\1/'`"
+# Full path to C/C++ Compiler (without cpu arch/tune arguments)
+C_COMPILER = "$(echo ${CC} | sed 's/^\([^ ]*\).*/\1/')"
+CXX_COMPILER = "$(echo ${CXX} | sed 's/^\([^ ]*\).*/\1/')"
+OECMAKE_C_COMPILER ?= "$(which ${C_COMPILER})"
+OECMAKE_CXX_COMPILER ?= "$(which ${CXX_COMPILER})"
OECMAKE_AR ?= "${AR}"
# Compiler flags
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
deleted file mode 100644
index e40dfdd..0000000
--- a/meta/recipes-devtools/cmake/cmake-native_2.8.12.2.bb
+++ /dev/null
@@ -1,19 +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 \
-"
-
-SRC_URI[md5sum] = "17c6513483d23590cbce6957ec6d1e66"
-SRC_URI[sha256sum] = "8c6574e9afabcb9fc66f463bb1f2f051958d86c85c37fccf067eb1a44a120e5e"
-
-# 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-native_3.2.2.bb b/meta/recipes-devtools/cmake/cmake-native_3.2.2.bb
new file mode 100644
index 0000000..17e9e2c
--- /dev/null
+++ b/meta/recipes-devtools/cmake/cmake-native_3.2.2.bb
@@ -0,0 +1,19 @@
+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 \
+"
+
+SRC_URI[md5sum] = "2da57308071ea98b10253a87d2419281"
+SRC_URI[sha256sum] = "ade94e6e36038774565f2aed8866415443444fb7a362eb0ea5096e40d5407c78"
+
+# 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 28b7f2d..d1cb7ab 100644
--- a/meta/recipes-devtools/cmake/cmake.inc
+++ b/meta/recipes-devtools/cmake/cmake.inc
@@ -6,7 +6,7 @@ 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=bb2fa3a08736b842556f6171bb9e8ae1 \
+LIC_FILES_CHKSUM = "file://Copyright.txt;md5=3ba5a6c34481652ce573e5c4e1d707e4 \
file://Source/cmake.h;beginline=1;endline=10;md5=341736dae83c9e344b53eeb1bc7d7bc2"
CMAKE_MAJOR_VERSION = "${@'.'.join(d.getVar('PV',1).split('.')[0:2])}"
@@ -14,11 +14,8 @@ CMAKE_MAJOR_VERSION = "${@'.'.join(d.getVar('PV',1).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 \
- file://cmake-2.8.11.2-FindFreetype.patch \
"
-PR = "r1"
-
inherit autotools
# Ugly hack to work around undefined OE_QMAKE_PATH_EXTERNAL_HOST_BINS variable
@@ -36,11 +33,12 @@ inherit autotools
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/RunCMake/IncompatibleQt/IncompatibleQt.cmake
- sed -i 's/^ find_package(Qt5Widgets REQUIRED)/# find_package(Qt5Widgets REQUIRED)/g' ${S}/Tests/QtAutomoc/CMakeLists.txt
- sed -i 's/^find_package(Qt5Core REQUIRED)/#find_package(Qt5Core REQUIRED)/g' ${S}/Tests/Qt4And5Automoc/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
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
deleted file mode 100644
index 1b523c0..0000000
--- a/meta/recipes-devtools/cmake/cmake/cmake-2.8.11.2-FindFreetype.patch
+++ /dev/null
@@ -1,47 +0,0 @@
-From: Julian Ospald <hasufell@gentoo.org>
-Date: Sun Dec 8 13:38:06 UTC 2013
-Subject: fix check for freetype-2.5.1
-
-Upstream-Status: Submitted http://www.cmake.org/Bug/view.php?id=14601
-
-Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
-
---- old/Modules/FindFreetype.cmake
-+++ new/Modules/FindFreetype.cmake
-@@ -64,6 +64,19 @@
- PATH_SUFFIXES include/freetype2 include
- )
-
-+if(NOT FREETYPE_INCLUDE_DIR_freetype2)
-+ find_path(FREETYPE_INCLUDE_DIR_freetype2 config/ftheader.h
-+ HINTS
-+ ENV FREETYPE_DIR
-+ PATHS
-+ /usr/X11R6
-+ /usr/local/X11R6
-+ /usr/local/X11
-+ /usr/freeware
-+ PATH_SUFFIXES include/freetype2 include
-+ )
-+endif()
-+
- find_library(FREETYPE_LIBRARY
- NAMES freetype libfreetype freetype219
- HINTS
-@@ -82,8 +95,14 @@
- endif()
- set(FREETYPE_LIBRARIES "${FREETYPE_LIBRARY}")
-
--if(FREETYPE_INCLUDE_DIR_freetype2 AND EXISTS "${FREETYPE_INCLUDE_DIR_freetype2}/freetype/freetype.h")
-- file(STRINGS "${FREETYPE_INCLUDE_DIR_freetype2}/freetype/freetype.h" freetype_version_str
-+if(EXISTS "${FREETYPE_INCLUDE_DIR_freetype2}/freetype/freetype.h")
-+ set(FREETYPE_H "${FREETYPE_INCLUDE_DIR_freetype2}/freetype/freetype.h")
-+elseif(EXISTS "${FREETYPE_INCLUDE_DIR_freetype2}/freetype.h")
-+ set(FREETYPE_H "${FREETYPE_INCLUDE_DIR_freetype2}/freetype.h")
-+endif()
-+
-+if(FREETYPE_INCLUDE_DIR_freetype2 AND FREETYPE_H)
-+ file(STRINGS "${FREETYPE_H}" freetype_version_str
- REGEX "^#[\t ]*define[\t ]+FREETYPE_(MAJOR|MINOR|PATCH)[\t ]+[0-9]+$")
-
- unset(FREETYPE_VERSION_STRING)
diff --git a/meta/recipes-devtools/cmake/cmake/qt4-fail-silent.patch b/meta/recipes-devtools/cmake/cmake/qt4-fail-silent.patch
index fd39f3f..80fc277 100644
--- a/meta/recipes-devtools/cmake/cmake/qt4-fail-silent.patch
+++ b/meta/recipes-devtools/cmake/cmake/qt4-fail-silent.patch
@@ -13,10 +13,21 @@ Upstream-Status: Pending
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
---- cmake-2.8.11/Modules/FindQt4.cmake 2013-07-04 10:20:42.092848274 +0100
-+++ cmake-2.8.11/Modules/FindQt4.cmake 2013-07-04 10:52:15.693380555 +0100
-@@ -1025,21 +1025,22 @@
- set(_configs)
+The patch was slightly adapted in order to match cmake 3.2.2:
+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>
+---
+ 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
+--- a/Modules/FindQt4.cmake
++++ b/Modules/FindQt4.cmake
+@@ -1000,25 +1000,26 @@ if (QT_QMAKE_EXECUTABLE AND
+ endif()
endmacro()
-
@@ -28,6 +39,10 @@ Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
- "${QT_MKSPECS_DIR}/default"
- ${QT_INCLUDE_DIR}
- )
+- set_property(TARGET Qt4::QtCore APPEND PROPERTY
+- INTERFACE_COMPILE_DEFINITIONS
+- $<$<NOT:$<CONFIG:Debug>>:QT_NO_DEBUG>
+- )
- set_property(TARGET Qt4::QtCore PROPERTY
- INTERFACE_QT_MAJOR_VERSION 4
- )
@@ -43,6 +58,10 @@ Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
+ "${QT_MKSPECS_DIR}/default"
+ ${QT_INCLUDE_DIR}
+ )
++ set_property(TARGET Qt4::QtCore APPEND PROPERTY
++ INTERFACE_COMPILE_DEFINITIONS
++ $<$<NOT:$<CONFIG:Debug>>:QT_NO_DEBUG>
++ )
+ set_property(TARGET Qt4::QtCore PROPERTY
+ INTERFACE_QT_MAJOR_VERSION 4
+ )
@@ -53,3 +72,6 @@ Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
foreach(QT_MODULE ${QT_MODULES})
_QT4_ADJUST_LIB_VARS(${QT_MODULE})
+--
+1.9.1
+
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
index 0e311f7..15cbca8 100644
--- a/meta/recipes-devtools/cmake/cmake/support-oe-qt4-tools-names.patch
+++ b/meta/recipes-devtools/cmake/cmake/support-oe-qt4-tools-names.patch
@@ -11,11 +11,19 @@ Upstream-Status: Inappropriate [embedded specific]
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
-Index: cmake-2.8.11/Modules/FindQt4.cmake
-===================================================================
---- cmake-2.8.11.orig/Modules/FindQt4.cmake
-+++ cmake-2.8.11/Modules/FindQt4.cmake
-@@ -569,7 +569,7 @@ endfunction()
+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>
+---
+ 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
+--- a/Modules/FindQt4.cmake
++++ b/Modules/FindQt4.cmake
+@@ -522,7 +522,7 @@ endfunction()
set(QT4_INSTALLED_VERSION_TOO_OLD FALSE)
@@ -23,36 +31,24 @@ Index: cmake-2.8.11/Modules/FindQt4.cmake
+set(_QT4_QMAKE_NAMES qmake qmake2 qmake4 qmake-qt4 qmake-mac)
_qt4_find_qmake("${_QT4_QMAKE_NAMES}" QT_QMAKE_EXECUTABLE QTVERSION)
- if (QT_QMAKE_EXECUTABLE AND QTVERSION)
-@@ -1157,19 +1157,19 @@ if (QT_QMAKE_EXECUTABLE AND QTVERSION)
- )
-
- find_program(QT_RCC_EXECUTABLE
-- NAMES rcc
-+ NAMES rcc4 rcc
- PATHS ${QT_BINARY_DIR}
- NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH
- )
+ if (QT_QMAKE_EXECUTABLE AND
+@@ -1148,12 +1148,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)
+- _find_qt4_program(QT_RCC_EXECUTABLE Qt4::rcc rcc)
+- _find_qt4_program(QT_DBUSCPP2XML_EXECUTABLE Qt4::qdbuscpp2xml qdbuscpp2xml)
+- _find_qt4_program(QT_DBUSXML2CPP_EXECUTABLE Qt4::qdbusxml2cpp qdbusxml2cpp)
++ _find_qt4_program(QT_RCC_EXECUTABLE Qt4::rcc rcc4 rcc)
++ _find_qt4_program(QT_DBUSCPP2XML_EXECUTABLE Qt4::qdbuscpp2xml qdbuscpp2xml4 qdbuscpp2xml)
++ _find_qt4_program(QT_DBUSXML2CPP_EXECUTABLE Qt4::qdbusxml2cpp qdbusxml2cpp4 qdbusxml2cpp)
+ _find_qt4_program(QT_LUPDATE_EXECUTABLE Qt4::lupdate lupdate-qt4 lupdate4 lupdate)
+ _find_qt4_program(QT_LRELEASE_EXECUTABLE Qt4::lrelease lrelease-qt4 lrelease4 lrelease)
+- _find_qt4_program(QT_QCOLLECTIONGENERATOR_EXECUTABLE Qt4::qcollectiongenerator qcollectiongenerator-qt4 qcollectiongenerator)
++ _find_qt4_program(QT_QCOLLECTIONGENERATOR_EXECUTABLE Qt4::qcollectiongenerator qcollectiongenerator-qt4 qcollectiongenerator qcollectiongenerator4)
+ _find_qt4_program(QT_DESIGNER_EXECUTABLE Qt4::designer designer-qt4 designer4 designer)
+ _find_qt4_program(QT_LINGUIST_EXECUTABLE Qt4::linguist linguist-qt4 linguist4 linguist)
- find_program(QT_DBUSCPP2XML_EXECUTABLE
-- NAMES qdbuscpp2xml
-+ NAMES qdbuscpp2xml4 qdbuscpp2xml
- PATHS ${QT_BINARY_DIR}
- NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH
- )
-
- find_program(QT_DBUSXML2CPP_EXECUTABLE
-- NAMES qdbusxml2cpp
-+ NAMES qdbusxml2cp4 qdbusxml2cpp
- PATHS ${QT_BINARY_DIR}
- NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH
- )
-@@ -1187,7 +1187,7 @@ if (QT_QMAKE_EXECUTABLE AND QTVERSION)
- )
-
- find_program(QT_QCOLLECTIONGENERATOR_EXECUTABLE
-- NAMES qcollectiongenerator-qt4 qcollectiongenerator
-+ NAMES qcollectiongenerator-qt4 qcollectiongenerator qcollectiongenerator4
- PATHS ${QT_BINARY_DIR}
- NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH
- )
+--
+1.9.1
+
diff --git a/meta/recipes-devtools/cmake/cmake_2.8.12.2.bb b/meta/recipes-devtools/cmake/cmake_2.8.12.2.bb
deleted file mode 100644
index 66a6af6..0000000
--- a/meta/recipes-devtools/cmake/cmake_2.8.12.2.bb
+++ /dev/null
@@ -1,52 +0,0 @@
-require cmake.inc
-
-inherit cmake
-
-DEPENDS += "curl expat zlib libarchive"
-
-SRC_URI += "file://dont-run-cross-binaries.patch"
-
-SRC_URI_append_class-nativesdk = " \
- file://OEToolchainConfig.cmake \
- file://environment.d-cmake.sh"
-
-SRC_URI[md5sum] = "17c6513483d23590cbce6957ec6d1e66"
-SRC_URI[sha256sum] = "8c6574e9afabcb9fc66f463bb1f2f051958d86c85c37fccf067eb1a44a120e5e"
-
-# Strip ${prefix} from ${docdir}, set result into docdir_stripped
-python () {
- prefix=d.getVar("prefix", True)
- docdir=d.getVar("docdir", True)
-
- if not docdir.startswith(prefix):
- raise bb.build.FuncFailed('docdir must contain prefix as its prefix')
-
- docdir_stripped = docdir[len(prefix):]
- if len(docdir_stripped) > 0 and docdir_stripped[0] == '/':
- docdir_stripped = docdir_stripped[1:]
-
- d.setVar("docdir_stripped", docdir_stripped)
-}
-
-EXTRA_OECMAKE=" \
- -DCMAKE_DOC_DIR=${docdir_stripped}/cmake-${CMAKE_MAJOR_VERSION} \
- -DCMAKE_USE_SYSTEM_LIBRARIES=1 \
- -DKWSYS_CHAR_IS_SIGNED=1 \
- -DBUILD_CursesDialog=0 \
- ${@bb.utils.contains('DISTRO_FEATURES', 'largefile', '-DKWSYS_LFS_WORKS=1', '-DKWSYS_LFS_DISABLE=1', d)} \
-"
-
-do_install_append_class-nativesdk() {
- mkdir -p ${D}${datadir}/cmake
- install -m 644 ${WORKDIR}/OEToolchainConfig.cmake ${D}${datadir}/cmake/
-
- mkdir -p ${D}${SDKPATHNATIVE}/environment-setup.d
- install -m 644 ${WORKDIR}/environment.d-cmake.sh ${D}${SDKPATHNATIVE}/environment-setup.d/cmake.sh
-}
-
-FILES_${PN}_append_class-nativesdk = " ${SDKPATHNATIVE}"
-
-FILES_${PN} += "${datadir}/cmake-${CMAKE_MAJOR_VERSION}"
-FILES_${PN}-doc += "${docdir}/cmake-${CMAKE_MAJOR_VERSION}"
-
-BBCLASSEXTEND = "nativesdk"
diff --git a/meta/recipes-devtools/cmake/cmake_3.2.2.bb b/meta/recipes-devtools/cmake/cmake_3.2.2.bb
new file mode 100644
index 0000000..4765f6c
--- /dev/null
+++ b/meta/recipes-devtools/cmake/cmake_3.2.2.bb
@@ -0,0 +1,56 @@
+require cmake.inc
+
+inherit cmake
+
+DEPENDS += "curl expat zlib libarchive xz ncurses bzip2"
+
+SRC_URI_append_class-nativesdk = " \
+ file://OEToolchainConfig.cmake \
+ file://environment.d-cmake.sh"
+
+SRC_URI[md5sum] = "2da57308071ea98b10253a87d2419281"
+SRC_URI[sha256sum] = "ade94e6e36038774565f2aed8866415443444fb7a362eb0ea5096e40d5407c78"
+
+# Strip ${prefix} from ${docdir}, set result into docdir_stripped
+python () {
+ prefix=d.getVar("prefix", True)
+ docdir=d.getVar("docdir", True)
+
+ if not docdir.startswith(prefix):
+ raise bb.build.FuncFailed('docdir must contain prefix as its prefix')
+
+ docdir_stripped = docdir[len(prefix):]
+ if len(docdir_stripped) > 0 and docdir_stripped[0] == '/':
+ docdir_stripped = docdir_stripped[1:]
+
+ d.setVar("docdir_stripped", docdir_stripped)
+}
+
+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 \
+ -DKWSYS_CHAR_IS_SIGNED=1 \
+ -DBUILD_CursesDialog=0 \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'largefile', '-DKWSYS_LFS_WORKS=1', '-DKWSYS_LFS_DISABLE=1', d)} \
+"
+
+do_install_append_class-nativesdk() {
+ mkdir -p ${D}${datadir}/cmake
+ install -m 644 ${WORKDIR}/OEToolchainConfig.cmake ${D}${datadir}/cmake/
+
+ mkdir -p ${D}${SDKPATHNATIVE}/environment-setup.d
+ install -m 644 ${WORKDIR}/environment.d-cmake.sh ${D}${SDKPATHNATIVE}/environment-setup.d/cmake.sh
+}
+
+FILES_${PN}_append_class-nativesdk = " ${SDKPATHNATIVE}"
+
+FILES_${PN} += "${datadir}/cmake-${CMAKE_MAJOR_VERSION}"
+FILES_${PN}-doc += "${docdir}/cmake-${CMAKE_MAJOR_VERSION}"
+
+BBCLASSEXTEND = "nativesdk"
--
1.9.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH v3 2/2] cmake: Upgrade 2.8.12.2 -> 3.2.2
2015-06-10 7:36 ` [PATCH v3 2/2] cmake: Upgrade 2.8.12.2 -> 3.2.2 Moritz Blume
@ 2015-06-10 16:49 ` Burton, Ross
2015-06-10 19:41 ` Burton, Ross
2015-06-11 17:14 ` Stefan Herbrechtsmeier
2015-06-11 19:10 ` Stefan Herbrechtsmeier
2 siblings, 1 reply; 8+ messages in thread
From: Burton, Ross @ 2015-06-10 16:49 UTC (permalink / raw)
To: Moritz Blume; +Cc: OE-core
[-- Attachment #1: Type: text/plain, Size: 20392 bytes --]
I see this causes piglit to fail to build, which is a problem if we want
this in oe-core. I'm having a quick look to see if upgrading piglit helps
but right now this is blocking merging.
Ross
On 10 June 2015 at 08:36, Moritz Blume <moritz.blume@bmw-carit.de> wrote:
> Patches "qt4-fail-silent.patch" and "support-oe-qt4-tools-names.patch"
> were adapted in order to fit to CMake 3.2.2 (refer to the commit
> message in the respective patch for details).
> Patch "cmake-2.8.11.2-FindFreetype.patch" was dropped since it was
> rejected upstream and its functionality otherwise implemented in the
> meantime.
>
> Note that CMake 3 needs to have the full compiler path in the toolchain
> file (see cmake.bbclass).
>
> Signed-off-by: Moritz Blume <moritz.blume@bmw-carit.de>
> ---
> meta/classes/cmake.bbclass | 8 ++-
> .../cmake/cmake-native_2.8.12.2.bb | 19 ------
> meta/recipes-devtools/cmake/cmake-native_3.2.2.bb | 19 ++++++
> meta/recipes-devtools/cmake/cmake.inc | 12 ++--
> .../cmake/cmake/cmake-2.8.11.2-FindFreetype.patch | 47 ---------------
> .../cmake/cmake/qt4-fail-silent.patch | 30 ++++++++--
> .../cmake/cmake/support-oe-qt4-tools-names.patch | 70
> ++++++++++------------
> meta/recipes-devtools/cmake/cmake_2.8.12.2.bb | 52 ----------------
> meta/recipes-devtools/cmake/cmake_3.2.2.bb | 56 +++++++++++++++++
> 9 files changed, 144 insertions(+), 169 deletions(-)
> delete mode 100644 meta/recipes-devtools/cmake/cmake-native_2.8.12.2.bb
> create mode 100644 meta/recipes-devtools/cmake/cmake-native_3.2.2.bb
> delete mode 100644
> meta/recipes-devtools/cmake/cmake/cmake-2.8.11.2-FindFreetype.patch
> delete mode 100644 meta/recipes-devtools/cmake/cmake_2.8.12.2.bb
> create mode 100644 meta/recipes-devtools/cmake/cmake_3.2.2.bb
>
> diff --git a/meta/classes/cmake.bbclass b/meta/classes/cmake.bbclass
> index 1ebb936..c97fd02 100644
> --- a/meta/classes/cmake.bbclass
> +++ b/meta/classes/cmake.bbclass
> @@ -10,9 +10,11 @@ CCACHE = ""
> # We want the staging and installing functions from autotools
> inherit autotools
>
> -# C/C++ Compiler (without cpu arch/tune arguments)
> -OECMAKE_C_COMPILER ?= "`echo ${CC} | sed 's/^\([^ ]*\).*/\1/'`"
> -OECMAKE_CXX_COMPILER ?= "`echo ${CXX} | sed 's/^\([^ ]*\).*/\1/'`"
> +# Full path to C/C++ Compiler (without cpu arch/tune arguments)
> +C_COMPILER = "$(echo ${CC} | sed 's/^\([^ ]*\).*/\1/')"
> +CXX_COMPILER = "$(echo ${CXX} | sed 's/^\([^ ]*\).*/\1/')"
> +OECMAKE_C_COMPILER ?= "$(which ${C_COMPILER})"
> +OECMAKE_CXX_COMPILER ?= "$(which ${CXX_COMPILER})"
> OECMAKE_AR ?= "${AR}"
>
> # Compiler flags
> 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
> deleted file mode 100644
> index e40dfdd..0000000
> --- a/meta/recipes-devtools/cmake/cmake-native_2.8.12.2.bb
> +++ /dev/null
> @@ -1,19 +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 \
> -"
> -
> -SRC_URI[md5sum] = "17c6513483d23590cbce6957ec6d1e66"
> -SRC_URI[sha256sum] =
> "8c6574e9afabcb9fc66f463bb1f2f051958d86c85c37fccf067eb1a44a120e5e"
> -
> -# 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-native_3.2.2.bb
> b/meta/recipes-devtools/cmake/cmake-native_3.2.2.bb
> new file mode 100644
> index 0000000..17e9e2c
> --- /dev/null
> +++ b/meta/recipes-devtools/cmake/cmake-native_3.2.2.bb
> @@ -0,0 +1,19 @@
> +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 \
> +"
> +
> +SRC_URI[md5sum] = "2da57308071ea98b10253a87d2419281"
> +SRC_URI[sha256sum] =
> "ade94e6e36038774565f2aed8866415443444fb7a362eb0ea5096e40d5407c78"
> +
> +# 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 28b7f2d..d1cb7ab 100644
> --- a/meta/recipes-devtools/cmake/cmake.inc
> +++ b/meta/recipes-devtools/cmake/cmake.inc
> @@ -6,7 +6,7 @@ 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=bb2fa3a08736b842556f6171bb9e8ae1 \
> +LIC_FILES_CHKSUM =
> "file://Copyright.txt;md5=3ba5a6c34481652ce573e5c4e1d707e4 \
>
> file://Source/cmake.h;beginline=1;endline=10;md5=341736dae83c9e344b53eeb1bc7d7bc2"
>
> CMAKE_MAJOR_VERSION = "${@'.'.join(d.getVar('PV',1).split('.')[0:2])}"
> @@ -14,11 +14,8 @@ CMAKE_MAJOR_VERSION =
> "${@'.'.join(d.getVar('PV',1).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 \
> - file://cmake-2.8.11.2-FindFreetype.patch \
> "
>
> -PR = "r1"
> -
> inherit autotools
>
> # Ugly hack to work around undefined OE_QMAKE_PATH_EXTERNAL_HOST_BINS
> variable
> @@ -36,11 +33,12 @@ inherit autotools
>
> 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/RunCMake/IncompatibleQt/IncompatibleQt.cmake
> - sed -i 's/^ find_package(Qt5Widgets REQUIRED)/#
> find_package(Qt5Widgets REQUIRED)/g' ${S}/Tests/QtAutomoc/CMakeLists.txt
> - sed -i 's/^find_package(Qt5Core REQUIRED)/#find_package(Qt5Core
> REQUIRED)/g' ${S}/Tests/Qt4And5Automoc/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
> 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
> deleted file mode 100644
> index 1b523c0..0000000
> --- a/meta/recipes-devtools/cmake/cmake/cmake-2.8.11.2-FindFreetype.patch
> +++ /dev/null
> @@ -1,47 +0,0 @@
> -From: Julian Ospald <hasufell@gentoo.org>
> -Date: Sun Dec 8 13:38:06 UTC 2013
> -Subject: fix check for freetype-2.5.1
> -
> -Upstream-Status: Submitted http://www.cmake.org/Bug/view.php?id=14601
> -
> -Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
> -
> ---- old/Modules/FindFreetype.cmake
> -+++ new/Modules/FindFreetype.cmake
> -@@ -64,6 +64,19 @@
> - PATH_SUFFIXES include/freetype2 include
> - )
> -
> -+if(NOT FREETYPE_INCLUDE_DIR_freetype2)
> -+ find_path(FREETYPE_INCLUDE_DIR_freetype2 config/ftheader.h
> -+ HINTS
> -+ ENV FREETYPE_DIR
> -+ PATHS
> -+ /usr/X11R6
> -+ /usr/local/X11R6
> -+ /usr/local/X11
> -+ /usr/freeware
> -+ PATH_SUFFIXES include/freetype2 include
> -+ )
> -+endif()
> -+
> - find_library(FREETYPE_LIBRARY
> - NAMES freetype libfreetype freetype219
> - HINTS
> -@@ -82,8 +95,14 @@
> - endif()
> - set(FREETYPE_LIBRARIES "${FREETYPE_LIBRARY}")
> -
> --if(FREETYPE_INCLUDE_DIR_freetype2 AND EXISTS
> "${FREETYPE_INCLUDE_DIR_freetype2}/freetype/freetype.h")
> -- file(STRINGS "${FREETYPE_INCLUDE_DIR_freetype2}/freetype/freetype.h"
> freetype_version_str
> -+if(EXISTS "${FREETYPE_INCLUDE_DIR_freetype2}/freetype/freetype.h")
> -+ set(FREETYPE_H "${FREETYPE_INCLUDE_DIR_freetype2}/freetype/freetype.h")
> -+elseif(EXISTS "${FREETYPE_INCLUDE_DIR_freetype2}/freetype.h")
> -+ set(FREETYPE_H "${FREETYPE_INCLUDE_DIR_freetype2}/freetype.h")
> -+endif()
> -+
> -+if(FREETYPE_INCLUDE_DIR_freetype2 AND FREETYPE_H)
> -+ file(STRINGS "${FREETYPE_H}" freetype_version_str
> - REGEX "^#[\t ]*define[\t ]+FREETYPE_(MAJOR|MINOR|PATCH)[\t
> ]+[0-9]+$")
> -
> - unset(FREETYPE_VERSION_STRING)
> diff --git a/meta/recipes-devtools/cmake/cmake/qt4-fail-silent.patch
> b/meta/recipes-devtools/cmake/cmake/qt4-fail-silent.patch
> index fd39f3f..80fc277 100644
> --- a/meta/recipes-devtools/cmake/cmake/qt4-fail-silent.patch
> +++ b/meta/recipes-devtools/cmake/cmake/qt4-fail-silent.patch
> @@ -13,10 +13,21 @@ Upstream-Status: Pending
>
> Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
>
> ---- cmake-2.8.11/Modules/FindQt4.cmake 2013-07-04 10:20:42.092848274 +0100
> -+++ cmake-2.8.11/Modules/FindQt4.cmake 2013-07-04 10:52:15.693380555 +0100
> -@@ -1025,21 +1025,22 @@
> - set(_configs)
> +The patch was slightly adapted in order to match cmake 3.2.2:
> +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>
> +---
> + 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
> +--- a/Modules/FindQt4.cmake
> ++++ b/Modules/FindQt4.cmake
> +@@ -1000,25 +1000,26 @@ if (QT_QMAKE_EXECUTABLE AND
> + endif()
> endmacro()
>
> -
> @@ -28,6 +39,10 @@ Signed-off-by: Paul Eggleton <
> paul.eggleton@linux.intel.com>
> - "${QT_MKSPECS_DIR}/default"
> - ${QT_INCLUDE_DIR}
> - )
> +- set_property(TARGET Qt4::QtCore APPEND PROPERTY
> +- INTERFACE_COMPILE_DEFINITIONS
> +- $<$<NOT:$<CONFIG:Debug>>:QT_NO_DEBUG>
> +- )
> - set_property(TARGET Qt4::QtCore PROPERTY
> - INTERFACE_QT_MAJOR_VERSION 4
> - )
> @@ -43,6 +58,10 @@ Signed-off-by: Paul Eggleton <
> paul.eggleton@linux.intel.com>
> + "${QT_MKSPECS_DIR}/default"
> + ${QT_INCLUDE_DIR}
> + )
> ++ set_property(TARGET Qt4::QtCore APPEND PROPERTY
> ++ INTERFACE_COMPILE_DEFINITIONS
> ++ $<$<NOT:$<CONFIG:Debug>>:QT_NO_DEBUG>
> ++ )
> + set_property(TARGET Qt4::QtCore PROPERTY
> + INTERFACE_QT_MAJOR_VERSION 4
> + )
> @@ -53,3 +72,6 @@ Signed-off-by: Paul Eggleton <
> paul.eggleton@linux.intel.com>
>
> foreach(QT_MODULE ${QT_MODULES})
> _QT4_ADJUST_LIB_VARS(${QT_MODULE})
> +--
> +1.9.1
> +
> 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
> index 0e311f7..15cbca8 100644
> --- a/meta/recipes-devtools/cmake/cmake/support-oe-qt4-tools-names.patch
> +++ b/meta/recipes-devtools/cmake/cmake/support-oe-qt4-tools-names.patch
> @@ -11,11 +11,19 @@ Upstream-Status: Inappropriate [embedded specific]
>
> Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
>
> -Index: cmake-2.8.11/Modules/FindQt4.cmake
> -===================================================================
> ---- cmake-2.8.11.orig/Modules/FindQt4.cmake
> -+++ cmake-2.8.11/Modules/FindQt4.cmake
> -@@ -569,7 +569,7 @@ endfunction()
> +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>
> +---
> + 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
> +--- a/Modules/FindQt4.cmake
> ++++ b/Modules/FindQt4.cmake
> +@@ -522,7 +522,7 @@ endfunction()
>
> set(QT4_INSTALLED_VERSION_TOO_OLD FALSE)
>
> @@ -23,36 +31,24 @@ Index: cmake-2.8.11/Modules/FindQt4.cmake
> +set(_QT4_QMAKE_NAMES qmake qmake2 qmake4 qmake-qt4 qmake-mac)
> _qt4_find_qmake("${_QT4_QMAKE_NAMES}" QT_QMAKE_EXECUTABLE QTVERSION)
>
> - if (QT_QMAKE_EXECUTABLE AND QTVERSION)
> -@@ -1157,19 +1157,19 @@ if (QT_QMAKE_EXECUTABLE AND QTVERSION)
> - )
> -
> - find_program(QT_RCC_EXECUTABLE
> -- NAMES rcc
> -+ NAMES rcc4 rcc
> - PATHS ${QT_BINARY_DIR}
> - NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH
> - )
> + if (QT_QMAKE_EXECUTABLE AND
> +@@ -1148,12 +1148,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)
> +- _find_qt4_program(QT_RCC_EXECUTABLE Qt4::rcc rcc)
> +- _find_qt4_program(QT_DBUSCPP2XML_EXECUTABLE Qt4::qdbuscpp2xml
> qdbuscpp2xml)
> +- _find_qt4_program(QT_DBUSXML2CPP_EXECUTABLE Qt4::qdbusxml2cpp
> qdbusxml2cpp)
> ++ _find_qt4_program(QT_RCC_EXECUTABLE Qt4::rcc rcc4 rcc)
> ++ _find_qt4_program(QT_DBUSCPP2XML_EXECUTABLE Qt4::qdbuscpp2xml
> qdbuscpp2xml4 qdbuscpp2xml)
> ++ _find_qt4_program(QT_DBUSXML2CPP_EXECUTABLE Qt4::qdbusxml2cpp
> qdbusxml2cpp4 qdbusxml2cpp)
> + _find_qt4_program(QT_LUPDATE_EXECUTABLE Qt4::lupdate lupdate-qt4
> lupdate4 lupdate)
> + _find_qt4_program(QT_LRELEASE_EXECUTABLE Qt4::lrelease lrelease-qt4
> lrelease4 lrelease)
> +- _find_qt4_program(QT_QCOLLECTIONGENERATOR_EXECUTABLE
> Qt4::qcollectiongenerator qcollectiongenerator-qt4 qcollectiongenerator)
> ++ _find_qt4_program(QT_QCOLLECTIONGENERATOR_EXECUTABLE
> Qt4::qcollectiongenerator qcollectiongenerator-qt4 qcollectiongenerator
> qcollectiongenerator4)
> + _find_qt4_program(QT_DESIGNER_EXECUTABLE Qt4::designer designer-qt4
> designer4 designer)
> + _find_qt4_program(QT_LINGUIST_EXECUTABLE Qt4::linguist linguist-qt4
> linguist4 linguist)
>
> - find_program(QT_DBUSCPP2XML_EXECUTABLE
> -- NAMES qdbuscpp2xml
> -+ NAMES qdbuscpp2xml4 qdbuscpp2xml
> - PATHS ${QT_BINARY_DIR}
> - NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH
> - )
> -
> - find_program(QT_DBUSXML2CPP_EXECUTABLE
> -- NAMES qdbusxml2cpp
> -+ NAMES qdbusxml2cp4 qdbusxml2cpp
> - PATHS ${QT_BINARY_DIR}
> - NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH
> - )
> -@@ -1187,7 +1187,7 @@ if (QT_QMAKE_EXECUTABLE AND QTVERSION)
> - )
> -
> - find_program(QT_QCOLLECTIONGENERATOR_EXECUTABLE
> -- NAMES qcollectiongenerator-qt4 qcollectiongenerator
> -+ NAMES qcollectiongenerator-qt4 qcollectiongenerator
> qcollectiongenerator4
> - PATHS ${QT_BINARY_DIR}
> - NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH
> - )
> +--
> +1.9.1
> +
> diff --git a/meta/recipes-devtools/cmake/cmake_2.8.12.2.bb
> b/meta/recipes-devtools/cmake/cmake_2.8.12.2.bb
> deleted file mode 100644
> index 66a6af6..0000000
> --- a/meta/recipes-devtools/cmake/cmake_2.8.12.2.bb
> +++ /dev/null
> @@ -1,52 +0,0 @@
> -require cmake.inc
> -
> -inherit cmake
> -
> -DEPENDS += "curl expat zlib libarchive"
> -
> -SRC_URI += "file://dont-run-cross-binaries.patch"
> -
> -SRC_URI_append_class-nativesdk = " \
> - file://OEToolchainConfig.cmake \
> - file://environment.d-cmake.sh"
> -
> -SRC_URI[md5sum] = "17c6513483d23590cbce6957ec6d1e66"
> -SRC_URI[sha256sum] =
> "8c6574e9afabcb9fc66f463bb1f2f051958d86c85c37fccf067eb1a44a120e5e"
> -
> -# Strip ${prefix} from ${docdir}, set result into docdir_stripped
> -python () {
> - prefix=d.getVar("prefix", True)
> - docdir=d.getVar("docdir", True)
> -
> - if not docdir.startswith(prefix):
> - raise bb.build.FuncFailed('docdir must contain prefix as its
> prefix')
> -
> - docdir_stripped = docdir[len(prefix):]
> - if len(docdir_stripped) > 0 and docdir_stripped[0] == '/':
> - docdir_stripped = docdir_stripped[1:]
> -
> - d.setVar("docdir_stripped", docdir_stripped)
> -}
> -
> -EXTRA_OECMAKE=" \
> - -DCMAKE_DOC_DIR=${docdir_stripped}/cmake-${CMAKE_MAJOR_VERSION} \
> - -DCMAKE_USE_SYSTEM_LIBRARIES=1 \
> - -DKWSYS_CHAR_IS_SIGNED=1 \
> - -DBUILD_CursesDialog=0 \
> - ${@bb.utils.contains('DISTRO_FEATURES', 'largefile',
> '-DKWSYS_LFS_WORKS=1', '-DKWSYS_LFS_DISABLE=1', d)} \
> -"
> -
> -do_install_append_class-nativesdk() {
> - mkdir -p ${D}${datadir}/cmake
> - install -m 644 ${WORKDIR}/OEToolchainConfig.cmake
> ${D}${datadir}/cmake/
> -
> - mkdir -p ${D}${SDKPATHNATIVE}/environment-setup.d
> - install -m 644 ${WORKDIR}/environment.d-cmake.sh
> ${D}${SDKPATHNATIVE}/environment-setup.d/cmake.sh
> -}
> -
> -FILES_${PN}_append_class-nativesdk = " ${SDKPATHNATIVE}"
> -
> -FILES_${PN} += "${datadir}/cmake-${CMAKE_MAJOR_VERSION}"
> -FILES_${PN}-doc += "${docdir}/cmake-${CMAKE_MAJOR_VERSION}"
> -
> -BBCLASSEXTEND = "nativesdk"
> diff --git a/meta/recipes-devtools/cmake/cmake_3.2.2.bb
> b/meta/recipes-devtools/cmake/cmake_3.2.2.bb
> new file mode 100644
> index 0000000..4765f6c
> --- /dev/null
> +++ b/meta/recipes-devtools/cmake/cmake_3.2.2.bb
> @@ -0,0 +1,56 @@
> +require cmake.inc
> +
> +inherit cmake
> +
> +DEPENDS += "curl expat zlib libarchive xz ncurses bzip2"
> +
> +SRC_URI_append_class-nativesdk = " \
> + file://OEToolchainConfig.cmake \
> + file://environment.d-cmake.sh"
> +
> +SRC_URI[md5sum] = "2da57308071ea98b10253a87d2419281"
> +SRC_URI[sha256sum] =
> "ade94e6e36038774565f2aed8866415443444fb7a362eb0ea5096e40d5407c78"
> +
> +# Strip ${prefix} from ${docdir}, set result into docdir_stripped
> +python () {
> + prefix=d.getVar("prefix", True)
> + docdir=d.getVar("docdir", True)
> +
> + if not docdir.startswith(prefix):
> + raise bb.build.FuncFailed('docdir must contain prefix as its
> prefix')
> +
> + docdir_stripped = docdir[len(prefix):]
> + if len(docdir_stripped) > 0 and docdir_stripped[0] == '/':
> + docdir_stripped = docdir_stripped[1:]
> +
> + d.setVar("docdir_stripped", docdir_stripped)
> +}
> +
> +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 \
> + -DKWSYS_CHAR_IS_SIGNED=1 \
> + -DBUILD_CursesDialog=0 \
> + ${@bb.utils.contains('DISTRO_FEATURES', 'largefile',
> '-DKWSYS_LFS_WORKS=1', '-DKWSYS_LFS_DISABLE=1', d)} \
> +"
> +
> +do_install_append_class-nativesdk() {
> + mkdir -p ${D}${datadir}/cmake
> + install -m 644 ${WORKDIR}/OEToolchainConfig.cmake
> ${D}${datadir}/cmake/
> +
> + mkdir -p ${D}${SDKPATHNATIVE}/environment-setup.d
> + install -m 644 ${WORKDIR}/environment.d-cmake.sh
> ${D}${SDKPATHNATIVE}/environment-setup.d/cmake.sh
> +}
> +
> +FILES_${PN}_append_class-nativesdk = " ${SDKPATHNATIVE}"
> +
> +FILES_${PN} += "${datadir}/cmake-${CMAKE_MAJOR_VERSION}"
> +FILES_${PN}-doc += "${docdir}/cmake-${CMAKE_MAJOR_VERSION}"
> +
> +BBCLASSEXTEND = "nativesdk"
> --
> 1.9.1
>
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
>
[-- Attachment #2: Type: text/html, Size: 25407 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v3 2/2] cmake: Upgrade 2.8.12.2 -> 3.2.2
2015-06-10 16:49 ` Burton, Ross
@ 2015-06-10 19:41 ` Burton, Ross
0 siblings, 0 replies; 8+ messages in thread
From: Burton, Ross @ 2015-06-10 19:41 UTC (permalink / raw)
To: Moritz Blume; +Cc: OE-core
[-- Attachment #1: Type: text/plain, Size: 348 bytes --]
On 10 June 2015 at 17:49, Burton, Ross <ross.burton@intel.com> wrote:
> I see this causes piglit to fail to build, which is a problem if we want
> this in oe-core. I'm having a quick look to see if upgrading piglit helps
> but right now this is blocking merging.
>
Upgrading piglit seemed to help, re-running a world build now.
Ross
[-- Attachment #2: Type: text/html, Size: 699 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v3 2/2] cmake: Upgrade 2.8.12.2 -> 3.2.2
2015-06-10 7:36 ` [PATCH v3 2/2] cmake: Upgrade 2.8.12.2 -> 3.2.2 Moritz Blume
2015-06-10 16:49 ` Burton, Ross
@ 2015-06-11 17:14 ` Stefan Herbrechtsmeier
2015-06-11 19:10 ` Stefan Herbrechtsmeier
2 siblings, 0 replies; 8+ messages in thread
From: Stefan Herbrechtsmeier @ 2015-06-11 17:14 UTC (permalink / raw)
To: Moritz Blume, openembedded-core
Am 10.06.2015 um 09:36 schrieb Moritz Blume:
> Patches "qt4-fail-silent.patch" and "support-oe-qt4-tools-names.patch"
> were adapted in order to fit to CMake 3.2.2 (refer to the commit
> message in the respective patch for details).
> Patch "cmake-2.8.11.2-FindFreetype.patch" was dropped since it was
> rejected upstream and its functionality otherwise implemented in the
> meantime.
>
> Note that CMake 3 needs to have the full compiler path in the toolchain
> file (see cmake.bbclass).
Have you try the new CMake 3 toolchain file variables CMAKE_SYSROOT [1]
and CMAKE_STAGING_PREFIX [2]?
[1] http://www.cmake.org/cmake/help/v3.2/variable/CMAKE_SYSROOT.html
[2] http://www.cmake.org/cmake/help/v3.2/variable/CMAKE_STAGING_PREFIX.html
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v3 2/2] cmake: Upgrade 2.8.12.2 -> 3.2.2
2015-06-10 7:36 ` [PATCH v3 2/2] cmake: Upgrade 2.8.12.2 -> 3.2.2 Moritz Blume
2015-06-10 16:49 ` Burton, Ross
2015-06-11 17:14 ` Stefan Herbrechtsmeier
@ 2015-06-11 19:10 ` Stefan Herbrechtsmeier
2015-06-17 14:47 ` Moritz Blume
2 siblings, 1 reply; 8+ messages in thread
From: Stefan Herbrechtsmeier @ 2015-06-11 19:10 UTC (permalink / raw)
To: Moritz Blume, openembedded-core
Am 10.06.2015 um 09:36 schrieb Moritz Blume:
> Patches "qt4-fail-silent.patch" and "support-oe-qt4-tools-names.patch"
> were adapted in order to fit to CMake 3.2.2 (refer to the commit
> message in the respective patch for details).
> Patch "cmake-2.8.11.2-FindFreetype.patch" was dropped since it was
> rejected upstream and its functionality otherwise implemented in the
> meantime.
>
> Note that CMake 3 needs to have the full compiler path in the toolchain
> file (see cmake.bbclass).
Why is the full path needed?
Have you try to add STAGING_BINDIR_TOOLCHAIN to the CMAKE_FIND_ROOT_PATH?
<snip>
> diff --git a/meta/classes/cmake.bbclass b/meta/classes/cmake.bbclass
> index 1ebb936..c97fd02 100644
> --- a/meta/classes/cmake.bbclass
> +++ b/meta/classes/cmake.bbclass
> @@ -10,9 +10,11 @@ CCACHE = ""
> # We want the staging and installing functions from autotools
> inherit autotools
>
> -# C/C++ Compiler (without cpu arch/tune arguments)
> -OECMAKE_C_COMPILER ?= "`echo ${CC} | sed 's/^\([^ ]*\).*/\1/'`"
> -OECMAKE_CXX_COMPILER ?= "`echo ${CXX} | sed 's/^\([^ ]*\).*/\1/'`"
> +# Full path to C/C++ Compiler (without cpu arch/tune arguments)
> +C_COMPILER = "$(echo ${CC} | sed 's/^\([^ ]*\).*/\1/')"
> +CXX_COMPILER = "$(echo ${CXX} | sed 's/^\([^ ]*\).*/\1/')"
> +OECMAKE_C_COMPILER ?= "$(which ${C_COMPILER})"
> +OECMAKE_CXX_COMPILER ?= "$(which ${CXX_COMPILER})"
> OECMAKE_AR ?= "${AR}"
Why you don't use the full path for AR?
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v3 2/2] cmake: Upgrade 2.8.12.2 -> 3.2.2
2015-06-11 19:10 ` Stefan Herbrechtsmeier
@ 2015-06-17 14:47 ` Moritz Blume
2015-06-18 12:30 ` Stefan Herbrechtsmeier
0 siblings, 1 reply; 8+ messages in thread
From: Moritz Blume @ 2015-06-17 14:47 UTC (permalink / raw)
To: Stefan Herbrechtsmeier, openembedded-core
[-- Attachment #1: Type: text/plain, Size: 2866 bytes --]
On 11.06.2015 21:10, Stefan Herbrechtsmeier wrote:
> Am 10.06.2015 um 09:36 schrieb Moritz Blume:
>> Patches "qt4-fail-silent.patch" and "support-oe-qt4-tools-names.patch"
>> were adapted in order to fit to CMake 3.2.2 (refer to the commit
>> message in the respective patch for details).
>> Patch "cmake-2.8.11.2-FindFreetype.patch" was dropped since it was
>> rejected upstream and its functionality otherwise implemented in the
>> meantime.
>>
>> Note that CMake 3 needs to have the full compiler path in the toolchain
>> file (see cmake.bbclass).
> Why is the full path needed?
https://public.kitware.com/Bug/view.php?id=15251
"Having a full path to the compiler is a new requirement starting in
CMake 3.0. The incompatibility was introduced across a major version
number bump and is considered acceptable. The project will have to be
fixed to use a full path."
Without a full path, you get the following error message:
CMake Error at CMakeLists.txt:5 (project):
| The CMAKE_C_COMPILER:
|
| gcc
|
| is not a full path and was not found in the PATH.
|
| Tell CMake where to find the compiler by setting either the environment
| variable "CC" or the CMake cache entry CMAKE_C_COMPILER to the full
path to
| the compiler, or to the compiler name if it is in the PATH.
>
> Have you try to add STAGING_BINDIR_TOOLCHAIN to the CMAKE_FIND_ROOT_PATH?
I don't understand, is this related to the compiler path?
>
> <snip>
>
>> diff --git a/meta/classes/cmake.bbclass b/meta/classes/cmake.bbclass
>> index 1ebb936..c97fd02 100644
>> --- a/meta/classes/cmake.bbclass
>> +++ b/meta/classes/cmake.bbclass
>> @@ -10,9 +10,11 @@ CCACHE = ""
>> # We want the staging and installing functions from autotools
>> inherit autotools
>> -# C/C++ Compiler (without cpu arch/tune arguments)
>> -OECMAKE_C_COMPILER ?= "`echo ${CC} | sed 's/^\([^ ]*\).*/\1/'`"
>> -OECMAKE_CXX_COMPILER ?= "`echo ${CXX} | sed 's/^\([^ ]*\).*/\1/'`"
>> +# Full path to C/C++ Compiler (without cpu arch/tune arguments)
>> +C_COMPILER = "$(echo ${CC} | sed 's/^\([^ ]*\).*/\1/')"
>> +CXX_COMPILER = "$(echo ${CXX} | sed 's/^\([^ ]*\).*/\1/')"
>> +OECMAKE_C_COMPILER ?= "$(which ${C_COMPILER})"
>> +OECMAKE_CXX_COMPILER ?= "$(which ${CXX_COMPILER})"
>> OECMAKE_AR ?= "${AR}"
> Why you don't use the full path for AR?
>
It is not required to have a full path here...
--
BMW Car IT GmbH
Dr. Moritz Blume
Spezialist Entwicklung
Petuelring 116
80809 München
Tel.: +49 89 189311-25
Fax: +49 89 189311-20
Mail: moritz.blume@bmw-carit.de
Web: http://www.bmw-carit.de
-------------------------------------------------------------
BMW Car IT GmbH
Geschäftsführer: Michael Würtenberger und Reinhard Stolle
Sitz und Registergericht: München HRB 134810
------------------------------------------------------------
[-- Attachment #2: Type: text/html, Size: 4620 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v3 2/2] cmake: Upgrade 2.8.12.2 -> 3.2.2
2015-06-17 14:47 ` Moritz Blume
@ 2015-06-18 12:30 ` Stefan Herbrechtsmeier
0 siblings, 0 replies; 8+ messages in thread
From: Stefan Herbrechtsmeier @ 2015-06-18 12:30 UTC (permalink / raw)
To: Moritz Blume, openembedded-core
[-- Attachment #1: Type: text/plain, Size: 2090 bytes --]
Am 17.06.2015 um 16:47 schrieb Moritz Blume:
> On 11.06.2015 21:10, Stefan Herbrechtsmeier wrote:
>> Am 10.06.2015 um 09:36 schrieb Moritz Blume:
>>> Patches "qt4-fail-silent.patch" and "support-oe-qt4-tools-names.patch"
>>> were adapted in order to fit to CMake 3.2.2 (refer to the commit
>>> message in the respective patch for details).
>>> Patch "cmake-2.8.11.2-FindFreetype.patch" was dropped since it was
>>> rejected upstream and its functionality otherwise implemented in the
>>> meantime.
>>>
>>> Note that CMake 3 needs to have the full compiler path in the toolchain
>>> file (see cmake.bbclass).
>> Why is the full path needed?
>
> https://public.kitware.com/Bug/view.php?id=15251
>
> "Having a full path to the compiler is a new requirement starting in
> CMake 3.0. The incompatibility was introduced across a major version
> number bump and is considered acceptable. The project will have to be
> fixed to use a full path."
The documentions [1] says something else:
The CMAKE_<LANG>_COMPILER variables may be set to full paths, or to
names of compilers to search for in standard locations
> Without a full path, you get the following error message:
>
> CMake Error at CMakeLists.txt:5 (project):
> | The CMAKE_C_COMPILER:
> |
> | gcc
> |
> | is not a full path and was not found in the PATH.
> |
> | Tell CMake where to find the compiler by setting either the environment
> | variable "CC" or the CMake cache entry CMAKE_C_COMPILER to the full
> path to
> | the compiler, or to the compiler name if it is in the PATH.
>
But this messages also says that the compiler was not found in the PATH.
>>
>> Have you try to add STAGING_BINDIR_TOOLCHAIN to the
>> CMAKE_FIND_ROOT_PATH?
>
> I don't understand, is this related to the compiler path?
Yes, but this doesn't helps as CMAKE_<LAND>_COMPILER is not inside a
/bin path. CMake use find_program to get the full path in
Modules/CMakeDetermineCompiler.cmake.
<snip>
[1]
http://www.cmake.org/cmake/help/v3.2/manual/cmake-toolchains.7.html#cross-compiling-for-linux
[-- Attachment #2: Type: text/html, Size: 3834 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2015-06-18 12:33 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-06-10 7:36 [PATCH v3 1/2] cmake: Whitespace fix Moritz Blume
2015-06-10 7:36 ` [PATCH v3 2/2] cmake: Upgrade 2.8.12.2 -> 3.2.2 Moritz Blume
2015-06-10 16:49 ` Burton, Ross
2015-06-10 19:41 ` Burton, Ross
2015-06-11 17:14 ` Stefan Herbrechtsmeier
2015-06-11 19:10 ` Stefan Herbrechtsmeier
2015-06-17 14:47 ` Moritz Blume
2015-06-18 12:30 ` Stefan Herbrechtsmeier
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox