[build] make "common" a static library (part 2/2)

This commit is contained in:
Geoffrey McRae 2019-04-11 11:12:59 +10:00
parent 28b12c85f4
commit d8915dbfc9
29 changed files with 38 additions and 26 deletions

View File

@ -1 +1 @@
a12-150-gbee221c18d+1
a12-151-g28b12c85f4+1

View File

@ -55,11 +55,11 @@ find_package(GMP)
add_definitions(-D BUILD_VERSION='"${BUILD_VERSION}"')
add_definitions(-D ATOMIC_LOCKING)
add_definitions(-D GL_GLEXT_PROTOTYPES)
get_filename_component(PROJECT_TOP "${PROJECT_SOURCE_DIR}/.." ABSOLUTE)
include_directories(
${PROJECT_SOURCE_DIR}/include
${CMAKE_BINARY_DIR}/include
${PROJECT_SOURCE_DIR}/../common
${PKGCONFIG_INCLUDE_DIRS}
${GMP_INCLUDE_DIR}
)
@ -79,6 +79,7 @@ set(SOURCES
src/utils.c
)
add_subdirectory("${PROJECT_TOP}/common" "${CMAKE_BINARY_DIR}/common")
add_subdirectory(spice)
add_subdirectory(renderers)
add_subdirectory(clipboards)
@ -88,6 +89,7 @@ add_subdirectory(decoders)
add_executable(looking-glass-client ${SOURCES})
target_compile_options(looking-glass-client PUBLIC ${PKGCONFIG_CFLAGS_OTHER})
target_link_libraries(looking-glass-client
lg_common
spice
renderers
clipboards

View File

@ -13,6 +13,7 @@ add_library(clipboard_X11 STATIC
target_link_libraries(clipboard_X11
${CLIPBOARD_PKGCONFIG_LIBRARIES}
lg_common
)
target_include_directories(clipboard_X11

View File

@ -18,7 +18,7 @@ Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "interface/clipboard.h"
#include "debug.h"
#include "common/debug.h"
#include <X11/extensions/Xfixes.h>

View File

@ -11,6 +11,7 @@ add_library(decoders STATIC
)
target_link_libraries(decoders
lg_common
${DECODERS_PKGCONFIG_LIBRARIES}
)

View File

@ -19,8 +19,8 @@ Place, Suite 330, Boston, MA 02111-1307 USA
#include "interface/decoder.h"
#include "debug.h"
#include "memcpySSE.h"
#include "common/debug.h"
#include "common/memcpySSE.h"
#include <stdlib.h>
#include <string.h>

View File

@ -19,8 +19,8 @@ Place, Suite 330, Boston, MA 02111-1307 USA
#include "interface/decoder.h"
#include "debug.h"
#include "memcpySSE.h"
#include "common/debug.h"
#include "common/memcpySSE.h"
#include <stdlib.h>
#include <string.h>

View File

@ -13,6 +13,7 @@ add_library(font_SDL STATIC
target_link_libraries(font_SDL
${FONT_SDL_PKGCONFIG_LIBRARIES}
lg_common
)
target_include_directories(font_SDL

View File

@ -21,7 +21,7 @@ Place, Suite 330, Boston, MA 02111-1307 USA
#include <stdbool.h>
#include "interface/font.h"
#include "debug.h"
#include "common/debug.h"
#include <SDL2/SDL_ttf.h>
#include <fontconfig/fontconfig.h>

View File

@ -25,7 +25,7 @@ Place, Suite 330, Boston, MA 02111-1307 USA
#include <SDL2/SDL_ttf.h>
#include "app.h"
#include "KVMFR.h"
#include "common/KVMFR.h"
#define IS_LG_RENDERER_VALID(x) \
((x)->get_name && \

View File

@ -45,6 +45,7 @@ add_library(renderer_EGL STATIC
target_link_libraries(renderer_EGL
${RENDERER_EGL_PKGCONFIG_LIBRARIES}
lg_common
fonts
)

View File

@ -18,7 +18,7 @@ Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "alert.h"
#include "debug.h"
#include "common/debug.h"
#include "utils.h"
#include "texture.h"

View File

@ -18,7 +18,7 @@ Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "cursor.h"
#include "debug.h"
#include "common/debug.h"
#include "utils.h"
#include "texture.h"

View File

@ -18,7 +18,7 @@ Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "desktop.h"
#include "debug.h"
#include "common/debug.h"
#include "utils.h"
#include "texture.h"

View File

@ -19,7 +19,7 @@ Place, Suite 330, Boston, MA 02111-1307 USA
#include "interface/renderer.h"
#include "debug.h"
#include "common/debug.h"
#include "utils.h"
#include "dynamic/fonts.h"

View File

@ -18,7 +18,7 @@ Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "fps.h"
#include "debug.h"
#include "common/debug.h"
#include "utils.h"
#include "texture.h"

View File

@ -21,7 +21,7 @@ Place, Suite 330, Boston, MA 02111-1307 USA
#include "shader.h"
#include "texture.h"
#include "debug.h"
#include "common/debug.h"
#include "utils.h"
#include "ll.h"

View File

@ -18,7 +18,7 @@ Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "shader.h"
#include "debug.h"
#include "common/debug.h"
#include "utils.h"
#include <stdlib.h>

View File

@ -18,7 +18,7 @@ Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "splash.h"
#include "debug.h"
#include "common/debug.h"
#include "utils.h"
#include "draw.h"

View File

@ -18,7 +18,7 @@ Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "texture.h"
#include "debug.h"
#include "common/debug.h"
#include "utils.h"
#include <stdlib.h>

View File

@ -13,6 +13,7 @@ add_library(renderer_OpenGL STATIC
target_link_libraries(renderer_OpenGL
${RENDERER_OPENGL_PKGCONFIG_LIBRARIES}
lg_common
decoders
fonts
)

View File

@ -30,7 +30,7 @@ Place, Suite 330, Boston, MA 02111-1307 USA
#include <GL/glu.h>
#include <GL/glx.h>
#include "debug.h"
#include "common/debug.h"
#include "utils.h"
#include "lg-decoders.h"
#include "dynamic/fonts.h"

View File

@ -16,6 +16,7 @@ add_library(spice STATIC
)
target_link_libraries(spice
lg_common
${SPICE_PKGCONFIG_LIBRARIES}
)

View File

@ -18,7 +18,7 @@ Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "rsa.h"
#include "debug.h"
#include "common/debug.h"
#include <spice/protocol.h>
#include <malloc.h>

View File

@ -19,7 +19,7 @@ Place, Suite 330, Boston, MA 02111-1307 USA
#include "spice.h"
#include "utils.h"
#include "debug.h"
#include "common/debug.h"
#include <string.h>
#include <unistd.h>

View File

@ -18,7 +18,7 @@ Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "main.h"
#include "debug.h"
#include "common/debug.h"
#include <stdarg.h>
void app_alert(LG_MsgAlert type, const char * fmt, ...)

View File

@ -19,7 +19,7 @@ Place, Suite 330, Boston, MA 02111-1307 USA
#include "main.h"
#include "config.h"
#include "debug.h"
#include "common/debug.h"
#include <sys/stat.h>
#include <libconfig.h>

View File

@ -35,9 +35,9 @@ Place, Suite 330, Boston, MA 02111-1307 USA
#include <stdbool.h>
#include <assert.h>
#include "debug.h"
#include "common/debug.h"
#include "common/KVMFR.h"
#include "utils.h"
#include "KVMFR.h"
#include "kb.h"
#include "ll.h"
@ -337,6 +337,10 @@ static int frameThread(void * unused)
header.pitch < header.width
){
DEBUG_WARN("Bad header");
DEBUG_WARN(" width : %u" , header.width );
DEBUG_WARN(" height : %u" , header.height );
DEBUG_WARN(" pitch : %u" , header.pitch );
DEBUG_WARN(" dataPos: 0x%08lx", header.dataPos);
usleep(1000);
continue;
}

View File

@ -18,7 +18,7 @@ Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "utils.h"
#include "debug.h"
#include "common/debug.h"
#include <stdlib.h>
#include <stdio.h>