[CMake] Lost include dir in subdirectory process
Kertész Csaba
signfinnlista at gmail.com
Sun May 4 03:14:23 EDT 2008
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?
Regards,
Csaba
More information about the CMake
mailing list