[CMake] link_libraries vs target_link_libraries
Fernando Cacciola
fernando.cacciola at gmail.com
Wed Nov 12 10:34:35 EST 2008
Hendrik Sattler wrote:
> Bill Hoffman schrieb:
>>> OTOH, it could make sense to do the following:
>>>
>>> find_packge( CGAL REQUIRED <components> )
>>>
>>> include( ${CGAL_USE_FILE} )
>>>
>>> ....
>>> add_executable( program ... )
>>>
>>> use_CGAL( program )
>>>
>>> so it works now with 2.4, and eventually "upgrade" it to use target
>>> properties instead.
>> That sounds like a good way to go, and is similar to what the boost
>> folks are doing.
>
> But it is not backwards-compatible and will fail to link on the new
> version while it worked fine on the old version.
Why??
> Additionally, that would make ${CGAL_USE_FILE} obsolete as you can put
> the macro into FindCGAL.cmake.
>
Which is far from being a problem, or is it?
Best
Fernando
More information about the CMake
mailing list