yade-dev team mailing list archive
-
yade-dev team
-
Mailing list archive
-
Message #12671
[Branch ~yade-pkg/yade/git-trunk] Rev 3865: Split QGLViewer.cmake on qt4 and qt5 versions.
------------------------------------------------------------
revno: 3865
committer: Anton Gladky <gladky.anton@xxxxxxxxx>
timestamp: Thu 2016-05-19 22:53:18 +0200
message:
Split QGLViewer.cmake on qt4 and qt5 versions.
Qt4 support will be completely removed after the next
stable Yade release.
removed:
cMake/FindQGLVIEWER.cmake
added:
cMake/FindQGLVIEWER-qt4.cmake
cMake/FindQGLVIEWER-qt5.cmake
modified:
CMakeLists.txt
--
lp:yade
https://code.launchpad.net/~yade-pkg/yade/git-trunk
Your team Yade developers is subscribed to branch lp:yade.
To unsubscribe from this branch go to https://code.launchpad.net/~yade-pkg/yade/git-trunk/+edit-subscription
=== modified file 'CMakeLists.txt'
--- CMakeLists.txt 2016-05-11 19:09:20 +0000
+++ CMakeLists.txt 2016-05-19 20:53:18 +0000
@@ -223,9 +223,9 @@
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 @@
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})
=== added file 'cMake/FindQGLVIEWER-qt4.cmake'
--- cMake/FindQGLVIEWER-qt4.cmake 1970-01-01 00:00:00 +0000
+++ cMake/FindQGLVIEWER-qt4.cmake 2016-05-19 20:53:18 +0000
@@ -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)
=== added file 'cMake/FindQGLVIEWER-qt5.cmake'
--- cMake/FindQGLVIEWER-qt5.cmake 1970-01-01 00:00:00 +0000
+++ cMake/FindQGLVIEWER-qt5.cmake 2016-05-19 20:53:18 +0000
@@ -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)
=== removed file 'cMake/FindQGLVIEWER.cmake'
--- cMake/FindQGLVIEWER.cmake 2015-08-28 19:31:57 +0000
+++ cMake/FindQGLVIEWER.cmake 1970-01-01 00:00:00 +0000
@@ -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)