[CMake] install(EXPORT ..) and multiple projects
Clinton Stimpson
clinton at elemtech.com
Fri Feb 27 13:20:11 EST 2009
I've got two projects with one depending on the other. I include the
one project as a subdirectory and build it along with my project. Its
similar to how ParaView includes VTK.
I'm trying to use the install(EXPORT ...) to export my project from an
installation tree, but I can't figure out how to make it work.
The export(TARGETS ...) works fine for exporting from the build, except
I have to include libraries from the other project.
install(EXPORT ..) gives me an error
CMake Error: INSTALL(EXPORT "Foo" ...) includes target "Bar" which
requires target "Baz" that is not in the export set.
Baz is from the other project I include as a subproject. It seems "Foo"
is supposed to be a name specific to my project.
So I can't just add my project specific name for the export set into the
other project's CMakeLists.txt file.
So how do I export targets from an installation tree that contains
multiple projects?
Clint
More information about the CMake
mailing list