[CMake] unexpected INSTALL problems
Andreas Naumann
Andreas-Naumann at gmx.net
Wed Jun 15 08:39:33 EDT 2011
Am 15.06.2011 14:24, schrieb Dominik Szczerba:
> On Wed, Jun 15, 2011 at 2:22 PM, Andreas Naumann
> <Andreas-Naumann at gmx.net> wrote:
>
>> Am 15.06.2011 13:58, schrieb Dominik Szczerba:
>>
>>> I am trying to copy all libboost* stuff from /usr/lib to
>>> CMAKE_INSTALL_PREFIX just as most users would guess:
>>>
>>>
>>>
>> Why do you want to copy the boost libraries from /usr/lib to
>> CMAKE_INSTALL_PREFIX? And why all of them??
>> I don't see any reason for this.
>> If you wants to use them, you could use
>> find_package(Boost .....)
>>
> I need to create a redistributable package with this and none other
> boost version. It works very well for us and this policy is not up to
> me. The point of the mail was the very unintuitive cmake behavior. I
> will appreciate any hints.
>
> Dominik
>
>
okay, than you could use
find_package(Boost YOUR_VERSION EXACT)
If you think, you really have to ship the boost libraries with your
package, you could look for your boost libraries you need and use the
variable Boost_LIBRARIES.
But than you possibly copy only the links...
>>> INSTALL(DIRECTORY ${BOOST_RUNTIME_DIR}/ DESTINATION
>>> ${CMAKE_INSTALL_PREFIX}/bin FILES_MATCHING .......)
>>>
I tried
file(GLOB BOOSTLIBS /usr/lib/libboost*.so.*)
INSTALL(FILES ${BOOSTLIBS} DESTINATION ${CMAKE_INSTALL_PREFIX}/bin)
and it worked.
The libboost*.so are only symlinks on my system.
Andreas
>>> Whatever I specify for matching I always get half of my system copied
>>> instead of the requested files. E.g.
>>>
>>> PATTERN "libboost*.so" does absolutely nothing and REGEX
>>> "libboost.*\.so.*$" complains about the slash, when removed does
>>> nothing either. As a result all content is always copied.
>>>
>>> Interestingly and confusingly, the same thing (only used PATTERN)
>>> works for e.g. "*.h". What is special here?
>>>
>>> Are there any examples how to use this functionality? Both the
>>> documentation and the FAQ are not very comprehensive in this matter.
>>>
>>> Thanks and regards,
>>> Dominik
>>> _______________________________________________
>>> 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
>>>
>>>
>>>
>> _______________________________________________
>> 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
>>
>>
>>
>
More information about the CMake
mailing list