I've been testing cmake with Qt Creator integration which explicitly uses -G "MinGW Makefiles", while cmake defaults to NMake Makefiles. I'm not sure if it's possible to set generator in the toolchain file.
________________________________ From: Joshua Watt <jpewhac...@gmail.com> Sent: 16 November 2018 05:35:50 To: Samuli Piippo Cc: Yocto list discussion Subject: Re: [yocto] [meta-mingw][PATCH 2/2] cmake: add support for building nativesdk-cmake On Thu, Nov 15, 2018 at 7:22 PM Samuli Piippo <samuli.pii...@qt.io> wrote: > > Build nativesdk-cmake and dependency libs without without openssl. > > Signed-off-by: Samuli Piippo <samuli.pii...@qt.io> > --- > .../nativesdk-packagegroup-sdk-host.bbappend | 1 + > recipes-devtools/cmake/cmake_%.bbappend | 8 ++++++++ > recipes-extended/libarchive/libarchive_%.bbappend | 1 + > recipes-support/curl/curl_%.bbappend | 2 ++ > 4 files changed, 12 insertions(+) > create mode 100644 recipes-devtools/cmake/cmake_%.bbappend > create mode 100644 recipes-extended/libarchive/libarchive_%.bbappend > create mode 100644 recipes-support/curl/curl_%.bbappend > > diff --git > a/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bbappend > b/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bbappend > index ad69b13..9544ffb 100644 > --- a/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bbappend > +++ b/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bbappend > @@ -2,4 +2,5 @@ RDEPENDS_${PN}_mingw32 = "\ > nativesdk-pkgconfig \ > nativesdk-libtool \ > nativesdk-qemu \ > + nativesdk-cmake \ Have you been successful at getting cmake to work properly in MinGW? I've been working on automated tests for the SDK, and for kicks I pulled in your changes and tried to write a test for cmake (heavily borrowed from the cmake/assimp test in oe-core). When I ran the test, I got the following: --- snip --- -- Building for: NMake Makefiles -- The C compiler identification is GNU 8.2.0 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 (set): Syntax error in cmake code 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 when parsing string -m32 -march=i586 --sysroot=Z:\projects\poky\build\tmp\work\QEMU~ELC\CORE~B5D\1~~~~N25.0-R\TEST~Y0Z\\sysroots\i586-poky-linux Invalid escape sequence \p Call Stack (most recent call first): CMakeLists.txt:38 (PROJECT) --- snip --- It looks like cmake doesn't like the Windows style slashes in CFLAGS. You can see my test branch at jpew/oeqa in meta-mingw-contrib... it's still in progress so it might be a bit of work if you want to try it yourself. > " > diff --git a/recipes-devtools/cmake/cmake_%.bbappend > b/recipes-devtools/cmake/cmake_%.bbappend > new file mode 100644 > index 0000000..f76cd82 > --- /dev/null > +++ b/recipes-devtools/cmake/cmake_%.bbappend > @@ -0,0 +1,8 @@ > +DEPENDS_remove_mingw32 = "ncurses" > + > +cmake_do_generate_toolchain_file_append_mingw32() { > + cat >> ${WORKDIR}/toolchain.cmake <<EOF > +set( CMAKE_SYSTEM_NAME Windows ) > +EOF > +} > + > diff --git a/recipes-extended/libarchive/libarchive_%.bbappend > b/recipes-extended/libarchive/libarchive_%.bbappend > new file mode 100644 > index 0000000..a411b40 > --- /dev/null > +++ b/recipes-extended/libarchive/libarchive_%.bbappend > @@ -0,0 +1 @@ > +EXTRA_OECONF_append_mingw32 = " --without-cng" > diff --git a/recipes-support/curl/curl_%.bbappend > b/recipes-support/curl/curl_%.bbappend > new file mode 100644 > index 0000000..7865b46 > --- /dev/null > +++ b/recipes-support/curl/curl_%.bbappend > @@ -0,0 +1,2 @@ > +PACKAGECONFIG_remove_class-nativesdk_mingw32 = "ssl" > +RRECOMMENDS_lib${BPN}_remove_mingw32 = "ca-certificates" > -- > 2.17.1 > > -- > _______________________________________________ > yocto mailing list > yocto@yoctoproject.org > https://lists.yoctoproject.org/listinfo/yocto yocto Info Page<https://lists.yoctoproject.org/listinfo/yocto> lists.yoctoproject.org 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
-- _______________________________________________ yocto mailing list yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/yocto