Hi,

If someone with a more recent marble than me would be so kind to test the 
following patch (I guess KDE4.8 ? (or maybe 4.7 too)), hopefully this version 
works on linux and windows, and it does not require a compilation, so 
hopefully, more robust.

-- 
Cyrille Berger Skott
diff --git a/CMakeLists.txt b/CMakeLists.txt
index be6c889..759de33 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -254,15 +254,8 @@ if( MARBLE_FOUND )
     ##
     find_file(MARBLECONTROLBOX_H MarbleControlBox.h ${MARBLE_INCLUDE_DIR})
     if( MARBLECONTROLBOX_H )
-        INCLUDE(CheckCXXSourceCompiles)
-        set(CMAKE_REQUIRED_INCLUDES_SWAP ${CMAKE_REQUIRED_INCLUDES})
-        set(CMAKE_REQUIRED_LIBRARIES_SWAP ${CMAKE_REQUIRED_LIBRARIES})
-        set(CMAKE_REQUIRED_INCLUDES ${QT_INCLUDE_DIR})
-        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})
-        set(CMAKE_REQUIRED_INCLUDES ${CMAKE_REQUIRED_INCLUDES_SWAP})
+	file(READ ${MARBLECONTROLBOX_H} MARBLECONTROLBOX_H_CONTENT)
+	string(REGEX MATCH "setMarbleWidget" SETMARBLEWIDGET ${MARBLECONTROLBOX_H_CONTENT})
         if( SETMARBLEWIDGET )
             add_definitions(-DHAVE_SETMARBLEWIDGET)
         endif( SETMARBLEWIDGET)
_______________________________________________
calligra-devel mailing list
calligra-devel@kde.org
https://mail.kde.org/mailman/listinfo/calligra-devel

Reply via email to