Get pandagl building under Linux on CMake.

This commit is contained in:
Sam Edwards 2014-01-26 18:46:38 -07:00
parent 0f89ef1e7b
commit 5b791ca358
5 changed files with 52 additions and 3 deletions

View File

@ -31,6 +31,8 @@ add_subdirectory(src/mathutil)
add_subdirectory(src/gsgbase)
add_subdirectory(src/glstuff)
add_subdirectory(src/glgsg)
add_subdirectory(src/glxdisplay)
add_subdirectory(src/x11display)
add_subdirectory(src/pnmimage)
add_subdirectory(src/pnmimagetypes)
add_subdirectory(src/gobj)
@ -55,5 +57,5 @@ add_subdirectory(src/framework)
# Include panda metalibs
add_subdirectory(metalibs/panda)
#add_subdirectory(metalibs/pandagl)
add_subdirectory(metalibs/pandagl)
#add_subdirectory(metalibs/pandaegg)

View File

@ -2,6 +2,11 @@ if(HAVE_GL)
add_definitions(-DBUILDING_PANDAGL)
set(PANDAGL_LINK_TARGETS p3glgsg)
if(HAVE_GLX)
set(PANDAGL_LINK_TARGETS ${PANDAGL_LINK_TARGETS} p3glxdisplay)
endif()
add_library(pandagl pandagl.cxx)
target_link_libraries(pandagl ${PANDAGL_LINK_TARGETS})
endif()

View File

@ -10,6 +10,6 @@ if(HAVE_GL)
composite_sources(p3glgsg P3GLGSG_SOURCES)
add_library(p3glgsg ${P3GLGSG_HEADERS} ${P3GLGSG_SOURCES})
target_link_libraries(p3glgsg p3glstuff p3display)
target_link_libraries(p3glgsg p3glstuff p3display ${OPENGL_LIBRARIES})
target_interrogate(p3glgsg ALL)
endif()
endif()

View File

@ -0,0 +1,27 @@
if(HAVE_GLX)
set(P3GLXDISPLAY_HEADERS
config_glxdisplay.h
glxGraphicsBuffer.h glxGraphicsBuffer.I
glxGraphicsPipe.h glxGraphicsPipe.I
glxGraphicsPixmap.h glxGraphicsPixmap.I
glxGraphicsWindow.h
glxGraphicsStateGuardian.h glxGraphicsStateGuardian.I
posixGraphicsStateGuardian.h posixGraphicsStateGuardian.I
panda_glxext.h
)
set(P3GLXDISPLAY_SOURCES
config_glxdisplay.cxx
glxGraphicsBuffer.cxx
glxGraphicsPipe.cxx
glxGraphicsPixmap.cxx
glxGraphicsWindow.cxx
glxGraphicsStateGuardian.cxx
posixGraphicsStateGuardian.cxx
)
composite_sources(p3glxdisplay P3GLXDISPLAY_SOURCES)
add_library(p3glxdisplay ${P3GLXDISPLAY_HEADERS} ${P3GLXDISPLAY_SOURCES})
target_link_libraries(p3glxdisplay p3glgsg p3x11display)
target_interrogate(p3glxdisplay ALL)
endif()

View File

@ -0,0 +1,15 @@
if(HAVE_X11)
set(P3X11DISPLAY_HEADERS
config_x11display.h x11GraphicsPipe.I x11GraphicsPipe.h
x11GraphicsWindow.h x11GraphicsWindow.I
)
set(P3X11DISPLAY_SOURCES
config_x11display.cxx x11GraphicsPipe.cxx x11GraphicsWindow.cxx
)
composite_sources(p3x11display P3X11DISPLAY_SOURCES)
add_library(p3x11display ${P3X11DISPLAY_HEADERS} ${P3X11DISPLAY_SOURCES})
target_link_libraries(p3x11display p3display ${X11_LIBRARIES})
target_interrogate(p3x11display ALL)
endif()