Re: [CMake] Cross Compilation & Source file generators

2016-05-24 Thread Walter Gray
Nope, sorry. We build android from mac and windows too. And again, I'm more concerned with how protobuf's config.cmake scripts should be set up to easily enable users to deal with this problem. I'm trying to get their build scripts up to date before 3.0.0 leaves beta. On Tue, May 24, 2016 at 6:05

Re: [CMake] Cross Compilation & Source file generators

2016-05-24 Thread Dave Flogeras
Another "outside the box" solution that I have had success with is as follows (Note this solution will only work with Linux): You can use the Linux binfmt_misc driver to execute non-native executables through an interpreter. If you google for qemu binfmt wrapper, you'll find various suitable

Re: [CMake] Cross Compilation & Source file generators

2016-05-24 Thread Walter Gray
@Hendrik - Yes, unfortunately it didn't help me too much. Superbuilds are not really an appropriate solution here - The project I'm working on is too heavily down an alternative path, and I'm trying to set up the exported .cmake files in the protobuf 3.0 beta to properly support any sort of

Re: [CMake] Cross Compilation & Source file generators

2016-05-23 Thread David E DeMarle
Just to clarify, although ParaView's superbuild assists you to set up and compile in either "compile TOOLS" or "CROSS compile" mode (or the default "HOST" mode) the protobuf inclusion I was speaking of in is found within paraview's source code and is not an external project. See

Re: [CMake] Cross Compilation & Source file generators

2016-05-21 Thread Craig Scott
There's also the technique described in this stack overflow question/answer: http://stackoverflow.com/questions/36084785/building-a-tool-immediately-so-it-can-be-used-later-in-same-cmake-run I'd probably recommend the superbuild approach used by Paraview though if your build can be structured

Re: [CMake] Cross Compilation & Source file generators

2016-05-21 Thread David E DeMarle
Take a look at paraview's internal copy of protobuf. We compile protoc in the host tools pass and then use it when we build libprotobuf in the cross compile pass. On May 20, 2016 10:14 PM, "Walter Gray" wrote: > A small addendum - The way I am currently solving this problem

Re: [CMake] Cross Compilation & Source file generators

2016-05-21 Thread Hendrik Sattler
Hi, Did you read the Wiki page about cross compiling with CMake? CMake can already restrict searching for libraries to certain directories when cross compiling. HS Am 21. Mai 2016 04:13:38 MESZ, schrieb Walter Gray : >A small addendum - The way I am currently solving

Re: [CMake] Cross Compilation & Source file generators

2016-05-20 Thread Walter Gray
A small addendum - The way I am currently solving this problem is by replacing the version of protoc in the library folder for android with one that works on the host machine, but this is really not the best since it means that the library distribution is tied to the host AND the target. Thinking

[CMake] Cross Compilation & Source file generators

2016-05-20 Thread Walter Gray
I've got a project with a number of target platforms, including some that I have to cross-compile to such as android, that uses protobuf. If you're unfamiliar, the crux of the issue is that there is both a library, libprotobuf, and an 'compiler', protoc, that takes .proto files and generates a