make building examples an option
This commit is contained in:
parent
82713b9d49
commit
80d64827e9
2 changed files with 7 additions and 5 deletions
|
@ -4,6 +4,7 @@ PROJECT(ubus C)
|
|||
ADD_DEFINITIONS(-Os -Wall -Werror --std=gnu99 -g3 -Wmissing-declarations)
|
||||
|
||||
OPTION(BUILD_LUA "build Lua plugin" ON)
|
||||
OPTION(BUILD_EXAMPLES "build examples" ON)
|
||||
|
||||
SET(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "")
|
||||
|
||||
|
|
|
@ -2,9 +2,10 @@ cmake_minimum_required(VERSION 2.6)
|
|||
|
||||
ADD_DEFINITIONS(-I..)
|
||||
|
||||
ADD_EXECUTABLE(server server.c)
|
||||
TARGET_LINK_LIBRARIES(server ubus ubox blobmsg_json)
|
||||
|
||||
ADD_EXECUTABLE(client client.c)
|
||||
TARGET_LINK_LIBRARIES(client ubus ubox)
|
||||
IF (BUILD_EXAMPLES)
|
||||
ADD_EXECUTABLE(server server.c)
|
||||
TARGET_LINK_LIBRARIES(server ubus ubox blobmsg_json)
|
||||
|
||||
ADD_EXECUTABLE(client client.c)
|
||||
TARGET_LINK_LIBRARIES(client ubus ubox)
|
||||
ENDIF()
|
||||
|
|
Loading…
Add table
Reference in a new issue