Static build, fix duplicate symbol
This commit is contained in:
parent
920a531cc5
commit
97462b57c8
@ -22,9 +22,9 @@ if(NOT (X11_Xext_FOUND AND X11_Xfixes_FOUND))
|
||||
message(FATAL_ERROR "Please install Xext and Xfixes")
|
||||
endif()
|
||||
|
||||
add_library(${PROJECT_NAME} SHARED "")
|
||||
add_library(${PROJECT_NAME} STATIC "")
|
||||
|
||||
set_target_properties(${PROJECT_NAME} PROPERTIES COMPILE_FLAGS "-m32" LINK_FLAGS "-m32")
|
||||
set_target_properties(${PROJECT_NAME} PROPERTIES COMPILE_FLAGS "-m32 -fPIC" LINK_FLAGS "-m32 -fPIC")
|
||||
|
||||
target_include_directories(${PROJECT_NAME} PRIVATE
|
||||
$<BUILD_INTERFACE:${GLEW_INCLUDE_DIRS}>
|
||||
@ -43,4 +43,4 @@ add_subdirectory(src)
|
||||
install(TARGETS ${PROJECT_NAME} EXPORT ${PROJECT_NAME} DESTINATION "${lib_dest}")
|
||||
install(FILES "include/xoverlay.h" DESTINATION "${include_dest}")
|
||||
install(EXPORT ${PROJECT_NAME} DESTINATION "${lib_dest}")
|
||||
install(FILES ${PROJECT_NAME}-config.cmake DESTINATION ${export_dest})
|
||||
install(FILES ${PROJECT_NAME}-config.cmake DESTINATION ${export_dest})
|
||||
|
@ -11,12 +11,14 @@
|
||||
#include <GL/gl.h>
|
||||
#include <GL/glx.h>
|
||||
|
||||
struct xoverlay_glx_state
|
||||
typedef struct
|
||||
{
|
||||
int version_major;
|
||||
int version_minor;
|
||||
GLXContext context;
|
||||
} glx_state;
|
||||
} xoverlay_glx_state;
|
||||
|
||||
extern xoverlay_glx_state glx_state;
|
||||
|
||||
int xoverlay_glx_init();
|
||||
int xoverlay_glx_create_window();
|
||||
|
@ -24,6 +24,8 @@ typedef GLXContext (*glXCreateContextAttribsARBfn)(Display *, GLXFBConfig,
|
||||
GLXContext, Bool,
|
||||
const int *);
|
||||
|
||||
xoverlay_glx_state glx_state;
|
||||
|
||||
// Helper to check for extension string presence. Adapted from:
|
||||
// http://www.opengl.org/resources/features/OGLextensions/
|
||||
int glx_is_extension_supported(const char *list, const char *extension)
|
||||
@ -101,7 +103,7 @@ int xoverlay_glx_create_window()
|
||||
{
|
||||
XVisualInfo *info =
|
||||
glXGetVisualFromFBConfig(xoverlay_library.display, fbc[i]);
|
||||
if (info->depth != 32)
|
||||
if (info->depth >= 32)
|
||||
continue;
|
||||
int samples;
|
||||
glXGetFBConfigAttrib(xoverlay_library.display, fbc[i], GLX_SAMPLES,
|
||||
|
Loading…
x
Reference in New Issue
Block a user