[CMake] export files and FIND_PACKAGE
Micha Renner
Micha.Renner at t-online.de
Fri Feb 5 03:18:47 EST 2010
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
More information about the CMake
mailing list