diff --git a/client/Windows/CMakeLists.txt b/client/Windows/CMakeLists.txt index b45bed5f5..43098594a 100644 --- a/client/Windows/CMakeLists.txt +++ b/client/Windows/CMakeLists.txt @@ -15,8 +15,8 @@ # See the License for the specific language governing permissions and # limitations under the License. -set(MODULE_NAME "wfreerdp") -set(MODULE_PREFIX "FREERDP_CLIENT_WINDOWS") +set(MODULE_NAME "wfreerdp-client") +set(MODULE_PREFIX "FREERDP_CLIENT_WINDOWS_CONTROL") set(${MODULE_PREFIX}_SRCS wf_gdi.c @@ -32,11 +32,16 @@ set(${MODULE_PREFIX}_SRCS wf_rail.c wf_rail.h wf_interface.c - wf_interface.h - wfreerdp.c - wfreerdp.h) + wf_interface.h) + +if(WITH_CLIENT_INTERFACE) + add_library(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS}) + set_target_properties(${MODULE_NAME} PROPERTIES VERSION ${FREERDP_VERSION} SOVERSION ${FREERDP_API_VERSION} PREFIX "lib") +else() + set(${MODULE_PREFIX}_SRCS ${${MODULE_PREFIX}_SRCS} cli/wfreerdp.c cli/wfreerdp.h) + add_executable(${MODULE_NAME} WIN32 ${${MODULE_PREFIX}_SRCS}) +endif() -add_executable(${MODULE_NAME} WIN32 ${${MODULE_PREFIX}_SRCS}) set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} freerdp-client) @@ -52,6 +57,11 @@ set_complex_link_libraries(VARIABLE ${MODULE_PREFIX}_LIBS target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS}) -install(TARGETS ${MODULE_NAME} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT client) +if(WITH_CLIENT_INTERFACE) + install(TARGETS ${MODULE_NAME} DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT libraries) + add_subdirectory(cli) +else() + install(TARGETS ${MODULE_NAME} DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT client) +endif() set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "Client/Windows") diff --git a/client/Windows/cli/CMakeLists.txt b/client/Windows/cli/CMakeLists.txt new file mode 100644 index 000000000..56e492853 --- /dev/null +++ b/client/Windows/cli/CMakeLists.txt @@ -0,0 +1,35 @@ +# FreeRDP: A Remote Desktop Protocol Implementation +# FreeRDP Windows cmake build script +# +# Copyright 2012 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(MODULE_NAME "wfreerdp") +set(MODULE_PREFIX "FREERDP_CLIENT_WINDOWS") + +include_directories(..) + +set(${MODULE_PREFIX}_SRCS + wfreerdp.c + wfreerdp.h) + +add_executable(${MODULE_NAME} WIN32 ${${MODULE_PREFIX}_SRCS}) + +set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} wfreerdp-client) + +target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS}) + +install(TARGETS ${MODULE_NAME} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT client) + +set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "Client/Windows") diff --git a/client/Windows/wfreerdp.c b/client/Windows/cli/wfreerdp.c similarity index 100% rename from client/Windows/wfreerdp.c rename to client/Windows/cli/wfreerdp.c diff --git a/client/Windows/wfreerdp.h b/client/Windows/cli/wfreerdp.h similarity index 100% rename from client/Windows/wfreerdp.h rename to client/Windows/cli/wfreerdp.h diff --git a/client/Windows/wf_cliprdr.h b/client/Windows/wf_cliprdr.h index 484c6dccf..ed1f1bbea 100644 --- a/client/Windows/wf_cliprdr.h +++ b/client/Windows/wf_cliprdr.h @@ -19,7 +19,7 @@ #ifndef __WF_CLIPRDR_H #define __WF_CLIPRDR_H -#include "wfreerdp.h" +#include "wf_interface.h" void wf_cliprdr_init(wfInfo* wfi, rdpChannels* chanman); void wf_cliprdr_uninit(wfInfo* wfi); diff --git a/client/Windows/wf_event.c b/client/Windows/wf_event.c index 1ab6953a4..881ca0178 100644 --- a/client/Windows/wf_event.c +++ b/client/Windows/wf_event.c @@ -27,7 +27,7 @@ #include -#include "wfreerdp.h" +#include "wf_interface.h" #include "wf_gdi.h" #include "wf_event.h" diff --git a/client/Windows/wf_event.h b/client/Windows/wf_event.h index 7128af2d8..e4f1a1d2c 100644 --- a/client/Windows/wf_event.h +++ b/client/Windows/wf_event.h @@ -22,7 +22,7 @@ #ifndef __WF_EVENT_H #define __WF_EVENT_H -#include "wfreerdp.h" +#include "wf_interface.h" LRESULT CALLBACK wf_ll_kbd_proc(int nCode, WPARAM wParam, LPARAM lParam); LRESULT CALLBACK wf_event_proc(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam); diff --git a/client/Windows/wf_gdi.c b/client/Windows/wf_gdi.c index 41e268e90..a78c281e3 100644 --- a/client/Windows/wf_gdi.c +++ b/client/Windows/wf_gdi.c @@ -35,7 +35,7 @@ #include #include -#include "wfreerdp.h" +#include "wf_interface.h" #include "wf_graphics.h" const BYTE wf_rop2_table[] = diff --git a/client/Windows/wf_gdi.h b/client/Windows/wf_gdi.h index 6aaa27f64..2c45e5051 100644 --- a/client/Windows/wf_gdi.h +++ b/client/Windows/wf_gdi.h @@ -22,7 +22,7 @@ #ifndef __WF_GDI_H #define __WF_GDI_H -#include "wfreerdp.h" +#include "wf_interface.h" void wf_invalidate_region(wfInfo* wfi, int x, int y, int width, int height); wfBitmap* wf_image_new(wfInfo* wfi, int width, int height, int bpp, BYTE* data); diff --git a/client/Windows/wf_graphics.h b/client/Windows/wf_graphics.h index 7c3827ebb..0a4c6cded 100644 --- a/client/Windows/wf_graphics.h +++ b/client/Windows/wf_graphics.h @@ -20,7 +20,7 @@ #ifndef __WF_GRAPHICS_H #define __WF_GRAPHICS_H -#include "wfreerdp.h" +#include "wf_interface.h" HBITMAP wf_create_dib(wfInfo* wfi, int width, int height, int bpp, BYTE* data, BYTE** pdata); wfBitmap* wf_image_new(wfInfo* wfi, int width, int height, int bpp, BYTE* data); diff --git a/client/Windows/wf_interface.c b/client/Windows/wf_interface.c index a0db3c3bb..5a9695d4b 100644 --- a/client/Windows/wf_interface.c +++ b/client/Windows/wf_interface.c @@ -53,7 +53,7 @@ #include "wf_graphics.h" #include "wf_cliprdr.h" -#include "wfreerdp.h" +#include "wf_interface.h" void wf_context_new(freerdp* instance, rdpContext* context) { diff --git a/client/Windows/wf_rail.h b/client/Windows/wf_rail.h index 27ecf9b80..1ea164f60 100644 --- a/client/Windows/wf_rail.h +++ b/client/Windows/wf_rail.h @@ -19,7 +19,7 @@ #ifndef __WF_RAIL_H #define __WF_RAIL_H -#include "wfreerdp.h" +#include "wf_interface.h" void wf_rail_paint(wfInfo* wfi, rdpRail* rail, INT32 uleft, INT32 utop, UINT32 uright, UINT32 ubottom); void wf_rail_register_callbacks(wfInfo* wfi, rdpRail* rail); diff --git a/client/Windows/wf_window.h b/client/Windows/wf_window.h index feddf7e7c..5db681525 100644 --- a/client/Windows/wf_window.h +++ b/client/Windows/wf_window.h @@ -22,6 +22,6 @@ #include -#include "wfreerdp.h" +#include "wf_interface.h" #endif