diff Resources/CMake/OrthancStoneConfiguration.cmake @ 578:21fd70df3fc9

starting work on OpenGL
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 19 Apr 2019 15:57:46 +0200
parents b098a3aaf694
children fadacfbf5538
line wrap: on
line diff
--- a/Resources/CMake/OrthancStoneConfiguration.cmake	Fri Apr 19 15:42:57 2019 +0200
+++ b/Resources/CMake/OrthancStoneConfiguration.cmake	Fri Apr 19 15:57:46 2019 +0200
@@ -106,6 +106,16 @@
 endif()
 
 
+if (ENABLE_OPENGL)
+  add_definitions(
+    -DGL_GLEXT_PROTOTYPES=1
+    -DORTHANC_ENABLE_OPENGL=1
+    )
+else()
+  add_definitions(-DORTHANC_ENABLE_OPENGL=0)  
+endif()
+
+
 
 #####################################################################
 ## Configuration of the C/C++ macros
@@ -125,6 +135,8 @@
   add_definitions(-DCHECK_OBSERVERS_MESSAGES)
 endif()
 
+
+
 #####################################################################
 ## Embed the colormaps into the binaries
 #####################################################################
@@ -249,7 +261,6 @@
   ${ORTHANC_STONE_ROOT}/Framework/Fonts/GlyphAlphabet.cpp
   ${ORTHANC_STONE_ROOT}/Framework/Fonts/GlyphBitmapAlphabet.cpp
   ${ORTHANC_STONE_ROOT}/Framework/Fonts/GlyphTextureAlphabet.cpp
-  ${ORTHANC_STONE_ROOT}/Framework/Fonts/OpenGLTextCoordinates.cpp
   ${ORTHANC_STONE_ROOT}/Framework/Fonts/TextBoundingBox.cpp
   ${ORTHANC_STONE_ROOT}/Framework/Layers/CircleMeasureTracker.cpp
   ${ORTHANC_STONE_ROOT}/Framework/Layers/ColorFrameRenderer.cpp
@@ -362,6 +373,15 @@
   ${BOOST_EXTENDED_SOURCES}
   )
 
+
+if (ENABLE_OPENGL)
+  list(APPEND ORTHANC_STONE_SOURCES
+    ${ORTHANC_STONE_ROOT}/Framework/Fonts/OpenGLTextCoordinates.cpp
+    ${ORTHANC_STONE_ROOT}/Framework/OpenGL/OpenGLShader.cpp
+    )
+endif()
+
+
 include_directories(${ORTHANC_STONE_ROOT})