diff --git a/Applications/DataExplorer/DataExplorer.cmake b/Applications/DataExplorer/DataExplorer.cmake index 7a77712399d69d055a731f95ff14a936be003480..cc121e2599256a3f4433c659ab5c88f78e83ce79 100644 --- a/Applications/DataExplorer/DataExplorer.cmake +++ b/Applications/DataExplorer/DataExplorer.cmake @@ -64,6 +64,7 @@ target_link_libraries(DataExplorer Qt5::Xml Qt5::Network logog + ${VTK_LIBRARIES} ) # Workaround for Windows conan tiff-package @@ -80,10 +81,6 @@ if(CMAKE_CROSSCOMPILING) ) endif() -if(VTK_NETCDF_FOUND) - target_link_libraries(DataExplorer vtkNetCDF vtkNetCDF_cxx ) -endif() - if(GEOTIFF_FOUND) target_link_libraries(DataExplorer ${GEOTIFF_LIBRARIES} ) endif() diff --git a/Applications/DataExplorer/NetCdfDialog/NetCdfConfigureDialog.cpp b/Applications/DataExplorer/NetCdfDialog/NetCdfConfigureDialog.cpp index 4a956f53cea026708f6dd37611d832d43214e39b..338d737b7dd6ec266e97713dd0a7bb2c6f0503b1 100644 --- a/Applications/DataExplorer/NetCdfDialog/NetCdfConfigureDialog.cpp +++ b/Applications/DataExplorer/NetCdfDialog/NetCdfConfigureDialog.cpp @@ -225,8 +225,8 @@ void NetCdfConfigureDialog::getDimEdges(int dimId, unsigned &size, double &first { int sizeOfDim = tmpVarOfDim->get_dim(0)->size(); size = sizeOfDim; - double arrayOfDimStart[1] = {0}; - std::size_t edgeOfArray[1] = {1}; + double *arrayOfDimStart = new double[1]; //[1] = {0}; + long edgeOfArray = 1; //[1] = {1}; long edgeOrigin[1] = {0}; tmpVarOfDim->set_cur(edgeOrigin); tmpVarOfDim->get(arrayOfDimStart,edgeOfArray); @@ -306,7 +306,7 @@ double NetCdfConfigureDialog::getResolution() void NetCdfConfigureDialog::createDataObject() { - auto* length = new std::size_t[_currentVar->num_dims()]; + auto* length = new long[_currentVar->num_dims()]; double originLon = 0, originLat = 0; double lastLon = 0, lastLat = 0; unsigned sizeLon = 0, sizeLat = 0; diff --git a/Applications/DataExplorer/VtkVis/CMakeLists.txt b/Applications/DataExplorer/VtkVis/CMakeLists.txt index ef1894a69343f8762e53030e4fe1be8aa770c7eb..69dee55ba5ffd2a19cab9addaced855099b79bae 100644 --- a/Applications/DataExplorer/VtkVis/CMakeLists.txt +++ b/Applications/DataExplorer/VtkVis/CMakeLists.txt @@ -135,7 +135,7 @@ if(GEOTIFF_FOUND) endif() # GEOTIFF_FOUND target_link_libraries(VtkVis - PUBLIC BaseLib GeoLib MeshLib DataHolderLib QtBase ${VTK_LIBRARIES} NetCdfDialogLib + PUBLIC BaseLib GeoLib MeshLib DataHolderLib QtBase PRIVATE MathLib ApplicationsFileIO Qt5::Gui logog ) set_property(TARGET VtkVis PROPERTY FOLDER "DataExplorer") diff --git a/scripts/cmake/ConanSetup.cmake b/scripts/cmake/ConanSetup.cmake index 2d4c7232c34bed3515e56b1aadbbd32a58e60c0a..11b32b59f8f97d31f6a26af89819a9d8d877a466 100644 --- a/scripts/cmake/ConanSetup.cmake +++ b/scripts/cmake/ConanSetup.cmake @@ -51,9 +51,6 @@ if(OGS_BUILD_GUI) Qt/5.11@bincrafters/stable ) set(CONAN_OPTIONS ${CONAN_OPTIONS} VTK:qt=True) - if(UNIX AND NOT APPLE) - set(CONAN_OPTIONS ${CONAN_OPTIONS} VTK:x11=True) - endif() endif() # Find Conan and do version check diff --git a/scripts/cmake/Find.cmake b/scripts/cmake/Find.cmake index 681fa97316142dab50f0bcdabf98ed2df08d7107..7e9df44766403f8fb2d8c58c512eac0e93385283 100644 --- a/scripts/cmake/Find.cmake +++ b/scripts/cmake/Find.cmake @@ -65,18 +65,9 @@ find_package(Boost REQUIRED) include_directories(SYSTEM ${Boost_INCLUDE_DIRS}) include(VtkModules) -find_package(VTK COMPONENTS ${VTK_MODULES} REQUIRED) +#find_package(VTK COMPONENTS ${VTK_MODULES} REQUIRED) +find_package(VTK 8.0.0 REQUIRED) include(${VTK_USE_FILE}) -if(NOT OGS_USE_CONAN) - foreach(DIR ${VTK_INCLUDE_DIRS}) - if("${DIR}" MATCHES ".*vtknetcdf.*") - include_directories(SYSTEM ${DIR}/../cxx ${DIR}/include) - elseif("${DIR}" MATCHES ".*vtk.*") - include_directories(SYSTEM ${DIR}/vtknetcdf/include) - endif() - endforeach() - include_directories(SYSTEM ${VTK_DIR}/../ThirdParty/netcdf/vtknetcdf/cxx) -endif() find_package(Eigen3 3.2.9 REQUIRED) include_directories(SYSTEM ${EIGEN3_INCLUDE_DIR}) diff --git a/scripts/cmake/VtkModules.cmake b/scripts/cmake/VtkModules.cmake index 5054da414cbe863d60f77497ef8cd384571ce72a..6ddd41b9fe4f0f4f0d0112cde3a34117aac1a711 100644 --- a/scripts/cmake/VtkModules.cmake +++ b/scripts/cmake/VtkModules.cmake @@ -11,7 +11,7 @@ endif() if(OGS_BUILD_GUI) set(VTK_MODULES ${VTK_MODULES} vtkRenderingCore - vtknetcdf + vtknetcdfcpp vtkIOLegacy vtkIOImage vtkRenderingAnnotation