android - Cross-compiling package with CMake: how to set linker path to find compiler support library? -


i'm trying cross-compile qhull library android, on linux x86-64 host. i'm new cmake, rather experienced other buildsystem tools.

i've setup toolchain file, according recommendations i've found, , has worked several other packages. yet, no matter try, nothing seems augment linker path 1 or more of qhull's executable programs. problem can't find android ndk's libsup++.a, implicit dependency of compiler (gcc). if take generated link command , manually add -lpath_to_libsup++.a, link succeeds.

in toolchain file, among things i've tried are:

  • cmake_find_root_path
  • link_directories()
  • cmake_exe_linker_flags

i don't see unusual cmakelists.txt, @ least respect first point of failure (user_eg3).

i'd prefer not patch library, if possible. know many others using on android (it's dependency of point cloud library), assume i'm missing step.

btw, i'm using cmake v3.4.3, android ndk r10e, , qhull v7.2.0.

i found workaround.

in this post, florian mentioned cmake internally sets cmake_exe_linker_flags_init $env{ldflags}. i've found if set environment variable ldflags=-lpath_to_libsup++.a, gets passed through link command, succeeds.

i'd still know proper cmake solution problem. or, if problem lies qhull, maybe can peek @ cmakelists.txt (linked above) , point out it's doing wrong.


Comments

Popular posts from this blog

java - pagination of xlsx file to XSSFworkbook using apache POI -

Unlimited choices in BASH case statement -

apache - How do I stop my index.php being run twice for every user -