OK, I have a "fix", though that fix includes rejecting dcmtk < 3.6.1. But 3.6.1 
was released in 2011! So I don't think that's too much to ask that anyone who 
requires DICOM support be on a version of dcmtk that's no more than 7 years old.

I will amend this fix to the other DICOM PR I just submitted: 
https://github.com/OpenImageIO/oiio/pull/1843 
<https://github.com/OpenImageIO/oiio/pull/1843>

Also incorporated the patch that Richard suggested earlier in the thread. All 
in one.

        -- lg


> On Jan 16, 2018, at 10:53 PM, Larry Gritz <[email protected]> wrote:
> 
> After some poking around, it seems like it's extremely difficult to do any 
> kind of string comparisons with the C preprocessor, or even to tell if it's a 
> string or not.
> 
> I'm going to try to detect the version on the CMake side and see if I can 
> come up with something clever. Otherwise, I may just reject Dcmtk versions 
> older than 3.6.1.
> 
> Are you just trying to get a clean build, or do you need DICOM file support? 
> (If the latter, please upgrade your dcmtk.)
> 
> 
> 
>> On Jan 16, 2018, at 10:47 PM, Larry Gritz <[email protected] 
>> <mailto:[email protected]>> wrote:
>> 
>> OK I understand now.
>> 
>> It seems that for dcmtk <= 3.6.0, it defined PACKAGE_VERSION_NUMBER as a 
>> string "360", but by the time they were 3.6.1, they changed it to be sure 
>> it's a number, 361.
>> 
>> So for the old version,
>> 
>>     #if PACKAGE_VERSION_NUMBER >= 361
>> 
>> just won't work, because the preprocessor refuses to compare a string to a 
>> number.
>> 
>> Working on a solution...
>> 
>> 
>>> On Jan 15, 2018, at 3:59 AM, Daniel Flood <[email protected] 
>>> <mailto:[email protected]>> wrote:
>>> 
>>> Hey Larry, we have dcmtk 3.6.0 installed.  
>>> 
>>> Just noticed this at the top of your FindDCMTK.cmake module in Oiio: 
>>> 
>>> "# FIXME: CMake >= 3.5 has its own FindDCMTK.cmake, so when our minimum     
>>>                                                        
>>> # cmake is at least that, we can remove this file.
>>> 
>>> We're using Cmake 3.2.3 which does seem to have a FindDCMTK.cmake module, I 
>>> tried using that instead but it produced the same error.  Let me know if 
>>> there's any more info I can provide,
>>> 
>>> cheers,
>>> Daniel
>>> 
>>> 
>>> 
>>> 
>>> On 15 January 2018 at 16:17, Larry Gritz <[email protected] 
>>> <mailto:[email protected]>> wrote:
>>> Richard: Should I change those #if's on my end?  Looks plausible than me.
>>> 
>>> Daniel: Do you know which Dcmtk version you have installed?
>>> 
>>> 
>>>> On Jan 14, 2018, at 6:23 PM, Richard Shaw <[email protected] 
>>>> <mailto:[email protected]>> wrote:
>>>> 
>>>> Here's what I used for Fedora, might do the trick..
>>>> 
>>>> https://src.fedoraproject.org/rpms/OpenImageIO/blob/master/f/OpenImageIO-dcmtk.patch
>>>>  
>>>> <https://src.fedoraproject.org/rpms/OpenImageIO/blob/master/f/OpenImageIO-dcmtk.patch>
>>>> 
>>>> Thanks,
>>>> Richard
>>>> 
>>> 
>>> --
>>> Larry Gritz
>>> [email protected] <mailto:[email protected]>
>>> 
>>> 
>>> 
>>> 
>>> 
>>> _______________________________________________
>>> Oiio-dev mailing list
>>> [email protected] <mailto:[email protected]>
>>> http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org 
>>> <http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org>
>>> 
>>> 
>>> _______________________________________________
>>> Oiio-dev mailing list
>>> [email protected] <mailto:[email protected]>
>>> http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org 
>>> <http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org>
>> 
>> --
>> Larry Gritz
>> [email protected] <mailto:[email protected]>
>> 
>> 
>> 
>> 
>> _______________________________________________
>> Oiio-dev mailing list
>> [email protected] <mailto:[email protected]>
>> http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org
> 
> --
> Larry Gritz
> [email protected] <mailto:[email protected]>
> 
> 
> 
> 
> _______________________________________________
> Oiio-dev mailing list
> [email protected]
> http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org

--
Larry Gritz
[email protected]




_______________________________________________
Oiio-dev mailing list
[email protected]
http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org

Reply via email to