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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -21,7 +21,7 @@ Place, Suite 330, Boston, MA 02111-1307 USA
#include <stdbool.h> #include <stdbool.h>
#include "interface/font.h" #include "interface/font.h"
#include "debug.h" #include "common/debug.h"
#include <SDL2/SDL_ttf.h> #include <SDL2/SDL_ttf.h>
#include <fontconfig/fontconfig.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 <SDL2/SDL_ttf.h>
#include "app.h" #include "app.h"
#include "KVMFR.h" #include "common/KVMFR.h"
#define IS_LG_RENDERER_VALID(x) \ #define IS_LG_RENDERER_VALID(x) \
((x)->get_name && \ ((x)->get_name && \

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -35,9 +35,9 @@ Place, Suite 330, Boston, MA 02111-1307 USA
#include <stdbool.h> #include <stdbool.h>
#include <assert.h> #include <assert.h>
#include "debug.h" #include "common/debug.h"
#include "common/KVMFR.h"
#include "utils.h" #include "utils.h"
#include "KVMFR.h"
#include "kb.h" #include "kb.h"
#include "ll.h" #include "ll.h"
@ -337,6 +337,10 @@ static int frameThread(void * unused)
header.pitch < header.width header.pitch < header.width
){ ){
DEBUG_WARN("Bad header"); 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); usleep(1000);
continue; continue;
} }

View file

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