summaryrefslogtreecommitdiffstats
path: root/binding
diff options
context:
space:
mode:
authorThierry Bultel <thierry.bultel@iot.bzh>2018-07-11 17:24:08 +0200
committerThierry Bultel <thierry.bultel@iot.bzh>2018-07-17 10:50:07 +0200
commitb3303810b1edbe0a9bc7c066fb6c4ea96cb65c12 (patch)
treee88bb6122b9051a37ea088dfee67e734bee520a5 /binding
parente2c836ff4229b158d528aaa537c0f4d216debe3e (diff)
Set the binding version in cmake instead of source
Setting AFB_BINDING_VERSION is cmake makes merges easier between branches, since it is always defined once at a single place instead that in each file that need it. Also removed the "INSTALL" section with LIBRARY_DESTINATION since it is now treated in app-templates. Change-Id: I7ef5f3b4d2009ab6ec296ac70bfc0a5647f9534c Signed-off-by: Thierry Bultel <thierry.bultel@iot.bzh>
Diffstat (limited to 'binding')
-rw-r--r--binding/CMakeLists.txt6
-rw-r--r--binding/radio-binding.c2
-rw-r--r--binding/radio_impl_kingfisher.c1
-rw-r--r--binding/radio_impl_rtlsdr.c1
4 files changed, 2 insertions, 8 deletions
diff --git a/binding/CMakeLists.txt b/binding/CMakeLists.txt
index c295eb0..f4f58f6 100644
--- a/binding/CMakeLists.txt
+++ b/binding/CMakeLists.txt
@@ -21,6 +21,8 @@
# Add target to project dependency list
PROJECT_TARGET_ADD(radio-binding)
+ add_definitions(-DAFB_BINDING_VERSION=2)
+
# Define project Targets
set(radio_SOURCES
radio-binding.c
@@ -46,10 +48,6 @@ PROJECT_TARGET_ADD(radio-binding)
TARGET_COMPILE_OPTIONS(${TARGET_NAME} PUBLIC ${SOUND_CFLAGS})
TARGET_LINK_LIBRARIES(${TARGET_NAME} ${SOUND_LIBRARIES} ${link_libraries})
- # installation directory
- INSTALL(TARGETS ${TARGET_NAME}
- LIBRARY DESTINATION ${BINDINGS_INSTALL_DIR})
-
# Add helper program target
PROJECT_TARGET_ADD(rtl_fm_helper)
diff --git a/binding/radio-binding.c b/binding/radio-binding.c
index e1e1763..715ec35 100644
--- a/binding/radio-binding.c
+++ b/binding/radio-binding.c
@@ -22,9 +22,7 @@
#include <stdint.h>
#include <unistd.h>
#include <sys/types.h>
-
#include <json-c/json.h>
-#define AFB_BINDING_VERSION 2
#include <afb/afb-binding.h>
#include "radio_impl.h"
diff --git a/binding/radio_impl_kingfisher.c b/binding/radio_impl_kingfisher.c
index 177ad88..d88176d 100644
--- a/binding/radio_impl_kingfisher.c
+++ b/binding/radio_impl_kingfisher.c
@@ -23,7 +23,6 @@
#include <fcntl.h>
#include <sys/stat.h>
#include <gst/gst.h>
-#define AFB_BINDING_VERSION 2
#include <afb/afb-binding.h>
#include "radio_impl.h"
diff --git a/binding/radio_impl_rtlsdr.c b/binding/radio_impl_rtlsdr.c
index 503748e..c6b0ea9 100644
--- a/binding/radio_impl_rtlsdr.c
+++ b/binding/radio_impl_rtlsdr.c
@@ -24,7 +24,6 @@
#include <sys/stat.h>
#include <errno.h>
#include <glib.h>
-#define AFB_BINDING_VERSION 2
#include <afb/afb-binding.h>
#include "radio_impl.h"