Fix cmake build

Bug: 171711491

X11Support.cpp was not being built.

Change-Id: I353b77844ee17c79f84319feb249768fdce9d409
diff --git a/stream-servers/apigen-codec-common/CMakeLists.txt b/stream-servers/apigen-codec-common/CMakeLists.txt
index 726c454..5916746 100644
--- a/stream-servers/apigen-codec-common/CMakeLists.txt
+++ b/stream-servers/apigen-codec-common/CMakeLists.txt
@@ -1,8 +1,17 @@
+if (APPLE)
+    set(apigen-codec-common-platform-sources)
+elseif (WIN32)
+    set(apigen-codec-common-platform-sources)
+else()
+    set(apigen-codec-common-platform-sources X11Support.cpp)
+endif()
+
 add_library(
     apigen-codec-common
     ChecksumCalculator.cpp
     ChecksumCalculatorThreadInfo.cpp
-    glUtils.cpp)
+    glUtils.cpp
+    ${apigen-codec-common-platform-sources})
 target_compile_options(
     apigen-codec-common PRIVATE -fvisibility=hidden)
 target_link_libraries(
diff --git a/stream-servers/apigen-codec-common/X11Support.cpp b/stream-servers/apigen-codec-common/X11Support.cpp
index e4a5787..eedf92f 100644
--- a/stream-servers/apigen-codec-common/X11Support.cpp
+++ b/stream-servers/apigen-codec-common/X11Support.cpp
@@ -70,12 +70,12 @@
         GlxApi mApi;
 };
 
-struct X11Api* getX11Api() {
+AEMU_EXPORT struct X11Api* getX11Api() {
     static X11FunctionGetter* g = new X11FunctionGetter;
     return g->getApi();
 }
 
-struct GlxApi* getGlxApi() {
+AEMU_EXPORT struct GlxApi* getGlxApi() {
     static GlxFunctionGetter* g = new GlxFunctionGetter;
     return g->getApi();
 }
diff --git a/stream-servers/apigen-codec-common/X11Support.h b/stream-servers/apigen-codec-common/X11Support.h
index a61a922..2d6eca4 100644
--- a/stream-servers/apigen-codec-common/X11Support.h
+++ b/stream-servers/apigen-codec-common/X11Support.h
@@ -3,6 +3,8 @@
 #include <X11/Xlib.h>
 #include <GL/glx.h>
 
+#include "base/export.h"
+
 // GLX
 #define LIST_GLX_FUNCS(f) \
     f(glXQueryVersion) \
@@ -135,5 +137,5 @@
 LIST_GLX_FUNCS(DECLARE_API_STRUCT_MEMBER)
 };
 
-struct X11Api* getX11Api();
-struct GlxApi* getGlxApi();
+AEMU_EXPORT struct X11Api* getX11Api();
+AEMU_EXPORT struct GlxApi* getGlxApi();