OpenVDS should always be used (#10166)

* OpenVDS should always be used, remove optional defines
This commit is contained in:
jonjenssen 2023-04-24 18:23:31 +02:00 committed by GitHub
parent 90ccf447fb
commit d8def3d986
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 36 additions and 67 deletions

View File

@ -322,10 +322,6 @@ if(MSVC)
set(RESINSIGHT_USE_ODB_API 1)
endif()
if(NOT ${RESINSIGHT_OPENVDS_API_DIR} EQUAL "")
set(RESINSIGHT_USE_OPENVDS_API 1)
endif()
# Odb Dlls
if(RESINSIGHT_USE_ODB_API)
# Find all the dlls
@ -343,14 +339,12 @@ if(MSVC)
endif()
# OpenVDS Dlls
if(RESINSIGHT_USE_OPENVDS_API)
set(OPENVDS_DLL_NAMES openvds segyutils)
foreach(OPENVDS_DLL_NAME ${OPENVDS_DLL_NAMES})
list(APPEND RI_DLL_FILENAMES
${RESINSIGHT_OPENVDS_API_DIR}/bin/msvc_141/${OPENVDS_DLL_NAME}.dll
)
endforeach(OPENVDS_DLL_NAME)
endif()
# HDF5 Dlls
if(RESINSIGHT_FOUND_HDF5)

View File

@ -258,17 +258,7 @@ list(APPEND RI_LIBRARIES RigGeoMechDataModel)
#
# OpenVDS
#
if(RESINSIGHT_USE_OPENVDS_API)
set(OPENVDS_FILES FileInterface/RifOpenVDSReader.h
FileInterface/RifOpenVDSReader.cpp
)
list(APPEND CPP_SOURCES ${OPENVDS_FILES})
add_definitions(-DUSE_OPENVDS)
include_directories(${RESINSIGHT_OPENVDS_API_DIR}/include)
endif()
include_directories(${RESINSIGHT_OPENVDS_API_DIR}/include)
#
# HDF5

View File

@ -49,12 +49,7 @@ bool RicImportSeismicFeature::isCommandEnabled()
//--------------------------------------------------------------------------------------------------
void RicImportSeismicFeature::onActionTriggered( bool isChecked )
{
#ifdef USE_OPENVDS
QString filter = "Seismic files (*.zgy *.vds);;All Files (*.*)";
#else
QString filter = "Seismic files (*.zgy);;All Files (*.*)";
#endif
RiaApplication* app = RiaApplication::instance();
QString defaultDir = app->lastUsedDialogDirectory( "SEISMIC_GRID" );
QString fileName = RiuFileDialogTools::getOpenFileName( Riu3DMainWindowTools::mainWindowWidget(), "Import Seismic", defaultDir, filter );

View File

@ -79,6 +79,7 @@ set(SOURCE_GROUP_HEADER_FILES
${CMAKE_CURRENT_LIST_DIR}/RifReaderPressureDepthData.h
${CMAKE_CURRENT_LIST_DIR}/RifSeismicReader.h
${CMAKE_CURRENT_LIST_DIR}/RifSeismicZGYReader.h
${CMAKE_CURRENT_LIST_DIR}/RifOpenVDSReader.h
${CMAKE_CURRENT_LIST_DIR}/RifOpmGridTools.h
${CMAKE_CURRENT_LIST_DIR}/RifCsvSummaryReader.h
${CMAKE_CURRENT_LIST_DIR}/RifRevealSummaryCsvReader.h
@ -164,6 +165,7 @@ set(SOURCE_GROUP_SOURCE_FILES
${CMAKE_CURRENT_LIST_DIR}/RifReaderPressureDepthData.cpp
${CMAKE_CURRENT_LIST_DIR}/RifSeismicReader.cpp
${CMAKE_CURRENT_LIST_DIR}/RifSeismicZGYReader.cpp
${CMAKE_CURRENT_LIST_DIR}/RifOpenVDSReader.cpp
${CMAKE_CURRENT_LIST_DIR}/RifOpmGridTools.cpp
${CMAKE_CURRENT_LIST_DIR}/RifCsvSummaryReader.cpp
${CMAKE_CURRENT_LIST_DIR}/RifRevealCsvSummaryReader.cpp

View File

@ -20,11 +20,8 @@
#include "RiaLogging.h"
#include "RifSeismicZGYReader.h"
#ifdef USE_OPENVDS
#include "RifOpenVDSReader.h"
#endif
#include "RifSeismicZGYReader.h"
#include "RimRegularLegendConfig.h"
#include "RimSeismicAlphaMapper.h"
@ -118,12 +115,10 @@ bool RimSeismicData::openFileIfNotOpen()
{
m_filereader = std::make_shared<RifSeismicZGYReader>();
}
#ifdef USE_OPENVDS
else if ( fi.suffix().toLower() == "vds" )
{
m_filereader = std::make_shared<RifOpenVDSReader>();
}
#endif
else
{
m_filereader.reset();

View File

@ -339,21 +339,16 @@ endif()
FetchContent_Populate(openvds)
set(RESINSIGHT_OPENVDS_API_DIR ${openvds_SOURCE_DIR})
message(STATUS "Using OpenVDS api from : ${RESINSIGHT_OPENVDS_API_DIR}")
if(NOT ${RESINSIGHT_OPENVDS_API_DIR} EQUAL "")
add_definitions(-DUSE_OPENVDS)
set(RESINSIGHT_USE_OPENVDS_API 1)
message(STATUS "Using OpenVDS api from : ${RESINSIGHT_OPENVDS_API_DIR}")
if(MSVC)
if(MSVC)
list(APPEND EXTERNAL_LINK_LIBRARIES
${RESINSIGHT_OPENVDS_API_DIR}/lib/msvc_141/openvds.lib
)
else()
else()
list(APPEND EXTERNAL_LINK_LIBRARIES
${RESINSIGHT_OPENVDS_API_DIR}/lib64/libopenvds.so
)
endif()
endif()
# ##############################################################################
@ -810,8 +805,7 @@ if(RESINSIGHT_BUNDLE_TESTMODELS)
)
endif()
if(NOT ${RESINSIGHT_OPENVDS_API_DIR} EQUAL "")
if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
set(OPENVDS_SHARED_LIB_FILES
${RESINSIGHT_OPENVDS_API_DIR}/lib64/libopenvds.so
${RESINSIGHT_OPENVDS_API_DIR}/lib64/libopenvds.so.3
@ -828,7 +822,6 @@ if(NOT ${RESINSIGHT_OPENVDS_API_DIR} EQUAL "")
install(PROGRAMS ${RESINSIGHT_OPENVDS_API_DIR}/bin/SEGYImport
DESTINATION ${RESINSIGHT_INSTALL_FOLDER}
)
endif()
endif()
# ##############################################################################