Commit 2a9a603b authored by Anton Gladky's avatar Anton Gladky

Update dependencies for libqglviewer-dev-qt5.

parent 0fad958e
......@@ -18,7 +18,7 @@ Build-Depends: cmake,
libloki-dev,
libmetis-dev [amd64 i386 powerpc],
libopenblas-dev [amd64 i386 powerpc],
libqglviewer-dev,
libqglviewer-dev-qt5,
libsuitesparse-dev [amd64 i386 powerpc],
libvtk6-dev,
libxi-dev,
......
From 01fea359c04d08f93d2feddcd07b31bc794dbb37 Mon Sep 17 00:00:00 2001
From: Anton Gladky <gladky.anton@gmail.com>
Date: Thu, 19 May 2016 22:51:22 +0200
Subject: [PATCH] Split QGLViewer.cmake on qt4 and qt5 versions.
Qt4 support will be completely removed after the next
stable Yade release.
---
CMakeLists.txt | 3 ++-
cMake/FindQGLVIEWER-qt4.cmake | 24 ++++++++++++++++++++++++
cMake/FindQGLVIEWER-qt5.cmake | 24 ++++++++++++++++++++++++
cMake/FindQGLVIEWER.cmake | 25 -------------------------
4 files changed, 50 insertions(+), 26 deletions(-)
create mode 100644 cMake/FindQGLVIEWER-qt4.cmake
create mode 100644 cMake/FindQGLVIEWER-qt5.cmake
delete mode 100644 cMake/FindQGLVIEWER.cmake
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 952a3be..44ca9cc 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -223,9 +223,9 @@ IF(ENABLE_GUI)
FIND_PACKAGE(OpenGL)
FIND_PACKAGE(GLUT)
FIND_PACKAGE(glib2)
- FIND_PACKAGE(QGLVIEWER)
IF(USE_QT5)
+ FIND_PACKAGE(QGLVIEWER-qt5 REQUIRED)
FIND_PACKAGE(Qt5 CONFIG REQUIRED Widgets Xml OpenGL)
SET(CMAKE_AUTOMOC ON)
FIND_PACKAGE(Qt5Widgets)
@@ -242,6 +242,7 @@ IF(ENABLE_GUI)
SET(ENABLE_GUI OFF)
ENDIF(Qt5Widgets_FOUND AND OPENGL_FOUND AND GLUT_FOUND AND GLIB2_FOUND AND QGLVIEWER_FOUND)
ELSE(USE_QT5) # Use Qt4
+ FIND_PACKAGE(QGLVIEWER-qt4 REQUIRED)
FIND_PACKAGE(Qt4 COMPONENTS QtCore QtGui QtOpenGL)
IF(QT4_FOUND AND OPENGL_FOUND AND GLUT_FOUND AND GLIB2_FOUND AND QGLVIEWER_FOUND)
SET(GUI_LIBS ${GLUT_LIBRARY} ${OPENGL_LIBRARY} ${QGLVIEWER_LIBRARIES})
diff --git a/cMake/FindQGLVIEWER-qt4.cmake b/cMake/FindQGLVIEWER-qt4.cmake
new file mode 100644
index 0000000..c196ff2
--- /dev/null
+++ b/cMake/FindQGLVIEWER-qt4.cmake
@@ -0,0 +1,24 @@
+# - Try to find QGLViewer
+# Once done this will define
+#
+# QGLVIEWER_FOUND - system has QGLViewer
+# QGLVIEWER_INCLUDE_DIR - the QGLViewer include directory
+# QGLVIEWER_LIBRARIES - Link these to use QGLViewer
+
+find_path(QGLVIEWER_INCLUDE_DIR
+ NAMES qglviewer.h
+ PATHS /usr/include/QGLViewer
+ )
+
+find_library(QGLVIEWER_LIBRARIES
+ NAMES QGLViewer QGLViewer-qt4
+)
+
+IF(QGLVIEWER_INCLUDE_DIR AND QGLVIEWER_LIBRARIES)
+ SET(QGLVIEWER_FOUND TRUE)
+ SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DQGLVIEWER_FOUND")
+ENDIF(QGLVIEWER_INCLUDE_DIR AND QGLVIEWER_LIBRARIES)
+
+
+include(FindPackageHandleStandardArgs)
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(QGLVIEWER-qt4 DEFAULT_MSG QGLVIEWER_INCLUDE_DIR QGLVIEWER_LIBRARIES)
diff --git a/cMake/FindQGLVIEWER-qt5.cmake b/cMake/FindQGLVIEWER-qt5.cmake
new file mode 100644
index 0000000..bbd15f9
--- /dev/null
+++ b/cMake/FindQGLVIEWER-qt5.cmake
@@ -0,0 +1,24 @@
+# - Try to find QGLViewer
+# Once done this will define
+#
+# QGLVIEWER_FOUND - system has QGLViewer
+# QGLVIEWER_INCLUDE_DIR - the QGLViewer include directory
+# QGLVIEWER_LIBRARIES - Link these to use QGLViewer
+
+find_path(QGLVIEWER_INCLUDE_DIR
+ NAMES qglviewer.h
+ PATHS /usr/include/QGLViewer
+ )
+
+find_library(QGLVIEWER_LIBRARIES
+ NAMES QGLViewer QGLViewer-qt5
+)
+
+IF(QGLVIEWER_INCLUDE_DIR AND QGLVIEWER_LIBRARIES)
+ SET(QGLVIEWER_FOUND TRUE)
+ SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DQGLVIEWER_FOUND")
+ENDIF(QGLVIEWER_INCLUDE_DIR AND QGLVIEWER_LIBRARIES)
+
+
+include(FindPackageHandleStandardArgs)
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(QGLVIEWER-qt5 DEFAULT_MSG QGLVIEWER_INCLUDE_DIR QGLVIEWER_LIBRARIES)
diff --git a/cMake/FindQGLVIEWER.cmake b/cMake/FindQGLVIEWER.cmake
deleted file mode 100644
index d7aeef6..0000000
--- a/cMake/FindQGLVIEWER.cmake
+++ /dev/null
@@ -1,25 +0,0 @@
-# - Try to find QGLViewer
-# Once done this will define
-#
-# QGLVIEWER_FOUND - system has QGLViewer
-# QGLVIEWER_INCLUDE_DIR - the QGLViewer include directory
-# QGLVIEWER_LIBRARIES - Link these to use QGLViewer
-
-find_path(QGLVIEWER_INCLUDE_DIR
- NAMES qglviewer.h
- PATHS /usr/include/QGLViewer
- )
-
-find_library(QGLVIEWER_LIBRARIES
- NAMES QGLViewer QGLViewer-qt4
-)
-
-IF(QGLVIEWER_INCLUDE_DIR AND QGLVIEWER_LIBRARIES)
- SET(QGLVIEWER_FOUND TRUE)
- SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DQGLVIEWER_FOUND")
-ENDIF(QGLVIEWER_INCLUDE_DIR AND QGLVIEWER_LIBRARIES)
-
-
-
-include(FindPackageHandleStandardArgs)
-FIND_PACKAGE_HANDLE_STANDARD_ARGS(QGLVIEWER DEFAULT_MSG QGLVIEWER_INCLUDE_DIR QGLVIEWER_LIBRARIES)
01_remove_google_analytics.patch
02_FixMatplotLibWarning.patch
01fea359c04d08f93d2feddcd07b31bc794dbb37.patch
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment