Mercurial > hg > orthanc-stone
diff Resources/CMake/OrthancStoneConfiguration.cmake @ 699:5c551f078c18 refactor-viewport-controller
Merge from default
author | Benjamin Golinvaux <bgo@osimis.io> |
---|---|
date | Fri, 17 May 2019 09:20:46 +0200 |
parents | 8b6adfb62a2f 7719eb852dd5 |
children | 059e1fd05fd6 |
line wrap: on
line diff
--- a/Resources/CMake/OrthancStoneConfiguration.cmake Wed May 15 16:56:17 2019 +0200 +++ b/Resources/CMake/OrthancStoneConfiguration.cmake Fri May 17 09:20:46 2019 +0200 @@ -146,13 +146,19 @@ if (ENABLE_OPENGL) - include(FindOpenGL) - if (NOT OPENGL_FOUND) - message(FATAL_ERROR "Cannot find OpenGL on your system") + if (NOT CMAKE_SYSTEM_NAME STREQUAL "Emscripten") + # If including "FindOpenGL.cmake" using Emscripten (targeting + # WebAssembly), the "OPENGL_LIBRARIES" value incorrectly includes + # the "nul" library, which leads to warning message in Emscripten: + # 'shared:WARNING: emcc: cannot find library "nul"'. + include(FindOpenGL) + if (NOT OPENGL_FOUND) + message(FATAL_ERROR "Cannot find OpenGL on your system") + endif() + + link_libraries(${OPENGL_LIBRARIES}) endif() - link_libraries(${OPENGL_LIBRARIES}) - add_definitions( -DGL_GLEXT_PROTOTYPES=1 -DORTHANC_ENABLE_OPENGL=1 @@ -417,6 +423,7 @@ ${ORTHANC_STONE_ROOT}/Framework/Toolbox/SlicesSorter.cpp ${ORTHANC_STONE_ROOT}/Framework/Toolbox/UndoRedoStack.cpp ${ORTHANC_STONE_ROOT}/Framework/Toolbox/ViewportGeometry.cpp + ${ORTHANC_STONE_ROOT}/Framework/Toolbox/VolumeImageGeometry.cpp ${ORTHANC_STONE_ROOT}/Framework/Viewport/CairoContext.cpp ${ORTHANC_STONE_ROOT}/Framework/Viewport/CairoSurface.cpp ${ORTHANC_STONE_ROOT}/Framework/Viewport/IMouseTracker.h