diff -ruN calligra-2.3.87.orig/CMakeLists.txt calligra-2.3.87/CMakeLists.txt --- calligra-2.3.87.orig/CMakeLists.txt 2012-01-28 15:26:27.000000000 +0100 +++ calligra-2.3.87/CMakeLists.txt 2012-02-07 23:53:45.000000000 +0100 @@ -264,12 +264,9 @@ ## find_file(MARBLECONTROLBOX_H MarbleControlBox.h ${MARBLE_INCLUDE_DIR}) if( MARBLECONTROLBOX_H ) - INCLUDE(CheckCXXSourceCompiles) - set(CMAKE_REQUIRED_LIBRARIES_SWAP ${CMAKE_REQUIRED_LIBRARIES}) - set(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} ${QT_QTCORE_LIBRARY} ${QT_QTGUI_LIBRARY} ${MARBLE_LIBRARIES}) - CHECK_CXX_SOURCE_COMPILES ( "#include <${MARBLECONTROLBOX_H}>\nint main(){Marble::MarbleControlBox*p; p->setMarbleWidget(0); return 0;}" SETMARBLEWIDGET) - # subsequent tests will fail if this is not set back. - set(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES_SWAP}) + execute_process(COMMAND grep -m 1 -e "setMarbleWidget" ${MARBLECONTROLBOX_H} + OUTPUT_VARIABLE SETMARBLEWIDGET + ) if( SETMARBLEWIDGET ) add_definitions(-DHAVE_SETMARBLEWIDGET) endif( SETMARBLEWIDGET)