diff Resources/CMake/OrthancStoneConfiguration.cmake @ 1168:f2951ac074bd

allow compiling unit tests with sdl
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 20 Nov 2019 11:08:29 +0100
parents 63539e826355
children ba08f2b0a779 848dcba80d81
line wrap: on
line diff
--- a/Resources/CMake/OrthancStoneConfiguration.cmake	Wed Nov 20 10:47:42 2019 +0100
+++ b/Resources/CMake/OrthancStoneConfiguration.cmake	Wed Nov 20 11:08:29 2019 +0100
@@ -56,6 +56,12 @@
   endif()
 endif()
 
+if (ENABLE_OPENGL)
+  if (NOT ENABLE_QT AND NOT ENABLE_SDL AND NOT ENABLE_WASM)
+    message(FATAL_ERROR "Cannot enable OpenGL if WebAssembly, SDL and Qt are all disabled")
+  endif()
+endif()
+
 if (ENABLE_WASM)
   if (NOT ORTHANC_SANDBOXED)
     message(FATAL_ERROR "WebAssembly target must me configured as sandboxed")