c++ - How to specify linux binary's rpath in cmake -


i have cmakelists.txt file contains such line of code:

link_directories(dir_a dir_b dir_c) 

when build executable , perform

readelf -d 

on it, see rpath dir_a, dir_b dir_c.

what can cmake if want create

  • executable empty rpath?
  • executable paths, not specified in link_directories line?

the executable not supposed "installed".

from cmake-documentation can read that:

  • you can use variable cmake_skip_rpath have cmake not adding rpath binary ever and
  • that set_target_properties-functions rpaths can controlled individually on per-target base.

Comments

Popular posts from this blog

java - UnknownEntityTypeException: Unable to locate persister (Hibernate 5.0) -

python - ValueError: empty vocabulary; perhaps the documents only contain stop words -

ubuntu - collect2: fatal error: ld terminated with signal 9 [Killed] -