From 5748e58e3d94a0ccf861fb8f52330a083fede2a1 Mon Sep 17 00:00:00 2001 From: Lars Bilke <lars.bilke@ufz.de> Date: Wed, 10 Jul 2019 15:59:10 +0200 Subject: [PATCH] [CMake] Remove if(CMAKE_CROSSCOMPILING). --- Applications/DataExplorer/DataExplorer.cmake | 8 -------- BaseLib/CMakeLists.txt | 3 --- GeoLib/CMakeLists.txt | 3 --- Tests/CMakeLists.txt | 6 ------ scripts/cmake/Find.cmake | 12 ------------ scripts/cmake/packaging/PackagingWin.cmake | 3 --- 6 files changed, 35 deletions(-) diff --git a/Applications/DataExplorer/DataExplorer.cmake b/Applications/DataExplorer/DataExplorer.cmake index febcc41ab65..10de32e5976 100644 --- a/Applications/DataExplorer/DataExplorer.cmake +++ b/Applications/DataExplorer/DataExplorer.cmake @@ -71,14 +71,6 @@ if(OGS_USE_CONAN AND WIN32) target_link_libraries(DataExplorer ${ZLIB_LIBRARIES}) endif() -if(CMAKE_CROSSCOMPILING) - target_link_libraries(DataExplorer - ${QT_XML_DEPS_LIBRARIES} - ${QT_GUI_DEPS_LIBRARIES} - ${QT_NETWORK_DEPS_LIBRARIES} - ) -endif() - if(GEOTIFF_FOUND) target_link_libraries(DataExplorer ${GEOTIFF_LIBRARIES} ) endif() diff --git a/BaseLib/CMakeLists.txt b/BaseLib/CMakeLists.txt index ec1c2013b18..e51c8c30639 100644 --- a/BaseLib/CMakeLists.txt +++ b/BaseLib/CMakeLists.txt @@ -27,9 +27,6 @@ endif() if(Qt5XmlPatterns_FOUND) target_link_libraries(BaseLib PUBLIC Qt5::Xml Qt5::XmlPatterns) - if(WIN32 AND CMAKE_CROSSCOMPILING AND OPENSSL_FOUND) - target_link_libraries(BaseLib PUBLIC Qt5::Network ${OPENSSL_LIBRARIES} ws2_32) - endif() endif() if(OGS_USE_PCH) diff --git a/GeoLib/CMakeLists.txt b/GeoLib/CMakeLists.txt index be49c05a839..1f22c6b6fac 100644 --- a/GeoLib/CMakeLists.txt +++ b/GeoLib/CMakeLists.txt @@ -20,9 +20,6 @@ target_link_libraries(GeoLib PUBLIC BaseLib MathLib logog PRIVATE tet) if(Qt5XmlPatterns_FOUND) target_link_libraries(GeoLib PUBLIC Qt5::Xml Qt5::XmlPatterns) - if(WIN32 AND CMAKE_CROSSCOMPILING AND OPENSSL_FOUND) - target_link_libraries(GeoLib PUBLIC Qt5::Network ${OPENSSL_LIBRARIES} ws2_32) - endif() endif() if(OGS_USE_PCH) diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt index 3e9721b0a99..5e046f8e731 100644 --- a/Tests/CMakeLists.txt +++ b/Tests/CMakeLists.txt @@ -73,12 +73,6 @@ endif() if(Qt5XmlPatterns_FOUND) target_link_libraries(testrunner Qt5::Core Qt5::Gui Qt5::Xml Qt5::Network VtkVis QtDataView) - if(CMAKE_CROSSCOMPILING) - target_link_libraries(testrunner - ${QT_XML_DEPS_LIBRARIES} - ${QT_GUI_DEPS_LIBRARIES} - ${QT_NETWORK_DEPS_LIBRARIES}) - endif() endif() if(OGS_USE_PCH) diff --git a/scripts/cmake/Find.cmake b/scripts/cmake/Find.cmake index 556e6a2174d..375b20490dd 100644 --- a/scripts/cmake/Find.cmake +++ b/scripts/cmake/Find.cmake @@ -61,9 +61,6 @@ find_package(Eigen3 3.3.4 REQUIRED) include_directories(SYSTEM ${EIGEN3_INCLUDE_DIR}) ## pthread, is a requirement of logog ## -if(CMAKE_CROSSCOMPILING) - set(THREADS_PTHREAD_ARG 0 CACHE STRING "Result from TRY_RUN" FORCE) -endif() set(CMAKE_THREAD_PREFER_PTHREAD ON) set(THREADS_PREFER_PTHREAD_FLAG ON) find_package(Threads REQUIRED) @@ -94,15 +91,6 @@ if(OGS_BUILD_GUI) endif() find_package(Qt5 5.2 REQUIRED ${QT_MODULES}) cmake_policy(SET CMP0020 NEW) - if(CMAKE_CROSSCOMPILING) - find_package(PkgConfig REQUIRED) - 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() if(OGS_USE_NETCDF) diff --git a/scripts/cmake/packaging/PackagingWin.cmake b/scripts/cmake/packaging/PackagingWin.cmake index 48ea5fdbeb8..d6efd12dd2b 100644 --- a/scripts/cmake/packaging/PackagingWin.cmake +++ b/scripts/cmake/packaging/PackagingWin.cmake @@ -2,9 +2,6 @@ set(CMAKE_INSTALL_UCRT_LIBRARIES ON) set(CMAKE_INSTALL_OPENMP_LIBRARIES ON) include(InstallRequiredSystemLibraries) set(CPACK_GENERATOR ZIP) -#if(NOT CMAKE_CROSSCOMPILING) -# set(CPACK_GENERATOR NSIS ZIP) -#endif() set(CPACK_NSIS_MUI_ICON ${PROJECT_SOURCE_DIR}/scripts/packaging/ogs-de-icon.ico) set(CPACK_PACKAGE_ICON ${PROJECT_SOURCE_DIR}/Documentation/OpenGeoSys-Logo.bmp) set(CPACK_NSIS_INSTALLED_ICON_NAME ${CPACK_NSIS_MUI_ICON}) -- GitLab