提交 b9f0da02 编写于 作者: T Timo R 提交者: BtbN

Move opengl loader into a seperate static library, so plugins can use it

上级 362e008b
......@@ -8,9 +8,10 @@ include_directories(${OPENGL_INCLUDE_DIR})
add_definitions(-DLIBOBS_EXPORTS)
if(WIN32)
set(libobs-opengl_PLATFORM_SOURCES
gl-windows.c
set(obs-opengl_PLATFORM_SOURCES
GL/wgl_obs.c)
set(libobs-opengl_PLATFORM_SOURCES
gl-windows.c)
elseif(APPLE)
set(libobs-opengl_PLATFORM_SOURCES
gl-cocoa.m)
......@@ -32,10 +33,14 @@ elseif(APPLE)
${IOSURF})
else()
set(libobs-opengl_PLATFORM_SOURCES
gl-x11.c
gl-x11.c)
set(obs-opengl_PLATFORM_SOURCES
GL/glx_obs.c)
endif()
set(obs-opengl_SOURCES
GL/gl_obs.c)
set(libobs-opengl_SOURCES
${libobs-opengl_PLATFORM_SOURCES}
gl-helpers.c
......@@ -47,14 +52,23 @@ set(libobs-opengl_SOURCES
gl-texture2d.c
gl-texturecube.c
gl-vertexbuffer.c
gl-zstencil.c
GL/gl_obs.c)
gl-zstencil.c)
set(libobs-opengl_HEADERS
gl-helpers.h
gl-shaderparser.h
gl-subsystem.h)
add_library(obs-opengl STATIC
${obs-opengl_SOURCES}
${obs-opengl_PLATFORM_SOURCES})
if(NOT WIN32)
set_property(TARGET obs-opengl APPEND_STRING
PROPERTY COMPILE_FLAGS " -fPIC")
endif()
target_link_libraries(obs-opengl
${OPENGL_gl_LIBRARY})
add_library(libobs-opengl MODULE
${libobs-opengl_SOURCES}
${libobs-opengl_HEADERS})
......@@ -64,7 +78,7 @@ set_target_properties(libobs-opengl
PREFIX "")
target_link_libraries(libobs-opengl
libobs
${libobs-opengl_PLATFORM_DEPS}
${OPENGL_gl_LIBRARY})
obs-opengl
${libobs-opengl_PLATFORM_DEPS})
install_obs_core(libobs-opengl)
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册