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!