From b9401e1db423d30a263ed38770c53e2da2edc251 Mon Sep 17 00:00:00 2001 From: Lars Bilke <lars.bilke@ufz.de> Date: Mon, 19 Dec 2016 13:09:10 +0100 Subject: [PATCH] [CMake] Replaced QT4_FOUND with Qt5XmlPatterns_FOUND --- Applications/FileIO/CMakeLists.txt | 6 ++-- .../Utils/FileConverter/CMakeLists.txt | 31 ++++++++++--------- Applications/Utils/GeoTools/CMakeLists.txt | 4 +-- BaseLib/CMakeLists.txt | 4 +-- GeoLib/CMakeLists.txt | 4 +-- Tests/CMakeLists.txt | 4 +-- 6 files changed, 27 insertions(+), 26 deletions(-) diff --git a/Applications/FileIO/CMakeLists.txt b/Applications/FileIO/CMakeLists.txt index 06deb492e2c..71b0150b058 100644 --- a/Applications/FileIO/CMakeLists.txt +++ b/Applications/FileIO/CMakeLists.txt @@ -2,12 +2,12 @@ GET_SOURCE_FILES(SOURCES) if(NOT Shapelib_FOUND) list(REMOVE_ITEM SOURCES SHPInterface.h SHPInterface.cpp) endif() -if(QT4_FOUND) +if(Qt5XmlPatterns_FOUND) APPEND_SOURCE_FILES(SOURCES XmlIO/Qt) endif() APPEND_SOURCE_FILES(SOURCES Gmsh) -if(QT4_FOUND) +if(Qt5XmlPatterns_FOUND) APPEND_SOURCE_FILES(SOURCES FEFLOW) endif() @@ -22,7 +22,7 @@ include(${PROJECT_SOURCE_DIR}/scripts/cmake/OGSEnabledElements.cmake) add_library(ApplicationsFileIO ${SOURCES}) target_link_libraries(ApplicationsFileIO DataHolderLib) -if(QT4_FOUND) +if(Qt5XmlPatterns_FOUND) target_link_libraries(ApplicationsFileIO Qt5::Xml Qt5::XmlPatterns) if(WIN32 AND CMAKE_CROSSCOMPILING AND OPENSSL_FOUND) target_link_libraries(ApplicationsFileIO Qt5::Network ${OPENSSL_LIBRARIES} ws2_32) diff --git a/Applications/Utils/FileConverter/CMakeLists.txt b/Applications/Utils/FileConverter/CMakeLists.txt index 26f4b49b37b..6c7d036e96b 100644 --- a/Applications/Utils/FileConverter/CMakeLists.txt +++ b/Applications/Utils/FileConverter/CMakeLists.txt @@ -1,15 +1,18 @@ +if (Qt5XmlPatterns_FOUND) + if (Shapelib_FOUND) + add_executable(ConvertSHPToGLI ConvertSHPToGLI.cpp) + set_target_properties(ConvertSHPToGLI PROPERTIES FOLDER Utilities) + target_link_libraries(ConvertSHPToGLI GeoLib Qt5::Xml ${Shapelib_LIBRARIES}) + endif() -if (QT4_FOUND AND Shapelib_FOUND) - add_executable(ConvertSHPToGLI ConvertSHPToGLI.cpp) - set_target_properties(ConvertSHPToGLI PROPERTIES FOLDER Utilities) - target_link_libraries(ConvertSHPToGLI GeoLib Qt5::Xml ${Shapelib_LIBRARIES}) -endif () - -if (QT4_FOUND) add_executable(FEFLOW2OGS FEFLOW2OGS.cpp) set_target_properties(FEFLOW2OGS PROPERTIES FOLDER Utilities) target_link_libraries(FEFLOW2OGS ApplicationsFileIO) ADD_VTK_DEPENDENCY(FEFLOW2OGS) + + add_executable(convertGEO convertGEO.cpp) + set_target_properties(convertGEO PROPERTIES FOLDER Utilities) + target_link_libraries(convertGEO GeoLib) endif () add_executable(generateMatPropsFromMatID generateMatPropsFromMatID.cpp ) @@ -43,20 +46,18 @@ set_target_properties(TIN2VTK PROPERTIES FOLDER Utilities) target_link_libraries(TIN2VTK MeshLib) ADD_VTK_DEPENDENCY(TIN2VTK) -if (QT4_FOUND) - add_executable(convertGEO convertGEO.cpp) - set_target_properties(convertGEO PROPERTIES FOLDER Utilities) - target_link_libraries(convertGEO GeoLib) -endif() - #################### ### Installation ### #################### install(TARGETS generateMatPropsFromMatID GMSH2OGS OGS2VTK VTK2OGS VTK2TIN RUNTIME DESTINATION bin COMPONENT ogs_converter) -if(QT4_FOUND) - install(TARGETS ConvertSHPToGLI FEFLOW2OGS convertGEO +if(Qt5XmlPatterns_FOUND) + if(Shapelib_FOUND) + install(TARGETS ConvertSHPToGLI + RUNTIME DESTINATION bin COMPONENT ogs_converter) + endif() + install(TARGETS FEFLOW2OGS convertGEO RUNTIME DESTINATION bin COMPONENT ogs_converter) endif() diff --git a/Applications/Utils/GeoTools/CMakeLists.txt b/Applications/Utils/GeoTools/CMakeLists.txt index 8144402f449..82cbb066974 100644 --- a/Applications/Utils/GeoTools/CMakeLists.txt +++ b/Applications/Utils/GeoTools/CMakeLists.txt @@ -1,4 +1,4 @@ -if(QT4_FOUND) +if(Qt5XmlPatterns_FOUND) add_executable(TriangulatePolyline TriangulatePolyline.cpp) target_link_libraries(TriangulatePolyline GeoLib) set_target_properties(TriangulatePolyline PROPERTIES FOLDER Utilities) @@ -16,4 +16,4 @@ if(QT4_FOUND) RUNTIME DESTINATION bin COMPONENT Utilities ) -endif() # QT4_FOUND +endif() diff --git a/BaseLib/CMakeLists.txt b/BaseLib/CMakeLists.txt index f616e282093..f1ffd71688d 100644 --- a/BaseLib/CMakeLists.txt +++ b/BaseLib/CMakeLists.txt @@ -3,7 +3,7 @@ APPEND_SOURCE_FILES(SOURCES IO) APPEND_SOURCE_FILES(SOURCES IO/XmlIO) -if(QT4_FOUND) +if(Qt5XmlPatterns_FOUND) APPEND_SOURCE_FILES(SOURCES IO/XmlIO/Qt) endif() @@ -22,7 +22,7 @@ if(MSVC) target_link_libraries(BaseLib WinMM) # needed for timeGetTime endif() -if(QT4_FOUND) +if(Qt5XmlPatterns_FOUND) target_link_libraries(BaseLib Qt5::Xml Qt5::XmlPatterns) if(WIN32 AND CMAKE_CROSSCOMPILING AND OPENSSL_FOUND) target_link_libraries(BaseLib Qt5::Network ${OPENSSL_LIBRARIES} ws2_32) diff --git a/GeoLib/CMakeLists.txt b/GeoLib/CMakeLists.txt index 87187d88faf..fdf788ef33c 100644 --- a/GeoLib/CMakeLists.txt +++ b/GeoLib/CMakeLists.txt @@ -7,7 +7,7 @@ APPEND_SOURCE_FILES(SOURCES IO/Legacy) APPEND_SOURCE_FILES(SOURCES IO/XmlIO/Rapid) APPEND_SOURCE_FILES(SOURCES IO/XmlIO/Boost) -if(QT4_FOUND) +if(Qt5XmlPatterns_FOUND) APPEND_SOURCE_FILES(SOURCES IO/XmlIO/Qt) endif() @@ -20,7 +20,7 @@ target_link_libraries(GeoLib MathLib ) -if(QT4_FOUND) +if(Qt5XmlPatterns_FOUND) target_link_libraries(GeoLib Qt5::Xml Qt5::XmlPatterns) if(WIN32 AND CMAKE_CROSSCOMPILING AND OPENSSL_FOUND) target_link_libraries(GeoLib Qt5::Network ${OPENSSL_LIBRARIES} ws2_32) diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt index 5c7c197f13e..b98f1586537 100644 --- a/Tests/CMakeLists.txt +++ b/Tests/CMakeLists.txt @@ -20,7 +20,7 @@ APPEND_SOURCE_FILES(TEST_SOURCES NumLib) APPEND_SOURCE_FILES(TEST_SOURCES ProcessLib) APPEND_SOURCE_FILES(TEST_SOURCES ProcessLib/LiquidFlow) -if(QT4_FOUND) +if(Qt5XmlPatterns_FOUND) APPEND_SOURCE_FILES(TEST_SOURCES FileIO_Qt) endif() @@ -68,7 +68,7 @@ if(OGS_BUILD_SWMM) target_link_libraries(testrunner SwmmInterface) endif() -if(QT4_FOUND) +if(Qt5XmlPatterns_FOUND) target_link_libraries(testrunner Qt5::Core Qt5::Gui Qt5::Xml Qt5::Network) if(CMAKE_CROSSCOMPILING) target_link_libraries(testrunner -- GitLab