OSDN Git Service

kdevplatform: make webkit optional
authorIvailo Monev <xakepa10@gmail.com>
Wed, 25 Nov 2015 05:15:37 +0000 (05:15 +0000)
committerIvailo Monev <xakepa10@gmail.com>
Wed, 25 Nov 2015 05:15:37 +0000 (05:15 +0000)
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
kdevplatform/documentation/CMakeLists.txt

index 1747cd5..d18e3a9 100644 (file)
@@ -1,26 +1,27 @@
-macro_log_feature(QT_QTWEBKIT_FOUND "QtWebKit" "QtWebKit, for integrated documentation" "http://qt-project.org/" TRUE)
+macro_log_feature(QT_QTWEBKIT_FOUND "QtWebKit" "QtWebKit, for integrated documentation" "http://qt-project.org/" FALSE)
 
+if(QT_QTWEBKIT_FOUND)
+    set(kdevplatformdocumentation_LIB_SRCS
+        standarddocumentationview.cpp
+        documentationfindwidget.cpp
+        documentationview.cpp
+        documentationfindwidget.ui
+    )
 
-set(kdevplatformdocumentation_LIB_SRCS
-    standarddocumentationview.cpp
-    documentationfindwidget.cpp
-    documentationview.cpp
-    documentationfindwidget.ui
-)
+    add_library(kdevplatformdocumentation SHARED ${kdevplatformdocumentation_LIB_SRCS})
 
-add_library(kdevplatformdocumentation SHARED ${kdevplatformdocumentation_LIB_SRCS})
+    install(TARGETS kdevplatformdocumentation EXPORT KDevPlatformTargets ${INSTALL_TARGETS_DEFAULT_ARGS} )
 
-install(TARGETS kdevplatformdocumentation EXPORT KDevPlatformTargets ${INSTALL_TARGETS_DEFAULT_ARGS} )
+    target_link_libraries(kdevplatformdocumentation
+            LINK_PRIVATE ${QT_QTWEBKIT_LIBRARY}
+            LINK_PUBLIC kdevplatforminterfaces)
 
-target_link_libraries(kdevplatformdocumentation
-        LINK_PRIVATE ${QT_QTWEBKIT_LIBRARY}
-        LINK_PUBLIC kdevplatforminterfaces)
+    set_target_properties(kdevplatformdocumentation PROPERTIES VERSION ${KDEVPLATFORM_LIB_VERSION} SOVERSION ${KDEVPLATFORM_LIB_SOVERSION})
 
-set_target_properties(kdevplatformdocumentation PROPERTIES VERSION ${KDEVPLATFORM_LIB_VERSION} SOVERSION ${KDEVPLATFORM_LIB_SOVERSION})
-
-install(FILES
-    documentationexport.h
-    documentationfindwidget.h
-    standarddocumentationview.h
-    DESTINATION ${INCLUDE_INSTALL_DIR}/kdevplatform/documentation COMPONENT Devel
- )
+    install(FILES
+        documentationexport.h
+        documentationfindwidget.h
+        standarddocumentationview.h
+        DESTINATION ${INCLUDE_INSTALL_DIR}/kdevplatform/documentation COMPONENT Devel
+    )
+endif()
\ No newline at end of file