![]() ![]() ![]() My best guess currently would be to set -DCMAKE_INSTALL_PREFIX= from the command line to match the sysroot of the toolchain. I'd be curious whether anyone knows the best practices about how to handle this. On the other hand, the toolchain does not override the CMAKE_INSTALL_PREFIX, so attempts to make install will just pass these cross-compiled artifacts on to the host directories rather than the sysroot in use by the toolchain. In other cross-compile scenarios I've created a arch/platform-specific sysroot to send compiled artifacts to, but with this toolchain setting these variables, it looks like it is not possible to point cmake to my sysroot via command-line variables because the toolchain overrides them anyway. In cross-compiling, at least in this case, it looks like CMAKE_FIND_ROOT_PATH and CMAKE_SYSROOT are both set, which affects the dependency discovery process. On a native build, the build process would just use the standard paths to discover the dependencies. I'm having some confusion about how the various prefix and find variables work in Cmake in general as well as how this applies to CMAKE_INSTALL_PREFIX. One of these libraries depends on another. I've been trying to cross-compile some C libraries using Cmake and the Android NDK toolchain. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |