mirror of
https://github.com/OPM/ResInsight.git
synced 2025-01-01 03:37:15 -06:00
10a579fac5
* Refactor to deprecate existing QGLWidget derived widget Renamed cvfqt::OpenGLWidget to cvfqt::GLWidget_deprecated Renamed cvfqt::CvfBoundQGLContext to cvfqt::CvfBoundQGLContext_deprecated Renamed cvfqt::OpenGLContext to cvfqt::OpenGLContext_QGLContextAdapter_deprecated Added cvf::OpenGLUtils * Marked existing QtMinimal and QtMultiView as deprecated * Additional deprecated renaming * Added missing type * Added missing include * Fixes to get snippets up and running before introducing new OpenGL widgets * Added class for OpenGLInfo * Refactored cvf::OpenGLContext and cvf::OpenGLContextGroup, and added first cut impl of cvfqt::GLWidget and cvfqt::OpenGLWidget * Removed unused TriggerTBBCopy.txt * Initial support for compilation on Qt6 * Added QtMinimal and QtMinimal_GLWidget * Refactored SnippetRunner to handle utilize cvfqt::OpenGLWidget * Removed unused code * Fixes and workarounds from compiling on linux * Fixes by clang-format (#11056) Co-authored-by: sigurdp <sigurdp@users.noreply.github.com> * Added QTMultiView test app based on cvfqt::OpenGLWidget * Removed includes of QOpenGLFunctions * Modifications for compile with Qt6 * Added test bench for cvfqt::OpenGLWidget * Minor fixes * Force to use Qt5 * Fixes by cmake-format --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: sigurdp <sigurdp@users.noreply.github.com>
99 lines
2.9 KiB
CMake
99 lines
2.9 KiB
CMake
cmake_minimum_required(VERSION 3.15)
|
|
|
|
project(VizFramework)
|
|
|
|
|
|
if (CEE_CEEVIZ_ROOT)
|
|
message(STATUS "CEE_CEEVIZ_ROOT: ${CEE_CEEVIZ_ROOT}")
|
|
else()
|
|
set(CEE_CEEVIZ_ROOT ${PROJECT_SOURCE_DIR})
|
|
message(STATUS "Setting CEE_CEEVIZ_ROOT to ${CEE_CEEVIZ_ROOT}")
|
|
endif()
|
|
|
|
# Determine if we're being run stand-alone or invoked from some other project
|
|
set(CEE_STAND_ALONE ON)
|
|
if (PROJECT_SOURCE_DIR STREQUAL CMAKE_SOURCE_DIR)
|
|
message("VizFramework project being built stand-alone")
|
|
else()
|
|
set(CEE_STAND_ALONE OFF)
|
|
message("VizFramework project is invoked from other project")
|
|
endif()
|
|
|
|
|
|
if (CEE_STAND_ALONE)
|
|
# Set a default build type (not relevant for WIN32)
|
|
if (NOT CMAKE_BUILD_TYPE)
|
|
set(CMAKE_BUILD_TYPE Release CACHE STRING "Choose the type of build, options are: None Debug Release RelWithDebInfo MinSizeRel." FORCE)
|
|
endif()
|
|
|
|
include(CMake/Utils/ceeDetermineCompilerFlags.cmake)
|
|
|
|
set(CMAKE_CXX_STANDARD 17)
|
|
endif()
|
|
|
|
|
|
# Allow use of non-threadsafe reference counter in cvf::Object on systems with no atomics support
|
|
option(CEE_WORKAROUND_ON_SYSTEMS_WITHOUT_ATOMICS "Allow use of non-threadsafe reference counter on systems with no atomics support" OFF)
|
|
if (CEE_WORKAROUND_ON_SYSTEMS_WITHOUT_ATOMICS)
|
|
add_definitions(-DCVF_WORKAROUND_TO_COMPILE_ON_SYSTEMS_WITHOUT_ATOMICS)
|
|
endif()
|
|
|
|
|
|
add_subdirectory(LibCore)
|
|
add_subdirectory(LibIo)
|
|
add_subdirectory(LibGeometry)
|
|
add_subdirectory(LibRender)
|
|
add_subdirectory(LibViewing)
|
|
|
|
add_subdirectory(LibRegGrid2D)
|
|
add_subdirectory(LibStructGrid)
|
|
add_subdirectory(LibFreeType)
|
|
add_subdirectory(ThirdParty/FreeType)
|
|
|
|
add_subdirectory(LibUtilities)
|
|
|
|
|
|
option(CEE_BUILD_GUI_QT "Build GUI library for Qt" ON)
|
|
if (CEE_BUILD_GUI_QT)
|
|
option(CEE_USE_QT6 "Use Qt6" OFF)
|
|
option(CEE_USE_QT5 "Use Qt5" OFF)
|
|
add_subdirectory(LibGuiQt)
|
|
endif()
|
|
|
|
|
|
if (CEE_STAND_ALONE)
|
|
option(CEE_BUILD_UNIT_TESTS "Build unit tests" ON)
|
|
option(CEE_BUILD_TEST_APPS "Build test apps" ON)
|
|
endif()
|
|
|
|
if (CEE_BUILD_UNIT_TESTS OR CEE_BUILD_TEST_APPS)
|
|
# Add CeeViz's root source dir as a preprocessor directive so unit tests and test apps can determine where to find the resources they want.
|
|
add_definitions(-DCVF_CEEVIZ_ROOT_SOURCE_DIR="${CEE_CEEVIZ_ROOT}")
|
|
endif()
|
|
|
|
if (CEE_BUILD_UNIT_TESTS)
|
|
add_subdirectory(Tests)
|
|
endif()
|
|
|
|
if (CEE_BUILD_TEST_APPS)
|
|
# For now, build the snippet libs here
|
|
add_subdirectory(Tests/SnippetsBasis)
|
|
|
|
if (CEE_BUILD_GUI_QT)
|
|
add_subdirectory(TestApps/Qt/QtMinimal)
|
|
add_subdirectory(TestApps/Qt/QtMultiView)
|
|
add_subdirectory(TestApps/Qt/QtTestBenchOpenGLWidget)
|
|
add_subdirectory(TestApps/Qt/QtSnippetRunner)
|
|
|
|
if (CEE_USE_QT5)
|
|
add_subdirectory(TestApps/Qt/QtMinimal_GLWidget)
|
|
add_subdirectory(TestApps/Qt/QtMinimal_deprecated)
|
|
add_subdirectory(TestApps/Qt/QtMultiView_deprecated)
|
|
endif()
|
|
endif()
|
|
|
|
if (WIN32)
|
|
add_subdirectory(TestApps/Win32/Win32SnippetRunner)
|
|
endif()
|
|
endif()
|