diff --git a/ApplicationCode/CMakeLists.txt b/ApplicationCode/CMakeLists.txt index dc43bfff7b..69d04055b8 100644 --- a/ApplicationCode/CMakeLists.txt +++ b/ApplicationCode/CMakeLists.txt @@ -151,6 +151,11 @@ list( APPEND CPP_SOURCES add_subdirectory(WellPathImportSsihub) add_subdirectory(ResultStatisticsCache) +set( RI_LIBRARIES + WellPathImportSsihub + ResultStatisticsCache +) + # # Odb api # @@ -164,6 +169,17 @@ endif() add_subdirectory(GeoMech/GeoMechDataModel) +if (RESINSIGHT_USE_ODB_API) + list( APPEND RI_LIBRARIES + RifOdbReader + ) +else() + list( APPEND RI_LIBRARIES + RigGeoMechDataModel + ) +endif() + + # # HDF5 # @@ -288,10 +304,7 @@ endif () set( LINK_LIBRARIES ${OPM_LIBRARIES} - WellPathImportSsihub - - ResultStatisticsCache - RigGeoMechDataModel + ${RI_LIBRARIES} ${APP_FWK_LIBRARIES} ${VIZ_FWK_LIBRARIES} @@ -309,11 +322,6 @@ if (${CMAKE_SYSTEM_NAME} MATCHES "Linux") ) endif() -# Add the odb reader if we are compiling with odb support -IF (${RESINSIGHT_USE_ODB_API}) - set ( LINK_LIBRARIES ${LINK_LIBRARIES} RifOdbReader) -ENDIF() - target_link_libraries( ResInsight ${LINK_LIBRARIES} ${EXTERNAL_LINK_LIBRARIES}) diff --git a/ApplicationCode/GeoMech/GeoMechDataModel/CMakeLists.txt b/ApplicationCode/GeoMech/GeoMechDataModel/CMakeLists.txt index 57217c686e..ed56edb9f3 100644 --- a/ApplicationCode/GeoMech/GeoMechDataModel/CMakeLists.txt +++ b/ApplicationCode/GeoMech/GeoMechDataModel/CMakeLists.txt @@ -2,7 +2,6 @@ cmake_minimum_required (VERSION 2.8.12) project (RigGeoMechDataModel) - add_library( ${PROJECT_NAME} RigFemPart.h RigFemPart.cpp @@ -36,7 +35,7 @@ target_include_directories(${PROJECT_NAME} ${CMAKE_CURRENT_SOURCE_DIR} ) -target_link_libraries( ${PROJECT_NAME} +set( LINK_LIBRARIES LibCore cafPdmCvf @@ -45,7 +44,10 @@ target_link_libraries( ${PROJECT_NAME} CommonCode ResultStatisticsCache - RifOdbReader +) + +target_link_libraries( ${PROJECT_NAME} + ${LINK_LIBRARIES} ) source_group("" FILES ${PROJECT_FILES})