Configure RESINSIGHT_USE_ODB_API in root CMakeLists.txt

This commit is contained in:
Kristian Bendiksen 2021-01-12 09:48:02 +01:00
parent 14f87533fa
commit 3112f61890
3 changed files with 21 additions and 14 deletions

View File

@ -271,6 +271,8 @@ if(RESINSIGHT_ENABLE_GRPC)
endif()
if(RESINSIGHT_USE_ODB_API)
add_definitions(-DUSE_ODB_API)
list(APPEND LINK_LIBRARIES RigGeoMechDataModel)
list(APPEND LINK_LIBRARIES RifOdbReader)
endif()

View File

@ -210,26 +210,15 @@ set(RI_LIBRARIES ResultStatisticsCache Commands)
#
# Odb api
#
set(RESINSIGHT_ODB_API_DIR
""
CACHE
PATH
"Optional path to the ABAQUS ODB API from Simulia. Needed for support of geomechanical models"
)
if(NOT ${RESINSIGHT_ODB_API_DIR} EQUAL "")
add_definitions(-DUSE_ODB_API)
if(RESINSIGHT_USE_ODB_API)
add_subdirectory(GeoMech/OdbReader)
set(RESINSIGHT_USE_ODB_API 1)
message(STATUS "Using ODB-Api from : ${RESINSIGHT_ODB_API_DIR}")
add_definitions(-DUSE_ODB_API)
list(APPEND RI_LIBRARIES RifOdbReader)
endif()
add_subdirectory(GeoMech/GeoMechDataModel)
list(APPEND RI_LIBRARIES RigGeoMechDataModel)
if(RESINSIGHT_USE_ODB_API)
list(APPEND RI_LIBRARIES RifOdbReader)
endif()
#
# HDF5
#

View File

@ -69,6 +69,22 @@ if (RESINSIGHT_USE_OPENMP)
endif()
endif()
################################################################################
# ABAQUS ODB
################################################################################
set(RESINSIGHT_ODB_API_DIR
""
CACHE
PATH
"Optional path to the ABAQUS ODB API from Simulia. Needed for support of geomechanical models"
)
if(NOT ${RESINSIGHT_ODB_API_DIR} EQUAL "")
add_definitions(-DUSE_ODB_API)
set(RESINSIGHT_USE_ODB_API 1)
message(STATUS "Using ODB-Api from : ${RESINSIGHT_ODB_API_DIR}")
endif()
################################################################################
# Version number