2012-05-18 02:45:23 -05:00
|
|
|
cmake_minimum_required (VERSION 2.8)
|
|
|
|
|
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-05-24 03:28:04 -05:00
|
|
|
set(CMAKE_CXX_FLAGS "-DCVF_LINUX -pipe -Wextra -Woverloaded-virtual -Wformat -std=gnu++11")
|
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-05-27 04:25:50 -05:00
|
|
|
################################################################################
|
|
|
|
# Boost
|
|
|
|
################################################################################
|
|
|
|
|
|
|
|
# if we are building shared libraries ourselves, then don't include Boost in them
|
|
|
|
if (BUILD_SHARED_LIBS)
|
|
|
|
set(Boost_USE_STATIC_LIBS OFF)
|
|
|
|
elseif (DEFINED BUILD_SHARED_LIBS)
|
|
|
|
set(Boost_USE_STATIC_LIBS ON)
|
|
|
|
endif ()
|
|
|
|
set(Boost_USE_MULTITHREADED ON)
|
|
|
|
set(Boost_USE_STATIC_RUNTIME OFF)
|
|
|
|
|
2016-05-27 10:28:31 -05:00
|
|
|
if (MSVC)
|
|
|
|
ADD_DEFINITIONS("-DBOOST_ALL_NO_LIB")
|
|
|
|
endif()
|
2016-05-27 05:48:56 -05:00
|
|
|
|
|
|
|
|
2016-05-27 04:25:50 -05:00
|
|
|
# Requires BOOST filesystem version 3, thus 1.44 is necessary.
|
|
|
|
add_definitions(-DBOOST_FILESYSTEM_VERSION=3)
|
|
|
|
|
2016-06-03 09:25:48 -05:00
|
|
|
if(MSVC)
|
|
|
|
set(BUILD_SHARED_LIBS OFF)
|
|
|
|
set(Boost_USE_STATIC_LIBS ON)
|
|
|
|
set(RESINSIGHT_BOOST_ROOT "" CACHE PATH "Path to installed boost directories" )
|
|
|
|
set(RESINSIGHT_BOOST_LIBRARYDIR "" CACHE PATH "Path to boost binary libraries" )
|
|
|
|
set(BOOST_ROOT ${RESINSIGHT_BOOST_ROOT})
|
|
|
|
set(BOOST_LIBRARYDIR ${RESINSIGHT_BOOST_LIBRARYDIR})
|
|
|
|
|
|
|
|
if (RESINSIGHT_BOOST_ROOT AND RESINSIGHT_BOOST_LIBRARYDIR)
|
|
|
|
find_package(Boost 1.44.0 COMPONENTS filesystem date_time system regex REQUIRED)
|
|
|
|
else()
|
|
|
|
message (FATAL_ERROR "You need to set RESINSIGHT_BOOST_ROOT and RESINSIGHT_BOOST_LIBRARYDIR")
|
|
|
|
endif()
|
|
|
|
|
|
|
|
else()
|
|
|
|
find_package(Boost 1.44.0 COMPONENTS filesystem date_time system regex REQUIRED)
|
|
|
|
endif()
|
2012-09-11 02:22:36 -05:00
|
|
|
|
2016-06-10 07:03:22 -05:00
|
|
|
################################################################################
|
|
|
|
# cotire
|
|
|
|
# Fully automated CMake module for build speedup
|
|
|
|
# https://github.com/sakra/cotire
|
|
|
|
################################################################################
|
|
|
|
|
|
|
|
option(RESINSIGHT_ENABLE_COTIRE "Use Cotire to speed up build process" OFF)
|
|
|
|
if(RESINSIGHT_ENABLE_COTIRE)
|
|
|
|
set (CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake")
|
|
|
|
|
|
|
|
include(cotire)
|
|
|
|
|
|
|
|
set(CAF_USE_COTIRE TRUE CACHE INTERNAL "CAF: Use 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()
|
|
|
|
|
2016-06-02 05:50:42 -05:00
|
|
|
set (ERT_BINARY_LIB_NAMES
|
|
|
|
libecl.so
|
|
|
|
libeclxx.so
|
|
|
|
libecl_well.so
|
|
|
|
libert_geometry.so
|
|
|
|
libert_util.so
|
|
|
|
)
|
|
|
|
|
2016-05-26 14:23:16 -05:00
|
|
|
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()
|
|
|
|
|
|
|
|
list(APPEND ERT_INCLUDE_DIRS
|
|
|
|
${RESINSIGHT_ERT_EXTERNAL_INCLUDE_ROOT}
|
|
|
|
)
|
|
|
|
|
2016-06-02 05:50:42 -05:00
|
|
|
list(APPEND ERT_EXTERNAL_LIBRARIES
|
2016-05-26 14:23:16 -05:00
|
|
|
${RESINSIGHT_ERT_EXTERNAL_LIB_ROOT}/libecl.so
|
2016-06-02 05:50:42 -05:00
|
|
|
${RESINSIGHT_ERT_EXTERNAL_LIB_ROOT}/libeclxx.so
|
2016-05-26 14:23:16 -05:00
|
|
|
${RESINSIGHT_ERT_EXTERNAL_LIB_ROOT}/libecl_well.so
|
|
|
|
${RESINSIGHT_ERT_EXTERNAL_LIB_ROOT}/libert_geometry.so
|
|
|
|
${RESINSIGHT_ERT_EXTERNAL_LIB_ROOT}/libert_util.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(BUILD_PYTHON OFF CACHE BOOL "ERT: Run py_compile on the python wrappers")
|
|
|
|
SET(ERT_USE_OPENMP ${OPENMP_FOUND} CACHE BOOL "ERT: Compile using OpenMP")
|
2016-06-02 02:36:11 -05:00
|
|
|
SET(ERT_BUILD_CXX ON CACHE BOOL "ERT: Enable build of CXX wrappers" FORCE)
|
2016-05-26 14:23:16 -05:00
|
|
|
|
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)
|
|
|
|
set(ERT_INCLUDE_ROOT "${RESINSIGHT_ERT_EXTERNAL_SOURCE_ROOT}")
|
|
|
|
add_subdirectory(${ERT_SOURCE_PATH} ${CMAKE_BINARY_DIR}/ThirdParty/Ert)
|
|
|
|
else()
|
|
|
|
set(ERT_INCLUDE_ROOT ${CMAKE_SOURCE_DIR}/ThirdParty/Ert/devel)
|
|
|
|
add_subdirectory(ThirdParty/Ert/devel)
|
|
|
|
endif ()
|
|
|
|
|
|
|
|
list(APPEND ERT_INCLUDE_DIRS
|
|
|
|
${ERT_INCLUDE_ROOT}/libecl/include/
|
|
|
|
${ERT_INCLUDE_ROOT}/libert_util/include/
|
|
|
|
${ERT_INCLUDE_ROOT}/libgeometry/include/
|
|
|
|
${ERT_INCLUDE_ROOT}/libecl_well/include/
|
|
|
|
${ERT_INCLUDE_ROOT}/libeclxx/include
|
|
|
|
${ERT_INCLUDE_ROOT}/libert_utilxx/include
|
|
|
|
|
|
|
|
${CMAKE_BINARY_DIR}/ThirdParty/Ert/devel/libert_util/include
|
|
|
|
)
|
|
|
|
|
|
|
|
list(APPEND ERT_LIBRARIES
|
|
|
|
ecl
|
2016-05-27 10:28:31 -05:00
|
|
|
eclxx
|
2016-05-26 14:23:16 -05:00
|
|
|
ecl_well
|
|
|
|
ert_geometry
|
|
|
|
ert_util
|
|
|
|
)
|
|
|
|
|
2016-05-27 10:28:31 -05:00
|
|
|
if (MSVC)
|
|
|
|
set_property(TARGET
|
|
|
|
${ERT_LIBRARIES}
|
|
|
|
ecl_lfs
|
|
|
|
PROPERTY FOLDER "ERT"
|
|
|
|
)
|
|
|
|
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
|
|
|
|
2016-05-27 06:12:31 -05:00
|
|
|
################################################################################
|
|
|
|
# Opm
|
|
|
|
################################################################################
|
|
|
|
|
2016-05-27 09:00:50 -05:00
|
|
|
add_subdirectory(ThirdParty/custom-opm-parser)
|
2016-05-27 10:28:31 -05:00
|
|
|
|
2015-09-11 10:03:11 -05:00
|
|
|
|
|
|
|
################################################################################
|
|
|
|
# NRLib
|
|
|
|
################################################################################
|
|
|
|
|
|
|
|
add_subdirectory(ThirdParty/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)
|
|
|
|
|
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)
|
|
|
|
|
|
|
|
include_directories(
|
|
|
|
${LibCore_SOURCE_DIR}
|
|
|
|
${LibGeometry_SOURCE_DIR}
|
|
|
|
${LibRender_SOURCE_DIR}
|
|
|
|
${LibViewing_SOURCE_DIR}
|
|
|
|
${LibGuiQt_SOURCE_DIR}
|
|
|
|
)
|
|
|
|
|
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)
|
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
|
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
|
|
|
|
2012-05-18 02:45:23 -05:00
|
|
|
set (RESINSIGHT_FINAL_NAME "ResInsight-${STRPRODUCTVER}")
|
2012-09-11 08:10:28 -05:00
|
|
|
|
|
|
|
# Append el5 when compiled on RHEL5 and el6 if compiled on RHEL6
|
|
|
|
string(REGEX MATCH "el[5,6]?" RESINSIGHT_PLATFORM ${CMAKE_SYSTEM})
|
|
|
|
if (NOT "${RESINSIGHT_PLATFORM}" STREQUAL "")
|
|
|
|
set (RESINSIGHT_FINAL_NAME "${RESINSIGHT_FINAL_NAME}-${RESINSIGHT_PLATFORM}")
|
|
|
|
endif()
|
|
|
|
|
2013-03-26 17:00:09 -05:00
|
|
|
# override system install prefix if private installation chosen
|
2013-08-30 08:37:29 -05:00
|
|
|
option (RESINSIGHT_PRIVATE_INSTALL "Install as an independent bundle including the neccesary Qt libraries" ON)
|
|
|
|
if (RESINSIGHT_PRIVATE_INSTALL)
|
2013-04-19 01:54:38 -05:00
|
|
|
set (CMAKE_INSTALL_PREFIX ${CMAKE_BINARY_DIR}/Install/)
|
|
|
|
#set (CMAKE_INSTALL_PREFIX /usr/${RESINSIGHT_FINAL_NAME})
|
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
|
|
|
|
${CMAKE_BINARY_DIR}/ThirdParty/Ert/devel/lib64/libecl.so
|
|
|
|
${CMAKE_BINARY_DIR}/ThirdParty/Ert/devel/lib64/libecl.so.2
|
|
|
|
${CMAKE_BINARY_DIR}/ThirdParty/Ert/devel/lib64/libecl.so.2.0
|
|
|
|
${CMAKE_BINARY_DIR}/ThirdParty/Ert/devel/lib64/libeclxx.so
|
|
|
|
${CMAKE_BINARY_DIR}/ThirdParty/Ert/devel/lib64/libeclxx.so.2
|
|
|
|
${CMAKE_BINARY_DIR}/ThirdParty/Ert/devel/lib64/libeclxx.so.2.0
|
|
|
|
${CMAKE_BINARY_DIR}/ThirdParty/Ert/devel/lib64/libecl_well.so
|
|
|
|
${CMAKE_BINARY_DIR}/ThirdParty/Ert/devel/lib64/libecl_well.so.2
|
|
|
|
${CMAKE_BINARY_DIR}/ThirdParty/Ert/devel/lib64/libecl_well.so.2.0
|
|
|
|
${CMAKE_BINARY_DIR}/ThirdParty/Ert/devel/lib64/libert_geometry.so
|
|
|
|
${CMAKE_BINARY_DIR}/ThirdParty/Ert/devel/lib64/libert_geometry.so.2
|
|
|
|
${CMAKE_BINARY_DIR}/ThirdParty/Ert/devel/lib64/libert_geometry.so.2.0
|
|
|
|
${CMAKE_BINARY_DIR}/ThirdParty/Ert/devel/lib64/libert_util.so
|
|
|
|
${CMAKE_BINARY_DIR}/ThirdParty/Ert/devel/lib64/libert_util.so.2
|
|
|
|
${CMAKE_BINARY_DIR}/ThirdParty/Ert/devel/lib64/libert_util.so.2.0
|
2016-06-02 05:50:42 -05:00
|
|
|
)
|
|
|
|
|
|
|
|
install(FILES ${ERT_SHARED_LIB_FILES} DESTINATION ${RESINSIGHT_FINAL_NAME} )
|
|
|
|
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
|
|
|
|
|
|
|
################################################################################
|
|
|
|
# Installation packaging
|
|
|
|
################################################################################
|
|
|
|
|
|
|
|
if (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
|
|
|
|
set(CPACK_GENERATOR TGZ)
|
|
|
|
elseif (${CMAKE_SYSTEM_NAME} MATCHES "Windows")
|
|
|
|
set(CPACK_GENERATOR ZIP)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
set(CPACK_PACKAGE_VERSION_MAJOR ${CMAKE_MAJOR_VERSION})
|
|
|
|
set(CPACK_PACKAGE_VERSION_MINOR ${CMAKE_MINOR_VERSION})
|
|
|
|
set(CPACK_PACKAGE_VERSION_PATCH ${CMAKE_PATCH_VERSION})
|
|
|
|
|
|
|
|
set(CPACK_PACKAGE_NAME "ResInsight-bin")
|
|
|
|
|
2012-09-11 08:10:28 -05:00
|
|
|
if (NOT "${RESINSIGHT_PLATFORM}" STREQUAL "")
|
|
|
|
set (CPACK_SYSTEM_NAME "${RESINSIGHT_PLATFORM}")
|
|
|
|
endif()
|
|
|
|
|
2012-05-18 02:45:23 -05:00
|
|
|
include (CPack)
|