[CMake] How do cmake install shared library?

J Decker d3ck0r at gmail.com
Mon Mar 9 04:18:16 EDT 2015


try install( PROGRAMS  ) or SCRIPTS ...
it loses permission on data files...

On Mon, Mar 9, 2015 at 12:19 AM, kl222 <kl222 at 126.com> wrote:

> Hello all:
>     I have some third-party dynamic libraries in the lib directory, how
> can I install it to the installation directory?
>
>
>
>
>
>
>
>
>
> *lib$ ls -la总用量 1768drwxrwxr-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.3lrwxrwxrwx 1 l l      17  3月  9 13:23 libqxmpp.so.0 ->
> libqxmpp.so.0.8.3lrwxrwxrwx 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.3drwxrwxr-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 -lalrwxrwxrwx 1 l l      18  3月  9 15:04 libqxmpp.so ->
> /libqxmpp.so.0.8.3lrwxrwxrwx 1 l l      18  3月  9 15:04 libqxmpp.so.0 ->
> /libqxmpp.so.0.8.3lrwxrwxrwx 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?
>
>
>
> --
>
> Powered by www.kitware.com
>
> Please keep messages on-topic and check the CMake FAQ at:
> http://www.cmake.org/Wiki/CMake_FAQ
>
> Kitware offers various services to support the CMake community. For more
> information on each offering, please visit:
>
> CMake Support: http://cmake.org/cmake/help/support.html
> CMake Consulting: http://cmake.org/cmake/help/consulting.html
> CMake Training Courses: http://cmake.org/cmake/help/training.html
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/cmake
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake/attachments/20150309/2e3ddf81/attachment.html>


More information about the CMake mailing list