mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Merge branch 'pr/268' into dev
This commit is contained in:
@@ -209,6 +209,8 @@ source_group( "SocketInterface" FILES ${SOCKET_INTERFACE_FILES} )
|
||||
|
||||
if (MSVC)
|
||||
set( EXE_FILES WIN32)
|
||||
elseif (APPLE)
|
||||
set( EXE_FILES MACOSX_BUNDLE)
|
||||
endif()
|
||||
set( EXE_FILES
|
||||
${EXE_FILES}
|
||||
@@ -224,6 +226,18 @@ set( EXE_FILES
|
||||
|
||||
add_executable( ResInsight ${EXE_FILES} )
|
||||
|
||||
# Application icon for MacOS X bundle
|
||||
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 ()
|
||||
|
||||
set( LINK_LIBRARIES
|
||||
WellPathImportSsihub
|
||||
|
||||
@@ -76,6 +76,10 @@ set( LINK_LIBRARIES
|
||||
${QT_LIBRARIES}
|
||||
)
|
||||
|
||||
if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
|
||||
set(CMAKE_CXX_FLAGS "-DGTEST_USE_OWN_TR1_TUPLE=1")
|
||||
endif()
|
||||
|
||||
add_executable( ${ProjectName}
|
||||
${CODE_HEADER_FILES}
|
||||
|
||||
|
||||
@@ -61,6 +61,10 @@ IF(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
|
||||
set( EXTERNAL_LINK_LIBRARIES
|
||||
pthread
|
||||
)
|
||||
ELSEIF(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
|
||||
set( CMAKE_CXX_FLAGS
|
||||
"-DGTEST_USE_OWN_TR1_TUPLE=1"
|
||||
)
|
||||
ENDIF()
|
||||
|
||||
target_link_libraries( ${ProjectName} ${LINK_LIBRARIES} ${EXTERNAL_LINK_LIBRARIES})
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
#include "cvfArray.h"
|
||||
#include "cvfCollection.h"
|
||||
|
||||
#include "RivGridPartMgr.h"
|
||||
#include "RivReservoirFaultsPartMgr.h"
|
||||
|
||||
namespace cvf
|
||||
@@ -33,7 +34,6 @@ namespace cvf
|
||||
|
||||
class RimResultSlot;
|
||||
class RimCellEdgeResultSlot;
|
||||
class RivGridPartMgr;
|
||||
class RigCaseData;
|
||||
class RimReservoirView;
|
||||
|
||||
|
||||
@@ -87,6 +87,8 @@ IF(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
|
||||
set(CMAKE_CXX_FLAGS_RELEASE "-O2 -DNO_DEBUG")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ")
|
||||
|
||||
ELSEIF(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
|
||||
set(CMAKE_CXX_FLAGS "-DGTEST_USE_OWN_TR1_TUPLE=1")
|
||||
ENDIF(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
|
||||
|
||||
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
#include "RifReaderInterface.h"
|
||||
|
||||
#include "RimDefines.h"
|
||||
#include "RigStatisticsDataCache.h"
|
||||
|
||||
#include <QDateTime>
|
||||
|
||||
@@ -31,7 +32,6 @@
|
||||
|
||||
class RifReaderInterface;
|
||||
class RigMainGrid;
|
||||
class RigStatisticsDataCache;
|
||||
class RigActiveCellInfo;
|
||||
|
||||
//==================================================================================================
|
||||
|
||||
@@ -99,12 +99,6 @@ AtomicCounter::AtomicCounter(int initialValue)
|
||||
}
|
||||
|
||||
|
||||
AtomicCounter::AtomicCounter(const AtomicCounter& counter)
|
||||
: m_counter(counter.value())
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
AtomicCounter::~AtomicCounter()
|
||||
{
|
||||
}
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
#pragma warning (pop)
|
||||
#endif
|
||||
|
||||
#if defined CVF_LINUX || defined(CVF_ANDROID)
|
||||
#if defined(CVF_LINUX) || defined(CVF_ANDROID) || defined(CVF_OSX)
|
||||
#include <pthread.h>
|
||||
#endif
|
||||
|
||||
|
||||
@@ -200,7 +200,11 @@ void OpenGL::cvf_check_ogl(OpenGLContext* oglContext, const CodeLocation& codeLo
|
||||
CVF_ASSERT(oglContext->isCurrent());
|
||||
|
||||
Logger* logger = oglContext->group()->logger();
|
||||
#if defined(CVF_OSX)
|
||||
if (logger && (err != GL_INVALID_FRAMEBUFFER_OPERATION))
|
||||
#else
|
||||
if (logger)
|
||||
#endif /* defined(CVF_OSX) */
|
||||
{
|
||||
String errCodeStr = mapOpenGLErrorToString(err);
|
||||
String msg = "OGL(" + errCodeStr + "): ";
|
||||
|
||||
@@ -286,7 +286,9 @@ bool ShaderProgram::useProgram(OpenGLContext* oglContext) const
|
||||
}
|
||||
|
||||
CVF_ASSERT(OglRc::safeOglId(m_oglRcProgram.p()) != 0);
|
||||
#ifndef CVF_OSX
|
||||
CVF_ASSERT(validateProgram(oglContext));
|
||||
#endif
|
||||
|
||||
// Need this check to clear any "hanging" errors that is not produced by glUseProgram below, but still
|
||||
// will make this method return false.
|
||||
|
||||
@@ -41,6 +41,36 @@ if (${CMAKE_SYSTEM_NAME} MATCHES "Windows")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# recreate the magic that CMake does for MacOS X frameworks in the
|
||||
# include list when we call mkoctfile as a custom command
|
||||
if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
|
||||
set (QT_INCLUDES)
|
||||
set (QT_FRAMEWORKS)
|
||||
# QT_INCLUDE_DIR contains two items; the first is the directory
|
||||
# containing header files, the second is the framework. This
|
||||
# setup is specially processed in include_directories (); CMake
|
||||
# will add -F before the frameworks. We will have to replicate
|
||||
# that setup here when we want to pass it directly to a command
|
||||
# see <http://www.cmake.org/Bug/print_bug_page.php?bug_id=10632>
|
||||
foreach (item IN ITEMS ${QT_QTNETWORK_INCLUDE_DIR} ${QT_QTCORE_INCLUDE_DIR} ${QT_INCLUDE_DIR})
|
||||
if ("${item}" MATCHES ".framework$")
|
||||
get_filename_component (frmwrk_path ${item} PATH)
|
||||
get_filename_component (frmwrk_name ${item} NAME_WE)
|
||||
# mkoctfile doesn't support arbitrary compiler command,
|
||||
# so we must wrap in -Wl, to pass to the linker
|
||||
list (APPEND QT_FRAMEWORKS "-Wl,-F${frmwrk_path}")
|
||||
list (APPEND QT_FRAMEWORKS "-Wl,-framework,${frmwrk_name}")
|
||||
else ()
|
||||
list (APPEND QT_INCLUDES "-I${item}")
|
||||
endif ()
|
||||
endforeach (item)
|
||||
if (QT_INCLUDES)
|
||||
list (REMOVE_DUPLICATES QT_INCLUDES)
|
||||
endif ()
|
||||
if (QT_FRAMEWORKS)
|
||||
list (REMOVE_DUPLICATES QT_FRAMEWORKS)
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
# Find location of Octave based on mkoctfile
|
||||
find_program(RESINSIGHT_OCTAVE_PLUGIN_MKOCTFILE mkoctfile)
|
||||
@@ -113,6 +143,20 @@ if (RESINSIGHT_OCTAVE_PLUGIN_QMAKE AND RESINSIGHT_OCTAVE_PLUGIN_MKOCTFILE)
|
||||
COMMENT "===> Generating ${octFileName}"
|
||||
)
|
||||
endif()
|
||||
elseif (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
|
||||
add_custom_command(
|
||||
OUTPUT "${octFileName}"
|
||||
COMMAND ${RESINSIGHT_OCTAVE_PLUGIN_MKOCTFILE}
|
||||
${QT_INCLUDES}
|
||||
${QT_FRAMEWORKS}
|
||||
-I${ResInsight_SOURCE_DIR}/ApplicationCode/SocketInterface
|
||||
${RPATH_COMMAND}
|
||||
-L${QT_LIBRARY_DIR} -Wl,-framework,QtCore -Wl,-framework,QtNetwork
|
||||
-o "${octFileName}"
|
||||
"${srcFileName}"
|
||||
DEPENDS "${srcFileName}"
|
||||
COMMENT "===> Generating ${octFileName}"
|
||||
)
|
||||
else()
|
||||
add_custom_command(
|
||||
OUTPUT "${octFileName}"
|
||||
|
||||
Reference in New Issue
Block a user