On 09/26/2018 10:23 AM, Hendrik Greving wrote:
> Is there any way before 3.13 to achieve what I need? Right now we
> modify LINK_FLAGS based on something that is computed with values
> from LOCATION.
[snip]
> our cmake setup is using LOCATION property for two targets to compute
> a relative path from these two, and adds this to LINK_FLAGS
> (for rpath, but irrelevant in this context).

To at least see if 3.13 will support your use case, you could
try a nightly binary from here:

  https://cmake.org/files/dev/?C=M;O=D

Use `$<TARGET_FILE_DIR:mytarget>/..` to refer to a path relative
to the target file location.

I've never seen a need to adjust link flags based on the target
location.  CMake has several features for RPATH support.  What
are you really trying to do?

-Brad
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake

Reply via email to