[CMake] unexpected INSTALL problems

Andreas Naumann Andreas-Naumann at gmx.net
Wed Jun 15 09:07:55 EDT 2011


Am 15.06.2011 14:58, schrieb Dominik Szczerba:
>> okay, than you could use
>> find_package(Boost YOUR_VERSION EXACT)
>>      
> Problem is boost has very complicated linking scenario. Using
> FindBoost and linking to it hardcodes the versions, because they are
> in the filenames! If I need to run on another system I must have
> exactly the same boost version, but that is almost never the case.
>
>    
>>>>> 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)
>>      
> The problem here is that FILE() only runs at configure time, while
> INSTALL on building the install target. We can not accept that on
> other reasons, we need to have the full installation in one go.
>
> So I conclude it is not possible.
>
> Many thanks for your response.
>
> Dominik
>
>    

On my system, FindBoost detects the *.so without the version numbers. 
So, I can update to a new (hopefully binary compatible) version without 
relinking.
And we provide packages depending on boost by setting the package 
dependency using cpack.

Andreas


More information about the CMake mailing list