On Thu, Nov 06, 2014 at 11:37:44PM +0100, Andreas Enge wrote: > Does this mean that this option only honours paths coming from "-l", while > at the same time using "-l" is unusual with cmake?
Actually I do not know about the second part of the sentence, but the first one seems to be true. When I add -DCMAKE_EXE_LINKER_FLAGS=-lkdeclarative , the binary ktouch is indeed linked with an additional "-lkdeclarative". In the link line, we still have "-Wl,-rpath,:::...:::". Maybe something happens before or during installation. In any case, objdump now shows: RUNPATH /gnu/store/w931dmcqpkb3sdcxnjpqxdn7qykh3qbr-ktouch-4.14.2/lib:/gnu/store/4k20pkxgvfc22wpcvh6xr26ma4b619ad-glibc-2.20/lib:/gnu/store/k7w7wdpvaqlkwq0ijz9149pqn3lq8a5n-gcc-4.8.3-lib/lib64:/gnu/store/k7w7wdpvaqlkwq0ijz9149pqn3lq8a5n-gcc-4.8.3-lib/lib:/gnu/store/mipmjv4mpsf3rrsk1mbhpqzlw939v6ny-kdelibs-4.14.2/lib:/gnu/store/k7w7wdpvaqlkwq0ijz9149pqn3lq8a5n-gcc-4.8.3-lib/lib/gcc/x86_64-unknown-linux-gnu/4.8.3/../../.. Notice the additional /gnu/store/mipmjv4mpsf3rrsk1mbhpqzlw939v6ny-kdelibs-4.14.2/lib , which contains libkdeclarative.so. Andreas