2012-05-18 02:45:23 -05:00
|
|
|
cmake_minimum_required (VERSION 2.8)
|
|
|
|
|
|
|
|
project (ApplicationCode)
|
|
|
|
|
2012-06-26 09:10:41 -05:00
|
|
|
# NB: The generated file is written to Cmake binary folder to avoid source tree pollution
|
|
|
|
# This folder is added to include_directories
|
2013-03-22 10:12:00 -05:00
|
|
|
CONFIGURE_FILE( ${CMAKE_SOURCE_DIR}/ApplicationCode/Adm/RiaVersionInfo.h.cmake
|
|
|
|
${CMAKE_BINARY_DIR}/Generated/RiaVersionInfo.h
|
2012-06-26 09:10:41 -05:00
|
|
|
)
|
|
|
|
|
|
|
|
|
2012-05-18 02:45:23 -05:00
|
|
|
include_directories(
|
2015-07-29 07:20:15 -05:00
|
|
|
${cafPdmCore_SOURCE_DIR}
|
|
|
|
${cafPdmUiCore_SOURCE_DIR}
|
|
|
|
${cafPdmXml_SOURCE_DIR}
|
|
|
|
${cafProjectDataModel_SOURCE_DIR}
|
|
|
|
|
|
|
|
${cafCommand_SOURCE_DIR}
|
|
|
|
${cafViewer_SOURCE_DIR}
|
2015-07-31 11:49:33 -05:00
|
|
|
${cafAnimControl_SOURCE_DIR}
|
2015-07-29 07:20:15 -05:00
|
|
|
${cafUserInterface_SOURCE_DIR}
|
|
|
|
${cafPdmCvf_SOURCE_DIR}
|
|
|
|
${CommonCode_SOURCE_DIR}
|
2016-08-02 03:25:55 -05:00
|
|
|
${cafVizExtensions_SOURCE_DIR}
|
2016-10-19 05:22:13 -05:00
|
|
|
${cafTensor_SOURCE_DIR}
|
2015-07-29 07:20:15 -05:00
|
|
|
|
2015-10-05 09:09:51 -05:00
|
|
|
${ResInsight_SOURCE_DIR}/ThirdParty
|
2016-05-26 07:49:13 -05:00
|
|
|
${ResInsight_SOURCE_DIR}/ThirdParty/NRLib/nrlib/well
|
|
|
|
${ResInsight_SOURCE_DIR}/ThirdParty/Qwt/src
|
|
|
|
${ERT_INCLUDE_DIRS}
|
2015-10-05 09:09:51 -05:00
|
|
|
|
2017-04-05 01:34:52 -05:00
|
|
|
${boost-Subset_SOURCE_DIR}
|
2016-09-05 08:23:24 -05:00
|
|
|
${custom-opm-flowdiagnostics_SOURCE_DIR}/opm-flowdiagnostics/
|
2016-12-09 09:25:43 -06:00
|
|
|
${custom-opm-flowdiag-app_SOURCE_DIR}/opm-flowdiagnostics-applications/
|
|
|
|
${custom-opm-flowdiag-app_SOURCE_DIR}/opmCore
|
2016-05-27 10:28:31 -05:00
|
|
|
|
2012-05-18 02:45:23 -05:00
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/Adm
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/Application
|
2017-06-13 08:15:40 -05:00
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/Application/Tools
|
2015-08-14 08:42:12 -05:00
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/Commands
|
2016-10-21 08:49:56 -05:00
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/Commands/EclipseCommands
|
2012-05-18 02:45:23 -05:00
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/FileInterface
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/SocketInterface
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/ModelVisualization
|
2015-11-12 05:00:51 -06:00
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/ModelVisualization/GridBox
|
2016-09-20 09:09:27 -05:00
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/ModelVisualization/Intersections
|
2012-05-18 02:45:23 -05:00
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/UserInterface
|
2017-06-29 04:48:26 -05:00
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/CommandFileInterface/Core
|
2017-01-12 04:31:10 -06:00
|
|
|
|
2012-05-18 02:45:23 -05:00
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/ProjectDataModel
|
2017-05-30 07:50:43 -05:00
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/ProjectDataModel/Completions
|
2017-01-12 04:31:10 -06:00
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/ProjectDataModel/Flow
|
2017-05-30 07:50:43 -05:00
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/ProjectDataModel/Summary
|
2017-01-12 04:31:10 -06:00
|
|
|
|
2015-08-14 08:42:12 -05:00
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/ResultStatisticsCache
|
2012-05-18 02:45:23 -05:00
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/ReservoirDataModel
|
2013-09-06 06:06:39 -05:00
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/WellPathImportSsihub
|
2015-04-24 08:53:50 -05:00
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/GeoMech/OdbReader
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/GeoMech/GeoMechDataModel
|
2015-04-27 06:51:22 -05:00
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/GeoMech/GeoMechVisualization
|
2015-04-24 08:53:50 -05:00
|
|
|
|
2012-06-26 09:10:41 -05:00
|
|
|
${CMAKE_BINARY_DIR}/Generated
|
2013-12-04 05:04:42 -06:00
|
|
|
${CMAKE_CURRENT_BINARY_DIR}
|
2012-05-18 02:45:23 -05:00
|
|
|
)
|
|
|
|
|
2015-04-29 02:26:29 -05:00
|
|
|
#############################################################################
|
|
|
|
# Defining all the source (and header) files
|
|
|
|
#############################################################################
|
2012-09-11 02:22:36 -05:00
|
|
|
|
2013-03-18 05:40:39 -05:00
|
|
|
# Use all h files in the subdirectories to make them available in the project
|
2012-05-18 02:45:23 -05:00
|
|
|
file( GLOB_RECURSE HEADER_FILES *.h )
|
|
|
|
|
2013-05-16 06:43:37 -05:00
|
|
|
set( SOCKET_INTERFACE_FILES
|
|
|
|
SocketInterface/RiaSocketServer.cpp
|
2013-05-24 04:07:59 -05:00
|
|
|
SocketInterface/RiaProjectInfoCommands.cpp
|
|
|
|
SocketInterface/RiaCaseInfoCommands.cpp
|
|
|
|
SocketInterface/RiaGeometryCommands.cpp
|
|
|
|
SocketInterface/RiaPropertyDataCommands.cpp
|
2013-12-04 05:04:42 -06:00
|
|
|
SocketInterface/RiaWellDataCommands.cpp
|
2013-05-24 04:07:59 -05:00
|
|
|
SocketInterface/RiaSocketTools.cpp
|
2014-04-14 07:36:47 -05:00
|
|
|
SocketInterface/RiaSocketDataTransfer.cpp
|
2013-05-16 06:43:37 -05:00
|
|
|
)
|
|
|
|
|
2012-05-18 02:45:23 -05:00
|
|
|
list( APPEND CPP_SOURCES
|
2013-05-16 06:43:37 -05:00
|
|
|
${SOCKET_INTERFACE_FILES}
|
2015-10-05 09:09:51 -05:00
|
|
|
${UNIT_TEST_FILES}
|
2012-05-18 02:45:23 -05:00
|
|
|
)
|
|
|
|
|
2013-04-16 03:27:36 -05:00
|
|
|
list( APPEND REFERENCED_CMAKE_FILES
|
2017-06-13 08:15:40 -05:00
|
|
|
Application/CMakeLists_files.cmake
|
|
|
|
Application/Tools/CMakeLists_files.cmake
|
|
|
|
|
2013-04-16 03:27:36 -05:00
|
|
|
ReservoirDataModel/CMakeLists_files.cmake
|
2015-09-04 08:30:04 -05:00
|
|
|
ReservoirDataModel/CMakeLists_filesNotToUnitTest.cmake
|
2013-04-16 03:27:36 -05:00
|
|
|
FileInterface/CMakeLists_files.cmake
|
2016-11-04 05:42:03 -05:00
|
|
|
|
2013-04-16 03:27:36 -05:00
|
|
|
ProjectDataModel/CMakeLists_files.cmake
|
2016-11-04 05:42:03 -05:00
|
|
|
ProjectDataModel/Summary/CMakeLists_files.cmake
|
2017-01-12 04:31:10 -06:00
|
|
|
ProjectDataModel/Flow/CMakeLists_files.cmake
|
2017-05-30 07:50:43 -05:00
|
|
|
ProjectDataModel/Completions/CMakeLists_files.cmake
|
2016-11-04 05:42:03 -05:00
|
|
|
|
2015-11-12 05:00:51 -06:00
|
|
|
GeoMech/GeoMechVisualization/CMakeLists_files.cmake
|
|
|
|
|
2013-04-18 00:33:45 -05:00
|
|
|
ModelVisualization/CMakeLists_files.cmake
|
2015-11-12 05:00:51 -06:00
|
|
|
ModelVisualization/GridBox/CMakeLists_files.cmake
|
2016-09-20 09:09:27 -05:00
|
|
|
ModelVisualization/Intersections/CMakeLists_files.cmake
|
2016-10-21 07:39:04 -05:00
|
|
|
|
|
|
|
UserInterface/CMakeLists_files.cmake
|
2015-11-12 05:00:51 -06:00
|
|
|
|
|
|
|
Commands/CMakeLists_files.cmake
|
2016-10-21 08:49:56 -05:00
|
|
|
Commands/ApplicationCommands/CMakeLists_files.cmake
|
2017-05-30 07:25:41 -05:00
|
|
|
Commands/CompletionCommands/CMakeLists_files.cmake
|
2016-10-21 08:49:56 -05:00
|
|
|
Commands/CrossSectionCommands/CMakeLists_files.cmake
|
|
|
|
Commands/EclipseCommands/CMakeLists_files.cmake
|
2017-01-25 01:08:11 -06:00
|
|
|
Commands/EclipseCommands/EclipseWell/CMakeLists_files.cmake
|
2017-06-28 07:36:32 -05:00
|
|
|
Commands/ExportCommands/CMakeLists_files.cmake
|
2017-01-13 06:32:02 -06:00
|
|
|
Commands/FlowCommands/CMakeLists_files.cmake
|
2016-10-21 08:49:56 -05:00
|
|
|
Commands/IntersectionBoxCommands/CMakeLists_files.cmake
|
|
|
|
Commands/OctaveScriptCommands/CMakeLists_files.cmake
|
2017-05-30 07:25:41 -05:00
|
|
|
Commands/OperationsUsingObjReferences/CMakeLists_files.cmake
|
2016-10-21 08:49:56 -05:00
|
|
|
Commands/SummaryPlotCommands/CMakeLists_files.cmake
|
2015-08-18 03:51:13 -05:00
|
|
|
Commands/ToggleCommands/CMakeLists_files.cmake
|
2015-09-15 06:28:50 -05:00
|
|
|
Commands/ViewLink/CMakeLists_files.cmake
|
2015-09-18 02:07:06 -05:00
|
|
|
Commands/WellLogCommands/CMakeLists_files.cmake
|
2015-10-28 04:02:09 -05:00
|
|
|
Commands/WellPathCommands/CMakeLists_files.cmake
|
2017-06-29 04:48:26 -05:00
|
|
|
|
|
|
|
CommandFileInterface/Core/CMakeLists_files.cmake
|
2013-04-16 03:27:36 -05:00
|
|
|
)
|
|
|
|
|
2015-12-03 04:38:59 -06:00
|
|
|
option (RESINSIGHT_INCLUDE_APPLICATION_UNIT_TESTS "Include ApplicationCode Unit Tests" OFF)
|
|
|
|
if (RESINSIGHT_INCLUDE_APPLICATION_UNIT_TESTS)
|
|
|
|
add_definitions(-DUSE_UNIT_TESTS)
|
|
|
|
|
|
|
|
list( APPEND REFERENCED_CMAKE_FILES
|
|
|
|
UnitTests/CMakeLists_files.cmake
|
|
|
|
)
|
|
|
|
|
|
|
|
list( APPEND CPP_SOURCES
|
|
|
|
${ResInsight_SOURCE_DIR}/ThirdParty/gtest/gtest-all.cc
|
|
|
|
)
|
|
|
|
|
|
|
|
endif()
|
|
|
|
|
|
|
|
|
2013-04-16 03:27:36 -05:00
|
|
|
# Include source file lists from *.cmake files
|
|
|
|
foreach (referencedfile ${REFERENCED_CMAKE_FILES})
|
|
|
|
include (${referencedfile})
|
|
|
|
endforeach (referencedfile)
|
|
|
|
|
2012-05-18 02:45:23 -05:00
|
|
|
list( APPEND CPP_SOURCES
|
2013-02-13 07:50:37 -06:00
|
|
|
${CODE_SOURCE_FILES}
|
2012-05-18 02:45:23 -05:00
|
|
|
)
|
|
|
|
|
2015-04-29 02:26:29 -05:00
|
|
|
#############################################################################
|
|
|
|
# Sub-directory projects
|
|
|
|
#############################################################################
|
|
|
|
|
2013-09-06 04:34:24 -05:00
|
|
|
add_subdirectory(WellPathImportSsihub)
|
2015-05-11 06:25:05 -05:00
|
|
|
add_subdirectory(ResultStatisticsCache)
|
2013-05-29 05:59:08 -05:00
|
|
|
|
2015-04-29 02:26:29 -05:00
|
|
|
#
|
|
|
|
# Odb api
|
|
|
|
#
|
|
|
|
set(RESINSIGHT_ODB_API_DIR "" CACHE PATH "Path to the ODB api from Simulia")
|
|
|
|
if(NOT ${RESINSIGHT_ODB_API_DIR} EQUAL "")
|
|
|
|
add_definitions(-DUSE_ODB_API)
|
|
|
|
add_subdirectory(GeoMech/OdbReader)
|
|
|
|
SET(RESINSIGHT_USE_ODB_API 1)
|
2015-05-19 14:23:12 -05:00
|
|
|
MESSAGE( STATUS "Using ODB-Api from : ${RESINSIGHT_ODB_API_DIR}" )
|
2015-04-29 02:26:29 -05:00
|
|
|
endif()
|
2015-05-07 02:57:17 -05:00
|
|
|
|
|
|
|
add_subdirectory(GeoMech/GeoMechDataModel)
|
|
|
|
|
2015-04-29 02:26:29 -05:00
|
|
|
#############################################################################
|
|
|
|
# Qt specifics: Moc, ui, resources
|
|
|
|
#############################################################################
|
2012-05-18 02:45:23 -05:00
|
|
|
|
|
|
|
set ( QT_MOC_HEADERS
|
2015-08-20 02:57:09 -05:00
|
|
|
${QT_MOC_HEADERS}
|
2012-06-26 09:10:41 -05:00
|
|
|
|
2013-04-16 04:19:37 -05:00
|
|
|
ProjectDataModel/RimMimeData.h
|
2016-09-30 05:33:32 -05:00
|
|
|
ProjectDataModel/RimIntersectionBox.h
|
2012-06-26 09:10:41 -05:00
|
|
|
|
2013-12-04 05:04:42 -06:00
|
|
|
SocketInterface/RiaSocketServer.h
|
2012-05-18 02:45:23 -05:00
|
|
|
)
|
|
|
|
|
|
|
|
qt4_wrap_cpp( MOC_FILES_CPP ${QT_MOC_HEADERS} )
|
|
|
|
|
2013-03-05 06:26:28 -06:00
|
|
|
qt4_wrap_ui( FORM_FILES_CPP ${QT_UI_FILES} )
|
|
|
|
|
2012-05-18 02:45:23 -05:00
|
|
|
# NOTE! Resources in subfolders must append to QRC_FILES using the following statement
|
|
|
|
# set( QRC_FILES
|
|
|
|
# ${QRC_FILES}
|
|
|
|
# ${CMAKE_CURRENT_SOURCE_DIR}/Resources/myLibrary.qrc
|
|
|
|
# PARENT_SCOPE
|
|
|
|
# )
|
|
|
|
|
|
|
|
set( QRC_FILES
|
|
|
|
${QRC_FILES}
|
|
|
|
Resources/ResInsight.qrc
|
|
|
|
)
|
|
|
|
|
|
|
|
# Runs RCC on specified files
|
|
|
|
qt4_add_resources( QRC_FILES_CPP ${QRC_FILES} )
|
|
|
|
|
2013-04-10 05:01:38 -05:00
|
|
|
# Adding resource (RC) files for Windows
|
|
|
|
if ( MSVC )
|
|
|
|
set( WIN_RESOURCE Resources/ResInsight.rc )
|
|
|
|
endif()
|
2012-05-18 02:45:23 -05:00
|
|
|
|
|
|
|
|
2013-04-18 00:33:45 -05:00
|
|
|
################################################################################
|
|
|
|
# Create source groups - see also included CMakeLists_files.cmake
|
|
|
|
################################################################################
|
|
|
|
source_group( "ModelVisualization" FILES ${MODEL_VISUALIZATION_FILES} )
|
2013-05-16 06:43:37 -05:00
|
|
|
source_group( "SocketInterface" FILES ${SOCKET_INTERFACE_FILES} )
|
2015-10-05 09:09:51 -05:00
|
|
|
source_group( "UnitTests" FILES ${UNIT_TEST_FILES} )
|
2012-05-18 02:45:23 -05:00
|
|
|
|
|
|
|
|
2015-04-29 02:26:29 -05:00
|
|
|
#############################################################################
|
|
|
|
# Set up the main executable with its source files
|
|
|
|
#############################################################################
|
|
|
|
|
2013-08-22 01:03:27 -05:00
|
|
|
# Default behaviour for a Qt application is a console application, resulting in a console window always being launced at startup
|
|
|
|
# The following statement is used to control this behaviour
|
|
|
|
# set_target_properties( MY_TARGET PROPERTIES LINK_FLAGS_DEBUG "/SUBSYSTEM:WINDOWS")
|
|
|
|
# This setting i not honored by Cmake - http://public.kitware.com/Bug/view.php?id=14326
|
|
|
|
# We use the following workaround described in the bug report
|
|
|
|
# ADD_EXECUTABLE(${TARGET_NAME} WIN32 ${SRC})
|
|
|
|
# See CMake symbol WIN32_EXECUTABLE for details
|
|
|
|
|
|
|
|
if (MSVC)
|
|
|
|
set( EXE_FILES WIN32)
|
2014-12-01 03:06:03 -06:00
|
|
|
elseif (APPLE)
|
|
|
|
set( EXE_FILES MACOSX_BUNDLE)
|
2013-08-22 01:03:27 -05:00
|
|
|
endif()
|
|
|
|
set( EXE_FILES
|
|
|
|
${EXE_FILES}
|
2012-05-18 02:45:23 -05:00
|
|
|
${CPP_SOURCES}
|
|
|
|
${MOC_FILES_CPP}
|
2013-12-04 05:04:42 -06:00
|
|
|
${FORM_FILES_CPP}
|
2012-05-18 02:45:23 -05:00
|
|
|
${QRC_FILES_CPP}
|
2013-04-10 05:01:38 -05:00
|
|
|
${WIN_RESOURCE}
|
2013-12-04 05:04:42 -06:00
|
|
|
${HEADER_FILES}
|
2015-04-29 03:50:25 -05:00
|
|
|
${REFERENCED_CMAKE_FILES}
|
2013-10-09 01:54:51 -05:00
|
|
|
../ResInsightVersion.cmake
|
2012-05-18 02:45:23 -05:00
|
|
|
)
|
|
|
|
|
2013-08-22 01:03:27 -05:00
|
|
|
add_executable( ResInsight ${EXE_FILES} )
|
|
|
|
|
2015-04-29 02:26:29 -05:00
|
|
|
|
|
|
|
#############################################################################
|
2014-12-01 03:09:30 -06:00
|
|
|
# Application icon for MacOS X bundle
|
2015-04-29 02:26:29 -05:00
|
|
|
#############################################################################
|
|
|
|
|
2014-12-01 03:09:30 -06:00
|
|
|
if (APPLE)
|
|
|
|
add_custom_command (OUTPUT Resources/ResInsight.icns
|
|
|
|
COMMAND sips -s format icns ${CMAKE_CURRENT_SOURCE_DIR}/Resources/AppLogo48x48.png --out ${CMAKE_CURRENT_BINARY_DIR}/Resources/ResInsight.icns
|
|
|
|
COMMENT Converting application icon
|
|
|
|
)
|
|
|
|
add_custom_target (ResInsight-icns
|
|
|
|
DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/Resources/ResInsight.icns)
|
|
|
|
add_dependencies (ResInsight ResInsight-icns)
|
|
|
|
set_target_properties (ResInsight PROPERTIES
|
|
|
|
MACOSX_BUNDLE_ICON_FILE ${CMAKE_CURRENT_BINARY_DIR}/Resources/ResInsight.icns)
|
|
|
|
endif ()
|
2012-05-18 02:45:23 -05:00
|
|
|
|
2015-04-29 02:26:29 -05:00
|
|
|
#############################################################################
|
|
|
|
# Set up libraries and dependent projects to link with
|
|
|
|
#############################################################################
|
|
|
|
|
2012-05-18 02:45:23 -05:00
|
|
|
set( LINK_LIBRARIES
|
2017-01-21 05:26:21 -06:00
|
|
|
${OPM_LIBRARIES}
|
2016-09-05 08:23:24 -05:00
|
|
|
|
2013-09-06 09:07:09 -05:00
|
|
|
WellPathImportSsihub
|
|
|
|
|
2015-05-11 06:25:05 -05:00
|
|
|
ResultStatisticsCache
|
2015-04-25 01:54:08 -05:00
|
|
|
RigGeoMechDataModel
|
|
|
|
|
2016-05-26 07:49:13 -05:00
|
|
|
${APP_FWK_LIBRARIES}
|
|
|
|
${VIZ_FWK_LIBRARIES}
|
2016-06-30 07:53:38 -05:00
|
|
|
|
2016-05-26 07:49:13 -05:00
|
|
|
${ERT_LIBRARIES}
|
2016-05-27 06:12:31 -05:00
|
|
|
|
2017-01-21 05:26:21 -06:00
|
|
|
${THIRD_PARTY_LIBRARIES}
|
2015-09-11 10:03:11 -05:00
|
|
|
|
2012-05-18 02:45:23 -05:00
|
|
|
${OPENGL_LIBRARIES}
|
|
|
|
${QT_LIBRARIES}
|
|
|
|
)
|
2017-04-05 01:34:52 -05:00
|
|
|
|
2012-09-09 04:24:02 -05:00
|
|
|
set( EXTERNAL_LINK_LIBRARIES ${ERT_LIBRARY_LIST} )
|
2012-10-02 03:17:52 -05:00
|
|
|
|
|
|
|
# According to ivarun this is needed on OpenSuse, and Fedora. See: https://github.com/OPM/ResInsight/pull/7
|
|
|
|
if (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
|
|
|
|
set ( EXTERNAL_LINK_LIBRARIES
|
2013-12-04 05:04:42 -06:00
|
|
|
${EXTERNAL_LINK_LIBRARIES}
|
|
|
|
rt
|
2012-10-02 03:17:52 -05:00
|
|
|
)
|
|
|
|
endif()
|
|
|
|
|
2015-04-29 02:26:29 -05:00
|
|
|
# Add the odb reader if we are compiling with odb support
|
|
|
|
IF (${RESINSIGHT_USE_ODB_API})
|
|
|
|
set ( LINK_LIBRARIES ${LINK_LIBRARIES} RifOdbReader)
|
|
|
|
ENDIF()
|
|
|
|
|
2012-06-26 09:10:41 -05:00
|
|
|
target_link_libraries( ResInsight ${LINK_LIBRARIES} ${EXTERNAL_LINK_LIBRARIES})
|
2012-05-18 02:45:23 -05:00
|
|
|
|
2016-06-08 05:18:36 -05:00
|
|
|
|
|
|
|
#############################################################################
|
|
|
|
# cotire
|
|
|
|
#############################################################################
|
|
|
|
if(RESINSIGHT_ENABLE_COTIRE)
|
|
|
|
|
|
|
|
# forever is used as variable name, and this symbol is defined by Qt and used in precompiled headers
|
|
|
|
set_source_files_properties (${ResInsight_SOURCE_DIR}/ThirdParty/gtest/gtest-all.cc PROPERTIES COTIRE_EXCLUDED TRUE)
|
|
|
|
|
|
|
|
# multiple QRC files are not supported
|
|
|
|
set_source_files_properties (qrc_cafAnimControl.cxx PROPERTIES COTIRE_EXCLUDED TRUE)
|
|
|
|
|
|
|
|
# variables at global file scope
|
2016-09-21 07:40:50 -05:00
|
|
|
set_source_files_properties (ModelVisualization/Intersections/RivIntersectionGeometryGenerator.cpp PROPERTIES COTIRE_EXCLUDED TRUE)
|
|
|
|
set_source_files_properties (ModelVisualization/Intersections/RivIntersectionPartMgr.cpp PROPERTIES COTIRE_EXCLUDED TRUE)
|
|
|
|
set_source_files_properties (ModelVisualization/Intersections/RivIntersectionBoxPartMgr.cpp PROPERTIES COTIRE_EXCLUDED TRUE)
|
|
|
|
|
2016-06-29 01:03:59 -05:00
|
|
|
set_source_files_properties (ModelVisualization/GridBox/RivGridBoxGenerator.cpp PROPERTIES COTIRE_EXCLUDED TRUE)
|
|
|
|
set_source_files_properties (Commands/WellLogCommands/RicWellLogPlotCurveFeatureImpl.cpp PROPERTIES COTIRE_EXCLUDED TRUE)
|
2016-06-08 05:18:36 -05:00
|
|
|
|
|
|
|
# using namespace cvf
|
|
|
|
set_source_files_properties (GeoMech/GeoMechVisualization/RivFemPartGeometryGenerator.cpp PROPERTIES COTIRE_EXCLUDED TRUE)
|
|
|
|
set_source_files_properties (UnitTests/cvfGeometryTools-Test.cpp PROPERTIES COTIRE_EXCLUDED TRUE)
|
2016-06-29 01:03:59 -05:00
|
|
|
|
|
|
|
# opm parser
|
|
|
|
set_source_files_properties (ProjectDataModel/RimProject.cpp PROPERTIES COTIRE_EXCLUDED TRUE)
|
|
|
|
|
2016-06-08 05:18:36 -05:00
|
|
|
set_target_properties(ResInsight PROPERTIES COTIRE_ENABLE_PRECOMPILED_HEADER FALSE)
|
|
|
|
|
|
|
|
cotire(ResInsight)
|
|
|
|
|
|
|
|
# make sure the unity target is included in the active builds to trigger rebuild before debug
|
|
|
|
get_target_property(_unityTargetName ResInsight COTIRE_UNITY_TARGET_NAME)
|
|
|
|
set_target_properties(${_unityTargetName} PROPERTIES EXCLUDE_FROM_DEFAULT_BUILD FALSE)
|
2016-06-10 05:47:21 -05:00
|
|
|
set_target_properties(ResInsight PROPERTIES EXCLUDE_FROM_DEFAULT_BUILD TRUE)
|
2016-06-08 05:18:36 -05:00
|
|
|
|
|
|
|
endif()
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-04-29 02:26:29 -05:00
|
|
|
#############################################################################
|
|
|
|
# Copy Dlls on MSVC
|
|
|
|
#############################################################################
|
2015-04-24 08:53:50 -05:00
|
|
|
|
2015-04-25 01:54:08 -05:00
|
|
|
# Copy Odb Dlls
|
|
|
|
|
2015-04-29 02:26:29 -05:00
|
|
|
if ((MSVC) AND (${RESINSIGHT_USE_ODB_API}))
|
2015-04-25 01:54:08 -05:00
|
|
|
# Find all the dlls
|
2015-04-28 03:45:00 -05:00
|
|
|
file (GLOB RI_ALL_ODB_DLLS ${RESINSIGHT_ODB_API_DIR}/lib/*.dll)
|
2015-04-25 01:54:08 -05:00
|
|
|
|
|
|
|
# Strip off the path
|
|
|
|
foreach (aDLL ${RI_ALL_ODB_DLLS})
|
|
|
|
get_filename_component(filenameWithExt ${aDLL} NAME)
|
|
|
|
list(APPEND RI_ODB_DLLS ${filenameWithExt} )
|
|
|
|
endforeach(aDLL)
|
|
|
|
|
|
|
|
# Copy to target directory
|
|
|
|
foreach (aDLL ${RI_ODB_DLLS})
|
|
|
|
add_custom_command(TARGET ResInsight POST_BUILD
|
2015-04-28 03:45:00 -05:00
|
|
|
COMMAND ${CMAKE_COMMAND} -E copy_if_different
|
|
|
|
"${RESINSIGHT_ODB_API_DIR}/lib/${aDLL}"
|
|
|
|
"${CMAKE_CURRENT_BINARY_DIR}/$<CONFIGURATION>")
|
2016-06-10 08:10:10 -05:00
|
|
|
if (_unityTargetName)
|
|
|
|
add_custom_command(TARGET ${_unityTargetName} POST_BUILD
|
|
|
|
COMMAND ${CMAKE_COMMAND} -E copy_if_different
|
|
|
|
"${RESINSIGHT_ODB_API_DIR}/lib/${aDLL}"
|
|
|
|
"${CMAKE_CURRENT_BINARY_DIR}/$<CONFIGURATION>")
|
|
|
|
endif()
|
2015-04-25 01:54:08 -05:00
|
|
|
endforeach()
|
|
|
|
|
2015-04-29 02:26:29 -05:00
|
|
|
endif()
|
2015-04-25 01:54:08 -05:00
|
|
|
|
2015-04-29 02:26:29 -05:00
|
|
|
# Qt DLLs
|
2015-04-25 01:54:08 -05:00
|
|
|
|
2012-05-18 02:45:23 -05:00
|
|
|
if (MSVC)
|
2012-06-26 09:10:41 -05:00
|
|
|
|
Added visualization of Well Paths in reservoir views.
Added PDM objects for a list of well paths (RimWellPathCollection) and for individual well paths (RimWellPath).
RimWellPathCollection uses RivWellPathCollectionPartMgr to generate visualization parts for each well path in the collection.
RimWellPath handles geometry defined in RigWellPath, and RivWellPathPartMgr is used to generate visualization parts. The well path visualization parts are generated by reusing RivPipeGeometryGenerator (also used for well pipes).
Added features:
- Select Open Well Paths in File menu to open one or more well path files, file format supported is Statoil JSON format.
- Each well path has a label showing the name, and the PDM window will show additional info (Id, Source System, UTM Zone, Update Date and User, Survey Type, File Path).
- Possible to turn on / off visibility, set thickness, set color for individual well paths.
- List of well paths including specified parameters/settings will be stored in project file.
- Possible to clip all well paths at a specified distance to the reservoir as this is the relevant area to see, and if showing whole well path it may be problematic for auto zoom etc.
Known problems:
- Well paths are not shown in some types of reservoir views, for instance reservoir views showing well pipes. Will look into this later.
p4#: 21658
2013-05-16 07:10:22 -05:00
|
|
|
set (QTLIBLIST QtCore QtCored QtGui QtGuid QtOpenGl QtOpenGld QtNetwork QtNetworkd QtScript QtScriptd QtScriptTools QtScriptToolsd)
|
2012-05-18 02:45:23 -05:00
|
|
|
foreach (qtlib ${QTLIBLIST})
|
2012-06-26 09:10:41 -05:00
|
|
|
add_custom_command(TARGET ResInsight POST_BUILD
|
|
|
|
COMMAND ${CMAKE_COMMAND} -E copy_if_different
|
|
|
|
"${QT_BINARY_DIR}/${qtlib}4.dll"
|
2015-04-28 03:45:00 -05:00
|
|
|
"${CMAKE_CURRENT_BINARY_DIR}/$<CONFIGURATION>")
|
2016-06-10 08:10:10 -05:00
|
|
|
if (_unityTargetName)
|
|
|
|
add_custom_command(TARGET ResInsight POST_BUILD
|
|
|
|
COMMAND ${CMAKE_COMMAND} -E copy_if_different
|
|
|
|
"${QT_BINARY_DIR}/${qtlib}4.dll"
|
|
|
|
"${CMAKE_CURRENT_BINARY_DIR}/$<CONFIGURATION>")
|
|
|
|
endif()
|
2012-06-26 09:10:41 -05:00
|
|
|
endforeach( qtlib )
|
2012-05-18 02:45:23 -05:00
|
|
|
|
|
|
|
endif(MSVC)
|
|
|
|
|
|
|
|
#############################################################################
|
|
|
|
# Install
|
|
|
|
#############################################################################
|
|
|
|
|
2013-03-26 17:12:34 -05:00
|
|
|
set (RESINSIGHT_LICENSE_FILES
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/Adm/LicenseInformation.txt
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/Adm/gplLicense.txt
|
|
|
|
)
|
|
|
|
|
2013-03-26 17:00:09 -05:00
|
|
|
# bundle libraries together with private installation
|
2013-08-30 08:37:29 -05:00
|
|
|
if (RESINSIGHT_PRIVATE_INSTALL)
|
|
|
|
|
2013-12-04 05:04:42 -06:00
|
|
|
if (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
|
|
|
|
# tell binary to first attempt to load libraries from its own directory
|
2016-05-26 14:23:16 -05:00
|
|
|
set(RESINSIGHT_INSTALL_RPATH "\$ORIGIN")
|
2015-05-19 14:23:12 -05:00
|
|
|
|
|
|
|
if (${RESINSIGHT_USE_ODB_API})
|
|
|
|
# This is a "hack" to make ResInsight runtime find the ODB so files used when compiling.
|
|
|
|
# statoil wanted it this way, but we should probbly make a different installoptions that does things this way,
|
|
|
|
# and really do copy them when doing PRIVATE_INSTALL
|
2016-05-26 14:23:16 -05:00
|
|
|
set(RESINSIGHT_INSTALL_RPATH ${RESINSIGHT_INSTALL_RPATH} ${RESINSIGHT_ODB_API_DIR}/lib)
|
2015-05-19 14:23:12 -05:00
|
|
|
endif()
|
2016-05-26 14:23:16 -05:00
|
|
|
|
2016-05-26 14:40:19 -05:00
|
|
|
if (EXISTS ${RESINSIGHT_ERT_EXTERNAL_LIB_ROOT})
|
2016-05-26 14:23:16 -05:00
|
|
|
# append the external ERT lib root
|
|
|
|
set(RESINSIGHT_INSTALL_RPATH ${RESINSIGHT_INSTALL_RPATH} ${RESINSIGHT_ERT_EXTERNAL_LIB_ROOT})
|
|
|
|
endif()
|
|
|
|
|
|
|
|
#message("RESINSIGHT_INSTALL_RPATH : " "${RESINSIGHT_INSTALL_RPATH}")
|
2013-12-04 05:04:42 -06:00
|
|
|
|
2016-05-26 14:23:16 -05:00
|
|
|
set_target_properties (ResInsight PROPERTIES INSTALL_RPATH "${RESINSIGHT_INSTALL_RPATH}")
|
|
|
|
|
2013-12-04 05:04:42 -06:00
|
|
|
endif()
|
|
|
|
|
|
|
|
if (${CMAKE_SYSTEM_NAME} MATCHES "Windows")
|
|
|
|
# put a .exe.local file in the target directory to pick up DLLs from there
|
2016-12-01 03:17:38 -06:00
|
|
|
install (CODE "exec_program (\"${CMAKE_COMMAND}\" ARGS -E touch \$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}ResInsight${CMAKE_EXECUTABLE_SUFFIX}.local)")
|
2013-12-04 05:04:42 -06:00
|
|
|
|
|
|
|
set (RESINSIGHT_FILES
|
|
|
|
${QT_BINARY_DIR}/QtCore4.dll
|
|
|
|
${QT_BINARY_DIR}/QtGui4.dll
|
|
|
|
${QT_BINARY_DIR}/QtOpenGL4.dll
|
|
|
|
${QT_BINARY_DIR}/QtNetwork4.dll
|
|
|
|
${QT_BINARY_DIR}/QtScript4.dll
|
|
|
|
${QT_BINARY_DIR}/QtScriptTools4.dll
|
|
|
|
)
|
2015-06-25 04:27:11 -05:00
|
|
|
|
|
|
|
if (${RESINSIGHT_USE_ODB_API})
|
|
|
|
set (RESINSIGHT_FILES ${RESINSIGHT_FILES} ${RI_ALL_ODB_DLLS})
|
|
|
|
endif()
|
|
|
|
|
2015-12-22 08:00:27 -06:00
|
|
|
# CRT
|
|
|
|
set(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP ON)
|
|
|
|
set(CMAKE_INSTALL_OPENMP_LIBRARIES ON)
|
|
|
|
include(InstallRequiredSystemLibraries)
|
2016-12-01 04:23:52 -06:00
|
|
|
install(PROGRAMS ${CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS} DESTINATION ${RESINSIGHT_INSTALL_FOLDER})
|
2015-12-22 08:00:27 -06:00
|
|
|
|
2013-12-04 05:04:42 -06:00
|
|
|
endif()
|
|
|
|
|
|
|
|
set (RESINSIGHT_FILES ${RESINSIGHT_FILES} ${RESINSIGHT_LICENSE_FILES})
|
2012-05-18 02:45:23 -05:00
|
|
|
|
|
|
|
|
2016-12-01 04:23:52 -06:00
|
|
|
install(TARGETS ResInsight DESTINATION ${RESINSIGHT_INSTALL_FOLDER})
|
2012-05-18 02:45:23 -05:00
|
|
|
|
2016-12-01 04:23:52 -06:00
|
|
|
install(FILES ${RESINSIGHT_FILES} DESTINATION ${RESINSIGHT_INSTALL_FOLDER} )
|
2012-09-13 06:14:07 -05:00
|
|
|
|
2013-12-04 05:04:42 -06:00
|
|
|
if (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
|
2016-12-01 04:23:52 -06:00
|
|
|
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/resinsight DESTINATION ${RESINSIGHT_INSTALL_FOLDER} PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE )
|
2013-12-04 05:04:42 -06:00
|
|
|
endif()
|
2012-05-18 02:45:23 -05:00
|
|
|
|
2013-08-30 08:37:29 -05:00
|
|
|
else (RESINSIGHT_PRIVATE_INSTALL)
|
2013-03-26 17:00:09 -05:00
|
|
|
# binaries go in /usr/bin
|
|
|
|
install (TARGETS ResInsight
|
2013-12-04 05:04:42 -06:00
|
|
|
DESTINATION bin
|
|
|
|
)
|
2013-03-26 17:00:09 -05:00
|
|
|
# license go in /usr/share/doc
|
|
|
|
install (FILES ${RESINSIGHT_LICENSE_FILES}
|
2013-12-04 05:04:42 -06:00
|
|
|
DESTINATION share/doc/ResInsight
|
|
|
|
)
|
2013-03-26 17:00:09 -05:00
|
|
|
# no bundled libraries for system install
|
2013-03-26 17:48:26 -05:00
|
|
|
# application icon
|
|
|
|
install (FILES ${CMAKE_CURRENT_SOURCE_DIR}/Resources/AppLogo48x48.png
|
2013-12-04 05:04:42 -06:00
|
|
|
DESTINATION share/icons/hicolor/48x48/apps
|
|
|
|
RENAME ResInsight.png
|
|
|
|
)
|
2013-03-26 17:48:26 -05:00
|
|
|
# desktop environment icon; remember to call `update-desktop-database`
|
|
|
|
# in package post-install scripts
|
|
|
|
configure_file (
|
2013-12-04 05:04:42 -06:00
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/resinsight.desktop.in
|
|
|
|
${CMAKE_CURRENT_BINARY_DIR}/resinsight.desktop
|
|
|
|
@ONLY
|
|
|
|
)
|
2013-03-26 17:48:26 -05:00
|
|
|
install (FILES ${CMAKE_CURRENT_BINARY_DIR}/resinsight.desktop
|
2013-12-04 05:04:42 -06:00
|
|
|
DESTINATION share/applications
|
|
|
|
)
|
2013-08-30 08:37:29 -05:00
|
|
|
endif (RESINSIGHT_PRIVATE_INSTALL)
|