cmake_minimum_required(VERSION 2.8.11)

include (libubus)

project(libubus)

include_directories(
	../../../../
)

file(
	GLOB
	source_files
	../../../libubus.c
	../../../libubus-io.c
	../../../libubus-obj.c
	../../../libubus-sub.c
	../../../libubus-req.c
	../../../libubus-acl.c
)

ADD_DEFINITIONS(-Wall -Werror --std=gnu99 -g3 -Wmissing-declarations)


add_library(
        ubus
        SHARED
        ${source_files}
)

target_link_libraries (ubus 
	LINK_PUBLIC 
	ubox
	)

target_include_directories (ubus PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
