<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif;" dir="ltr">
<div id="divtagdefaultwrapper" dir="ltr" style="font-size: 12pt; color: rgb(0, 0, 0); font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;">
<p style="margin-top:0; margin-bottom:0">I've been testing cmake with Qt Creator integration which explicitly uses -G "<span>MinGW Makefiles", while cmake defaults to NMake Makefiles. I'm not sure if it's possible to set generator in the toolchain file.</span></p>
<p style="margin-top:0; margin-bottom:0"><span><br>
</span></p>
</div>
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>From:</b> Joshua Watt <jpewhacker@gmail.com><br>
<b>Sent:</b> 16 November 2018 05:35:50<br>
<b>To:</b> Samuli Piippo<br>
<b>Cc:</b> Yocto list discussion<br>
<b>Subject:</b> Re: [yocto] [meta-mingw][PATCH 2/2] cmake: add support for building nativesdk-cmake</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt">
<div class="PlainText">On Thu, Nov 15, 2018 at 7:22 PM Samuli Piippo <samuli.piippo@qt.io> wrote:<br>
><br>
> Build nativesdk-cmake and dependency libs without without openssl.<br>
><br>
> Signed-off-by: Samuli Piippo <samuli.piippo@qt.io><br>
> ---<br>
> .../nativesdk-packagegroup-sdk-host.bbappend | 1 +<br>
> recipes-devtools/cmake/cmake_%.bbappend | 8 ++++++++<br>
> recipes-extended/libarchive/libarchive_%.bbappend | 1 +<br>
> recipes-support/curl/curl_%.bbappend | 2 ++<br>
> 4 files changed, 12 insertions(+)<br>
> create mode 100644 recipes-devtools/cmake/cmake_%.bbappend<br>
> create mode 100644 recipes-extended/libarchive/libarchive_%.bbappend<br>
> create mode 100644 recipes-support/curl/curl_%.bbappend<br>
><br>
> diff --git a/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bbappend b/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bbappend<br>
> index ad69b13..9544ffb 100644<br>
> --- a/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bbappend<br>
> +++ b/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bbappend<br>
> @@ -2,4 +2,5 @@ RDEPENDS_${PN}_mingw32 = "\<br>
> nativesdk-pkgconfig \<br>
> nativesdk-libtool \<br>
> nativesdk-qemu \<br>
> + nativesdk-cmake \<br>
<br>
Have you been successful at getting cmake to work properly in MinGW?<br>
I've been working on automated tests for the SDK, and for kicks I<br>
pulled in your changes and tried to write a test for cmake (heavily<br>
borrowed from the cmake/assimp test in oe-core). When I ran the test,<br>
I got the following:<br>
<br>
--- snip ---<br>
<br>
-- Building for: NMake Makefiles<br>
-- The C compiler identification is GNU 8.2.0<br>
CMake Error at Z:/projects/poky/build/tmp/work/qemux86-poky-linux/core-image-minimal/1.0-r0/testimage-sdk/CMakeTest-zljaq7x7/build/CMakeFiles/3.12.2/CMakeCCompiler.cmake:2<br>
(set):<br>
Syntax error in cmake code at<br>
<br>
Z:/projects/poky/build/tmp/work/qemux86-poky-linux/core-image-minimal/1.0-r0/testimage-sdk/CMakeTest-zljaq7x7/build/CMakeFiles/3.12.2/CMakeCCompiler.cmake:2<br>
<br>
when parsing string<br>
<br>
-m32 -march=i586<br>
--sysroot=Z:\projects\poky\build\tmp\work\QEMU~ELC\CORE~B5D\1~~~~N25.0-R\TEST~Y0Z\\sysroots\i586-poky-linux<br>
<br>
Invalid escape sequence \p<br>
Call Stack (most recent call first):<br>
CMakeLists.txt:38 (PROJECT)<br>
<br>
--- snip ---<br>
<br>
It looks like cmake doesn't like the Windows style slashes in CFLAGS.<br>
<br>
You can see my test branch at jpew/oeqa in meta-mingw-contrib... it's<br>
still in progress so it might be a bit of work if you want to try it<br>
yourself.<br>
<br>
> "<br>
> diff --git a/recipes-devtools/cmake/cmake_%.bbappend b/recipes-devtools/cmake/cmake_%.bbappend<br>
> new file mode 100644<br>
> index 0000000..f76cd82<br>
> --- /dev/null<br>
> +++ b/recipes-devtools/cmake/cmake_%.bbappend<br>
> @@ -0,0 +1,8 @@<br>
> +DEPENDS_remove_mingw32 = "ncurses"<br>
> +<br>
> +cmake_do_generate_toolchain_file_append_mingw32() {<br>
> + cat >> ${WORKDIR}/toolchain.cmake <<EOF<br>
> +set( CMAKE_SYSTEM_NAME Windows )<br>
> +EOF<br>
> +}<br>
> +<br>
> diff --git a/recipes-extended/libarchive/libarchive_%.bbappend b/recipes-extended/libarchive/libarchive_%.bbappend<br>
> new file mode 100644<br>
> index 0000000..a411b40<br>
> --- /dev/null<br>
> +++ b/recipes-extended/libarchive/libarchive_%.bbappend<br>
> @@ -0,0 +1 @@<br>
> +EXTRA_OECONF_append_mingw32 = " --without-cng"<br>
> diff --git a/recipes-support/curl/curl_%.bbappend b/recipes-support/curl/curl_%.bbappend<br>
> new file mode 100644<br>
> index 0000000..7865b46<br>
> --- /dev/null<br>
> +++ b/recipes-support/curl/curl_%.bbappend<br>
> @@ -0,0 +1,2 @@<br>
> +PACKAGECONFIG_remove_class-nativesdk_mingw32 = "ssl"<br>
> +RRECOMMENDS_lib${BPN}_remove_mingw32 = "ca-certificates"<br>
> --<br>
> 2.17.1<br>
><br>
> --<br>
> _______________________________________________<br>
> yocto mailing list<br>
> yocto@yoctoproject.org<br>
> <a href="https://lists.yoctoproject.org/listinfo/yocto" id="LPlnk98956" class="OWAAutoLink" previewremoved="true">
https://lists.yoctoproject.org/listinfo/yocto</a>
<div id="LPBorder_GT_15423491240070.2354233722957071" style="margin-bottom: 20px; overflow: auto; width: 100%; text-indent: 0px;">
<table id="LPContainer_15423491240050.9019769904137116" role="presentation" cellspacing="0" style="width: 90%; background-color: rgb(255, 255, 255); position: relative; overflow: auto; padding-top: 20px; padding-bottom: 20px; margin-top: 20px; border-top: 1px dotted rgb(200, 200, 200); border-bottom: 1px dotted rgb(200, 200, 200);">
<tbody>
<tr valign="top" style="border-spacing: 0px;">
<td id="TextCell_15423491240060.6552528997888396" colspan="2" style="vertical-align: top; position: relative; padding: 0px; display: table-cell;">
<div id="LPRemovePreviewContainer_15423491240060.4063729828392795"></div>
<div id="LPTitle_15423491240060.4978357256082786" style="top: 0px; color: rgb(66, 205, 83); font-weight: 400; font-size: 21px; font-family: wf_segoe-ui_light, "Segoe UI Light", "Segoe WP Light", "Segoe UI", "Segoe WP", Tahoma, Arial, sans-serif; line-height: 21px;">
<a id="LPUrlAnchor_15423491240060.397776801442713" href="https://lists.yoctoproject.org/listinfo/yocto" target="_blank" style="text-decoration: none;">yocto Info Page</a></div>
<div id="LPMetadata_15423491240060.32289360814623747" style="margin: 10px 0px 16px; color: rgb(102, 102, 102); font-weight: 400; font-family: wf_segoe-ui_normal, "Segoe UI", "Segoe WP", Tahoma, Arial, sans-serif; font-size: 14px; line-height: 14px;">
lists.yoctoproject.org</div>
<div id="LPDescription_15423491240070.18548421292485706" style="display: block; color: rgb(102, 102, 102); font-weight: 400; font-family: wf_segoe-ui_normal, "Segoe UI", "Segoe WP", Tahoma, Arial, sans-serif; font-size: 14px; line-height: 20px; max-height: 100px; overflow: hidden;">
Discussion of all things about the Yocto Project. Read our Community Guidelines or learn more about how to participate in other community discussions. Subscribe before posting to bypass moderation. To see the collection of prior postings to the list, visit
the yocto Archives.. Using yocto</div>
</td>
</tr>
</tbody>
</table>
</div>
<br>
<br>
</div>
</span></font></div>
</div>
</body>
</html>