Skip to content

Commit

Permalink
Remove our dependency on Qt Charts.
Browse files Browse the repository at this point in the history
  • Loading branch information
agarny committed Aug 6, 2017
1 parent 466a886 commit 32db84c
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 388 deletions.
35 changes: 8 additions & 27 deletions CMakeLists.txt
Expand Up @@ -11,7 +11,6 @@ OPTION(ENABLE_TEST_PLUGINS "Enable the test plugins to be built" OFF)
OPTION(ENABLE_TESTS "Enable the tests to be built" OFF)

OPTION(USE_PREBUILT_MESA_PACKAGE "Use the pre-built version of the Mesa package" ON)
OPTION(USE_PREBUILT_QTCHARTS_PACKAGE "Use the pre-built version of the QtCharts package" ON)
OPTION(USE_PREBUILT_QTWEBKIT_PACKAGE "Use the pre-built version of the QtWebKit package" ON)

OPTION(USE_PREBUILT_BIOSIGNALMLAPI_PACKAGE "Use the pre-built version of the BioSignalML API package" ON)
Expand Down Expand Up @@ -273,9 +272,8 @@ IF(WIN32)
SET(ICU_VERSION 57)
ENDIF()

# Retrieve or build our copy of Qt Charts and QtWebKit
# Retrieve or build our copy of QtWebKit

ADD_SUBDIRECTORY(src/3rdparty/QtCharts)
ADD_SUBDIRECTORY(src/3rdparty/QtWebKit)

# Required Qt modules
Expand All @@ -286,12 +284,6 @@ ELSE()
SET(TEST)
ENDIF()

IF(USE_PREBUILT_QTCHARTS_PACKAGE)
SET(CHARTS Charts)
ELSE()
SET(CHARTS)
ENDIF()

IF(USE_PREBUILT_QTWEBKIT_PACKAGE)
SET(WEBKIT WebKit)
SET(WEBKITWIDGETS WebKitWidgets)
Expand Down Expand Up @@ -327,12 +319,6 @@ IF(APPLE)
SET(QTTEST)
ENDIF()

IF(USE_PREBUILT_QTCHARTS_PACKAGE)
SET(QTCHARTS QtCharts)
ELSE()
SET(QTCHARTS)
ENDIF()

IF(USE_PREBUILT_QTWEBKIT_PACKAGE)
SET(QTWEBKIT QtWebKit)
SET(QTWEBKITWIDGETS QtWebKitWidgets)
Expand All @@ -342,7 +328,6 @@ IF(APPLE)
ENDIF()

