diff --git a/ApplicationExeCode/CMakeLists.txt b/ApplicationExeCode/CMakeLists.txt index f5de99bc4a..ac5e492bf2 100644 --- a/ApplicationExeCode/CMakeLists.txt +++ b/ApplicationExeCode/CMakeLists.txt @@ -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() + 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) # HDF5 Dlls if(RESINSIGHT_FOUND_HDF5) diff --git a/ApplicationLibCode/CMakeLists.txt b/ApplicationLibCode/CMakeLists.txt index f0316c3c22..89b7fd39d9 100644 --- a/ApplicationLibCode/CMakeLists.txt +++ b/ApplicationLibCode/CMakeLists.txt @@ -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 diff --git a/ApplicationLibCode/Commands/SeismicCommands/RicImportSeismicFeature.cpp b/ApplicationLibCode/Commands/SeismicCommands/RicImportSeismicFeature.cpp index 9ddd53fbcd..2c4b408f1f 100644 --- a/ApplicationLibCode/Commands/SeismicCommands/RicImportSeismicFeature.cpp +++ b/ApplicationLibCode/Commands/SeismicCommands/RicImportSeismicFeature.cpp @@ -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 - + QString filter = "Seismic files (*.zgy *.vds);;All Files (*.*)"; RiaApplication* app = RiaApplication::instance(); QString defaultDir = app->lastUsedDialogDirectory( "SEISMIC_GRID" ); QString fileName = RiuFileDialogTools::getOpenFileName( Riu3DMainWindowTools::mainWindowWidget(), "Import Seismic", defaultDir, filter ); diff --git a/ApplicationLibCode/FileInterface/CMakeLists_files.cmake b/ApplicationLibCode/FileInterface/CMakeLists_files.cmake index e00c47ebd4..a1da0f6c25 100644 --- a/ApplicationLibCode/FileInterface/CMakeLists_files.cmake +++ b/ApplicationLibCode/FileInterface/CMakeLists_files.cmake @@ -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 diff --git a/ApplicationLibCode/ProjectDataModel/Seismic/RimSeismicData.cpp b/ApplicationLibCode/ProjectDataModel/Seismic/RimSeismicData.cpp index 51e9c44122..18e31e4fcf 100644 --- a/ApplicationLibCode/ProjectDataModel/Seismic/RimSeismicData.cpp +++ b/ApplicationLibCode/ProjectDataModel/Seismic/RimSeismicData.cpp @@ -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(); } -#ifdef USE_OPENVDS else if ( fi.suffix().toLower() == "vds" ) { m_filereader = std::make_shared(); } -#endif else { m_filereader.reset(); diff --git a/CMakeLists.txt b/CMakeLists.txt index 3dfba1632c..c7e6e61b0e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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) - list(APPEND EXTERNAL_LINK_LIBRARIES - ${RESINSIGHT_OPENVDS_API_DIR}/lib/msvc_141/openvds.lib - ) - else() - list(APPEND EXTERNAL_LINK_LIBRARIES - ${RESINSIGHT_OPENVDS_API_DIR}/lib64/libopenvds.so - ) - endif() +if(MSVC) + list(APPEND EXTERNAL_LINK_LIBRARIES + ${RESINSIGHT_OPENVDS_API_DIR}/lib/msvc_141/openvds.lib + ) +else() + list(APPEND EXTERNAL_LINK_LIBRARIES + ${RESINSIGHT_OPENVDS_API_DIR}/lib64/libopenvds.so + ) endif() # ############################################################################## @@ -810,25 +805,23 @@ if(RESINSIGHT_BUNDLE_TESTMODELS) ) endif() -if(NOT ${RESINSIGHT_OPENVDS_API_DIR} EQUAL "") - 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 - ${RESINSIGHT_OPENVDS_API_DIR}/lib64/libopenvds.so.3.2.3 - ${RESINSIGHT_OPENVDS_API_DIR}/lib64/libopenvds-968eeb36.so.3.2.3 - ${RESINSIGHT_OPENVDS_API_DIR}/lib64/libsegyutils.so - ${RESINSIGHT_OPENVDS_API_DIR}/lib64/libsegyutils.so.3 - ${RESINSIGHT_OPENVDS_API_DIR}/lib64/libsegyutils.so.3.2.3 - ) - install(FILES ${OPENVDS_SHARED_LIB_FILES} - DESTINATION ${RESINSIGHT_INSTALL_FOLDER} - ) +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 + ${RESINSIGHT_OPENVDS_API_DIR}/lib64/libopenvds.so.3.2.3 + ${RESINSIGHT_OPENVDS_API_DIR}/lib64/libopenvds-968eeb36.so.3.2.3 + ${RESINSIGHT_OPENVDS_API_DIR}/lib64/libsegyutils.so + ${RESINSIGHT_OPENVDS_API_DIR}/lib64/libsegyutils.so.3 + ${RESINSIGHT_OPENVDS_API_DIR}/lib64/libsegyutils.so.3.2.3 + ) + install(FILES ${OPENVDS_SHARED_LIB_FILES} + DESTINATION ${RESINSIGHT_INSTALL_FOLDER} + ) - install(PROGRAMS ${RESINSIGHT_OPENVDS_API_DIR}/bin/SEGYImport - DESTINATION ${RESINSIGHT_INSTALL_FOLDER} - ) - endif() + install(PROGRAMS ${RESINSIGHT_OPENVDS_API_DIR}/bin/SEGYImport + DESTINATION ${RESINSIGHT_INSTALL_FOLDER} + ) endif() # ##############################################################################