[client] project restructure part 2/2

This commit is contained in:
Geoffrey McRae 2019-03-28 12:42:41 +11:00
parent fdba14691c
commit 52c4e15c76
11 changed files with 81 additions and 8 deletions

View File

@ -1 +1 @@
a12-112-g3d136a28a0+1 a12-113-gfdba14691c+1

View File

@ -29,10 +29,7 @@ set(CMAKE_C_STANDARD 11)
find_package(PkgConfig) find_package(PkgConfig)
pkg_check_modules(PKGCONFIG REQUIRED pkg_check_modules(PKGCONFIG REQUIRED
sdl2 sdl2
SDL2_ttf
fontconfig
x11 x11
xfixes
libconfig libconfig
) )
@ -68,18 +65,19 @@ set(SOURCES
src/lg-fonts.c src/lg-fonts.c
src/ll.c src/ll.c
src/utils.c src/utils.c
clipboard/x11.c
decoders/null.c
decoders/yuv420.c
fonts/sdl.c
) )
add_subdirectory(spice) add_subdirectory(spice)
add_subdirectory(renderers) add_subdirectory(renderers)
add_subdirectory(clipboard)
add_subdirectory(fonts)
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
spice spice
renderers renderers
clipboard
fonts
) )

View File

@ -0,0 +1,25 @@
cmake_minimum_required(VERSION 3.6)
project(clipboard LANGUAGES C)
find_package(PkgConfig)
pkg_check_modules(CLIPBOARD_PKGCONFIG REQUIRED
x11
xfixes
)
add_library(clipboard STATIC
src/x11.c
)
target_link_libraries(clipboard
${CLIPBOARD_PKGCONFIG_LIBRARIES}
)
target_include_directories(clipboard
PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:include>
PRIVATE
src
${CLIPBOARD_PKGCONFIG_INCLUDE_DIRS}
)

View File

@ -0,0 +1,24 @@
cmake_minimum_required(VERSION 3.6)
project(decoders LANGUAGES C)
#find_package(PkgConfig)
#pkg_check_modules(DECODERS_PKGCONFIG REQUIRED
#)
add_library(decoders STATIC
src/null.c
src/yuv420.c
)
target_link_libraries(decoders
${DECODERS_PKGCONFIG_LIBRARIES}
)
target_include_directories(decoders
PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:include>
PRIVATE
src
${DECODERS_PKGCONFIG_INCLUDE_DIRS}
)

View File

@ -0,0 +1,25 @@
cmake_minimum_required(VERSION 3.6)
project(fonts LANGUAGES C)
find_package(PkgConfig)
pkg_check_modules(FONTS_PKGCONFIG REQUIRED
SDL2_ttf
fontconfig
)
add_library(fonts STATIC
src/sdl.c
)
target_link_libraries(fonts
${FONTS_PKGCONFIG_LIBRARIES}
)
target_include_directories(fonts
PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:include>
PRIVATE
src
${FONTS_PKGCONFIG_INCLUDE_DIRS}
)

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}
decoders
) )
target_include_directories(renderer_opengl target_include_directories(renderer_opengl