[CMake] cmake export

Patrick Spendrin ps_ml at gmx.de
Thu Dec 11 11:44:27 EST 2008


Hello,

after speaking with Alex Neundorf I am asking here to reach more ppl.

My problem:
When I build a library foo and export it with install(EXPORT) etc. I 
will get a file called foo.cmake and foo-Debug.cmake which should be 
included when developing with my library foo. So if I now take the 
installed version of foo, tar it together into a package and unpack it 
somewhere else I will get a problem (on Windows). In the foo-Debug.cmake 
file the library foo itself is of course given relative to the 
foo-Debug.cmake file. 3rd party libraries are given with complete paths 
of my source computer though - which normally makes no sense on the 
destination computer.
For now I am handling this with a post-install script but I would really 
like to have a different approach where cmake would make the 
3rd-party-libraries paths' relative to the foo-Debug.cmake file as well.

Attached:
- the CMakeLists.txt file of my testing project - it simply builds one 
library, links it to Qt4 and exports its own library.
- the exported file: you can see that in 
IMPORTED_LINK_INTERFACE_LIBRARIES_DEBUG you link to a complete path:
"D:/cygopt/root/lib/QtCored4.lib" instead of 
"${_IMPORT_PREFIX}/lib/QtCored4.lib" as I would like it.

If you have any ideas, please simply tell me.

regards,
Patrick

-- 
web:                 http://windows.kde.org
mailing list:        kde-windows at kde.org
irc:                 #kde-windows (irc.freenode.net)
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: CMakeLists.txt
URL: <http://www.cmake.org/pipermail/cmake/attachments/20081211/a0556197/attachment.txt>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: myLib-debug.cmake
URL: <http://www.cmake.org/pipermail/cmake/attachments/20081211/a0556197/attachment-0001.txt>


More information about the CMake mailing list