> We have not thought deeply through the semantics of that in general.
> One of the main challenges is relocation handling.  Targets installed by the 
> project have known locations relative to the install prefix and we expect 
> that everything gets relocated together.  Targets from external places have 
> no such relationship.

Sure, this only works in case the locations are known. In my case, extlib is 
coming from a custom debian package, which locks its location.
Another usage scenario could be to actually install (make a copy of) the 
imported library as it would be compiled from the tree. Not generally a 
preferable solution but there are some use cases I could think of.

> If you're hard-coding paths anyway then I suggest simply linking via absolute 
> path instead of using an imported target.  
> If you do need usage requirements, do it through a non-imported interface 
> library:

True, this is a good tip I could consider. My mind was stuck with IMPORTED :)

-Lassi
-- 

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-developers

Reply via email to