[CMake] How do cmake install shared library?
kl222
kl222 at 126.com
Mon Mar 9 03:19:06 EDT 2015
Hello all:
I have somethird-partydynamic librariesin the lib directory,how can Iinstall it tothe installation directory?
lib$ ls -la
总用量 1768
drwxrwxr-x 3 l l 4096 3月 9 13:23 .
drwxrwxr-x 4 l l 4096 3月 9 13:23 ..
lrwxrwxrwx 1 l l 17 3月 9 13:23 libqxmpp.so -> libqxmpp.so.0.8.3
lrwxrwxrwx 1 l l 17 3月 9 13:23 libqxmpp.so.0 -> libqxmpp.so.0.8.3
lrwxrwxrwx 1 l l 17 3月 9 13:23 libqxmpp.so.0.8 -> libqxmpp.so.0.8.3
-rwxr-xr-x 1 l l 1797032 3月 9 13:23 libqxmpp.so.0.8.3
drwxrwxr-x 2 l l 4096 3月 9 13:25 pkgconfig
I was write in CMakeLists.txt :
INSTALL(DIRECTORY "${CMAKE_SOURCE_DIR}/ThirdLibary/lib/"
DESTINATION "."
FILES_MATCHING PATTERN "*.so*")
OK! It is install file. But the link file is error:
lib$ ls -la
lrwxrwxrwx 1 l l 18 3月 9 15:04 libqxmpp.so -> /libqxmpp.so.0.8.3
lrwxrwxrwx 1 l l 18 3月 9 15:04 libqxmpp.so.0 -> /libqxmpp.so.0.8.3
lrwxrwxrwx 1 l l 18 3月 9 15:04 libqxmpp.so.0.8 -> /libqxmpp.so.0.8.3
-rw-r--r-- 1 l l 1796920 3月 9 15:04 libqxmpp.so.0.8.3
What should I do?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake/attachments/20150309/52c7ef86/attachment.html>
More information about the CMake
mailing list