From 61da01973d6d787c42d9bad2d94bcb082d52c2ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Moreau?= Date: Fri, 17 Feb 2012 17:43:00 -0500 Subject: [PATCH] libfreerdp-locale: rename from libfreerdp-kbd, will contain all localization code --- CMakeLists.txt | 6 +----- client/DirectFB/CMakeLists.txt | 2 +- client/DirectFB/df_event.c | 4 ++-- client/X11/CMakeLists.txt | 2 +- client/X11/xf_event.c | 4 ++-- client/X11/xf_keyboard.h | 4 ++-- cunit/CMakeLists.txt | 2 ++ cunit/test_ber.c | 2 +- cunit/test_ntlmssp.c | 3 +-- cunit/test_per.c | 2 +- include/freerdp/{kbd/kbd.h => locale/keyboard.h} | 0 include/freerdp/{kbd => locale}/layouts.h | 2 +- include/freerdp/{kbd => locale}/locales.h | 0 include/freerdp/{kbd => locale}/vkcodes.h | 2 +- libfreerdp-core/CMakeLists.txt | 3 ++- .../CMakeLists.txt | 16 +++++++++------- {libfreerdp-kbd => libfreerdp-locale}/layouts.c | 2 +- .../layouts_xkb.c | 2 +- .../layouts_xkb.h | 0 {libfreerdp-kbd => libfreerdp-locale}/libkbd.c | 8 ++++---- {libfreerdp-kbd => libfreerdp-locale}/libkbd.h | 0 {libfreerdp-kbd => libfreerdp-locale}/locales.c | 2 +- .../x_layout_id_table.c | 2 +- .../x_layout_id_table.h | 0 server/X11/CMakeLists.txt | 5 +++-- server/X11/xf_input.c | 2 +- server/X11/xf_peer.c | 2 +- 27 files changed, 40 insertions(+), 39 deletions(-) rename include/freerdp/{kbd/kbd.h => locale/keyboard.h} (100%) rename include/freerdp/{kbd => locale}/layouts.h (99%) rename include/freerdp/{kbd => locale}/locales.h (100%) rename include/freerdp/{kbd => locale}/vkcodes.h (99%) rename {libfreerdp-kbd => libfreerdp-locale}/CMakeLists.txt (71%) rename {libfreerdp-kbd => libfreerdp-locale}/layouts.c (99%) rename {libfreerdp-kbd => libfreerdp-locale}/layouts_xkb.c (99%) rename {libfreerdp-kbd => libfreerdp-locale}/layouts_xkb.h (100%) rename {libfreerdp-kbd => libfreerdp-locale}/libkbd.c (97%) rename {libfreerdp-kbd => libfreerdp-locale}/libkbd.h (100%) rename {libfreerdp-kbd => libfreerdp-locale}/locales.c (99%) rename {libfreerdp-kbd => libfreerdp-locale}/x_layout_id_table.c (99%) rename {libfreerdp-kbd => libfreerdp-locale}/x_layout_id_table.h (100%) diff --git a/CMakeLists.txt b/CMakeLists.txt index ae298ea05..8ea2e2cd6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -153,11 +153,7 @@ endif() # Sub-directories add_subdirectory(include) add_subdirectory(libfreerdp-utils) - -if(NOT WIN32) - add_subdirectory(libfreerdp-kbd) -endif() - +add_subdirectory(libfreerdp-locale) add_subdirectory(libfreerdp-gdi) add_subdirectory(libfreerdp-rail) add_subdirectory(libfreerdp-cache) diff --git a/client/DirectFB/CMakeLists.txt b/client/DirectFB/CMakeLists.txt index e267f6b9a..bf317d644 100644 --- a/client/DirectFB/CMakeLists.txt +++ b/client/DirectFB/CMakeLists.txt @@ -29,7 +29,7 @@ add_executable(dfreerdp target_link_libraries(dfreerdp freerdp-core) target_link_libraries(dfreerdp freerdp-gdi) -target_link_libraries(dfreerdp freerdp-kbd) +target_link_libraries(dfreerdp freerdp-locale) target_link_libraries(dfreerdp freerdp-channels) target_link_libraries(dfreerdp freerdp-utils) target_link_libraries(dfreerdp ${DIRECTFB_LIBRARIES}) diff --git a/client/DirectFB/df_event.c b/client/DirectFB/df_event.c index 19af30a0d..b731d029f 100644 --- a/client/DirectFB/df_event.c +++ b/client/DirectFB/df_event.c @@ -17,8 +17,8 @@ * limitations under the License. */ -#include -#include +#include +#include #include "df_event.h" diff --git a/client/X11/CMakeLists.txt b/client/X11/CMakeLists.txt index 29f9ad813..77bc263e2 100644 --- a/client/X11/CMakeLists.txt +++ b/client/X11/CMakeLists.txt @@ -89,7 +89,7 @@ include_directories(${CMAKE_SOURCE_DIR}/resources) target_link_libraries(xfreerdp freerdp-core) target_link_libraries(xfreerdp freerdp-gdi) -target_link_libraries(xfreerdp freerdp-kbd) +target_link_libraries(xfreerdp freerdp-locale) target_link_libraries(xfreerdp freerdp-rail) target_link_libraries(xfreerdp freerdp-channels) target_link_libraries(xfreerdp freerdp-utils) diff --git a/client/X11/xf_event.c b/client/X11/xf_event.c index ccd293df2..cd853fc5b 100644 --- a/client/X11/xf_event.c +++ b/client/X11/xf_event.c @@ -20,8 +20,8 @@ #include #include -#include -#include +#include +#include #include "xf_rail.h" #include "xf_window.h" diff --git a/client/X11/xf_keyboard.h b/client/X11/xf_keyboard.h index 92e08fc23..aeba359b4 100644 --- a/client/X11/xf_keyboard.h +++ b/client/X11/xf_keyboard.h @@ -20,8 +20,8 @@ #ifndef __XF_KEYBOARD_H #define __XF_KEYBOARD_H -#include -#include +#include +#include #include "xfreerdp.h" diff --git a/cunit/CMakeLists.txt b/cunit/CMakeLists.txt index 070af12c7..7f4ccad85 100644 --- a/cunit/CMakeLists.txt +++ b/cunit/CMakeLists.txt @@ -75,5 +75,7 @@ target_link_libraries(test_freerdp freerdp-gdi) target_link_libraries(test_freerdp freerdp-utils) target_link_libraries(test_freerdp freerdp-channels) target_link_libraries(test_freerdp freerdp-codec) +target_link_libraries(test_freerdp freerdp-crypto) +target_link_libraries(test_freerdp freerdp-auth) add_test(CUnitTests ${EXECUTABLE_OUTPUT_PATH}/test_freerdp) diff --git a/cunit/test_ber.c b/cunit/test_ber.c index 2f1825abc..cb555f0e3 100644 --- a/cunit/test_ber.c +++ b/cunit/test_ber.c @@ -22,7 +22,7 @@ #include #include "test_ber.h" -#include "libfreerdp-core/ber.h" +#include int init_ber_suite(void) { diff --git a/cunit/test_ntlmssp.c b/cunit/test_ntlmssp.c index c19318571..5808b6955 100644 --- a/cunit/test_ntlmssp.c +++ b/cunit/test_ntlmssp.c @@ -20,8 +20,7 @@ #include #include #include - -#include "ntlmssp.h" +#include #include "test_ntlmssp.h" diff --git a/cunit/test_per.c b/cunit/test_per.c index 45a545112..3d872849f 100644 --- a/cunit/test_per.c +++ b/cunit/test_per.c @@ -22,7 +22,7 @@ #include #include "test_per.h" -#include "libfreerdp-core/per.h" +#include int init_per_suite(void) { diff --git a/include/freerdp/kbd/kbd.h b/include/freerdp/locale/keyboard.h similarity index 100% rename from include/freerdp/kbd/kbd.h rename to include/freerdp/locale/keyboard.h diff --git a/include/freerdp/kbd/layouts.h b/include/freerdp/locale/layouts.h similarity index 99% rename from include/freerdp/kbd/layouts.h rename to include/freerdp/locale/layouts.h index c92c7ac04..c275b8fd6 100644 --- a/include/freerdp/kbd/layouts.h +++ b/include/freerdp/locale/layouts.h @@ -23,7 +23,7 @@ #define __LAYOUT_IDS_H #include -#include +#include /* Keyboard layout IDs */ diff --git a/include/freerdp/kbd/locales.h b/include/freerdp/locale/locales.h similarity index 100% rename from include/freerdp/kbd/locales.h rename to include/freerdp/locale/locales.h diff --git a/include/freerdp/kbd/vkcodes.h b/include/freerdp/locale/vkcodes.h similarity index 99% rename from include/freerdp/kbd/vkcodes.h rename to include/freerdp/locale/vkcodes.h index f2f87d1b0..f5b7d5c2e 100644 --- a/include/freerdp/kbd/vkcodes.h +++ b/include/freerdp/locale/vkcodes.h @@ -24,7 +24,7 @@ #include #include -#include +#include /* Mouse buttons */ diff --git a/libfreerdp-core/CMakeLists.txt b/libfreerdp-core/CMakeLists.txt index 7e67dcebd..bc69c06fe 100644 --- a/libfreerdp-core/CMakeLists.txt +++ b/libfreerdp-core/CMakeLists.txt @@ -81,7 +81,7 @@ set(LIBFREERDP_CORE_SRCS listener.h peer.c peer.h - mppc.c + mppc.c ) add_library(freerdp-core ${LIBFREERDP_CORE_SRCS}) @@ -98,6 +98,7 @@ target_link_libraries(freerdp-core freerdp-utils) target_link_libraries(freerdp-core freerdp-codec) target_link_libraries(freerdp-core freerdp-crypto) target_link_libraries(freerdp-core freerdp-auth) +target_link_libraries(freerdp-core freerdp-locale) install(TARGETS freerdp-core DESTINATION ${CMAKE_INSTALL_LIBDIR}) diff --git a/libfreerdp-kbd/CMakeLists.txt b/libfreerdp-locale/CMakeLists.txt similarity index 71% rename from libfreerdp-kbd/CMakeLists.txt rename to libfreerdp-locale/CMakeLists.txt index e16fd78bb..102343642 100644 --- a/libfreerdp-kbd/CMakeLists.txt +++ b/libfreerdp-locale/CMakeLists.txt @@ -1,5 +1,5 @@ # FreeRDP: A Remote Desktop Protocol Client -# libfreerdp-kbd cmake build script +# libfreerdp-locale cmake build script # # Copyright 2011 O.S. Systems Software Ltda. # Copyright 2011 Otavio Salvador @@ -17,7 +17,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -set(FREERDP_KBD_SRCS +set(FREERDP_LOCALE_SRCS locales.c layouts.c layouts_xkb.c @@ -27,11 +27,11 @@ set(FREERDP_KBD_SRCS libkbd.c libkbd.h) -add_library(freerdp-kbd ${FREERDP_KBD_SRCS}) +add_library(freerdp-locale ${FREERDP_LOCALE_SRCS}) find_suggested_package(X11) if(WITH_X11) - target_link_libraries(freerdp-kbd ${X11_LIBRARIES}) + target_link_libraries(freerdp-locale ${X11_LIBRARIES}) endif() if(NOT APPLE) @@ -40,14 +40,16 @@ if(NOT APPLE) if(WITH_XKBFILE) add_definitions(-DWITH_XKBFILE) include_directories(${XKBFILE_INCLUDE_DIRS}) - target_link_libraries(freerdp-kbd ${XKBFILE_LIBRARIES}) + target_link_libraries(freerdp-locale ${XKBFILE_LIBRARIES}) endif() endif() endif() add_definitions(-DKEYMAP_PATH="${FREERDP_KEYMAP_PATH}") -set_target_properties(freerdp-kbd PROPERTIES VERSION ${FREERDP_VERSION_FULL} SOVERSION ${FREERDP_VERSION} PREFIX "lib") +set_target_properties(freerdp-locale PROPERTIES VERSION ${FREERDP_VERSION_FULL} SOVERSION ${FREERDP_VERSION} PREFIX "lib") -install(TARGETS freerdp-kbd DESTINATION ${CMAKE_INSTALL_LIBDIR}) +target_link_libraries(freerdp-locale freerdp-utils) + +install(TARGETS freerdp-locale DESTINATION ${CMAKE_INSTALL_LIBDIR}) diff --git a/libfreerdp-kbd/layouts.c b/libfreerdp-locale/layouts.c similarity index 99% rename from libfreerdp-kbd/layouts.c rename to libfreerdp-locale/layouts.c index 1f8a5ae20..3f6660746 100644 --- a/libfreerdp-kbd/layouts.c +++ b/libfreerdp-locale/layouts.c @@ -22,7 +22,7 @@ #include #include "libkbd.h" -#include +#include typedef struct { diff --git a/libfreerdp-kbd/layouts_xkb.c b/libfreerdp-locale/layouts_xkb.c similarity index 99% rename from libfreerdp-kbd/layouts_xkb.c rename to libfreerdp-locale/layouts_xkb.c index 2e8a9654a..ef9f6b9a0 100644 --- a/libfreerdp-kbd/layouts_xkb.c +++ b/libfreerdp-locale/layouts_xkb.c @@ -29,7 +29,7 @@ #endif #include "libkbd.h" -#include +#include #include "x_layout_id_table.h" #include "layouts_xkb.h" diff --git a/libfreerdp-kbd/layouts_xkb.h b/libfreerdp-locale/layouts_xkb.h similarity index 100% rename from libfreerdp-kbd/layouts_xkb.h rename to libfreerdp-locale/layouts_xkb.h diff --git a/libfreerdp-kbd/libkbd.c b/libfreerdp-locale/libkbd.c similarity index 97% rename from libfreerdp-kbd/libkbd.c rename to libfreerdp-locale/libkbd.c index 156b30fdb..b29bfbf48 100644 --- a/libfreerdp-kbd/libkbd.c +++ b/libfreerdp-locale/libkbd.c @@ -21,13 +21,13 @@ #include #include #include -#include +#include #include "libkbd.h" -#include -#include -#include +#include +#include +#include #include "layouts_xkb.h" /* diff --git a/libfreerdp-kbd/libkbd.h b/libfreerdp-locale/libkbd.h similarity index 100% rename from libfreerdp-kbd/libkbd.h rename to libfreerdp-locale/libkbd.h diff --git a/libfreerdp-kbd/locales.c b/libfreerdp-locale/locales.c similarity index 99% rename from libfreerdp-kbd/locales.c rename to libfreerdp-locale/locales.c index 653b99014..4003b2821 100644 --- a/libfreerdp-kbd/locales.c +++ b/libfreerdp-locale/locales.c @@ -22,7 +22,7 @@ #include #include "libkbd.h" -#include +#include typedef struct { diff --git a/libfreerdp-kbd/x_layout_id_table.c b/libfreerdp-locale/x_layout_id_table.c similarity index 99% rename from libfreerdp-kbd/x_layout_id_table.c rename to libfreerdp-locale/x_layout_id_table.c index 42ee13525..68060c68e 100644 --- a/libfreerdp-kbd/x_layout_id_table.c +++ b/libfreerdp-locale/x_layout_id_table.c @@ -22,7 +22,7 @@ #include #include "libkbd.h" -#include +#include #include "x_layout_id_table.h" diff --git a/libfreerdp-kbd/x_layout_id_table.h b/libfreerdp-locale/x_layout_id_table.h similarity index 100% rename from libfreerdp-kbd/x_layout_id_table.h rename to libfreerdp-locale/x_layout_id_table.h diff --git a/server/X11/CMakeLists.txt b/server/X11/CMakeLists.txt index 7b33d86e1..127cb5bd1 100644 --- a/server/X11/CMakeLists.txt +++ b/server/X11/CMakeLists.txt @@ -64,6 +64,7 @@ target_link_libraries(xfreerdp-server freerdp-core) target_link_libraries(xfreerdp-server freerdp-codec) target_link_libraries(xfreerdp-server freerdp-utils) target_link_libraries(xfreerdp-server freerdp-gdi) -target_link_libraries(xfreerdp-server freerdp-kbd) +target_link_libraries(xfreerdp-server freerdp-crypto) +target_link_libraries(xfreerdp-server freerdp-auth) +target_link_libraries(xfreerdp-server freerdp-locale) target_link_libraries(xfreerdp-server ${X11_LIBRARIES}) - diff --git a/server/X11/xf_input.c b/server/X11/xf_input.c index ad3938f20..8f87a1a24 100644 --- a/server/X11/xf_input.c +++ b/server/X11/xf_input.c @@ -18,7 +18,7 @@ */ #include -#include +#include #include "xf_input.h" diff --git a/server/X11/xf_peer.c b/server/X11/xf_peer.c index 49aa56ee6..b60944410 100644 --- a/server/X11/xf_peer.c +++ b/server/X11/xf_peer.c @@ -27,7 +27,7 @@ #include #include #include -#include +#include #include #include #include