made dependency on KF5::FrameworkIntegration optional

wilder-pre-rebase
Hugo Pereira Da Costa 12 years ago
parent 319e9eed65
commit 497ff0429b
  1. 21
      kstyle/CMakeLists.txt
  2. 2
      kstyle/breezestyle.cpp
  3. 4
      kstyle/breezestyle.h
  4. 7
      kstyle/config-breeze.h.cmake

@ -27,6 +27,7 @@ if(BREEZE_USE_KDE4)
find_package(PkgConfig REQUIRED)
pkg_check_modules(XCB xcb x11-xcb)
set(BREEZE_HAVE_X11 ${XCB_FOUND})
set(BREEZE_HAVE_KSTYLE FALSE)
else()
@ -34,10 +35,20 @@ else()
find_package(KF5 REQUIRED COMPONENTS
I18n
Config
Completion
FrameworkIntegration
ConfigWidgets
WindowSystem)
find_package( KF5FrameworkIntegration CONFIG )
set_package_properties(KF5FrameworkIntegration PROPERTIES
DESCRIPTION "KF4 FrameworkIntegration framework"
URL "http://xcb.freedesktop.org"
TYPE OPTIONAL
PURPOSE "Required to use KStyle convenience functionalities in style"
)
set(BREEZE_HAVE_KSTYLE ${KF5FrameworkIntegration_FOUND})
find_package(XCB COMPONENTS XCB)
set_package_properties(XCB PROPERTIES
DESCRIPTION "X protocol C-language Binding"
@ -123,7 +134,11 @@ else()
kconfig_add_kcfg_files(breeze_PART_SRCS breezestyleconfigdata.kcfgc)
add_library(breeze MODULE ${breeze_PART_SRCS})
target_link_libraries(breeze Qt5::Core Qt5::Gui Qt5::Widgets Qt5::DBus)
target_link_libraries(breeze KF5::ConfigCore KF5::ConfigWidgets KF5::GuiAddons KF5::Style KF5::WindowSystem)
target_link_libraries(breeze KF5::ConfigCore KF5::ConfigWidgets KF5::GuiAddons KF5::WindowSystem)
if( KF5FrameworkIntegration_FOUND )
target_link_libraries(breeze KF5::Style)
endif()
if (WIN32)
# As stated in http://msdn.microsoft.com/en-us/library/4hwaceh6.aspx M_PI only gets defined

@ -170,7 +170,7 @@ namespace Breeze
, _splitterFactory( new SplitterFactory( this ) )
, _widgetExplorer( new WidgetExplorer( this ) )
, _tabBarData( new BreezePrivate::TabBarData( this ) )
#if !BREEZE_USE_KDE4
#if BREEZE_HAVE_KSTYLE
, SH_ArgbDndWindow( newStyleHint( QStringLiteral( "SH_ArgbDndWindow" ) ) )
, CE_CapacityBar( newControlElement( QStringLiteral( "CE_CapacityBar" ) ) )
#endif

@ -23,7 +23,9 @@
#include "breeze.h"
#include "config-breeze.h"
#if BREEZE_HAVE_KSTYLE
#include <KStyle>
#endif
#include <QAbstractItemView>
#include <QAbstractScrollArea>
@ -54,7 +56,7 @@ namespace Breeze
class WindowManager;
//* convenience typedef for base class
#if BREEZE_USE_KDE4
#if BREEZE_USE_KDE4 || !BREEZE_HAVE_KSTYLE
using ParentStyleClass = QCommonStyle;
#else
using ParentStyleClass = KStyle;

@ -22,10 +22,13 @@
#ifndef config_breeze_h
#define config_breeze_h
/* Define to 1 if you compile against KDE4*/
/* Define to 1 if breeze is compiled against KDE4 */
#cmakedefine01 BREEZE_USE_KDE4
/* Define to 1 if you have XCB libraries */
/* Define to 1 if FrameworkIntegration/Kstyle libraries are found */
#cmakedefine01 BREEZE_HAVE_KSTYLE
/* Define to 1 if XCB libraries are found */
#cmakedefine01 BREEZE_HAVE_X11
#endif

Loading…
Cancel
Save