Browse Source

CMake: Add support for building WGL display output.

Sam Edwards 12 years ago
parent
commit
74bc124867

+ 2 - 0
panda/CMakeLists.txt

@@ -40,6 +40,8 @@ add_subdirectory(src/glstuff)
 add_subdirectory(src/glgsg)
 add_subdirectory(src/x11display)
 add_subdirectory(src/glxdisplay)
+add_subdirectory(src/windisplay)
+add_subdirectory(src/wgldisplay)
 add_subdirectory(src/movies)
 add_subdirectory(src/audio)
 add_subdirectory(src/chan)

+ 4 - 1
panda/metalibs/pandagl/CMakeLists.txt

@@ -11,7 +11,10 @@ if(HAVE_GL)
   set(PANDAGL_LINK_TARGETS p3glgsg)
 
   if(HAVE_GLX)
-    set(PANDAGL_LINK_TARGETS ${PANDAGL_LINK_TARGETS} p3glxdisplay)
+    list(APPEND PANDAGL_LINK_TARGETS p3glxdisplay)
+  endif()
+  if(HAVE_WGL)
+    list(APPEND PANDAGL_LINK_TARGETS p3wgldisplay)
   endif()
 
 

+ 21 - 0
panda/src/wgldisplay/CMakeLists.txt

@@ -0,0 +1,21 @@
+if(HAVE_WGL)
+  set(P3WGLDISPLAY_HEADERS
+      config_wgldisplay.h
+      wglGraphicsBuffer.I wglGraphicsBuffer.h
+      wglGraphicsPipe.I wglGraphicsPipe.h
+      wglGraphicsStateGuardian.I wglGraphicsStateGuardian.h
+      wglGraphicsWindow.I wglGraphicsWindow.h
+      wglext.h)
+
+  set(P3WGLDISPLAY_SOURCES
+      config_wgldisplay.cxx
+      wglGraphicsBuffer.cxx
+      wglGraphicsPipe.cxx
+      wglGraphicsStateGuardian.cxx
+      wglGraphicsWindow.cxx)
+
+
+  composite_sources(p3wgldisplay P3WGLDISPLAY_SOURCES)
+  add_library(p3wgldisplay ${P3WGLDISPLAY_HEADERS} ${P3WGLDISPLAY_SOURCES})
+  target_link_libraries(p3wgldisplay p3display p3putil p3windisplay p3glgsg)
+endif()

+ 17 - 0
panda/src/windisplay/CMakeLists.txt

@@ -0,0 +1,17 @@
+if(WIN32)
+  set(P3WINDISPLAY_HEADERS
+      config_windisplay.h
+      winGraphicsPipe.I winGraphicsPipe.h
+      winGraphicsWindow.I winGraphicsWindow.h
+      winDetectDx.h)
+
+  set(P3WINDISPLAY_SOURCES
+      config_windisplay.cxx winGraphicsPipe.cxx
+      winGraphicsWindow.cxx
+      winDetectDx9.cxx winDetectDx8.cxx)
+
+  composite_sources(p3windisplay P3WINDISPLAY_SOURCES)
+  add_library(p3windisplay ${P3WINDISPLAY_HEADERS} ${P3WINDISPLAY_SOURCES})
+  target_link_libraries(p3windisplay p3display p3putil
+    Coreimm.lib)
+endif()