Make xlib and xcb support optional (but default on) on linux

* Also allow disabling GL a little better by removing the dependency in
  renderdoccmd.
* Disabling them now completely removes all xcb and xlib build
  dependencies. The resulting library/executable is only useful in
  limited situations - e.g. replaying vulkan remotely which doesn't need
  any window system interaction. Or capturing vulkan as well with the
  KHR_display WSI extension which doesn't need any built-time includes
  or libs.
This commit is contained in:
baldurk
2016-08-23 16:25:21 +02:00
parent f8bbedeb8b
commit 872fbe017b
14 changed files with 234 additions and 73 deletions
+12 -5
View File
@@ -23,11 +23,6 @@
* THE SOFTWARE.
******************************************************************************/
#if defined(RENDERDOC_PLATFORM_LINUX)
#define RENDERDOC_WINDOWING_XLIB 1
#define RENDERDOC_WINDOWING_XCB 1
#endif
#include "common/common.h"
#include "maths/matrix.h"
#include "serialise/string_utils.h"
@@ -38,10 +33,22 @@ static uint64_t GetHandle(WindowingSystem system, void *data)
#if defined(RENDERDOC_PLATFORM_LINUX)
if(system == eWindowingSystem_Xlib)
{
#if defined(RENDERDOC_WINDOWING_XLIB)
return (uint64_t)((XlibWindowData *)data)->window;
#else
RDCERR("Xlib windowing system data passed in, but support is not compiled in");
#endif
}
if(system == eWindowingSystem_XCB)
{
#if defined(RENDERDOC_WINDOWING_XCB)
return (uint64_t)((XCBWindowData *)data)->window;
#else
RDCERR("XCB windowing system data passed in, but support is not compiled in");
#endif
}
RDCERR("Unrecognised window system %d", system);