On 5. Feb, 2010, at 9:18 , Micha Renner wrote:

> I install a library (TLib) and their export files with these commands:
> 
> INSTALL(TARGETS TLib EXPORT TLibX RUNTIME DESTINATION dll
>                                       LIBRARY DESTINATION lib
>                                       ARCHIVE DESTINATION lib)
> 
> INSTALL(EXPORT TLibX NAMESPACE mp_ DESTINATION lib/TLib)
> INSTALL(FILES TLib-config.cmake DESTINATION lib/TLib)
> 
> To find the library I use:
> FIND_PACKAGE(TLib REQUIRED)
> 
> This works.
> 
> If I exchange TLibX for TLib (first two install commands) , CMake says
> during executing FIND_PACKAGE:
> "Cannot create mp_TLib target, because target already exists". Then it
> goes in an endless loop calling FIND_PACKAGE again and again
> and crashes sooner or later.
> 
> Are their any roles to chose the right export-filenames?
> 
> Micha

Hmmm, that appears to be a bug. Anyways, I usually call the EXPORT something 
like TLibExports or TLibTargets. The name doesn't really matter, since the user 
will never actually see it.


Michael

_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to