SET(MACOS_QT_LIBRARIES
${QTCHARTS}
QtCLucene
QtConcurrent
QtCore
Expand Down Expand Up @@ -864,11 +849,9 @@ SET(PLUGINS
widget/ZincWidget
)

IF( NOT USE_PREBUILT_QTCHARTS_PACKAGE
OR NOT USE_PREBUILT_QTWEBKIT_PACKAGE)
# We want to build our copy of the QtCharts and/or QtWebKit package, so
# don't build any plugins since some of them may require access to Qt
# Charts and/or QtWebKit
IF(NOT USE_PREBUILT_QTWEBKIT_PACKAGE)
# We want to build our copy of the QtWebKit package, so don't build any
# plugins since some of them may require access to QtWebKit

SET(PLUGINS)
ENDIF()
Expand Down Expand Up @@ -1174,7 +1157,7 @@ IF(WIN32)

# Qt libraries required by OpenCOR

FOREACH(QT_LIBRARY ${CHARTS} CLucene Core Gui Help Multimedia MultimediaWidgets Network OpenGL Positioning PrintSupport Qml Quick Sensors Sql Svg ${TEST} WebChannel ${WEBKIT} ${WEBKITWIDGETS} Widgets Xml XmlPatterns)
FOREACH(QT_LIBRARY CLucene Core Gui Help Multimedia MultimediaWidgets Network OpenGL Positioning PrintSupport Qml Quick Sensors Sql Svg ${TEST} WebChannel ${WEBKIT} ${WEBKITWIDGETS} Widgets Xml XmlPatterns)
WINDOWS_DEPLOY_QT_LIBRARY(Qt5${QT_LIBRARY})
ENDFOREACH()

Expand Down Expand Up @@ -1312,11 +1295,9 @@ ELSE()
# unnecessarily cumbersome to use, it's better to deploy one Qt
# library at a time...

FOREACH(QT_LIBRARY ${CHARTS} CLucene Core DBus Gui Help Multimedia MultimediaWidgets Network OpenGL Positioning PrintSupport Qml Quick Sensors Sql Svg ${TEST} WebChannel ${WEBKIT} ${WEBKITWIDGETS} Widgets XcbQpa Xml XmlPatterns)
IF("${QT_LIBRARY}" STREQUAL "${CHARTS}")
SET(REAL_QT_LIBRARY_DIR ${QTCHARTS_LIBRARIES_DIR})
ELSEIF( "${QT_LIBRARY}" STREQUAL "${WEBKIT}"
OR "${QT_LIBRARY}" STREQUAL "${WEBKITWIDGETS}")
FOREACH(QT_LIBRARY CLucene Core DBus Gui Help Multimedia MultimediaWidgets Network OpenGL Positioning PrintSupport Qml Quick Sensors Sql Svg ${TEST} WebChannel ${WEBKIT} ${WEBKITWIDGETS} Widgets XcbQpa Xml XmlPatterns)
IF( "${QT_LIBRARY}" STREQUAL "${WEBKIT}"
OR "${QT_LIBRARY}" STREQUAL "${WEBKITWIDGETS}")
SET(REAL_QT_LIBRARY_DIR ${QTWEBKIT_LIBRARIES_DIR})
ELSE()
SET(REAL_QT_LIBRARY_DIR ${QT_LIBRARY_DIR})
Expand Down
22 changes: 9 additions & 13 deletions cmake/common.cmake
Expand Up @@ -45,9 +45,9 @@ ENDMACRO()

MACRO(BUILD_PATCHCMAKE)
# Try to build our patch CMake program

SET(PATCH ${CMAKE_BINARY_DIR}/patchcmake${CMAKE_EXECUTABLE_SUFFIX})

IF(NOT EXISTS ${PATH})
SET(PATCH_SOURCE ${CMAKE_SOURCE_DIR}/cmake/patchcmake.c)

Expand Down Expand Up @@ -569,13 +569,11 @@ MACRO(WINDOWS_DEPLOY_QT_LIBRARY LIBRARY_NAME)
# test things both from within Qt Creator and without first having to deploy
# OpenCOR

IF( "${LIBRARY_NAME}" STREQUAL "Qt5Charts")
SET(REAL_QT_BINARY_DIR ${QTCHARTS_BINARIES_DIR})
ELSEIF( "${LIBRARY_NAME}" STREQUAL "Qt5WebKit"
OR "${LIBRARY_NAME}" STREQUAL "Qt5WebKitWidgets"
OR "${LIBRARY_NAME}" STREQUAL "icudt${ICU_VERSION}"
OR "${LIBRARY_NAME}" STREQUAL "icuin${ICU_VERSION}"
OR "${LIBRARY_NAME}" STREQUAL "icuuc${ICU_VERSION}")
IF( "${LIBRARY_NAME}" STREQUAL "Qt5WebKit"
OR "${LIBRARY_NAME}" STREQUAL "Qt5WebKitWidgets"
OR "${LIBRARY_NAME}" STREQUAL "icudt${ICU_VERSION}"
OR "${LIBRARY_NAME}" STREQUAL "icuin${ICU_VERSION}"
OR "${LIBRARY_NAME}" STREQUAL "icuuc${ICU_VERSION}")
SET(REAL_QT_BINARY_DIR ${QTWEBKIT_BINARIES_DIR})
ELSE()
SET(REAL_QT_BINARY_DIR ${QT_BINARY_DIR})
Expand Down Expand Up @@ -777,10 +775,8 @@ MACRO(MACOS_DEPLOY_QT_LIBRARY LIBRARY_NAME)

SET(QT_FRAMEWORK_DIR ${LIBRARY_NAME}.framework/Versions/${QT_VERSION_MAJOR})

IF("${LIBRARY_NAME}" STREQUAL "${QTCHARTS}")
SET(REAL_QT_LIBRARY_DIR ${QTCHARTS_LIBRARIES_DIR})
ELSEIF( "${LIBRARY_NAME}" STREQUAL "${QTWEBKIT}"
OR "${LIBRARY_NAME}" STREQUAL "${QTWEBKITWIDGETS}")
IF( "${LIBRARY_NAME}" STREQUAL "${QTWEBKIT}"
OR "${LIBRARY_NAME}" STREQUAL "${QTWEBKITWIDGETS}")
SET(REAL_QT_LIBRARY_DIR ${QTWEBKIT_LIBRARIES_DIR})
ELSE()
SET(REAL_QT_LIBRARY_DIR ${QT_LIBRARY_DIR})
Expand Down
2 changes: 1 addition & 1 deletion doc/downloads/index.js
Expand Up @@ -37,7 +37,7 @@ var jsonData = { "versions": [
}
],
"changes": [
{ "change": "<strong>Third-party libraries:</strong> upgraded <a href=\"https://libgit2.github.com/\">libgit2</a> to version 0.26 (see issue <a href=\"https://github.com/opencor/opencor/issues/1340\">#1340</a>). Added <a href=\"http://code.qt.io/cgit/qt/qtcharts.git/tree/\">Qt Charts</a> as a package (see issue <a href=\"https://github.com/opencor/opencor/issues/1342\">#1342</a>)." }
{ "change": "<strong>Third-party libraries:</strong> upgraded <a href=\"https://libgit2.github.com/\">libgit2</a> to version 0.26 (see issue <a href=\"https://github.com/opencor/opencor/issues/1340\">#1340</a>)." }
]
},
{ "major": 0, "minor": 4, "patch": 1, "day": 20, "month": 5, "year": 2015, "type": 0,
Expand Down
230 changes: 0 additions & 230 deletions src/3rdparty/QtCharts/CMakeLists.txt

This file was deleted.

0 comments on commit 32db84c

Please sign in to comment.