From d8915dbfc94ada379ba737bf7beead81e06a40ca Mon Sep 17 00:00:00 2001 From: Geoffrey McRae Date: Thu, 11 Apr 2019 11:12:59 +1000 Subject: [PATCH] [build] make "common" a static library (part 2/2) --- VERSION | 2 +- client/CMakeLists.txt | 4 +++- client/clipboards/X11/CMakeLists.txt | 1 + client/clipboards/X11/src/x11.c | 2 +- client/decoders/CMakeLists.txt | 1 + client/decoders/src/null.c | 4 ++-- client/decoders/src/yuv420.c | 4 ++-- client/fonts/SDL/CMakeLists.txt | 1 + client/fonts/SDL/src/sdl.c | 2 +- client/include/interface/renderer.h | 2 +- client/renderers/EGL/CMakeLists.txt | 1 + client/renderers/EGL/alert.c | 2 +- client/renderers/EGL/cursor.c | 2 +- client/renderers/EGL/desktop.c | 2 +- client/renderers/EGL/egl.c | 2 +- client/renderers/EGL/fps.c | 2 +- client/renderers/EGL/model.c | 2 +- client/renderers/EGL/shader.c | 2 +- client/renderers/EGL/splash.c | 2 +- client/renderers/EGL/texture.c | 2 +- client/renderers/OpenGL/CMakeLists.txt | 1 + client/renderers/OpenGL/opengl.c | 2 +- client/spice/CMakeLists.txt | 1 + client/spice/src/rsa.c | 2 +- client/spice/src/spice.c | 2 +- client/src/app.c | 2 +- client/src/config.c | 2 +- client/src/main.c | 8 ++++++-- client/src/utils.c | 2 +- 29 files changed, 38 insertions(+), 26 deletions(-) diff --git a/VERSION b/VERSION index 96754613..22cacb48 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -a12-150-gbee221c18d+1 \ No newline at end of file +a12-151-g28b12c85f4+1 \ No newline at end of file diff --git a/client/CMakeLists.txt b/client/CMakeLists.txt index 148d8a98..8023428c 100644 --- a/client/CMakeLists.txt +++ b/client/CMakeLists.txt @@ -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 diff --git a/client/clipboards/X11/CMakeLists.txt b/client/clipboards/X11/CMakeLists.txt index 231baf8e..ed12fad9 100644 --- a/client/clipboards/X11/CMakeLists.txt +++ b/client/clipboards/X11/CMakeLists.txt @@ -13,6 +13,7 @@ add_library(clipboard_X11 STATIC target_link_libraries(clipboard_X11 ${CLIPBOARD_PKGCONFIG_LIBRARIES} + lg_common ) target_include_directories(clipboard_X11 diff --git a/client/clipboards/X11/src/x11.c b/client/clipboards/X11/src/x11.c index 0917fcc4..d49c731d 100644 --- a/client/clipboards/X11/src/x11.c +++ b/client/clipboards/X11/src/x11.c @@ -18,7 +18,7 @@ Place, Suite 330, Boston, MA 02111-1307 USA */ #include "interface/clipboard.h" -#include "debug.h" +#include "common/debug.h" #include diff --git a/client/decoders/CMakeLists.txt b/client/decoders/CMakeLists.txt index 9f537c32..0bd722f6 100644 --- a/client/decoders/CMakeLists.txt +++ b/client/decoders/CMakeLists.txt @@ -11,6 +11,7 @@ add_library(decoders STATIC ) target_link_libraries(decoders + lg_common ${DECODERS_PKGCONFIG_LIBRARIES} ) diff --git a/client/decoders/src/null.c b/client/decoders/src/null.c index f6c026c2..bd30b55d 100644 --- a/client/decoders/src/null.c +++ b/client/decoders/src/null.c @@ -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 #include diff --git a/client/decoders/src/yuv420.c b/client/decoders/src/yuv420.c index 286e1cb6..b4c1b863 100644 --- a/client/decoders/src/yuv420.c +++ b/client/decoders/src/yuv420.c @@ -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 #include diff --git a/client/fonts/SDL/CMakeLists.txt b/client/fonts/SDL/CMakeLists.txt index 1684fefa..36eee766 100644 --- a/client/fonts/SDL/CMakeLists.txt +++ b/client/fonts/SDL/CMakeLists.txt @@ -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 diff --git a/client/fonts/SDL/src/sdl.c b/client/fonts/SDL/src/sdl.c index de08e5ec..9dbc7eba 100644 --- a/client/fonts/SDL/src/sdl.c +++ b/client/fonts/SDL/src/sdl.c @@ -21,7 +21,7 @@ Place, Suite 330, Boston, MA 02111-1307 USA #include #include "interface/font.h" -#include "debug.h" +#include "common/debug.h" #include #include diff --git a/client/include/interface/renderer.h b/client/include/interface/renderer.h index 00d7a4e7..7d3640ae 100644 --- a/client/include/interface/renderer.h +++ b/client/include/interface/renderer.h @@ -25,7 +25,7 @@ Place, Suite 330, Boston, MA 02111-1307 USA #include #include "app.h" -#include "KVMFR.h" +#include "common/KVMFR.h" #define IS_LG_RENDERER_VALID(x) \ ((x)->get_name && \ diff --git a/client/renderers/EGL/CMakeLists.txt b/client/renderers/EGL/CMakeLists.txt index 758f84e4..ce73f771 100644 --- a/client/renderers/EGL/CMakeLists.txt +++ b/client/renderers/EGL/CMakeLists.txt @@ -45,6 +45,7 @@ add_library(renderer_EGL STATIC target_link_libraries(renderer_EGL ${RENDERER_EGL_PKGCONFIG_LIBRARIES} + lg_common fonts ) diff --git a/client/renderers/EGL/alert.c b/client/renderers/EGL/alert.c index 9125b6a4..9be0ca2e 100644 --- a/client/renderers/EGL/alert.c +++ b/client/renderers/EGL/alert.c @@ -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" diff --git a/client/renderers/EGL/cursor.c b/client/renderers/EGL/cursor.c index a3cc0bc1..1691ce4e 100644 --- a/client/renderers/EGL/cursor.c +++ b/client/renderers/EGL/cursor.c @@ -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" diff --git a/client/renderers/EGL/desktop.c b/client/renderers/EGL/desktop.c index 7d95dc2a..caf3651e 100644 --- a/client/renderers/EGL/desktop.c +++ b/client/renderers/EGL/desktop.c @@ -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" diff --git a/client/renderers/EGL/egl.c b/client/renderers/EGL/egl.c index 00bc5598..d4ca6088 100644 --- a/client/renderers/EGL/egl.c +++ b/client/renderers/EGL/egl.c @@ -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" diff --git a/client/renderers/EGL/fps.c b/client/renderers/EGL/fps.c index 9808ceca..93a4fda0 100644 --- a/client/renderers/EGL/fps.c +++ b/client/renderers/EGL/fps.c @@ -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" diff --git a/client/renderers/EGL/model.c b/client/renderers/EGL/model.c index 877e61ff..1c6a41e0 100644 --- a/client/renderers/EGL/model.c +++ b/client/renderers/EGL/model.c @@ -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" diff --git a/client/renderers/EGL/shader.c b/client/renderers/EGL/shader.c index 65b0ab24..22df986f 100644 --- a/client/renderers/EGL/shader.c +++ b/client/renderers/EGL/shader.c @@ -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 diff --git a/client/renderers/EGL/splash.c b/client/renderers/EGL/splash.c index 435bfc6a..206e737f 100644 --- a/client/renderers/EGL/splash.c +++ b/client/renderers/EGL/splash.c @@ -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" diff --git a/client/renderers/EGL/texture.c b/client/renderers/EGL/texture.c index 89efb644..a0e282df 100644 --- a/client/renderers/EGL/texture.c +++ b/client/renderers/EGL/texture.c @@ -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 diff --git a/client/renderers/OpenGL/CMakeLists.txt b/client/renderers/OpenGL/CMakeLists.txt index 665aac6d..f1dda0af 100644 --- a/client/renderers/OpenGL/CMakeLists.txt +++ b/client/renderers/OpenGL/CMakeLists.txt @@ -13,6 +13,7 @@ add_library(renderer_OpenGL STATIC target_link_libraries(renderer_OpenGL ${RENDERER_OPENGL_PKGCONFIG_LIBRARIES} + lg_common decoders fonts ) diff --git a/client/renderers/OpenGL/opengl.c b/client/renderers/OpenGL/opengl.c index 996bec75..5a7a7b67 100644 --- a/client/renderers/OpenGL/opengl.c +++ b/client/renderers/OpenGL/opengl.c @@ -30,7 +30,7 @@ Place, Suite 330, Boston, MA 02111-1307 USA #include #include -#include "debug.h" +#include "common/debug.h" #include "utils.h" #include "lg-decoders.h" #include "dynamic/fonts.h" diff --git a/client/spice/CMakeLists.txt b/client/spice/CMakeLists.txt index 9242b49c..ceaf6030 100644 --- a/client/spice/CMakeLists.txt +++ b/client/spice/CMakeLists.txt @@ -16,6 +16,7 @@ add_library(spice STATIC ) target_link_libraries(spice + lg_common ${SPICE_PKGCONFIG_LIBRARIES} ) diff --git a/client/spice/src/rsa.c b/client/spice/src/rsa.c index 9e7fdbdd..7ee02d4c 100644 --- a/client/spice/src/rsa.c +++ b/client/spice/src/rsa.c @@ -18,7 +18,7 @@ Place, Suite 330, Boston, MA 02111-1307 USA */ #include "rsa.h" -#include "debug.h" +#include "common/debug.h" #include #include diff --git a/client/spice/src/spice.c b/client/spice/src/spice.c index 5b5950ac..34360897 100644 --- a/client/spice/src/spice.c +++ b/client/spice/src/spice.c @@ -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 #include diff --git a/client/src/app.c b/client/src/app.c index 0883fbfa..0e2909aa 100644 --- a/client/src/app.c +++ b/client/src/app.c @@ -18,7 +18,7 @@ Place, Suite 330, Boston, MA 02111-1307 USA */ #include "main.h" -#include "debug.h" +#include "common/debug.h" #include void app_alert(LG_MsgAlert type, const char * fmt, ...) diff --git a/client/src/config.c b/client/src/config.c index 7f758225..5ec69a44 100644 --- a/client/src/config.c +++ b/client/src/config.c @@ -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 #include diff --git a/client/src/main.c b/client/src/main.c index 14b43240..dd35fe51 100644 --- a/client/src/main.c +++ b/client/src/main.c @@ -35,9 +35,9 @@ Place, Suite 330, Boston, MA 02111-1307 USA #include #include -#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; } diff --git a/client/src/utils.c b/client/src/utils.c index 163c37d3..a877543e 100644 --- a/client/src/utils.c +++ b/client/src/utils.c @@ -18,7 +18,7 @@ Place, Suite 330, Boston, MA 02111-1307 USA */ #include "utils.h" -#include "debug.h" +#include "common/debug.h" #include #include