Skip to content
Snippets Groups Projects
Commit 2cb8ece1 authored by Vakho Tsulaia's avatar Vakho Tsulaia
Browse files

GeoModelVisualization: don't depend on EGL and GLX on Mac platforms

parent d5038e25
No related branches found
No related tags found
1 merge request!439GeoModelVisualization: don't depend on EGL and GLX on Mac platforms
Pipeline #11940199 failed
......@@ -12,7 +12,7 @@ project( "GeoModelVisualization" )
# Set the OpenGL flag requested by CMake
set( OpenGL_GL_PREFERENCE GLVND )
if (UNIX)
if (UNIX AND NOT APPLE)
find_package(OpenGL REQUIRED COMPONENTS OpenGL EGL GLX)
endif()
......
......@@ -8,14 +8,17 @@ file( GLOB RCS src/*.qrc )
# Add the library.
add_library( GXBase SHARED ${SOURCES} ${HEADERS} ${UIS} ${RCS} )
if(UNIX AND NOT APPLE)
set(OPENGL_EGL "OpenGL::EGL")
endif()
if (GEOMODEL_USE_QT6)
target_link_libraries( GXBase
PUBLIC Coin::Coin Qt${QT_VERSION}::Core Qt${QT_VERSION}::Gui Qt${QT_VERSION}::Widgets Qt${QT_VERSION}::Core5Compat SoQt::SoQt
PRIVATE Qt${QT_VERSION}::PrintSupport Qt${QT_VERSION}::OpenGL OpenGL::EGL GXHepVis )
PRIVATE Qt${QT_VERSION}::PrintSupport Qt${QT_VERSION}::OpenGL GXHepVis ${OPENGL_EGL})
else()
target_link_libraries( GXBase
PUBLIC Coin::Coin Qt${QT_VERSION}::Core Qt${QT_VERSION}::Gui Qt${QT_VERSION}::Widgets SoQt::SoQt
PRIVATE Qt${QT_VERSION}::PrintSupport Qt${QT_VERSION}::OpenGL OpenGL::EGL GXHepVis )
PRIVATE Qt${QT_VERSION}::PrintSupport Qt${QT_VERSION}::OpenGL GXHepVis ${OPENGL_EGL} )
endif()
target_include_directories( GXBase PUBLIC
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment