2018-02-27 13:00:56 -06:00
|
|
|
cmake_minimum_required (VERSION 2.8.12)
|
2012-05-18 02:45:23 -05:00
|
|
|
|
2014-08-12 08:02:19 -05:00
|
|
|
include (CheckCSourceCompiles)
|
2012-05-18 02:45:23 -05:00
|
|
|
project (ResInsight)
|
|
|
|
|
2013-09-20 09:21:46 -05:00
|
|
|
set (VIZ_MODULES_FOLDER_NAME Fwk/VizFwk)
|
2012-05-18 02:45:23 -05:00
|
|
|
|
2015-04-29 03:50:25 -05:00
|
|
|
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
|
2012-05-18 02:45:23 -05:00
|
|
|
|
2016-06-12 08:47:41 -05:00
|
|
|
SET(BUILD_SHARED_LIBS OFF CACHE BOOL "ERT: Build shared libraries")
|
2013-04-12 08:27:18 -05:00
|
|
|
|
2013-10-07 00:23:04 -05:00
|
|
|
################################################################################
|
2012-05-18 02:45:23 -05:00
|
|
|
# Setup the main platform defines
|
2013-10-07 00:23:04 -05:00
|
|
|
################################################################################
|
2012-05-18 02:45:23 -05:00
|
|
|
if (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
|
|
|
|
add_definitions(-DCVF_LINUX)
|
|
|
|
elseif (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
|
|
|
|
add_definitions(-DCVF_OSX)
|
2016-06-03 09:25:48 -05:00
|
|
|
elseif(MSVC)
|
2012-05-18 02:45:23 -05:00
|
|
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP")
|
|
|
|
endif()
|
|
|
|
|
2013-10-07 00:23:04 -05:00
|
|
|
if (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
|
2016-06-14 07:46:30 -05:00
|
|
|
set(CMAKE_CXX_FLAGS "-DCVF_LINUX -pipe -Wextra -Woverloaded-virtual -Wformat -std=c++0x")
|
2013-10-07 00:23:04 -05:00
|
|
|
set(CMAKE_CXX_FLAGS_DEBUG "-ggdb -g3 -O0 -DDEBUG -D_DEBUG")
|
|
|
|
set(CMAKE_CXX_FLAGS_RELEASE "-O2 -DNO_DEBUG")
|
|
|
|
endif()
|
|
|
|
|
2013-08-30 08:37:29 -05:00
|
|
|
|
2013-10-07 00:23:04 -05:00
|
|
|
################################################################################
|
|
|
|
# OpenMP
|
|
|
|
################################################################################
|
|
|
|
option (RESINSIGHT_USE_OPENMP "Enable OpenMP parallellization in the code" ON)
|
|
|
|
if (RESINSIGHT_USE_OPENMP)
|
|
|
|
find_package(OpenMP)
|
|
|
|
if(OPENMP_FOUND)
|
|
|
|
message(STATUS "Enabling OpenMP support")
|
|
|
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
|
|
|
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
|
|
|
|
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${OpenMP_EXE_LINKER_FLAGS}")
|
|
|
|
else()
|
|
|
|
message(STATUS "Disabling OpenMP support")
|
|
|
|
endif()
|
|
|
|
endif()
|
2012-05-18 02:45:23 -05:00
|
|
|
|
|
|
|
|
|
|
|
################################################################################
|
2013-01-22 02:30:28 -06:00
|
|
|
# Version number
|
2012-05-18 02:45:23 -05:00
|
|
|
################################################################################
|
2013-01-22 02:30:28 -06:00
|
|
|
include (ResInsightVersion.cmake)
|
2012-05-18 02:45:23 -05:00
|
|
|
|
2016-10-10 04:08:48 -05:00
|
|
|
|
2016-06-10 07:03:22 -05:00
|
|
|
################################################################################
|
|
|
|
# cotire
|
|
|
|
# Fully automated CMake module for build speedup
|
|
|
|
# https://github.com/sakra/cotire
|
|
|
|
################################################################################
|
|
|
|
|
2018-01-05 07:21:02 -06:00
|
|
|
option(RESINSIGHT_ENABLE_COTIRE "Experimental speedup of compilation using cotire" OFF)
|
|
|
|
mark_as_advanced(FORCE RESINSIGHT_ENABLE_COTIRE)
|
2016-06-10 07:03:22 -05:00
|
|
|
if(RESINSIGHT_ENABLE_COTIRE)
|
|
|
|
set (CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake")
|
|
|
|
|
|
|
|
include(cotire)
|
|
|
|
endif()
|
|
|
|
|
2016-06-06 02:56:45 -05:00
|
|
|
|
2013-01-17 06:33:59 -06:00
|
|
|
################################################################################
|
|
|
|
# ERT
|
|
|
|
################################################################################
|
2013-04-04 04:27:38 -05:00
|
|
|
|
2016-05-26 14:23:16 -05:00
|
|
|
if (NOT MSVC)
|
|
|
|
# Linux: Optional configuration of externally installed ERT, requires path to libraries and includes
|
2016-05-26 14:40:19 -05:00
|
|
|
set(RESINSIGHT_ERT_EXTERNAL_LIB_ROOT "" CACHE PATH "Path to installed ERT libraries")
|
|
|
|
set(RESINSIGHT_ERT_EXTERNAL_INCLUDE_ROOT "" CACHE PATH "Path to installed ERT includes")
|
2016-05-26 14:23:16 -05:00
|
|
|
endif()
|
|
|
|
|
|
|
|
if (RESINSIGHT_ERT_EXTERNAL_LIB_ROOT OR RESINSIGHT_ERT_EXTERNAL_INCLUDE_ROOT)
|
|
|
|
if (NOT(RESINSIGHT_ERT_EXTERNAL_LIB_ROOT AND RESINSIGHT_ERT_EXTERNAL_INCLUDE_ROOT))
|
|
|
|
message(FATAL_ERROR "Both RESINSIGHT_ERT_EXTERNAL_LIB_ROOT and RESINSIGHT_ERT_EXTERNAL_INCLUDE_ROOT must be defined")
|
|
|
|
endif()
|
|
|
|
|
2017-08-09 01:31:18 -05:00
|
|
|
message(FATAL_ERROR "TODO: Building using and external system installed ERT is broken.")
|
|
|
|
|
2016-05-26 14:23:16 -05:00
|
|
|
list(APPEND ERT_INCLUDE_DIRS
|
|
|
|
${RESINSIGHT_ERT_EXTERNAL_INCLUDE_ROOT}
|
|
|
|
)
|
|
|
|
|
2016-10-14 03:03:53 -05:00
|
|
|
list(APPEND ERT_LIBRARIES
|
2016-05-26 14:23:16 -05:00
|
|
|
${RESINSIGHT_ERT_EXTERNAL_LIB_ROOT}/libecl.so
|
|
|
|
)
|
|
|
|
|
2016-06-02 05:50:42 -05:00
|
|
|
else()
|
2016-05-26 14:23:16 -05:00
|
|
|
|
|
|
|
# Disable install of ERT libs and headers, as Ert code is compiled and linked directly
|
|
|
|
SET(INSTALL_ERT OFF CACHE BOOL "ERT: Install library")
|
|
|
|
SET(ERT_USE_OPENMP ${OPENMP_FOUND} CACHE BOOL "ERT: Compile using OpenMP")
|
|
|
|
|
2016-06-02 05:50:42 -05:00
|
|
|
# Remember original state
|
|
|
|
set(ORIGINAL_BUILD_SHARED_LIBS ${BUILD_SHARED_LIBS})
|
|
|
|
|
|
|
|
if (MSVC)
|
|
|
|
# Force static linking on Windows
|
|
|
|
set(BUILD_SHARED_LIBS OFF)
|
2016-06-03 09:25:48 -05:00
|
|
|
set(ERT_HAVE_UNISTD OFF) #If anyone has mingw installed
|
2016-06-02 05:50:42 -05:00
|
|
|
else ()
|
|
|
|
set(RESINSIGHT_ERT_EXTERNAL_SOURCE_ROOT "" CACHE STRING "Path to ERT CMakeList.txt (source path)")
|
|
|
|
|
|
|
|
# Force dynamic linking on other platforms
|
|
|
|
# Copy of libraries into install folder of ResInsight is done a bit further down in this file
|
|
|
|
set(BUILD_SHARED_LIBS ON)
|
2016-05-26 07:49:13 -05:00
|
|
|
endif()
|
2016-05-26 14:23:16 -05:00
|
|
|
|
|
|
|
if (RESINSIGHT_ERT_EXTERNAL_SOURCE_ROOT)
|
2017-08-09 01:31:18 -05:00
|
|
|
add_subdirectory(${RESINSIGHT_ERT_EXTERNAL_SOURCE_ROOT} ${CMAKE_BINARY_DIR}/ThirdParty/Ert)
|
2016-05-26 14:23:16 -05:00
|
|
|
else()
|
2016-10-13 06:39:01 -05:00
|
|
|
add_subdirectory(ThirdParty/Ert)
|
2016-05-26 14:23:16 -05:00
|
|
|
endif ()
|
|
|
|
|
2017-08-17 06:20:47 -05:00
|
|
|
if (MSVC)
|
|
|
|
# libecl : Disable some warnings
|
|
|
|
set_target_properties(ecl PROPERTIES COMPILE_FLAGS "/wd4244 /wd4267 /wd4013 /wd4190 /wd4018 /wd4477 /wd4098 /wd4293 /wd4305 /wd4020 /wd4028 /wd4715")
|
|
|
|
endif()
|
2016-05-26 14:23:16 -05:00
|
|
|
|
2017-08-09 01:31:18 -05:00
|
|
|
list(APPEND THIRD_PARTY_LIBRARIES
|
|
|
|
ecl
|
2016-05-26 14:23:16 -05:00
|
|
|
)
|
|
|
|
|
2016-05-27 10:28:31 -05:00
|
|
|
if (MSVC)
|
|
|
|
set_property(TARGET
|
2017-08-09 01:31:18 -05:00
|
|
|
ecl
|
2017-01-21 05:26:21 -06:00
|
|
|
PROPERTY FOLDER "Thirdparty/ERT"
|
2016-05-27 10:28:31 -05:00
|
|
|
)
|
|
|
|
endif()
|
2016-05-26 14:23:16 -05:00
|
|
|
|
2016-06-02 05:50:42 -05:00
|
|
|
# Restore original state
|
|
|
|
set(BUILD_SHARED_LIBS ${ORIGINAL_BUILD_SHARED_LIBS})
|
|
|
|
|
2016-05-26 14:23:16 -05:00
|
|
|
endif(RESINSIGHT_ERT_EXTERNAL_LIB_ROOT OR RESINSIGHT_ERT_EXTERNAL_INCLUDE_ROOT)
|
|
|
|
|
2013-01-17 14:26:12 -06:00
|
|
|
|
2017-08-17 01:39:02 -05:00
|
|
|
################################################################################
|
|
|
|
# HDF5
|
|
|
|
################################################################################
|
2017-08-22 07:08:17 -05:00
|
|
|
if(MSVC)
|
2018-01-05 07:21:02 -06:00
|
|
|
set(RESINSIGHT_HDF5_DIR "" CACHE PATH "Windows Only: Optional path to HDF5 libraries on Windows")
|
2017-08-22 07:08:17 -05:00
|
|
|
endif()
|
2017-08-22 15:30:31 -05:00
|
|
|
|
2018-01-04 06:53:50 -06:00
|
|
|
option (RESINSIGHT_ENABLE_PROTOTYPE_FEATURE_SOURING "Enable prototype feature Souring (requires third party library HDF5)" ON)
|
2018-01-05 07:21:02 -06:00
|
|
|
mark_as_advanced(FORCE RESINSIGHT_ENABLE_PROTOTYPE_FEATURE_SOURING)
|
|
|
|
|
2017-08-21 04:49:49 -05:00
|
|
|
if (RESINSIGHT_ENABLE_PROTOTYPE_FEATURE_SOURING)
|
2017-08-17 01:39:02 -05:00
|
|
|
if(MSVC)
|
|
|
|
if(NOT ${RESINSIGHT_HDF5_DIR} EQUAL "")
|
2017-08-22 15:30:31 -05:00
|
|
|
add_definitions(-DH5_BUILT_AS_DYNAMIC_LIB)
|
2017-08-17 01:39:02 -05:00
|
|
|
|
|
|
|
include_directories(${RESINSIGHT_HDF5_DIR}/include)
|
|
|
|
|
|
|
|
list(APPEND EXTERNAL_LINK_LIBRARIES
|
2017-08-22 15:30:31 -05:00
|
|
|
${RESINSIGHT_HDF5_DIR}/lib/hdf5.lib
|
|
|
|
${RESINSIGHT_HDF5_DIR}/lib/hdf5_cpp.lib
|
2017-08-17 01:39:02 -05:00
|
|
|
)
|
|
|
|
|
|
|
|
set(RESINSIGHT_FOUND_HDF5 1)
|
|
|
|
message( STATUS "Using HDF5 from : ${RESINSIGHT_HDF5_DIR}" )
|
|
|
|
else()
|
|
|
|
message( WARNING "Use of HDF5 is enabled, but RESINSIGHT_HDF5_DIR is empty. Specify RESINSIGHT_HDF5_DIR to be able to use HDF5" )
|
|
|
|
endif()
|
|
|
|
else()
|
2018-01-05 00:06:55 -06:00
|
|
|
find_package(HDF5 COMPONENTS CXX)
|
2017-08-17 01:39:02 -05:00
|
|
|
if (HDF5_FOUND)
|
2018-01-05 00:06:55 -06:00
|
|
|
add_definitions(-DH5_BUILT_AS_DYNAMIC_LIB)
|
2017-08-17 01:39:02 -05:00
|
|
|
add_definitions(${HDF5_DEFINITIONS})
|
|
|
|
include_directories(${HDF5_INCLUDE_DIRS})
|
|
|
|
|
2017-08-17 02:12:27 -05:00
|
|
|
list(APPEND EXTERNAL_LINK_LIBRARIES
|
2017-08-17 01:39:02 -05:00
|
|
|
${HDF5_LIBRARIES}
|
|
|
|
)
|
|
|
|
|
|
|
|
set(RESINSIGHT_FOUND_HDF5 1)
|
|
|
|
message( STATUS "Using HDF5 libraries : ${HDF5_LIBRARIES}" )
|
|
|
|
else()
|
|
|
|
message( WARNING "Use of HDF5 is enabled, but no HDF5 is found." )
|
|
|
|
endif() # HDF5_FOUND
|
|
|
|
endif() # MSVC
|
2017-08-21 04:49:49 -05:00
|
|
|
endif() # RESINSIGHT_ENABLE_PROTOTYPE_FEATURE_SOURING
|
2017-08-17 01:39:02 -05:00
|
|
|
|
|
|
|
|
2017-04-05 01:34:52 -05:00
|
|
|
################################################################################
|
|
|
|
# Subset of Boost, used by NRLib and flow diagnostics application
|
|
|
|
################################################################################
|
|
|
|
|
|
|
|
if(MSVC)
|
|
|
|
# stop MSVC from trying to auto-link libs
|
|
|
|
add_definitions("-DBOOST_ALL_NO_LIB")
|
|
|
|
endif()
|
|
|
|
|
|
|
|
add_subdirectory(ThirdParty/boost-Subset)
|
|
|
|
|
|
|
|
list(APPEND THIRD_PARTY_LIBRARIES
|
|
|
|
boost-Subset
|
|
|
|
)
|
|
|
|
|
2016-05-27 06:12:31 -05:00
|
|
|
################################################################################
|
|
|
|
# Opm
|
|
|
|
################################################################################
|
|
|
|
|
2016-09-05 08:23:24 -05:00
|
|
|
add_subdirectory(ThirdParty/custom-opm-flowdiagnostics)
|
2016-12-09 09:25:43 -06:00
|
|
|
add_subdirectory(ThirdParty/custom-opm-flowdiag-app)
|
2015-09-11 10:03:11 -05:00
|
|
|
|
2017-01-21 05:26:21 -06:00
|
|
|
list(APPEND OPM_LIBRARIES
|
|
|
|
custom-opm-flowdiagnostics
|
|
|
|
custom-opm-flowdiag-app
|
|
|
|
)
|
|
|
|
|
|
|
|
set_property(TARGET
|
|
|
|
${OPM_LIBRARIES}
|
|
|
|
PROPERTY FOLDER "Thirdparty/OPM"
|
|
|
|
)
|
|
|
|
|
2015-09-11 10:03:11 -05:00
|
|
|
################################################################################
|
|
|
|
# NRLib
|
|
|
|
################################################################################
|
|
|
|
|
|
|
|
add_subdirectory(ThirdParty/NRLib)
|
|
|
|
|
2017-01-21 05:26:21 -06:00
|
|
|
list(APPEND THIRD_PARTY_LIBRARIES
|
|
|
|
NRLib
|
|
|
|
)
|
|
|
|
|
2012-05-18 02:45:23 -05:00
|
|
|
################################################################################
|
|
|
|
# Qt
|
|
|
|
################################################################################
|
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 (QT_COMPONENTS_REQUIRED QtCore QtGui QtMain QtOpenGl QtNetwork QtScript QtScriptTools)
|
2013-10-16 06:51:42 -05:00
|
|
|
find_package (Qt4 COMPONENTS ${QT_COMPONENTS_REQUIRED})
|
2013-10-16 07:16:35 -05:00
|
|
|
if ( NOT QT4_FOUND )
|
2013-10-16 06:51:42 -05:00
|
|
|
message(FATAL_ERROR "Package Qt4 is required, but not found. Please specify qmake for variable QT_QMAKE_EXECUTABLE")
|
2013-10-16 07:16:35 -05:00
|
|
|
endif ( NOT QT4_FOUND )
|
2013-10-16 06:51:42 -05:00
|
|
|
|
|
|
|
if (QT_VERSION_MINOR LESS 6)
|
|
|
|
message(FATAL_ERROR "Qt 4.6 is required, please specify qmake for variable QT_QMAKE_EXECUTABLE")
|
|
|
|
endif()
|
|
|
|
|
2012-05-18 02:45:23 -05:00
|
|
|
include (${QT_USE_FILE})
|
|
|
|
|
|
|
|
# Open GL
|
|
|
|
find_package( OpenGL )
|
|
|
|
|
2015-08-26 05:27:29 -05:00
|
|
|
################################################################################
|
|
|
|
# Qwt
|
|
|
|
################################################################################
|
|
|
|
|
|
|
|
add_subdirectory(ThirdParty/Qwt/src)
|
|
|
|
|
2017-01-21 05:26:21 -06:00
|
|
|
list(APPEND THIRD_PARTY_LIBRARIES
|
|
|
|
Qwt
|
|
|
|
)
|
|
|
|
|
|
|
|
|
2017-01-21 05:36:14 -06:00
|
|
|
################################################################################
|
|
|
|
# Nightcharts
|
|
|
|
################################################################################
|
|
|
|
|
|
|
|
add_subdirectory(ThirdParty/nightcharts)
|
|
|
|
|
|
|
|
list(APPEND THIRD_PARTY_LIBRARIES
|
|
|
|
nightcharts
|
|
|
|
)
|
|
|
|
|
2017-10-11 12:41:29 -05:00
|
|
|
################################################################################
|
|
|
|
# C++ Mathematical Expression Parsing And Evaluation Library
|
|
|
|
################################################################################
|
|
|
|
|
|
|
|
add_subdirectory(ThirdParty/expressionparser)
|
|
|
|
|
|
|
|
list(APPEND THIRD_PARTY_LIBRARIES
|
|
|
|
expressionparser
|
|
|
|
)
|
2017-08-21 08:24:20 -05:00
|
|
|
|
2017-05-12 07:41:38 -05:00
|
|
|
################################################################################
|
2018-02-26 14:11:14 -06:00
|
|
|
# Eigen
|
2017-05-12 07:41:38 -05:00
|
|
|
################################################################################
|
2018-02-26 14:11:14 -06:00
|
|
|
include_directories(SYSTEM ThirdParty/Eigen-Subset)
|
2018-01-04 06:51:54 -06:00
|
|
|
|
2018-02-26 14:11:14 -06:00
|
|
|
################################################################################
|
|
|
|
# clipper
|
|
|
|
################################################################################
|
2017-08-21 15:05:15 -05:00
|
|
|
|
2018-02-26 14:11:14 -06:00
|
|
|
add_subdirectory(ThirdParty/clipper)
|
2017-08-21 15:05:15 -05:00
|
|
|
|
2018-02-26 14:11:14 -06:00
|
|
|
list(APPEND THIRD_PARTY_LIBRARIES
|
|
|
|
clipper
|
|
|
|
)
|
2017-05-12 07:41:38 -05:00
|
|
|
|
2017-01-21 05:36:14 -06:00
|
|
|
|
2017-01-21 05:38:48 -06:00
|
|
|
################################################################################
|
|
|
|
# Thirdparty libraries are put in ThirdParty solution folder
|
|
|
|
################################################################################
|
|
|
|
set_property(TARGET
|
|
|
|
${THIRD_PARTY_LIBRARIES}
|
|
|
|
PROPERTY FOLDER "Thirdparty"
|
|
|
|
)
|
|
|
|
|
2012-05-18 02:45:23 -05:00
|
|
|
################################################################################
|
2014-04-11 04:29:31 -05:00
|
|
|
# Vizualization Framework
|
2012-05-18 02:45:23 -05:00
|
|
|
################################################################################
|
2014-04-11 04:29:31 -05:00
|
|
|
|
|
|
|
# Allow use of non-threadsafe reference counter in cvf::Object on systems with no atomics support
|
2014-04-15 01:51:18 -05:00
|
|
|
if (CMAKE_COMPILER_IS_GNUCC)
|
|
|
|
|
2014-04-15 04:50:04 -05:00
|
|
|
if (NOT DEFINED HAVE_GCC_SYNC_FUNCTIONS)
|
2014-04-15 02:48:32 -05:00
|
|
|
check_c_source_compiles("int main(int argc, char **argv) {
|
|
|
|
int a;
|
|
|
|
__sync_add_and_fetch(&a, 1);
|
|
|
|
__sync_fetch_and_add(&a, 1);
|
|
|
|
__sync_sub_and_fetch(&a, 1);
|
2014-04-15 04:50:04 -05:00
|
|
|
__sync_fetch_and_sub(&a, 1); }" HAVE_GCC_SYNC_FUNCTIONS)
|
2014-04-15 02:48:32 -05:00
|
|
|
endif()
|
2014-04-15 01:51:18 -05:00
|
|
|
|
2014-04-15 04:50:04 -05:00
|
|
|
if (HAVE_GCC_SYNC_FUNCTIONS)
|
|
|
|
message("GCC synchronization functions detected")
|
2014-04-15 02:48:32 -05:00
|
|
|
else()
|
2014-04-15 04:50:04 -05:00
|
|
|
message("GCC synchronization functions NOT detected, fallback to non threadsafe reference counting")
|
|
|
|
add_definitions(-DCVF_USE_NON_THREADSAFE_REFERENCE_COUNT)
|
2014-04-15 01:51:18 -05:00
|
|
|
endif()
|
|
|
|
|
2014-04-11 04:29:31 -05:00
|
|
|
endif()
|
|
|
|
|
2012-05-18 02:45:23 -05:00
|
|
|
add_subdirectory(${VIZ_MODULES_FOLDER_NAME}/LibCore)
|
|
|
|
add_subdirectory(${VIZ_MODULES_FOLDER_NAME}/LibGeometry)
|
|
|
|
add_subdirectory(${VIZ_MODULES_FOLDER_NAME}/LibRender)
|
|
|
|
add_subdirectory(${VIZ_MODULES_FOLDER_NAME}/LibViewing)
|
|
|
|
add_subdirectory(${VIZ_MODULES_FOLDER_NAME}/LibGuiQt)
|
|
|
|
|
2016-05-26 07:49:13 -05:00
|
|
|
list(APPEND VIZ_FWK_LIBRARIES
|
|
|
|
LibGuiQt
|
|
|
|
LibViewing
|
|
|
|
LibRender
|
|
|
|
LibGeometry
|
|
|
|
LibCore
|
|
|
|
)
|
|
|
|
|
2015-04-29 03:50:25 -05:00
|
|
|
set_property(TARGET
|
2016-05-26 07:49:13 -05:00
|
|
|
${VIZ_FWK_LIBRARIES}
|
|
|
|
PROPERTY FOLDER "VizFwk"
|
2015-04-29 03:50:25 -05:00
|
|
|
)
|
|
|
|
|
2012-05-18 02:45:23 -05:00
|
|
|
|
|
|
|
################################################################################
|
2014-04-11 04:29:31 -05:00
|
|
|
# Application Framework
|
2012-05-18 02:45:23 -05:00
|
|
|
################################################################################
|
|
|
|
|
2013-09-20 09:21:46 -05:00
|
|
|
add_subdirectory(Fwk/AppFwk/cafAnimControl)
|
|
|
|
add_subdirectory(Fwk/AppFwk/cafViewer)
|
2015-07-29 07:20:15 -05:00
|
|
|
|
|
|
|
add_subdirectory(Fwk/AppFwk/cafProjectDataModel/cafPdmCore)
|
|
|
|
add_subdirectory(Fwk/AppFwk/cafProjectDataModel/cafPdmUiCore)
|
|
|
|
add_subdirectory(Fwk/AppFwk/cafProjectDataModel/cafPdmXml)
|
|
|
|
add_subdirectory(Fwk/AppFwk/cafProjectDataModel)
|
|
|
|
|
|
|
|
add_subdirectory(Fwk/AppFwk/cafCommand)
|
2013-09-20 09:21:46 -05:00
|
|
|
add_subdirectory(Fwk/AppFwk/cafUserInterface)
|
|
|
|
add_subdirectory(Fwk/AppFwk/cafPdmCvf)
|
2015-07-29 07:20:15 -05:00
|
|
|
add_subdirectory(Fwk/AppFwk/CommonCode)
|
2016-08-02 03:25:55 -05:00
|
|
|
add_subdirectory(Fwk/AppFwk/cafVizExtensions)
|
2012-05-18 02:45:23 -05:00
|
|
|
|
2015-11-26 07:18:11 -06:00
|
|
|
#add_subdirectory(Fwk/AppFwk/cafTests/cafTestCvfApplication)
|
2015-07-29 07:20:15 -05:00
|
|
|
|
|
|
|
add_subdirectory(Fwk/AppFwk/cafTensor)
|
2012-05-18 02:45:23 -05:00
|
|
|
|
2016-05-26 07:49:13 -05:00
|
|
|
list(APPEND APP_FWK_LIBRARIES
|
2015-07-29 07:20:15 -05:00
|
|
|
cafPdmCore
|
|
|
|
cafPdmUiCore
|
|
|
|
cafPdmXml
|
2016-06-08 05:15:46 -05:00
|
|
|
cafProjectDataModel
|
2016-05-26 07:49:13 -05:00
|
|
|
|
|
|
|
cafUserInterface
|
|
|
|
cafViewer
|
|
|
|
cafAnimControl
|
2015-07-29 07:20:15 -05:00
|
|
|
cafCommand
|
2016-05-26 07:49:13 -05:00
|
|
|
cafPdmCvf
|
|
|
|
|
2015-06-17 05:55:08 -05:00
|
|
|
cafTensor
|
2016-05-26 07:49:13 -05:00
|
|
|
CommonCode
|
2016-08-02 03:25:55 -05:00
|
|
|
cafVizExtensions
|
2015-04-29 03:50:25 -05:00
|
|
|
)
|
|
|
|
|
2016-05-26 07:49:13 -05:00
|
|
|
set_property(TARGET
|
|
|
|
${APP_FWK_LIBRARIES}
|
|
|
|
PROPERTY FOLDER "AppFwk"
|
|
|
|
)
|
2015-04-29 03:50:25 -05:00
|
|
|
|
2016-06-06 02:56:45 -05:00
|
|
|
|
2012-05-18 02:45:23 -05:00
|
|
|
################################################################################
|
|
|
|
# Installation settings
|
|
|
|
################################################################################
|
2012-09-11 08:10:28 -05:00
|
|
|
|
2016-12-01 04:23:52 -06:00
|
|
|
set (RESINSIGHT_INSTALL_FOLDER ".")
|
2012-09-11 08:10:28 -05:00
|
|
|
|
2013-03-26 17:00:09 -05:00
|
|
|
# override system install prefix if private installation chosen
|
2018-01-05 07:21:02 -06:00
|
|
|
option (RESINSIGHT_PRIVATE_INSTALL "Linux only: Install the libecl shared libraries along the executable" ON)
|
|
|
|
mark_as_advanced(FORCE RESINSIGHT_PRIVATE_INSTALL)
|
|
|
|
|
2013-08-30 08:37:29 -05:00
|
|
|
if (RESINSIGHT_PRIVATE_INSTALL)
|
2013-04-19 01:54:38 -05:00
|
|
|
set (CMAKE_INSTALL_PREFIX ${CMAKE_BINARY_DIR}/Install/)
|
2016-06-02 05:50:42 -05:00
|
|
|
|
|
|
|
################################################################################
|
|
|
|
# ERT shared library files
|
|
|
|
# Install procedure will copy so-files from ERT into same install folder as ResInsight
|
|
|
|
################################################################################
|
|
|
|
|
|
|
|
if (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
|
2016-06-02 06:55:27 -05:00
|
|
|
set(ERT_SHARED_LIB_FILES
|
2016-10-13 08:15:12 -05:00
|
|
|
${CMAKE_BINARY_DIR}/ThirdParty/Ert/${CMAKE_INSTALL_LIBDIR}/libecl.so
|
|
|
|
${CMAKE_BINARY_DIR}/ThirdParty/Ert/${CMAKE_INSTALL_LIBDIR}/libecl.so.2
|
2017-10-03 01:30:19 -05:00
|
|
|
${CMAKE_BINARY_DIR}/ThirdParty/Ert/${CMAKE_INSTALL_LIBDIR}/libecl.so.2.3
|
2016-06-02 05:50:42 -05:00
|
|
|
)
|
|
|
|
|
2016-12-01 04:23:52 -06:00
|
|
|
install(FILES ${ERT_SHARED_LIB_FILES} DESTINATION ${RESINSIGHT_INSTALL_FOLDER} )
|
2016-06-02 05:50:42 -05:00
|
|
|
endif()
|
|
|
|
|
2013-08-30 08:37:29 -05:00
|
|
|
endif (RESINSIGHT_PRIVATE_INSTALL)
|
2012-05-18 02:45:23 -05:00
|
|
|
|
2016-06-02 05:50:42 -05:00
|
|
|
|
2012-05-18 02:45:23 -05:00
|
|
|
################################################################################
|
|
|
|
# Application
|
|
|
|
################################################################################
|
|
|
|
add_subdirectory(ApplicationCode)
|
2012-10-04 05:12:58 -05:00
|
|
|
add_subdirectory(OctavePlugin)
|
2012-09-20 08:15:43 -05:00
|
|
|
|
2013-04-19 01:54:38 -05:00
|
|
|
################################################################################
|
|
|
|
# Code documentation using Doxygen
|
|
|
|
################################################################################
|
|
|
|
option(RESINSIGHT_BUILD_DOCUMENTATION "Use Doxygen to create the HTML based API documentation" OFF)
|
|
|
|
if(RESINSIGHT_BUILD_DOCUMENTATION)
|
|
|
|
FIND_PACKAGE(Doxygen)
|
|
|
|
if (NOT DOXYGEN_FOUND)
|
|
|
|
message(FATAL_ERROR
|
|
|
|
"Doxygen is needed to build the documentation. Please install it correctly")
|
|
|
|
endif()
|
|
|
|
#-- Configure the Template Doxyfile for our specific project
|
|
|
|
configure_file(Doxyfile.in
|
|
|
|
${PROJECT_BINARY_DIR}/Doxyfile @ONLY IMMEDIATE)
|
|
|
|
#-- Add a custom target to run Doxygen when ever the project is built
|
|
|
|
add_custom_target (Docs ALL
|
|
|
|
COMMAND ${DOXYGEN_EXECUTABLE} ${PROJECT_BINARY_DIR}/Doxyfile
|
|
|
|
SOURCES ${PROJECT_BINARY_DIR}/Doxyfile)
|
|
|
|
# IF you do NOT want the documentation to be generated EVERY time you build the project
|
|
|
|
# then leave out the 'ALL' keyword from the above command.
|
|
|
|
endif(RESINSIGHT_BUILD_DOCUMENTATION)
|
2012-05-18 02:45:23 -05:00
|
|
|
|