Am 17. April 2016 21:21:01 MESZ, schrieb Domen Vrankar 
<domen.vran...@gmail.com>:
>I've finally had time to look into this.
>
>The problem is that rpm expects a shared library to have execute
>permissions - during packaging missing execute permissions are ignored
>so dependency is found but once we try to install the package it
>figures out that it's missing hence the odd missing dependency error.
>
>To fix this simply set permissions that you want e.g.:
>
>set(LIBRARIES
>        ${LIB}/liblibrary.so
>        ${LIB}/liblibrary.so.5
>        ${LIB}/liblibrary.so.5.6.7)
>install(FILES ${LIBRARIES} DESTINATION lib
>  PERMISSIONS OWNER_EXECUTE # this permission is mandatory or package
>installation will fail
>)
>
>See the entire list of permissions here:
>https://cmake.org/cmake/help/v3.5/command/install.html
>
>I'll try to add some simple checking for such errors in CPack/RPM.

Actually the exec bit for library files is plain wrong. That RPM wrongly needs 
this is a bug in RPM. CMake should not make the world worse by making build 
systems set this exec bit on libraries. Just SILENTLY fix it up when generating 
the .rpm

Simple check: what happens when you try to execute the library from the command 
line? Only those files that have a defined behavior when running them should 
have the exec bit set.

HS

-- 

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

Reply via email to