On Sun, May 4, 2008 at 3:14 AM, Kertész Csaba <<a href="mailto:signfinnlista@gmail.com">signfinnlista@gmail.com</a>> 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;">
Hi all,<br>
<br>
I'm CMake newbie and I'm using the default CMake 2.4 patch 7 under<br>
Ubuntu Hardy. I have a project with autotools and I want to convert it<br>
to cmake. I don't know if I'm in wrong way, but I would like to detect<br>
the external libraries in the top level directory and use the detected<br>
include directories and libraries in src/ and other subdirectories if<br>
needs be.<br>
<br>
The PKGCONFIG module in CMake did not work me well in this situation,<br>
the results were quite wrong. Thus I decided to try the FIND_PACKAGE().<br>
I could find a FindGLIB.cmake for the glib detection on the net and the<br>
result is the following:<br>
<br>
The glib has two include directories. If I'm using the FIND_PACKAGE(GLIB<br>
REQUIRED) in the ./src directory, then everything is working fine,<br>
GLIB_INCLUDE_DIR comprises two directories. But if the FIND_PACKAGE is<br>
used in the top level directory, then the _second_ include directory is<br>
lost from GLIB_INCLUDE_DIR in the ./src directory (it is traced with<br>
message() ).<br>
<br>
Any idea?</blockquote><div><br>Can you post the FindGLIB.cmake that you're using?<br><br>In general it shouldn't matter where you call FIND_PACKAGE() in your directory structure.<br></div></div><br>-- <br>Philip Lowman