[CMake] Usage of add_library(... IMPORTED)
Stefan Reuschl
lists at stefanreuschl.de
Sat Sep 17 11:59:32 EDT 2011
Hi list,
a question about using IMPORTED library targets:
The documentation says
> It may be referenced like any target built within the project.
Which would sound nice without the exception in the previous sentence:
> The target name has scope in the directory in which it is created and
> below.
This is contrary to libraries build using add_library(). Is there a reason
for this?
I'm searching of the best way to use a library which was imported in a
subdirectory...
Do I have to use a ProjectConfig.cmake file to find the imported library,
i.e. import it in the ProjectConfig.cmake file?
To make it more complicated: What to do if add_custom_command() was used
in a subdirectory to create the library?
Thanks for any hints!
Regards,
Stefan
More information about the CMake
mailing list