summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonathan Aillet <jonathan.aillet@iot.bzh>2018-07-19 11:54:04 +0200
committerJonathan Aillet <jonathan.aillet@iot.bzh>2018-07-20 11:38:44 +0000
commit4303ba22a8cacea808eaf8f487303d1360ac4150 (patch)
treebb27f06f024f1b567e0ca02fde874d3290f4639c
parente43e32a266d3b8f0cf4e74f77e5201504cc567f4 (diff)
Set afb version in cmake instead of in header
Set application framework binding version in cmake instead of setting it before including binding header. Change-Id: Ic841069248d40fdd023c8056a614e484004be298 Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
-rw-r--r--alsa-binding/Alsa-ApiHat.h1
-rw-r--r--conf.d/cmake/config.cmake2
2 files changed, 2 insertions, 1 deletions
diff --git a/alsa-binding/Alsa-ApiHat.h b/alsa-binding/Alsa-ApiHat.h
index 50337db..ae735e8 100644
--- a/alsa-binding/Alsa-ApiHat.h
+++ b/alsa-binding/Alsa-ApiHat.h
@@ -23,7 +23,6 @@
#include <alsa/asoundlib.h>
#include <systemd/sd-event.h>
-#define AFB_BINDING_VERSION 2
#include <afb/afb-binding.h>
#include <json-c/json.h>
diff --git a/conf.d/cmake/config.cmake b/conf.d/cmake/config.cmake
index d3ed120..be142c8 100644
--- a/conf.d/cmake/config.cmake
+++ b/conf.d/cmake/config.cmake
@@ -136,6 +136,8 @@ set(COMPILE_OPTIONS
# -O2
# CACHE STRING "Compilation flags for RELEASE build type.")
+add_definitions(-DAFB_BINDING_VERSION=2)
+
# (BUG!!!) as PKG_CONFIG_PATH does not work [should be an env variable]
# ---------------------------------------------------------------------
set(CMAKE_PREFIX_PATH ${CMAKE_INSTALL_PREFIX}/lib64/pkgconfig ${CMAKE_INSTALL_PREFIX}/lib/pkgconfig)