examples/lua: attempt to highlight some traps
[project/libubox.git] / examples / CMakeLists.txt
1 cmake_minimum_required(VERSION 2.6)
2
3 IF (BUILD_EXAMPLES)
4 PROJECT(ubox-examples C)
5 ADD_DEFINITIONS(-O1 -Wall -Werror --std=gnu99 -g3)
6
7 INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/..)
8 LINK_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/..)
9
10 FIND_LIBRARY(json NAMES json-c json)
11
12 ADD_EXECUTABLE(ustream-example ustream-example.c)
13 TARGET_LINK_LIBRARIES(ustream-example ubox)
14
15 ADD_EXECUTABLE(json_script-example json_script-example.c)
16 TARGET_LINK_LIBRARIES(json_script-example ubox blobmsg_json json_script ${json})
17 ENDIF()