James C. Sutherland wrote:
However, I just discovered that this is a deprecated feature, and that install(EXPORT...) should be used instead.
Good, it is much more modern and more powerful.
However, it is not clear to me how to incorporate dependencies when using the install(EXPORT) approach. Are we now supposed to do this manually, or am I missing something?
The myproj-targets.cmake file that install(EXPORT) puts in the install tree should already have all the dependencies (actually that file includes a per-configuration file which defines all the libraries). See this page for details: http://www.cmake.org/Wiki/CMake_2.6_Notes
I think that I have this figured out now. I am collecting the library dependencies and shoving them into the Config file that find_package() uses. This seems to work just fine.
What are you putting in the Config? Typically the <pkg>Config.cmake file should just include the file produced by install(EXPORT). -Brad _______________________________________________ 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
