Mercurial > hg > orthanc-stone
comparison Resources/CMake/OrthancStoneConfiguration.cmake @ 665:419e5662d7a5
fix
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 15 May 2019 12:28:58 +0200 |
parents | 97926984d5d0 |
children | e9339f2b5de7 |
comparison
equal
deleted
inserted
replaced
664:9631a10ed3af | 665:419e5662d7a5 |
---|---|
144 ) | 144 ) |
145 endif() | 145 endif() |
146 | 146 |
147 | 147 |
148 if (ENABLE_OPENGL) | 148 if (ENABLE_OPENGL) |
149 include(FindOpenGL) | 149 if (NOT CMAKE_SYSTEM_NAME STREQUAL "Emscripten") |
150 if (NOT OPENGL_FOUND) | 150 # If including "FindOpenGL.cmake" using Emscripten (targetting |
151 message(FATAL_ERROR "Cannot find OpenGL on your system") | 151 # WebAssembly), the "OPENGL_LIBRARIES" value incorrectly includes |
152 endif() | 152 # the "nul" library, which leads to warning message in Emscripten: |
153 | 153 # 'shared:WARNING: emcc: cannot find library "nul"'. |
154 link_libraries(${OPENGL_LIBRARIES}) | 154 include(FindOpenGL) |
155 if (NOT OPENGL_FOUND) | |
156 message(FATAL_ERROR "Cannot find OpenGL on your system") | |
157 endif() | |
158 | |
159 link_libraries(${OPENGL_LIBRARIES}) | |
160 endif() | |
155 | 161 |
156 add_definitions( | 162 add_definitions( |
157 -DGL_GLEXT_PROTOTYPES=1 | 163 -DGL_GLEXT_PROTOTYPES=1 |
158 -DORTHANC_ENABLE_OPENGL=1 | 164 -DORTHANC_ENABLE_OPENGL=1 |
159 ) | 165 ) |