yade-dev team mailing list archive
-
yade-dev team
-
Mailing list archive
-
Message #12367
[Branch ~yade-pkg/yade/git-trunk] Rev 3718: Fix Qt5 compilation.
------------------------------------------------------------
revno: 3718
committer: Anton Gladky <gladky.anton@xxxxxxxxx>
timestamp: Fri 2015-08-28 21:31:57 +0200
message:
Fix Qt5 compilation.
modified:
cMake/FindQGLVIEWER.cmake
gui/CMakeLists.txt
gui/qt5/SerializableEditor.py
--
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 'cMake/FindQGLVIEWER.cmake'
--- cMake/FindQGLVIEWER.cmake 2015-07-01 08:39:26 +0000
+++ cMake/FindQGLVIEWER.cmake 2015-08-28 19:31:57 +0000
@@ -4,59 +4,22 @@
# QGLVIEWER_FOUND - system has QGLViewer
# QGLVIEWER_INCLUDE_DIR - the QGLViewer include directory
# QGLVIEWER_LIBRARIES - Link these to use QGLViewer
-# QGLVIEWER_DEFINITIONS - Compiler switches required for using QGLViewer
-#
find_path(QGLVIEWER_INCLUDE_DIR
- NAMES QGLViewer/qglviewer.h
- PATHS /usr/include
- /usr/local/include
- ENV QGLVIEWERROOT
+ NAMES qglviewer.h
+ PATHS /usr/include/QGLViewer
)
-find_library(QGLVIEWER_LIBRARY_RELEASE
- NAMES QGLViewer-qt4 qglviewer QGLViewer QGLViewer2
- PATHS /usr/lib
- /usr/local/lib
- ENV QGLVIEWERROOT
- ENV LD_LIBRARY_PATH
- ENV LIBRARY_PATH
- PATH_SUFFIXES QGLViewer QGLViewer/release
- )
-
-find_library(QGLVIEWER_LIBRARY_DEBUG
- NAMES dqglviewer dQGLViewer dQGLViewer2
- PATHS /usr/lib
- /usr/local/lib
- ENV QGLVIEWERROOT
- ENV LD_LIBRARY_PATH
- ENV LIBRARY_PATH
- PATH_SUFFIXES QGLViewer QGLViewer/debug
- )
-
-if(QGLVIEWER_LIBRARY_RELEASE)
- if(QGLVIEWER_LIBRARY_DEBUG)
- set(QGLVIEWER_LIBRARIES_ optimized ${QGLVIEWER_LIBRARY_RELEASE} debug ${QGLVIEWER_LIBRARY_DEBUG})
- else()
- set(QGLVIEWER_LIBRARIES_ ${QGLVIEWER_LIBRARY_RELEASE})
- endif()
-
- set(QGLVIEWER_LIBRARIES ${QGLVIEWER_LIBRARIES_} CACHE FILEPATH "The QGLViewer library")
-
-endif()
+find_library(QGLVIEWER_LIBRARIES
+ NAMES QGLViewer
+)
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)
-IF(QGLVIEWER_FOUND)
- IF(NOT QGLViewer_FIND_QUIETLY)
- MESSAGE(STATUS "Found QGLViewer: ${QGLVIEWER_LIBRARIES}")
- ENDIF(NOT QGLViewer_FIND_QUIETLY)
-ELSE(QGLVIEWER_FOUND)
- IF(QGLViewer_FIND_REQUIRED)
- MESSAGE(FATAL_ERROR "Could not find QGLViewer")
- ENDIF(QGLViewer_FIND_REQUIRED)
-ENDIF(QGLVIEWER_FOUND)
-
+
+
+include(FindPackageHandleStandardArgs)
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(QGLVIEWER DEFAULT_MSG QGLVIEWER_INCLUDE_DIR QGLVIEWER_LIBRARIES)
=== modified file 'gui/CMakeLists.txt'
--- gui/CMakeLists.txt 2015-08-27 09:47:22 +0000
+++ gui/CMakeLists.txt 2015-08-28 19:31:57 +0000
@@ -4,6 +4,7 @@
SET(CMAKE_AUTOMOC ON)
SET(_GLViewer_SOURCE_FILES qt5/GLViewer.cpp;qt5/_GLViewer.cpp;qt5/OpenGLManager.cpp;qt5/GLViewerDisplay.cpp;qt5/GLViewerMouse.cpp)
ADD_LIBRARY(_GLViewer SHARED ${_GLViewer_SOURCE_FILES})
+ SET_TARGET_PROPERTIES(_GLViewer PROPERTIES PREFIX "")
TARGET_LINK_LIBRARIES(_GLViewer Qt5::Widgets Qt5::Xml Qt5::OpenGL
${GLUT_LIBRARY} ${OPENGL_LIBRARY}
${QGLVIEWER_LIBRARIES}
=== modified file 'gui/qt5/SerializableEditor.py'
--- gui/qt5/SerializableEditor.py 2015-06-26 20:19:22 +0000
+++ gui/qt5/SerializableEditor.py 2015-08-28 19:31:57 +0000
@@ -2,6 +2,7 @@
from PyQt5.QtCore import *
from PyQt5.QtGui import *
from PyQt5 import QtGui
+from PyQt5.QtWidgets import *
import re,itertools
import logging