From b3303810b1edbe0a9bc7c066fb6c4ea96cb65c12 Mon Sep 17 00:00:00 2001 From: Thierry Bultel Date: Wed, 11 Jul 2018 17:24:08 +0200 Subject: 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 --- binding/CMakeLists.txt | 6 ++---- binding/radio-binding.c | 2 -- binding/radio_impl_kingfisher.c | 1 - binding/radio_impl_rtlsdr.c | 1 - 4 files changed, 2 insertions(+), 8 deletions(-) (limited to 'binding') 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 #include #include - #include -#define AFB_BINDING_VERSION 2 #include #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 #include #include -#define AFB_BINDING_VERSION 2 #include #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 #include #include -#define AFB_BINDING_VERSION 2 #include #include "radio_impl.h" -- cgit 1.2.3-korg