From 0f3169644d3a0ce02cf8979862f7a01e7b3a1878 Mon Sep 17 00:00:00 2001 From: Lars Bilke <lars.bilke@ufz.de> Date: Mon, 19 Dec 2016 12:50:20 +0100 Subject: [PATCH] [CMake] Update cmake scripts for qt5. --- Applications/DataExplorer/Base/CMakeLists.txt | 2 +- Applications/DataExplorer/DataExplorer.cmake | 8 ++++---- .../DataExplorer/DataView/CMakeLists.txt | 2 +- .../DataView/DiagramView/CMakeLists.txt | 2 +- .../DataView/StratView/CMakeLists.txt | 2 +- Applications/DataExplorer/VtkAct/CMakeLists.txt | 2 +- Applications/DataExplorer/VtkVis/CMakeLists.txt | 2 +- Applications/FileIO/CMakeLists.txt | 4 ++-- Applications/Utils/FileConverter/CMakeLists.txt | 2 +- BaseLib/CMakeLists.txt | 4 ++-- GeoLib/CMakeLists.txt | 4 ++-- Tests/CMakeLists.txt | 2 +- scripts/cmake/Find.cmake | 16 ++++++++-------- 13 files changed, 26 insertions(+), 26 deletions(-) diff --git a/Applications/DataExplorer/Base/CMakeLists.txt b/Applications/DataExplorer/Base/CMakeLists.txt index 9be3da3231e..0f05dccec88 100644 --- a/Applications/DataExplorer/Base/CMakeLists.txt +++ b/Applications/DataExplorer/Base/CMakeLists.txt @@ -37,7 +37,7 @@ add_library(QtBase ) target_link_libraries(QtBase - Qt4::QtGui + Qt5::Gui GeoLib) set_property(TARGET QtBase PROPERTY FOLDER "DataExplorer") diff --git a/Applications/DataExplorer/DataExplorer.cmake b/Applications/DataExplorer/DataExplorer.cmake index e477eea9e31..4a8d7728ace 100644 --- a/Applications/DataExplorer/DataExplorer.cmake +++ b/Applications/DataExplorer/DataExplorer.cmake @@ -49,10 +49,10 @@ add_executable(DataExplorer MACOSX_BUNDLE ) target_link_libraries(DataExplorer - Qt4::QtCore - Qt4::QtGui - Qt4::QtXml - Qt4::QtNetwork + Qt5::Core + Qt5::Gui + Qt5::Xml + Qt5::Network ApplicationsLib ApplicationsFileIO DataHolderLib diff --git a/Applications/DataExplorer/DataView/CMakeLists.txt b/Applications/DataExplorer/DataView/CMakeLists.txt index 744b1c9f490..5bf3d1281ba 100644 --- a/Applications/DataExplorer/DataView/CMakeLists.txt +++ b/Applications/DataExplorer/DataView/CMakeLists.txt @@ -127,7 +127,7 @@ add_library(QtDataView ${UIS} ) -target_link_libraries(QtDataView Qt4::QtCore Qt4::QtGui) +target_link_libraries(QtDataView Qt5::Core Qt5::Gui) target_link_libraries(QtDataView ApplicationsFileIO DataHolderLib diff --git a/Applications/DataExplorer/DataView/DiagramView/CMakeLists.txt b/Applications/DataExplorer/DataView/DiagramView/CMakeLists.txt index 5fe4562e300..4c42911159f 100644 --- a/Applications/DataExplorer/DataView/DiagramView/CMakeLists.txt +++ b/Applications/DataExplorer/DataView/DiagramView/CMakeLists.txt @@ -41,7 +41,7 @@ add_library(QtDiagramView ) target_link_libraries(QtDiagramView - Qt4::QtGui + Qt5::Gui GeoLib QtBase ) diff --git a/Applications/DataExplorer/DataView/StratView/CMakeLists.txt b/Applications/DataExplorer/DataView/StratView/CMakeLists.txt index 4a98b679595..409dce76c93 100644 --- a/Applications/DataExplorer/DataView/StratView/CMakeLists.txt +++ b/Applications/DataExplorer/DataView/StratView/CMakeLists.txt @@ -32,6 +32,6 @@ add_library(QtStratView ${UIS} ) -target_link_libraries(QtStratView Qt4::QtGui QtBase) +target_link_libraries(QtStratView Qt5::Gui QtBase) set_property(TARGET QtStratView PROPERTY FOLDER "DataExplorer") diff --git a/Applications/DataExplorer/VtkAct/CMakeLists.txt b/Applications/DataExplorer/VtkAct/CMakeLists.txt index 0868f2ac068..2c22239592e 100644 --- a/Applications/DataExplorer/VtkAct/CMakeLists.txt +++ b/Applications/DataExplorer/VtkAct/CMakeLists.txt @@ -28,7 +28,7 @@ add_library( VtkAct ADD_VTK_DEPENDENCY(VtkAct) target_link_libraries( VtkAct - Qt4::QtCore + Qt5::Core ${VTK_LIBRARIES} logog ) diff --git a/Applications/DataExplorer/VtkVis/CMakeLists.txt b/Applications/DataExplorer/VtkVis/CMakeLists.txt index 42679e61189..c56f10f45a7 100644 --- a/Applications/DataExplorer/VtkVis/CMakeLists.txt +++ b/Applications/DataExplorer/VtkVis/CMakeLists.txt @@ -128,5 +128,5 @@ if(GEOTIFF_FOUND) target_link_libraries(VtkVis ${GEOTIFF_LIBRARIES}) endif() # GEOTIFF_FOUND -target_link_libraries(VtkVis Qt4::QtGui QtDataView VtkAct) +target_link_libraries(VtkVis Qt5::Gui QtDataView VtkAct) set_property(TARGET VtkVis PROPERTY FOLDER "DataExplorer") diff --git a/Applications/FileIO/CMakeLists.txt b/Applications/FileIO/CMakeLists.txt index b493645270b..06deb492e2c 100644 --- a/Applications/FileIO/CMakeLists.txt +++ b/Applications/FileIO/CMakeLists.txt @@ -23,9 +23,9 @@ add_library(ApplicationsFileIO ${SOURCES}) target_link_libraries(ApplicationsFileIO DataHolderLib) if(QT4_FOUND) - target_link_libraries(ApplicationsFileIO Qt4::QtXml Qt4::QtXmlPatterns) + target_link_libraries(ApplicationsFileIO Qt5::Xml Qt5::XmlPatterns) if(WIN32 AND CMAKE_CROSSCOMPILING AND OPENSSL_FOUND) - target_link_libraries(ApplicationsFileIO Qt4::QtNetwork ${OPENSSL_LIBRARIES} ws2_32) + target_link_libraries(ApplicationsFileIO Qt5::Network ${OPENSSL_LIBRARIES} ws2_32) endif() endif() diff --git a/Applications/Utils/FileConverter/CMakeLists.txt b/Applications/Utils/FileConverter/CMakeLists.txt index 53d9029c01a..26f4b49b37b 100644 --- a/Applications/Utils/FileConverter/CMakeLists.txt +++ b/Applications/Utils/FileConverter/CMakeLists.txt @@ -2,7 +2,7 @@ if (QT4_FOUND AND Shapelib_FOUND) add_executable(ConvertSHPToGLI ConvertSHPToGLI.cpp) set_target_properties(ConvertSHPToGLI PROPERTIES FOLDER Utilities) - target_link_libraries(ConvertSHPToGLI GeoLib Qt4::QtXml ${Shapelib_LIBRARIES}) + target_link_libraries(ConvertSHPToGLI GeoLib Qt5::Xml ${Shapelib_LIBRARIES}) endif () if (QT4_FOUND) diff --git a/BaseLib/CMakeLists.txt b/BaseLib/CMakeLists.txt index 5a1bc9ee469..f616e282093 100644 --- a/BaseLib/CMakeLists.txt +++ b/BaseLib/CMakeLists.txt @@ -23,9 +23,9 @@ if(MSVC) endif() if(QT4_FOUND) - target_link_libraries(BaseLib Qt4::QtXml Qt4::QtXmlPatterns) + target_link_libraries(BaseLib Qt5::Xml Qt5::XmlPatterns) if(WIN32 AND CMAKE_CROSSCOMPILING AND OPENSSL_FOUND) - target_link_libraries(BaseLib Qt4::QtNetwork ${OPENSSL_LIBRARIES} ws2_32) + target_link_libraries(BaseLib Qt5::Network ${OPENSSL_LIBRARIES} ws2_32) endif() endif() diff --git a/GeoLib/CMakeLists.txt b/GeoLib/CMakeLists.txt index 47e6599dbd0..87187d88faf 100644 --- a/GeoLib/CMakeLists.txt +++ b/GeoLib/CMakeLists.txt @@ -21,9 +21,9 @@ target_link_libraries(GeoLib ) if(QT4_FOUND) - target_link_libraries(GeoLib Qt4::QtXml Qt4::QtXmlPatterns) + target_link_libraries(GeoLib Qt5::Xml Qt5::XmlPatterns) if(WIN32 AND CMAKE_CROSSCOMPILING AND OPENSSL_FOUND) - target_link_libraries(GeoLib Qt4::QtNetwork ${OPENSSL_LIBRARIES} ws2_32) + target_link_libraries(GeoLib Qt5::Network ${OPENSSL_LIBRARIES} ws2_32) endif() endif() diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt index 90a82855296..5c7c197f13e 100644 --- a/Tests/CMakeLists.txt +++ b/Tests/CMakeLists.txt @@ -69,7 +69,7 @@ if(OGS_BUILD_SWMM) endif() if(QT4_FOUND) - target_link_libraries(testrunner Qt4::QtCore Qt4::QtGui Qt4::QtXml Qt4::QtNetwork) + target_link_libraries(testrunner Qt5::Core Qt5::Gui Qt5::Xml Qt5::Network) if(CMAKE_CROSSCOMPILING) target_link_libraries(testrunner ${QT_XML_DEPS_LIBRARIES} diff --git a/scripts/cmake/Find.cmake b/scripts/cmake/Find.cmake index c91cf341749..98e7288d7b9 100644 --- a/scripts/cmake/Find.cmake +++ b/scripts/cmake/Find.cmake @@ -94,18 +94,18 @@ endif() find_package(Metis QUIET) -## Qt4 library ## +## Qt5 library ## if(OGS_BUILD_GUI) - find_package( Qt4 4.7 REQUIRED QtGui QtXml QtXmlPatterns) + find_package( Qt5 5.5 REQUIRED Gui Widgets Xml XmlPatterns) cmake_policy(SET CMP0020 NEW) if(CMAKE_CROSSCOMPILING) find_package(PkgConfig REQUIRED) - pkg_check_modules(QT_XML_DEPS REQUIRED QtXml) - list(REMOVE_ITEM QT_XML_DEPS_LIBRARIES QtXml QtCore) - pkg_check_modules(QT_GUI_DEPS REQUIRED QtGui) - list(REMOVE_ITEM QT_GUI_DEPS_LIBRARIES QtGui QtCore) - pkg_check_modules(QT_NETWORK_DEPS REQUIRED QtNetwork) - list(REMOVE_ITEM QT_NETWORK_DEPS_LIBRARIES QtNetwork QtCore) + pkg_check_modules(QT_XML_DEPS REQUIRED Xml) + list(REMOVE_ITEM QT_XML_DEPS_LIBRARIES Xml Core) + pkg_check_modules(QT_GUI_DEPS REQUIRED Gui) + list(REMOVE_ITEM QT_GUI_DEPS_LIBRARIES Gui Core) + pkg_check_modules(QT_NETWORK_DEPS REQUIRED Network) + list(REMOVE_ITEM QT_NETWORK_DEPS_LIBRARIES Network Core) endif() endif() -- GitLab