Re: [CMake] Creating relocatable export files

2016-01-07 Thread Alexander Neundorf
On Saturday, November 14, 2015 12:19:11 Nicholas Braden wrote: > Instead of using FOO_INCLUDE_DIR, I believe you should use > target_include_directories() with the INTERFACE or PUBLIC options - > this will export the include directories properly and they will be > used when someone target_link_libr

Re: [CMake] Creating relocatable export files

2015-11-14 Thread Tamás Kenéz
You need to manually write your config module which takes care of the dependencies. Of course you will still use the generated exports, too. For now let's say `ome-common` has one dependency: `omedep` and its config-module, `omedep-config.cmake` creates the imported lib target `omedep::omedep`. Th

Re: [CMake] Creating relocatable export files

2015-11-14 Thread Nicholas Braden
Instead of using FOO_INCLUDE_DIR, I believe you should use target_include_directories() with the INTERFACE or PUBLIC options - this will export the include directories properly and they will be used when someone target_link_library()s your exported target. https://cmake.org/cmake/help/latest/comman

[CMake] Creating relocatable export files

2015-11-14 Thread Roger Leigh
Hi, I'm wanting to create -config scripts for my libraries so that dependent projects can find them with find_package and use them transparently. I have a number of header-only and shared/static libs, and I'd like to retain their relationships, plus any additional libraries they are linked w