diff --git a/Applications/FileIO/CMakeLists.txt b/Applications/FileIO/CMakeLists.txt index 06deb492e2c3d3948cfd76b08a5d489db81f3f94..71b0150b0587accaa181755ca27f002fc4d4ed61 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 26f4b49b37b54a77420de3c7c3493d19cb63eed6..6c7d036e96b3af9383fde0182e2a7fb23f794f0a 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 8144402f4494add9729445d0544b621065596639..82cbb066974e94c626a3ced9d527b6cfc4e43502 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 f616e2820935a34be08b9c6e1572244d01dd9fbf..f1ffd71688d5cdfe6150bf7ae2d01d8a6cde34f6 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 87187d88fafcd8ae72501b3ad5feed13bd11d312..fdf788ef33cb74780fa4d4ed0c04fe578bcae096 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 5c7c197f13e9b7783c14ef7dad3497a81b1ca89c..b98f1586537f587cde6abd925e90a3a8a239354b 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