-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi,
After fighting with cmake the weekend (and getting rid of legacy-staging in console-image while watching cmake fail), I discovered that cmake supports cross-compiling since 2.6.0 and allows us to provide a site file using -C. I hacked support for that into cmake.bbclass: http://cgit.openembedded.org/cgit.cgi/openembedded/commit/?id=ba23d4de95a33db5feccd19359bd9b907c2d90bd I would like to propose to extend that by copying extending siteinfo.bbclass with knowledge about cmake site files. It would do roughy the following: 1) Build a list of appropriate filenames 2) if they exist concatenate them into ${WORKDIR}/site-file.cmake The sucky part is that you can't use the cmake cache file to populate the site files like we can with autotools :( Cmake emits CMakeCache.txt with entries like: //Result from TRY_RUN HAVE_POLL_FINE:STRING=0 //Output from TRY_RUN HAVE_POSIX_STRERROR_R__TRYRUN_OUTPUT:STRING=1 But the site file needs to look like this: SET( HAVE_POSIX_STRERROR_R "1" CACHE STRING "Result from TRY_RUN" FORCE) SET( HAVE_POSIX_STRERROR_R__TRYRUN_OUTPUT "1" CACHE STRING "Output from TRY_RUN" FORCE) So to generate missing entries one needs to: 1) Try building app using OE 2) Append TryRunResults.cmake to site-file.cmake 3) Try building app on target 4) Edit the new entries in site-file.cmake using CMakeCache.txt from the target if error, goto 1) 5) seperate out new entries into the proper site file (e.g. common, glibs, arm, etc) For more info see http://www.itk.org/Wiki/CMake_Cross_Compiling Oh, and cmake can't crosscompile itself out of the box, it tries to run generated binaries. Could cmake gurus comment on all this? Or better, write a tool that converts a cmakelist.txt to configure.ac, since I know how to fix autotools :) regards, Koen -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (Darwin) iD8DBQFLr7H+MkyGM64RGpERAlzWAJ0QUjX4fHJjeVt/iXDEfUA97eTIFQCgpyjq SiXrmypfUtbWhmCZU4W8jz8= =OGtp -----END PGP SIGNATURE----- _______________________________________________ Openembedded-devel mailing list [email protected] http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel
