discuss-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Discuss-gnuradio] patch to make FindQwt.cmake work on OpenSuse 12.1


From: Kire Pudsje
Subject: Re: [Discuss-gnuradio] patch to make FindQwt.cmake work on OpenSuse 12.1
Date: Tue, 15 May 2012 08:55:32 +0200

2012/5/14 Patrik Tast <address@hidden>:
> Hi,
>
>
>> File in question for reference:
>> http://gnuradio.org/cgit/gnuradio.git/tree/cmake/Modules/FindQwt.cmake
>>
>
> Could the *find that dependency* be automatized using locate and grep
> instead of hard-coding where to look in?
> I'm using latest qwt for other delvel projects also. A quick lookup (using
> Fedora) could look like this:
>
> $ locate libqwt.so
> /usr/local/qwt-6.0.2-svn/lib/libqwt.so
> /usr/local/qwt-6.0.2-svn/lib/libqwt.so.6
> /usr/local/qwt-6.0.2-svn/lib/libqwt.so.6.0
> /usr/local/qwt-6.0.2-svn/lib/libqwt.so.6.0.2
>
> $ locate qwt_plot.h
> /usr/local/qwt-6.0.2-svn/include/qwt_plot.h
>
>
> Patrik
>
The FILE GLOB could do the same trick as you suggest:
"FILE(GLOB qwt_files ${qwt_dir}/include/qwt*/qwt_plot.h)"

I tried to write a patch which uses exactly that.
It tries to locate the header files in:
/usr/local/qwt*/include
/usr/local/include/qwt*
/usr/qwt*/include
/usr/include/qwt*
/opt/local/qwt*/include
/opt/local/include/qwt*
/sw/local/qwt*/include
/sw/local/include/qwt*
Furthermore, the libraries are searched in the same order. So if I
have the packaged version for qwt in /usr/include/qwt5 and I have a
manually compiled qwt in /usr/local/qwt-6.0.2-svn, it prefers the
manually compiled version, and makes sure that it will then search the
libraries in exactly the same order. On 64bit machines, the lib64 will
be preferred over lib.
This patch is pure cmake language, so it should not break on windows.
Furthermore, no maintenance should be needed with new versions of qwt.
Kire.

Attachment: findqwt.diff
Description: Binary data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]