summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2009-06-28 23:14:33 +0200
committerAndrea Diamantini <adjam7@gmail.com>2009-06-28 23:14:33 +0200
commitc6f664ab7f5d474a6b080d091e7e8004f66e651e (patch)
tree8715fd7006f97c9d8c28d46c1d97ecd423801ade
parentFixing popup pos && removing unwanted statusBar (diff)
downloadrekonq-c6f664ab7f5d474a6b080d091e7e8004f66e651e.tar.xz
Fixing silly conditions on CMakeLists KDE version
check BUG: 198004
-rw-r--r--CMakeLists.txt66
-rw-r--r--src/CMakeLists.txt32
2 files changed, 50 insertions, 48 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 9b3d7ff4..f3383ed0 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -37,9 +37,22 @@ INCLUDE(FindPackageHandleStandardArgs)
INCLUDE(KDE4Defaults)
INCLUDE(MacroLibrary)
+# =================================================================================================
+# KDE Version
+
+if(${KDE_VERSION_MINOR} GREATER "2")
+ SET(KDE_OLD_VERSION false)
+else(${KDE_VERSION_MINOR} GREATER "2")
+ if(${KDE_VERSION_RELEASE} GREATER "69")
+ SET(KDE_OLD_VERSION false)
+ else(${KDE_VERSION_RELEASE} GREATER "69")
+ SET(KDE_OLD_VERSION true)
+ endif(${KDE_VERSION_RELEASE} GREATER "69")
+endif(${KDE_VERSION_MINOR} GREATER "2")
+# =================================================================================================
+
# --------------- KNetworkAccessManager
-if(${KDE_VERSION_MINOR} EQUAL "2" AND ${KDE_VERSION_RELEASE} GREATER "69")
-else(${KDE_VERSION_MINOR} EQUAL "2" AND ${KDE_VERSION_RELEASE} GREATER "69")
+if(KDE_OLD_VERSION)
find_package(KdeNetwork REQUIRED)
@@ -49,7 +62,8 @@ else(${KDE_VERSION_MINOR} EQUAL "2" AND ${KDE_VERSION_RELEASE} GREATER "69")
MESSAGE(STATUS " classes, instead of newly KIO::AccessManager. ")
MESSAGE(STATUS "")
-endif(${KDE_VERSION_MINOR} EQUAL "2" AND ${KDE_VERSION_RELEASE} GREATER "69")
+endif(KDE_OLD_VERSION)
+
# ==================================================================================================
@@ -110,21 +124,20 @@ ELSE(KDEWEBKIT_FOUND)
ENDIF(KDEWEBKIT_FOUND)
# --------------- KNetworkAccessManager
-if(${KDE_VERSION_MINOR} EQUAL "2" AND ${KDE_VERSION_RELEASE} GREATER "69")
-else(${KDE_VERSION_MINOR} EQUAL "2" AND ${KDE_VERSION_RELEASE} GREATER "69")
-MESSAGE(STATUS "")
-IF(KDENETWORK_FOUND)
- MESSAGE(STATUS " KDE Network library found............. YES")
-ELSE(KDENETWORK_FOUND)
- MESSAGE(STATUS " KDE Network library found............. NO")
- MESSAGE(STATUS "")
- MESSAGE(SEND_ERROR " rekonq needs, from version 0.2, KDENETWORK if compiled with a KDE version minor than 4.2.69 ")
- MESSAGE(STATUS " You can actually retrieve it from playground/libs/webkitkde/kdenetwork KDE svn")
- MESSAGE(STATUS "")
-ENDIF(KDENETWORK_FOUND)
-
-endif(${KDE_VERSION_MINOR} EQUAL "2" AND ${KDE_VERSION_RELEASE} GREATER "69")
+if(KDE_OLD_VERSION)
+ MESSAGE(STATUS "")
+ IF(KDENETWORK_FOUND)
+ MESSAGE(STATUS " KDE Network library found............. YES")
+ ELSE(KDENETWORK_FOUND)
+ MESSAGE(STATUS " KDE Network library found............. NO")
+ MESSAGE(STATUS "")
+ MESSAGE(SEND_ERROR " rekonq needs, from version 0.2, KDENETWORK if compiled with a KDE version minor than 4.2.69 ")
+ MESSAGE(STATUS " You can actually retrieve it from playground/libs/webkitkde/kdenetwork KDE svn")
+ MESSAGE(STATUS "")
+ ENDIF(KDENETWORK_FOUND)
+
+endif(KDE_OLD_VERSION)
MESSAGE(STATUS "")
MESSAGE(STATUS "----------------------------------------------------------------------------------")
@@ -133,28 +146,27 @@ MESSAGE(STATUS "")
##### FINAL RESULTS #####
-if(${KDE_VERSION_MINOR} EQUAL "2" AND ${KDE_VERSION_RELEASE} GREATER "69")
+if(KDE_OLD_VERSION)
- IF(QT_FOUND AND KDE4_FOUND AND KDEWEBKIT_FOUND)
+ IF(QT_FOUND AND KDE4_FOUND AND KDEWEBKIT_FOUND AND KDENETWORK_FOUND)
MESSAGE(STATUS " rekonq will be compiled............... YES")
SET(REKONQ_CAN_BE_COMPILED true)
- ELSE(QT_FOUND AND KDE4_FOUND AND KDEWEBKIT_FOUND)
+ ELSE(QT_FOUND AND KDE4_FOUND AND KDEWEBKIT_FOUND AND KDENETWORK_FOUND)
MESSAGE(FATAL_ERROR " rekonq will NOT be compiled!")
SET(REKONQ_CAN_BE_COMPILED false)
- ENDIF(QT_FOUND AND KDE4_FOUND AND KDEWEBKIT_FOUND)
+ ENDIF(QT_FOUND AND KDE4_FOUND AND KDEWEBKIT_FOUND AND KDENETWORK_FOUND)
-else(${KDE_VERSION_MINOR} EQUAL "2" AND ${KDE_VERSION_RELEASE} GREATER "69")
+else(KDE_OLD_VERSION)
- IF(QT_FOUND AND KDE4_FOUND AND KDEWEBKIT_FOUND AND KDENETWORK_FOUND)
+ IF(QT_FOUND AND KDE4_FOUND AND KDEWEBKIT_FOUND)
MESSAGE(STATUS " rekonq will be compiled............... YES")
SET(REKONQ_CAN_BE_COMPILED true)
- ELSE(QT_FOUND AND KDE4_FOUND AND KDEWEBKIT_FOUND AND KDENETWORK_FOUND)
+ ELSE(QT_FOUND AND KDE4_FOUND AND KDEWEBKIT_FOUND)
MESSAGE(FATAL_ERROR " rekonq will NOT be compiled!")
SET(REKONQ_CAN_BE_COMPILED false)
- ENDIF(QT_FOUND AND KDE4_FOUND AND KDEWEBKIT_FOUND AND KDENETWORK_FOUND)
-
-endif(${KDE_VERSION_MINOR} EQUAL "2" AND ${KDE_VERSION_RELEASE} GREATER "69")
+ ENDIF(QT_FOUND AND KDE4_FOUND AND KDEWEBKIT_FOUND)
+endif(KDE_OLD_VERSION)
MESSAGE(STATUS "")
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index ed3205b8..809e54af 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -1,14 +1,10 @@
### ------- SETTING REKONQ FILES..
-if(${KDE_VERSION_MINOR} EQUAL "2" AND ${KDE_VERSION_RELEASE} GREATER "69")
-
-SET( rekonq_NAM networkmanager.cpp )
-
-else(${KDE_VERSION_MINOR} EQUAL "2" AND ${KDE_VERSION_RELEASE} GREATER "69")
-
-SET( rekonq_NAM kaccessmanager.cpp )
-
-endif(${KDE_VERSION_MINOR} EQUAL "2" AND ${KDE_VERSION_RELEASE} GREATER "69")
+if(KDE_OLD_VERSION)
+ SET( rekonq_NAM kaccessmanager.cpp )
+else(KDE_OLD_VERSION)
+ SET( rekonq_NAM networkmanager.cpp )
+endif(KDE_OLD_VERSION)
SET( rekonq_SRCS
${rekonq_NAM}
@@ -66,13 +62,11 @@ INCLUDE_DIRECTORIES ( ${CMAKE_CURRENT_SOURCE_DIR}
${KDEWEBKIT_INCLUDE_DIR}
)
-if(${KDE_VERSION_MINOR} EQUAL "2" AND ${KDE_VERSION_RELEASE} GREATER "69")
-else(${KDE_VERSION_MINOR} EQUAL "2" AND ${KDE_VERSION_RELEASE} GREATER "69")
+if(KDE_OLD_VERSION)
INCLUDE_DIRECTORIES( ${KDENETWORK_INCLUDE_DIR} )
-endif(${KDE_VERSION_MINOR} EQUAL "2" AND ${KDE_VERSION_RELEASE} GREATER "69")
-
+endif(KDE_OLD_VERSION)
### -------------- ADDING DEFINITIONS...
@@ -81,13 +75,11 @@ ADD_DEFINITIONS ( ${KDE4_DEFINITIONS}
${KDEWEBKIT_DEFINITIONS}
)
-if(${KDE_VERSION_MINOR} EQUAL "2" AND ${KDE_VERSION_RELEASE} GREATER "69")
-else(${KDE_VERSION_MINOR} EQUAL "2" AND ${KDE_VERSION_RELEASE} GREATER "69")
+if(KDE_OLD_VERSION)
ADD_DEFINITIONS ( ${KDENETWORK_DEFINITIONS} )
-endif(${KDE_VERSION_MINOR} EQUAL "2" AND ${KDE_VERSION_RELEASE} GREATER "69")
-
+endif(KDE_OLD_VERSION)
### --------------- ADDING EXECUTABLE...
@@ -107,13 +99,11 @@ TARGET_LINK_LIBRARIES ( rekonq
${KDEWEBKIT_LIBRARIES}
)
-if(${KDE_VERSION_MINOR} EQUAL "2" AND ${KDE_VERSION_RELEASE} GREATER "69")
-else(${KDE_VERSION_MINOR} EQUAL "2" AND ${KDE_VERSION_RELEASE} GREATER "69")
+if(KDE_OLD_VERSION)
TARGET_LINK_LIBRARIES( ${KDENETWORK_LIBRARIES} )
-endif(${KDE_VERSION_MINOR} EQUAL "2" AND ${KDE_VERSION_RELEASE} GREATER "69")
-
+endif(KDE_OLD_VERSION)
### ------------ INSTALL FILES...