###########################################################################
-# Copyright 2015, 2016, 2017 IoT.bzh
+# Copyright (C) 2015-2018 "IoT.bzh"
#
# author: José Bollo <jose.bollo@iot.bzh>
#
ADD_LIBRARY(afb-lib STATIC
afb-api.c
- afb-api-dbus.c
afb-api-dyn.c
afb-api-so.c
afb-api-so-v1.c
wrap-json.c
)
+IF(INCLUDE_DBUS_TRANSPARENCY)
+ ADD_DEFINITIONS(-DWITH_DBUS_TRANSPARENCY)
+ TARGET_SOURCES(afb-lib PUBLIC afb-api-dbus.c)
+ENDIF()
+
###########################################
# build and install afb-daemon
###########################################
###########################################
# build and install afb-daemon
###########################################
-ADD_EXECUTABLE(afs-supervisor afs-supervisor.c afs-discover.c)
-TARGET_LINK_LIBRARIES(afs-supervisor
- afb-lib
- ${link_libraries}
-)
-INSTALL(TARGETS afs-supervisor
- RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
+IF(INCLUDE_SUPERVISOR)
+ ADD_EXECUTABLE(afs-supervisor afs-main.c afs-supervisor.c afs-discover.c afs-config.c)
+ TARGET_LINK_LIBRARIES(afs-supervisor
+ afb-lib
+ ${link_libraries}
+ )
+ INSTALL(TARGETS afs-supervisor
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
+ENDIF()
###########################################
# build and install libafbwsc