summaryrefslogtreecommitdiffstats
path: root/package/tcf-agent/0001-agent-add-install-target-to-the-CMakeLists.patch
diff options
context:
space:
mode:
authorNorbert Lange <nolange79@gmail.com>2018-01-02 18:39:25 +0100
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>2018-01-02 22:28:39 +0100
commitd0d04b4c5acebee336c0d429d402f9ac0ba3e1eb (patch)
tree76a4dde67641acd46adee46f3b42abdb625872b7 /package/tcf-agent/0001-agent-add-install-target-to-the-CMakeLists.patch
parent158e832aac8255a7e0ae39164281fe395f2013fc (diff)
downloadbuildroot-d0d04b4c5acebee336c0d429d402f9ac0ba3e1eb.tar.gz
buildroot-d0d04b4c5acebee336c0d429d402f9ac0ba3e1eb.zip
tcf-agent: new package
Signed-off-by: Norbert Lange <nolange79@gmail.com> [Thomas: rename to tcf-agent, add missing dependency on BR2_USE_MMU.] Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Diffstat (limited to 'package/tcf-agent/0001-agent-add-install-target-to-the-CMakeLists.patch')
-rw-r--r--package/tcf-agent/0001-agent-add-install-target-to-the-CMakeLists.patch48
1 files changed, 48 insertions, 0 deletions
diff --git a/package/tcf-agent/0001-agent-add-install-target-to-the-CMakeLists.patch b/package/tcf-agent/0001-agent-add-install-target-to-the-CMakeLists.patch
new file mode 100644
index 0000000000..fd2d61f3da
--- /dev/null
+++ b/package/tcf-agent/0001-agent-add-install-target-to-the-CMakeLists.patch
@@ -0,0 +1,48 @@
+From 96c43b223c90746cb2f680d6d5e198afc690dd4d Mon Sep 17 00:00:00 2001
+From: Norbert Lange <nolange79@gmail.com>
+Date: Mon, 4 Dec 2017 10:56:45 +0100
+Subject: [PATCH] agent: add install target to the CMakeLists
+
+It is common for CMake packages to make sure that 'make install'
+works properly, and that's what most users expect.
+
+More specifically, build systems such as Buildroot also expect
+'make install' to do the right thing for CMake-based packages
+
+Signed-off-by: Norbert Lange <nolange79@gmail.com>
+---
+ agent/CMakeLists.txt | 14 ++++++++++++++
+ 1 file changed, 14 insertions(+)
+
+diff --git a/agent/CMakeLists.txt b/agent/CMakeLists.txt
+index aef15b96..605862b2 100644
+--- a/agent/CMakeLists.txt
++++ b/agent/CMakeLists.txt
+@@ -1,6 +1,8 @@
+ # -*- cmake -*-
+
+ cmake_minimum_required(VERSION 2.8)
++project(tcfagent C)
++include(GNUInstallDirs)
+
+ set(CMAKE_COLOR_MAKEFILE OFF)
+
+@@ -43,3 +45,15 @@ message(STATUS "machine:" ${TCF_MACHINE})
+
+ add_executable(agent tcf/main/main.c)
+ target_link_libraries(agent ${TCF_LIB_NAME})
++
++# executable and library cant have the same target name,
++# but we can rename the output
++set_target_properties(agent
++ PROPERTIES OUTPUT_NAME tcf-agent)
++
++# add target to install all outputs
++install(TARGETS agent ${TCF_LIB_NAME}
++ RUNTIME DESTINATION ${CMAKE_INSTALL_SBINDIR}
++ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
++ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
++)
+--
+2.15.1
+
OpenPOWER on IntegriCloud