Skip to content

Commit

Permalink
CMake: workaround for possibly failing OpenGL check in vtk9
Browse files Browse the repository at this point in the history
  • Loading branch information
wwmayer committed Jan 21, 2021
1 parent 7a08b7a commit 020e5bc
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
7 changes: 6 additions & 1 deletion CMakeLists.txt
Expand Up @@ -50,6 +50,12 @@ if(NOT FREECAD_LIBPACK_USE OR FREECAD_LIBPACK_CHECKFILE_CLBUNDLER)
find_package(ZLIB REQUIRED)
find_package(PyCXX REQUIRED)
SetupOpenCasCade()
if(BUILD_GUI)
# Do this before the check for SMESH because it depends on vtk
# that may have its own OpenGL check but possibly fails and leaves
# OPENGL_gl_LIBRARY empty that results into linker errors
SetupOpenGL()
endif(BUILD_GUI)
SetupSalomeSMESH()
if (BUILD_FEM_NETGEN)
find_package(NETGEN)
Expand All @@ -64,7 +70,6 @@ if(NOT FREECAD_LIBPACK_USE OR FREECAD_LIBPACK_CHECKFILE_CLBUNDLER)
SetupFreetype()

if(BUILD_GUI)
SetupOpenGL()
SetupCoin3D()
SetupSpaceball()
SetupShibokenAndPyside()
Expand Down
1 change: 1 addition & 0 deletions cMake/FreeCAD_Helpers/PrintFinalReport.cmake
Expand Up @@ -163,6 +163,7 @@ macro(PrintFinalReport)
message(STATUS "Freetype: disabled")
endif(FREECAD_USE_FREETYPE)

message(STATUS "OpenGL: ${OPENGL_gl_LIBRARY}")
message(STATUS "OpenGLU: ${OPENGL_glu_LIBRARY} [${OPENGL_glu_LIBRARY}][${OPENGL_INCLUDE_DIR}]")

message(STATUS "Coin3D: [${COIN3D_LIBRARIES}] [${COIN3D_INCLUDE_DIRS}]")
Expand Down

0 comments on commit 020e5bc

Please sign in to comment.