[Buildroot] [PATCH 4/7 v2] package/freerdp: add options to enable/disable server and/or client

Yann E. MORIN yann.morin.1998 at free.fr
Mon Oct 6 22:35:10 UTC 2014


Building the client or the server requires an X.Org stack.

Since freerdp can also be used for weston (wayland-based, hence no X.Org
stack), we may want to disable the client and server.

Conversely, with on an X.Org stack, we may want to enable either or
none if we're just interested in the library.

Add two options, one to enable the server, the other the client; both
default to 'y' so that a previous .config can be re-used as-is, and
echibit the same behaviour, that is to build the server and client.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998 at free.fr>
Cc: Samuel Martin <s.martin49 at gmail.com>
---
 package/freerdp/Config.in  | 20 ++++++++++++++++++--
 package/freerdp/freerdp.mk | 15 +++++++++++++++
 2 files changed, 33 insertions(+), 2 deletions(-)

diff --git a/package/freerdp/Config.in b/package/freerdp/Config.in
index 23d0b0f..8e29a5b 100644
--- a/package/freerdp/Config.in
+++ b/package/freerdp/Config.in
@@ -6,17 +6,33 @@ config BR2_PACKAGE_FREERDP
 	  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_NEEDS_XLIBS
-	def_bool y
-	depends on BR2_PACKAGE_XORG7
+	bool
 	select BR2_PACKAGE_XLIB_LIBX11
 	select BR2_PACKAGE_XLIB_LIBXT
 	select BR2_PACKAGE_XLIB_LIBXEXT
 	select BR2_PACKAGE_XLIB_LIBXCURSOR
 	select BR2_PACKAGE_XLIB_LIBXDAMAGE
 
+config BR2_PACKAGE_FREERDP_SERVER
+	bool "build server"
+	default y
+	depends on BR2_PACKAGE_XORG7
+	select BR2_PACKAGE_FREERDP_NEEDS_XLIBS
+
+config BR2_PACKAGE_FREERDP_CLIENT
+	bool "build client"
+	default y
+	depends on BR2_PACKAGE_XORG7
+	select BR2_PACKAGE_FREERDP_NEEDS_XLIBS
+
+comment "freerdp server and client needs X.Org"
+	depends on !BR2_PACKAGE_XORG7
+
 endif
diff --git a/package/freerdp/freerdp.mk b/package/freerdp/freerdp.mk
index b50fd1e..594bab3 100644
--- a/package/freerdp/freerdp.mk
+++ b/package/freerdp/freerdp.mk
@@ -20,6 +20,21 @@ else
 FREERDP_CONF_OPTS += -DWITH_X11=OFF
 endif
 
+# We need to tell CMake to only create position-independent code,
+# othwerwise the server does not build.
+ifeq ($(BR2_PACKAGE_FREERDP_SERVER),y)
+FREERDP_CONF_OPTS += -DWITH_SERVER=ON -DWITH_SERVER_INTERFACE=ON \
+	-DCMAKE_POSITION_INDEPENDENT_CODE=ON
+else
+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
+
 ifeq ($(BR2_PACKAGE_CUPS),y)
 FREERDP_CONF_OPTS += -DWITH_CUPS=ON
 FREERDP_DEPENDENCIES += cups
-- 
1.9.1



More information about the buildroot mailing list