trinity-devel@lists.pearsoncomputing.net

Message: previous - next
Month: March 2012

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

From: "David C. Rankin" <drankinatty@...>
Date: Fri, 09 Mar 2012 10:48:27 -0600
On 03/09/2012 02:08 AM, Serghei Amelian wrote:

>
> Nope, you can't insert a condition inside a function.
>
> 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}
> )
>

Serghei,

   I created a patch and uploaded it to bug 902 if you want to go ahead and 
apply it. Thanks!


-- 
David C. Rankin, J.D.,P.E.