trinity-devel@lists.pearsoncomputing.net

Message: previous - next
Month: March 2012

Re: [trinity-devel] CMake - how to add library to build?

From: Serghei Amelian <serghei@...>
Date: Fri, 9 Mar 2012 15:43:52 +0200
On Friday 09 March 2012 15:41:15 David C. Rankin wrote:
> On 03/09/2012 02:08 AM, Serghei Amelian wrote:
> > The correct way is this (in this case we are using pkgconfig
> > information):
> >
> > if( WITH_XEXT )
> >   pkg_search_module( XEXT xext )
> >   if( NOT XEXT_FOUND )
> >     tde_message_fatal( "You requested Xext support, but is was not found
> > on your system (or devel package is not installed' )
> >   endif( )
> >   check_include_file( "X11/extensions/shape.h"
> > HAVE_X11_EXTENSIONS_SHAPE_H ) endif( )
> >
> > tde_add_executable( ksnapshot AUTOMOC
> >   SOURCES
> >     ksnapshotiface.skel main.cpp ksnapshot.cpp regiongrabber.cpp
> >     windowgrabber.cpp ksnapshotwidget.ui
> >   LINK kdeprint-shared ${XEXT_LIBRARIES}
> >   DESTINATION ${BIN_INSTALL_DIR}
> > )
>
> OK, I'm trying to follow this so I can help fix things, but ... where in
> the heck is ${XEXT_LIBRARIES} getting assigned??

In pkg_search_module(). Check cmake documentation for more information:

http://www.cmake.org/cmake/help/cmake-2-8-docs.html#module:FindPkgConfig

-- 
Serghei