Andriy Rysin wrote:
Hi

I've got a question about PKGCONFIG usage
Let's say I've got SOMELIB_CFLAGS and SOMELIB_LD_FLAGS from PKGCONFIG by
this:

PKGCONFIG(somelib SOMELIB_INCLUDE_DIR SOMELIB_LINK_DIR SOMELIB_LD_FLAGS
SOMELIB_CFLAGS)

I could use
SET(CMAKE_CXX_FLAGS "${SOMELIB_CFLAGS} ${CMAKE_CXX_FLAGS}")
to set includes for that dir

Alternatively you can use the STRING command to extract the directories from the -I options and then use INCLUDE_DIRECTORIES. This would allow those include directories to be included in dependency scanning.

> but I could not find any CMAKE_LD_FLAGS to
add SOMELIB_LD_FLAGS to, so that I've got my library included on linking
stage

CMAKE_C_LINK_FLAGS
CMAKE_CXX_LINK_FLAGS

or use SET_TARGET_PROPERTIES to set a LINK_FLAGS property on a specific target.

-Brad
_______________________________________________
CMake mailing list
[email protected]
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to