Hi Alexander,
Thanks for the detective work. Your last suggestion of :
extern "C" {
#include < librsvg/rsvg.h>
+#ifndef LIBRSVG_CHECK_VERSION
+ #include < librsvg/rsvg-cairo.h>
+#endif
}
Is what I went with, short and sweet ;-)
I've also merged into the OSG-3.2 branch the librsvg-2.0>=2.35 check
from the svn/trunk/CMakeModules/FindRSVG.cmake script.
I will make another 3.2.1 release candidate today/tomorrow that will
wrap this up.
Cheers,
Robert.
On 29 June 2014 19:46, Alexander Sinditskiy <[email protected]> wrote:
> Hi,
> Hello Robert
>
>
>>
>> Thanks for the changes. Which version of the OSG are you testing
>> against? Which version of RVSG are you testing against?
>>
>
>
> I have RSVG 2.36.1
> I tested my changes in OpenSceneGraph-3.2 and master/trunk branches.
>
>
>>
>> The second #if LIBRSVG_CHECK_VERSION assumes that either rvsg.h
>> provides this, or the fallback of #include
>> < librsvg/librsvg-features.h> provide it. Could there be a case where
>> neither provide it?
>>
>
>
> This define exists sicnce LIBRSVG_2_26_1
> https://github.com/GNOME/librsvg/commit/19b6a9616464a20a6824e255a296c708f882e55b
>
>
>
>>
>> So the whole block would look like:
>>
>> extern "C" {
>> #include < librsvg/rsvg.h>
>>
>> #ifndef LIBRSVG_CHECK_VERSION
>> #include < librsvg/librsvg-features.h>
>> #endif
>>
>> #if !defined(LIBRSVG_CHECK_VERSION) || !LIBRSVG_CHECK_VERSION(2, 36, 2)
>> #include < librsvg/rsvg-cairo.h>
>> #endif
>> }
>>
>
> I like your changes, but gcc not accept it if LIBRSVG_CHECK_VERSION is not
> defined:
>
>
> Code:
>
> # cat test.cpp
> #if !defined(TEST) || TEST(2, 36, 2)
> #pragma message("true")
> #else
> #pragma message("false")
> #endif
>
> int main()
> {
> return 0;
> }
> # gcc test.cpp
> test.cpp:1:27: error: missing binary operator before token "("
> test.cpp:4:24: note: #pragma message: false
>
>
>
>
> I have idea, may be it is a bit hacky. Since commit:
> https://github.com/GNOME/librsvg/commit/3b8adaa7e780b85695306292dfb23107d219bb34
> you have defined LIBRSVG_CHECK_VERSION after include < librsvg/rsvg.h>
> but before you don't.
>
>
> Code:
>
> extern "C" {
> #include < librsvg/rsvg.h>
> +#ifndef LIBRSVG_CHECK_VERSION
> + #include < librsvg/rsvg-cairo.h>
> +#endif
> }
>
>
>
>
>
> Thank you for review & tests :)!
>
> Cheers,
> Alexander
>
> ------------------
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=60044#60044
>
>
>
>
>
> _______________________________________________
> osg-users mailing list
> [email protected]
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org