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