[Pkg-owncloud-commits] [owncloud-client] 299/470: CMakeLists: fix Qt4 build

Sandro Knauß hefee-guest at moszumanska.debian.org
Thu May 12 16:25:16 UTC 2016


This is an automated email from the git hooks/post-receive script.

hefee-guest pushed a commit to branch master
in repository owncloud-client.

commit f8dc263338fe1c021de81f8774f5d7ad416a5947
Author: Olivier Goffart <ogoffart at woboq.com>
Date:   Mon Apr 11 15:25:49 2016 +0200

    CMakeLists: fix Qt4 build
    
    Only the src subdirectory needs Qt.
    Otherwise it activates Qt4 also for the dolphin plugin which always need Qt5
---
 CMakeLists.txt     | 22 +---------------------
 src/CMakeLists.txt | 14 ++++++++++++++
 2 files changed, 15 insertions(+), 21 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 853be4e..356798a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -30,7 +30,7 @@ endif()
 include(Warnings)
 
 include(${CMAKE_SOURCE_DIR}/VERSION.cmake)
-include_directories(BEFORE ${CMAKE_CURRENT_BINARY_DIR} "${CMAKE_CURRENT_BINARY_DIR}/src/mirall/")
+include_directories(BEFORE ${CMAKE_CURRENT_BINARY_DIR})
 
 # disable the crashreporter if libcrashreporter-qt is not available or we're building for ARM
 if( CMAKE_SYSTEM_PROCESSOR MATCHES "arm" OR NOT EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/src/3rdparty/libcrashreporter-qt/CMakeLists.txt")
@@ -51,9 +51,7 @@ endif()
 
 include(GNUInstallDirs)
 include(DefineInstallationPaths)
-include(QtVersionAbstraction)
 
-setup_qt()
 
 include(GetGitRevisionDescription)
 
@@ -126,24 +124,6 @@ if(APPLE)
   set( SOCKETAPI_TEAM_IDENTIFIER_PREFIX "" CACHE STRING "SocketApi prefix (including a following dot) that must match the codesign key's TeamIdentifier/Organizational Unit" )
 endif()
 
-#### find libs
-#find_package(Qt4 4.7.0 COMPONENTS QtCore QtGui QtXml QtNetwork QtTest QtWebkit REQUIRED )
-#if( UNIX AND NOT APPLE ) # Fdo notifications
-#    find_package(Qt4 4.7.0 COMPONENTS QtDBus REQUIRED )
-#endif()
-
-
-if(HAVE_QT5)
-  if (${Qt5Core_VERSION_MAJOR} EQUAL "5")
-    if (${Qt5Core_VERSION_MINOR} EQUAL "4" OR ${Qt5Core_VERSION_MINOR} GREATER 4)
-    else()
-      message(STATUS "If possible compile me with Qt 5.4 or higher.")
-    endif()
-  endif()
-else()
-  message(STATUS "If possible compile me with Qt 5.4 or higher.")
-endif()
-
 find_package(OpenSSL 1.0.0 REQUIRED)
 
 if(NOT TOKEN_AUTH_ONLY)
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 3645ba4..923c5b3 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -5,6 +5,20 @@ set(BIN_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin")
 
 set(synclib_NAME ${APPLICATION_EXECUTABLE}sync)
 
+include(QtVersionAbstraction)
+setup_qt()
+if(HAVE_QT5 AND NOT BUILD_WITH_QT4)
+  if (${Qt5Core_VERSION_MAJOR} EQUAL "5")
+    if (${Qt5Core_VERSION_MINOR} EQUAL "4" OR ${Qt5Core_VERSION_MINOR} GREATER 4)
+    else()
+      message(STATUS "If possible compile me with Qt 5.4 or higher.")
+    endif()
+  endif()
+else()
+  message(STATUS "If possible compile me with Qt 5.4 or higher.")
+endif()
+
+
 if (APPLE)
     set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++")
 endif()

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud-client.git



More information about the Pkg-owncloud-commits mailing list