From 86d7c1946f91d6e2484b904d516da64fd10fbdd6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Moreau?= Date: Tue, 13 Sep 2011 15:39:40 -0400 Subject: [PATCH] libfreerdp-common: initial commit --- CMakeLists.txt | 1 + .../freerdp/common}/bitmap.h | 3 +- include/freerdp/{gdi => common}/color.h | 0 include/freerdp/gdi/gdi.h | 2 +- include/freerdp/rail/rail.h | 2 +- libfreerdp-common/CMakeLists.txt | 30 +++++++++++++++++++ .../bitmap.c | 5 +++- .../bitmap_inc.c | 0 {libfreerdp-gdi => libfreerdp-common}/color.c | 2 +- libfreerdp-core/CMakeLists.txt | 3 +- libfreerdp-core/orders.c | 2 +- libfreerdp-core/update.c | 2 +- libfreerdp-gdi/16bpp.c | 2 +- libfreerdp-gdi/32bpp.c | 2 +- libfreerdp-gdi/8bpp.c | 2 +- libfreerdp-gdi/CMakeLists.txt | 2 +- libfreerdp-gdi/bitmap.c | 2 +- libfreerdp-gdi/gdi.c | 2 +- 18 files changed, 48 insertions(+), 16 deletions(-) rename {libfreerdp-core => include/freerdp/common}/bitmap.h (92%) rename include/freerdp/{gdi => common}/color.h (100%) create mode 100644 libfreerdp-common/CMakeLists.txt rename {libfreerdp-core => libfreerdp-common}/bitmap.c (99%) rename {libfreerdp-core => libfreerdp-common}/bitmap_inc.c (100%) rename {libfreerdp-gdi => libfreerdp-common}/color.c (99%) diff --git a/CMakeLists.txt b/CMakeLists.txt index 6fd61a0a9..668fc3b0d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -133,6 +133,7 @@ endif() add_subdirectory(libfreerdp-gdi) add_subdirectory(libfreerdp-rail) add_subdirectory(libfreerdp-cache) +add_subdirectory(libfreerdp-common) add_subdirectory(libfreerdp-chanman) add_subdirectory(libfreerdp-core) add_subdirectory(libfreerdp-rfx) diff --git a/libfreerdp-core/bitmap.h b/include/freerdp/common/bitmap.h similarity index 92% rename from libfreerdp-core/bitmap.h rename to include/freerdp/common/bitmap.h index b7a9f3747..618cb4c1c 100644 --- a/libfreerdp-core/bitmap.h +++ b/include/freerdp/common/bitmap.h @@ -20,8 +20,7 @@ #ifndef __BITMAP_H #define __BITMAP_H -#include -#include +#include boolean bitmap_decompress(uint8* srcData, uint8* dstData, int width, int height, int size, int srcBpp, int dstBpp); diff --git a/include/freerdp/gdi/color.h b/include/freerdp/common/color.h similarity index 100% rename from include/freerdp/gdi/color.h rename to include/freerdp/common/color.h diff --git a/include/freerdp/gdi/gdi.h b/include/freerdp/gdi/gdi.h index 183dcc490..19f10d57f 100644 --- a/include/freerdp/gdi/gdi.h +++ b/include/freerdp/gdi/gdi.h @@ -22,9 +22,9 @@ #include #include -#include #include #include +#include /* For more information, see [MS-RDPEGDI] */ diff --git a/include/freerdp/rail/rail.h b/include/freerdp/rail/rail.h index 60fc97b57..8cb920f29 100644 --- a/include/freerdp/rail/rail.h +++ b/include/freerdp/rail/rail.h @@ -24,8 +24,8 @@ #include #include #include -#include #include +#include typedef struct rdp_rail rdpRail; diff --git a/libfreerdp-common/CMakeLists.txt b/libfreerdp-common/CMakeLists.txt new file mode 100644 index 000000000..4af339be8 --- /dev/null +++ b/libfreerdp-common/CMakeLists.txt @@ -0,0 +1,30 @@ +# FreeRDP: A Remote Desktop Protocol Client +# libfreerdp-common cmake build script +# +# Copyright 2011 O.S. Systems Software Ltda. +# Copyright 2011 Otavio Salvador +# Copyright 2011 Marc-Andre Moreau +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +set(FREERDP_COMMON_SRCS + bitmap.c + color.c) + +add_library(freerdp-common ${FREERDP_COMMON_SRCS}) + +set_target_properties(freerdp-common PROPERTIES VERSION ${FREERDP_VERSION_FULL} SOVERSION ${FREERDP_VERSION} PREFIX "lib") +target_link_libraries(freerdp-common freerdp-utils) + +install(TARGETS freerdp-common DESTINATION ${CMAKE_INSTALL_LIBDIR}) + diff --git a/libfreerdp-core/bitmap.c b/libfreerdp-common/bitmap.c similarity index 99% rename from libfreerdp-core/bitmap.c rename to libfreerdp-common/bitmap.c index 16f9d5af2..8ff7917d9 100644 --- a/libfreerdp-core/bitmap.c +++ b/libfreerdp-common/bitmap.c @@ -17,7 +17,10 @@ * limitations under the License. */ -#include "bitmap.h" +#include +#include + +#include /* RLE Compressed Bitmap Stream (RLE_BITMAP_STREAM) diff --git a/libfreerdp-core/bitmap_inc.c b/libfreerdp-common/bitmap_inc.c similarity index 100% rename from libfreerdp-core/bitmap_inc.c rename to libfreerdp-common/bitmap_inc.c diff --git a/libfreerdp-gdi/color.c b/libfreerdp-common/color.c similarity index 99% rename from libfreerdp-gdi/color.c rename to libfreerdp-common/color.c index 5870a961d..fe5a3c717 100644 --- a/libfreerdp-gdi/color.c +++ b/libfreerdp-common/color.c @@ -21,7 +21,7 @@ #include #include #include -#include +#include uint32 gdi_color_convert_rgb(uint32 srcColor, int srcBpp, int dstBpp, HCLRCONV clrconv) { diff --git a/libfreerdp-core/CMakeLists.txt b/libfreerdp-core/CMakeLists.txt index 10985e7da..ea0fcb045 100644 --- a/libfreerdp-core/CMakeLists.txt +++ b/libfreerdp-core/CMakeLists.txt @@ -24,8 +24,6 @@ include_directories(${ZLIB_INCLUDE_DIRS}) set(LIBFREERDP_CORE_SRCS activation.c activation.h - bitmap.c - bitmap.h ber.c ber.h gcc.c @@ -105,5 +103,6 @@ endif() target_link_libraries(freerdp-core ${OPENSSL_LIBRARIES}) target_link_libraries(freerdp-core freerdp-utils) +target_link_libraries(freerdp-core freerdp-common) install(TARGETS freerdp-core DESTINATION ${CMAKE_INSTALL_LIBDIR}) diff --git a/libfreerdp-core/orders.c b/libfreerdp-core/orders.c index d6e1f3643..a6833c9b0 100644 --- a/libfreerdp-core/orders.c +++ b/libfreerdp-core/orders.c @@ -18,8 +18,8 @@ */ #include "window.h" -#include "bitmap.h" #include +#include #include "orders.h" diff --git a/libfreerdp-core/update.c b/libfreerdp-core/update.c index 61210fdce..8e3fa9105 100644 --- a/libfreerdp-core/update.c +++ b/libfreerdp-core/update.c @@ -18,8 +18,8 @@ */ #include "update.h" -#include "bitmap.h" #include "surface.h" +#include uint8 UPDATE_TYPE_STRINGS[][32] = { diff --git a/libfreerdp-gdi/16bpp.c b/libfreerdp-gdi/16bpp.c index 149b2c81e..eb8b2692d 100644 --- a/libfreerdp-gdi/16bpp.c +++ b/libfreerdp-gdi/16bpp.c @@ -23,7 +23,7 @@ #include #include #include -#include +#include #include #include diff --git a/libfreerdp-gdi/32bpp.c b/libfreerdp-gdi/32bpp.c index b5deb2d9a..6457257ce 100644 --- a/libfreerdp-gdi/32bpp.c +++ b/libfreerdp-gdi/32bpp.c @@ -23,7 +23,7 @@ #include #include #include -#include +#include #include #include diff --git a/libfreerdp-gdi/8bpp.c b/libfreerdp-gdi/8bpp.c index f9d90479d..9b751f613 100644 --- a/libfreerdp-gdi/8bpp.c +++ b/libfreerdp-gdi/8bpp.c @@ -23,7 +23,7 @@ #include #include #include -#include +#include #include #include diff --git a/libfreerdp-gdi/CMakeLists.txt b/libfreerdp-gdi/CMakeLists.txt index ae3f4fdb3..f629fcbd1 100644 --- a/libfreerdp-gdi/CMakeLists.txt +++ b/libfreerdp-gdi/CMakeLists.txt @@ -18,7 +18,6 @@ # limitations under the License. set(FREERDP_GDI_SRCS - color.c 8bpp.c 16bpp.c 32bpp.c @@ -37,6 +36,7 @@ set(FREERDP_GDI_SRCS add_library(freerdp-gdi ${FREERDP_GDI_SRCS}) target_link_libraries(freerdp-gdi freerdp-cache) +target_link_libraries(freerdp-gdi freerdp-common) target_link_libraries(freerdp-gdi freerdp-rfx) set_target_properties(freerdp-gdi PROPERTIES VERSION ${FREERDP_VERSION_FULL} SOVERSION ${FREERDP_VERSION} PREFIX "lib") diff --git a/libfreerdp-gdi/bitmap.c b/libfreerdp-gdi/bitmap.c index 61bf5b2e8..b0d50932e 100644 --- a/libfreerdp-gdi/bitmap.c +++ b/libfreerdp-gdi/bitmap.c @@ -23,7 +23,7 @@ #include #include #include -#include +#include #include #include diff --git a/libfreerdp-gdi/gdi.c b/libfreerdp-gdi/gdi.c index b3351040b..647febdc5 100644 --- a/libfreerdp-gdi/gdi.c +++ b/libfreerdp-gdi/gdi.c @@ -23,8 +23,8 @@ #include #include #include -#include #include +#include #include #include