[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-panel-devel
Subject:    Re: Re: DrKonqi dependencies
From:       Andreas Sturmlechner <andreas.sturmlechner () gmail ! com>
Date:       2017-03-19 21:14:26
Message-ID: 3501090.yCMhfxQXs9 () tux200s
[Download RAW message or body]

On Sunday, 19 March 2017 at 14:19, Kai Uwe Broulik wrote:
> I'd be fine with splitting drkonqi into its own repository, René recently
> brought this up as well.

Since I was pondering the idea anyway, might as well attach my patch to build 
drkonqi standalone from its subdir.

["drkonqi-standalone.patch" (drkonqi-standalone.patch)]

commit 1ee858f194fd2c8dcb2cbd3f436fffe7207ba0cc
Author: Andreas Sturmlechner <andreas.sturmlechner@gmail.com>
Date:   Sun Mar 19 12:54:34 2017 +0100

    drkonqi: Standalone sub-project

diff --git a/drkonqi/CMakeLists.txt b/drkonqi/CMakeLists.txt
index cdae1d49..3923a8f4 100644
--- a/drkonqi/CMakeLists.txt
+++ b/drkonqi/CMakeLists.txt
@@ -1,5 +1,68 @@
+project(drkonqi)
+
 include (CheckFunctionExists)
 
+if(${CMAKE_SOURCE_DIR} STREQUAL ${drkonqi_SOURCE_DIR})
+    set(PROJECT_VERSION "5.9.90")
+    set(PROJECT_VERSION_MAJOR 5)
+
+    cmake_minimum_required(VERSION 2.8.12 FATAL_ERROR)
+
+    set(QT_MIN_VERSION "5.7.0")
+    set(KF5_MIN_VERSION "5.29.0")
+    find_package(Qt5 ${QT_MIN_VERSION} CONFIG REQUIRED COMPONENTS DBus Gui Widgets Xml)
+    find_package(ECM 1.8.0 REQUIRED NO_MODULE)
+    set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH})
+
+    include(KDEInstallDirs)
+    include(KDECMakeSettings)
+    include(KDECompilerSettings NO_POLICY_SCOPE)
+    include(ECMPackageConfigHelpers)
+    include(ECMMarkNonGuiExecutable)
+    include(CMakePackageConfigHelpers)
+    include(WriteBasicConfigVersionFile)
+    include(CheckIncludeFiles)
+    include(FeatureSummary)
+    include(ECMOptionalAddSubdirectory)
+    include(ECMQtDeclareLoggingCategory)
+    include(KDEPackageAppTemplates)
+    include(ECMMarkAsTest)
+
+    find_package(KF5 ${KF5_MIN_VERSION} REQUIRED COMPONENTS
+                Completion
+                Config
+                ConfigWidgets
+                CoreAddons
+                Crash
+                I18n
+                IdleTime
+                JobWidgets
+                KIO
+                Notifications
+                Service
+                Wallet
+                WidgetsAddons
+    )
+    find_package(KF5XmlRpcClient REQUIRED)
+
+    find_package(X11)
+    set_package_properties(X11 PROPERTIES DESCRIPTION "X11 libraries"
+                URL "http://www.x.org"
+                TYPE OPTIONAL
+                PURPOSE "Required for X11 support")
+
+    if(X11_FOUND)
+        find_package(Qt5 ${QT_MIN_VERSION} CONFIG REQUIRED COMPONENTS X11Extras)
+        set(HAVE_X11 1)
+    endif()
+
+    if(BUILD_TESTING)
+        find_package(Qt5 ${QT_MIN_VERSION} CONFIG REQUIRED COMPONENTS Concurrent Test)
+    endif()
+
+    configure_file(../config-X11.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-X11.h)
+endif()
+
 check_function_exists("strsignal" HAVE_STRSIGNAL)
 check_function_exists("uname" HAVE_UNAME)
 
@@ -114,3 +177,7 @@ if (HAVE_X11)
 endif()
 
 install(TARGETS drkonqi DESTINATION ${KDE_INSTALL_LIBEXECDIR})
+
+if ("${CMAKE_BINARY_DIR}" STREQUAL "${CMAKE_CURRENT_BINARY_DIR}")
+    feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES)
+endif()


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic