[CMake] PKGCONFIG backward compatibility on CVS trunk.

Michel Hermier michel.hermier at gmail.com
Fri Dec 8 18:13:09 EST 2006


Michel Hermier wrote:
> Alan W. Irwin wrote:
>>
>> It appears the 2.4.5 version of UsePkgConfig.cmake is what you need. I
>> therefore believe the current approach in cvs (although it works
>> consistently for PLplot for 2.4.5 and cvs version) is attempting the
>> impossible; emulate the old behaviour by using the modern macros with
>> post-processing to attempt to make the result _exactly_ compatible.
>>
>> Therefore, I suggest the following improved proposal to take care of 
>> these
>> compatibility issues exactly.
>>
>> 1) Copy the 2.4.5 UsePkgConfig.cmake which defines the PKGCONFIG 
>> macro to
>> CVS with the only change being to add a message that it is an obsolete
>> macro.  Then you _know_ that if the user uses UsePkgConfig.cmake they 
>> will
>> automatically be compatible with what was done before.
>>
>> 2) Get rid of the emulated definition of the PKGCONFIG macro that is
>> currently in FindPkgConfig.cmake.  In other words, 
>> FindPkgConfig.cmake is
>> completely reserved for the new pkg-config stuff and does not try to 
>> emulate
>> the old PKGCONFIG macro.
>>
>> I attach a patch to current CVS that implements this proposal.  It works
>> for PLplot.
>>
>> Michel, does this patch work for you?
> The patch did the trick (as expected) thought it doesn't apply cleanly 
> for me due to whitespace.
>
> Anyway maybe the inclusion of the file should also be restricted by 
> some version compatibility checking ?
> So that a project say by macro that it requires a 2.4.5 compatibility 
> and only warn about the deprecated helper file and/or macro, while a 
> macro not saying it will output a error message on deprecated file 
> usage, and skip the content definition ? So that it helps version 
> migration ?
>
> Cheers,
>    Michel
>
Any news ? Seems not commited ?

Michel


More information about the CMake mailing list