On Sat, Jan 10, 2009 at 7:48 AM, Alexander Neundorf <span dir="ltr"><<a href="mailto:a.neundorf-work@gmx.net">a.neundorf-work@gmx.net</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="Ih2E3d">On Thursday 08 January 2009, Philip Lowman wrote:<br>
> If you use GTK2 in any of your projects and have time, please test this<br>
> CMake module and post any issues to this thread.<br>
<br>
</div>I had a quick look at it.<br>
I think in the FIND_PATH() call you don't need to list /usr/include<br>
and /usr/local/include, they are searched anyway.</blockquote><div><br>Yes, thanks. I'm not sure how those got there, I will remove them.<br> </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
The constants for true and false are "TRUE" and "FALSE" (i.e. upper case).</blockquote><div><br>Ah, you're complaining about using 1 and 0 in the macro arguments. There's a reason for that. I'm not sure what I'm doing wrong here below, but this code only outputs "a is true" when a 1 is passed in, both TRUE and ON do not work. Kinda looks like a bug but it's hard to believe that it is.<br>
<br>PROJECT(Foo)<br>CMAKE_MINIMUM_REQUIRED(VERSION 2.6)<br>MACRO(test_constants _a _b )<br> MESSAGE("a,b = ${_a},${_b}")<br> IF(${_a})<br> MESSAGE("a is true")<br> ENDIF()<br> IF(${_b})<br>
MESSAGE("b is true")<br> ENDIF()<br>ENDMACRO()<br><br>test_constants(1 0)<br>test_constants(TRUE FALSE)<br>test_constants(ON OFF)<br><br>outputs:<br><span style="color: rgb(255, 0, 0);">a,b = 1,0</span>
<p style="margin: 0px; text-indent: 0px; color: rgb(255, 0, 0);">a is true</p>
<p style="margin: 0px; text-indent: 0px; color: rgb(255, 0, 0);">a,b = TRUE,FALSE</p>
<p style="margin: 0px; text-indent: 0px; color: rgb(255, 0, 0);">a,b = ON,OFF</p> <br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
I'm not sure it's a good idea to abort with FATAL_ERROR if no components are<br>
given. No other module does that. What would be a good default ?<br>
Trying to find everything and report success if at least gtk itself has been<br>
found ?</blockquote><div><br>One choice would be to assume the only thing they want is "gtk" and it's dependents. I prefer the FATAL_ERROR though as it forces CMake users to read the documentation, they may after all want gtkmm, glade, or some other combination of GTK2's libraries. Worse case they don't read it and the FATAL_ERROR message tells them to read the documentation. =)<br>
<br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">> I intend to check it into CMake and support it.<br><br>Cool :-)<br>
Let me know when you do this, then I can close<br>
<a href="http://public.kitware.com/Bug/view.php?id=7483" target="_blank">http://public.kitware.com/Bug/view.php?id=7483</a></blockquote><div><br>Will do. Thanks for the reference. I noticed a couple of use cases in that module I hadn't thought of like<br>
/usr/lib64/gtk-2.0/include for example.<br></div></div><br>-- <br>Philip Lowman<br>