[CMake] not found library with package configuration files and changed CMAKE_INSTALL_PREFIX
Alexander Dahl
post at lespocky.de
Wed Sep 21 10:42:37 EDT 2011
Hei hei,
On Tue, 20 Sep 2011 16:38:06 +0200, Michael Hertling wrote:
> This leaves the target named "foo-shared", not "foo"; the latter is
> just the base name of the target's disk file, i.e. libfoo.so.0.1.0.
It does.
> The foo-targets.cmake file contains "foo-shared" as imported target,
> and it is this name that must be supplied to TARGET_LINK_LIBRARIES().
> Besides, the DESTINATION clause of INSTALL() should be qualified with
> ARCHIVE/LIBRARY/RUNTIME/..., and EXPORT must precede DESTINATION then.
Did that.
> The "-lfoo" notation instead of a full path is a typical hint that CMake
> doesn't recognize "foo" as an [imported] target but as a simple library
> passed to TARGET_LINK_LIBRARIES(). However, libraries residing in an
> "implicit system location" constitute an exception, refer to [3].
Thanks for the hint.
> You should still provide the variable FOO_LIBRARIES which contains
> "foo-shared", i.e. the name of the imported target. For the user, it
> should not make any difference whether the find module / config file
> uses full paths to library targets immediately or via imported targets
> and their IMPORTED_LOCATION properties. If you read the tutorial in [1]
> carefully, you will see that there's still a FOOBAR_LIBRARIES variable
> in the FooBar/FooBarConfig.cmake.in template of the configuration file.
I'll have a deeper look in this later.
> 'hope that helps.
It did, I can build the example now. Next step is trying this in our
cross build environment, but I'm confident it will work. Thanks for your
answer. :-)
Greets
Alex
--
»With the first link, the chain is forged. The first speech censured,
the first thought forbidden, the first freedom denied, chains us all
irrevocably.« (Jean-Luc Picard, quoting Judge Aaron Satie)
*** GnuPG-FP: 02C8 A590 7FE5 CA5F 3601 D1D5 8FBA 7744 CC87 10D0 ***
More information about the CMake
mailing list