bool "freerdp"
select BR2_PACKAGE_OPENSSL
select BR2_PACKAGE_ZLIB
- select BR2_PACKAGE_XLIB_LIBXEXT if BR2_PACKAGE_XORG7
help
FreeRDP is a free implementation of the Remote Desktop
Protocol (RDP), released under the Apache license
+ This only installs the freerdp library.
+
http://www.freerdp.com/
+
+if BR2_PACKAGE_FREERDP
+
+config BR2_PACKAGE_FREERDP_SERVER
+ bool "build server"
+ depends on BR2_PACKAGE_XORG7
+ select BR2_PACKAGE_XLIB_LIBX11
+ select BR2_PACKAGE_XLIB_LIBXDAMAGE
+ select BR2_PACKAGE_XLIB_LIBXEXT
+ select BR2_PACKAGE_XLIB_LIBXFIXES
+
+config BR2_PACKAGE_FREERDP_CLIENT
+ bool "build client"
+ default y
+ depends on BR2_PACKAGE_XORG7
+ select BR2_PACKAGE_XLIB_LIBX11
+ select BR2_PACKAGE_XLIB_LIBXEXT
+
+comment "freerdp server and client need X.Org"
+ depends on !BR2_PACKAGE_XORG7
+
+endif
--- /dev/null
+winpr/tools: fix building shared libs
+
+libwinpr-makecert-tool.a is used to build libxfreerdp-server.so, so even
+if we are building a static libwinpr-makecert-tool.a library, we need to
+build it with -fPIC.
+
+Patch and commit log suggested by Samuel MARTIN.
+
+Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
+Cc: Samuel Martin <s.martin49@gmail.com>
+
+diff -durN freerdp-440916eae2e07463912d5fe507677e67096eb083.orig/winpr/tools/makecert/CMakeLists.txt freerdp-440916eae2e07463912d5fe507677e67096eb083/winpr/tools/makecert/CMakeLists.txt
+--- freerdp-440916eae2e07463912d5fe507677e67096eb083.orig/winpr/tools/makecert/CMakeLists.txt 2014-08-25 06:52:43.000000000 -0700
++++ freerdp-440916eae2e07463912d5fe507677e67096eb083/winpr/tools/makecert/CMakeLists.txt 2014-10-24 15:39:39.600319523 -0700
+@@ -43,3 +43,8 @@
+
+ set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "WinPR/Tools")
+
++if(BUILD_SHARED_LIBS)
++ # build libwinpr-makecert-tool.a with PIC because it is used to build
++ # the shared library libxfreerdp-server.so.
++ set_property(TARGET ${MODULE_NAME} PROPERTY POSITION_INDEPENDENT_CODE TRUE)
++endif()
FREERDP_CONF_OPTS += -DARM_FP_ABI=$(call qstrip,$(BR2_GCC_TARGET_FLOAT_ABI))
endif
-ifeq ($(BR2_PACKAGE_XLIB_LIBXEXT),y)
-FREERDP_DEPENDENCIES += xlib_libXext
-FREERDP_CONF_OPTS += -DWITH_X11=ON
+#---------------------------------------
+# Enabling server and/or client
+
+ifeq ($(BR2_PACKAGE_FREERDP_SERVER),y)
+FREERDP_CONF_OPTS += -DWITH_SERVER=ON -DWITH_SERVER_INTERFACE=ON
else
-FREERDP_CONF_OPTS += -DWITH_X11=OFF
+FREERDP_CONF_OPTS += -DWITH_SERVER=OFF -DWITH_SERVER_INTERFACE=OFF
endif
+ifeq ($(BR2_PACKAGE_FREERDP_CLIENT),y)
+FREERDP_CONF_OPTS += -DWITH_CLIENT=ON -DWITH_CLIENT_INTERFACE=ON
+else
+FREERDP_CONF_OPTS += -DWITH_CLIENT=OFF -DWITH_CLIENT_INTERFACE=OFF
+endif
+
+#---------------------------------------
+# X.Org libs for client and/or server
+
+ifneq ($(BR2_PACKAGE_FREERDP_SERVER)$(BR2_PACKAGE_FREERDP_CLIENT),)
+
+# Those two are mandatory for both the server and the client
+FREERDP_DEPENDENCIES += xlib_libX11 xlib_libXext
+FREERDP_CONF_OPTS += -DWITH_X11=ON
+
+# The following libs are either optional or mandatory only for either
+# the server or the client. A mandatory library for either one is
+# selected from Kconfig, so we can make it conditional here
ifeq ($(BR2_PACKAGE_XLIB_LIBXCURSOR),y)
FREERDP_CONF_OPTS += -DWITH_XCURSOR=ON
FREERDP_DEPENDENCIES += xlib_libXcursor
FREERDP_CONF_OPTS += -DWITH_XCURSOR=OFF
endif
+ifeq ($(BR2_PACKAGE_XLIB_LIBXDAMAGE),y)
+FREERDP_CONF_OPTS += -DWITH_XDAMAGE=ON
+FREERDP_DEPENDENCIES += xlib_libXdamage
+else
+FREERDP_CONF_OPTS += -DWITH_XDAMAGE=OFF
+endif
+
+ifeq ($(BR2_PACKAGE_XLIB_LIBXFIXES),y)
+FREERDP_CONF_OPTS += -DWITH_XFIXES=ON
+FREERDP_DEPENDENCIES += xlib_libXfixes
+else
+FREERDP_CONF_OPTS += -DWITH_XFIXES=OFF
+endif
+
ifeq ($(BR2_PACKAGE_XLIB_LIBXI),y)
FREERDP_CONF_OPTS += -DWITH_XI=ON
FREERDP_DEPENDENCIES += xlib_libXi
FREERDP_CONF_OPTS += -DWITH_XKBFILE=OFF
endif
+ifeq ($(BR2_PACKAGE_XLIB_LIBXRANDR),y)
+FREERDP_CONF_OPTS += -DWITH_XRANDR=ON
+FREERDP_DEPENDENCIES += xlib_libXrandr
+else
+FREERDP_CONF_OPTS += -DWITH_XRANDR=OFF
+endif
+
ifeq ($(BR2_PACKAGE_XLIB_LIBXRENDER),y)
FREERDP_CONF_OPTS += -DWITH_XRENDER=ON
FREERDP_DEPENDENCIES += xlib_libXrender
FREERDP_CONF_OPTS += -DWITH_XRENDER=OFF
endif
+ifeq ($(BR2_PACKAGE_XLIB_LIBXTST),y)
+FREERDP_CONF_OPTS += -DWITH_XTEST=ON
+FREERDP_DEPENDENCIES += xlib_libXtst
+else
+FREERDP_CONF_OPTS += -DWITH_XTEST=OFF
+endif
+
ifeq ($(BR2_PACKAGE_XLIB_LIBXV),y)
FREERDP_CONF_OPTS += -DWITH_XV=ON
FREERDP_DEPENDENCIES += xlib_libXv
FREERDP_CONF_OPTS += -DWITH_XV=OFF
endif
+else # ! SERVER && ! CLIENT
+
+FREERDP_CONF_OPTS += -DWITH_X11=OFF
+
+endif # ! USES_XLIBS
+
$(eval $(cmake-package))