KDE/kdevplatform
Aleix Pol Gonzalez
aleixpol at gmail.com
Tue Aug 4 13:28:14 UTC 2009
SVN commit 1006807 by apol:
Un revert the FindKompare commit.
Fixed for 4.2 compilation. We have to use #if instead of #ifdef since HAVE_KOMPARE is a boolean value.
CCMAIL: kdevelop-devel at barney.cs.uni-potsdam.de
M +9 -1 CMakeLists.txt
A cmake/modules/FindKompare.cmake
A config-kdevplatform.h.cmake config-kdevplatform.h.cmake#1006599
M +0 -22 language/CMakeLists.txt
M +2 -1 language/codegen/komparesupport.cpp
M +4 -2 language/codegen/komparesupport.h
--- trunk/KDE/kdevplatform/CMakeLists.txt #1006806:1006807
@@ -14,13 +14,21 @@
find_package(KDE4 4.2.0 REQUIRED)
find_package(ZLIB REQUIRED)
+macro_optional_find_package(Kompare)
+macro_bool_to_01(KOMPARE_FOUND HAVE_KOMPARE)
+macro_log_feature(KOMPARE_FOUND "Kompare" "KPart to view file differences."
+ "http://www.caffeinated.me.uk/kompare/" FALSE ""
+ "Required for difference checking. From KDE SDK package.")
+configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/config-kdevplatform.h.cmake
+ ${CMAKE_CURRENT_BINARY_DIR}/config-kdevplatform.h )
+
include (KDE4Defaults)
include (MacroWriteBasicCMakeVersionFile)
include (MacroLibrary)
add_definitions (${QT_DEFINITIONS} ${KDE4_DEFINITIONS})
-include_directories(${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR} ${KDE4_INCLUDES} )
+include_directories(${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR} ${KDE4_INCLUDES} ${CMAKE_BINARY_DIR})
set(KDEVPLATFORM_LIB_VERSION 1.0.0)
set(KDEVPLATFORM_LIB_SOVERSION 1)
--- trunk/KDE/kdevplatform/language/CMakeLists.txt #1006806:1006807
@@ -121,28 +121,6 @@
highlighting/codehighlighting.cpp
)
-#Search for kompare to enable kompare support
-option(WITH_KOMPARE_PART "Search for the Kompare interface to enable KomparePart support" ON)
-set(ENABLE_KOMPARE ${WITH_KOMPARE_PART})
-if(WITH_KOMPARE_PART)
- set(ENABLE_KOMPARE FALSE)
- find_path(KOMPARE_INCLUDES kompareinterface.h HINTS ${KDE4_INCLUDE_DIR}/kompare)
- if(KOMPARE_INCLUDES AND ${KDE_VERSION} VERSION_GREATER 4.3.0)
- message(OK)
- set(ENABLE_KOMPARE TRUE)
- endif(KOMPARE_INCLUDES AND ${KDE_VERSION} VERSION_GREATER 4.3.0)
-endif(WITH_KOMPARE_PART)
-
-macro_log_feature(KOMPARE_INCLUDES "Kompare Part" "Enhance code generation user feedback" "" FALSE)
-if(ENABLE_KOMPARE)
- message(STATUS "Kompare interfaces FOUND. Enabling Kompare Support ")
- add_definitions(-DKOMPARE_ENABLED=true)
-else(ENABLE_KOMPARE)
- message(STATUS "Kompare interfaces NOT FOUND. Kompare Support cannot be enabled")
- add_definitions(-DKOMPARE_ENABLED=false)
-endif(ENABLE_KOMPARE)
-
-
set( kdevplatformlanguage_LIB_UI
codegen/ui/newclass.ui
codegen/ui/overridevirtuals.ui
--- trunk/KDE/kdevplatform/language/codegen/komparesupport.cpp #1006806:1006807
@@ -18,8 +18,9 @@
*/
#include "komparesupport.h"
+#include <config-kdevplatform.h>
-#if KOMPARE_ENABLED == true
+#if HAVE_KOMPARE
#include <stddef.h>
#include <cstddef>
--- trunk/KDE/kdevplatform/language/codegen/komparesupport.h #1006806:1006807
@@ -20,6 +20,8 @@
#ifndef KOMPARESUPPORT_H
#define KOMPARESUPPORT_H
+#include <config-kdevplatform.h>
+
class QWidget;
class QString;
@@ -31,8 +33,8 @@
class KompareWidgets
{
public:
- static const bool enabled = KOMPARE_ENABLED;
-
+ static const bool enabled = HAVE_KOMPARE;
+
KompareWidgets();
~KompareWidgets();
More information about the KDevelop-devel
mailing list