Drop test cases for deprecated ucimap-example.
[project/uci.git] / CMakeLists.txt
1 cmake_minimum_required(VERSION 2.6)
2
3 PROJECT(uci C)
4
5 SET(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "")
6 ADD_DEFINITIONS(-Os -Wall -Werror --std=gnu99 -g3 -I. -DUCI_PREFIX="${CMAKE_INSTALL_PREFIX}")
7
8 OPTION(UCI_DEBUG "debugging support" OFF)
9 OPTION(UCI_DEBUG_TYPECAST "typecast debugging support" OFF)
10 OPTION(BUILD_LUA "build Lua binding" ON)
11
12 CONFIGURE_FILE( ${CMAKE_SOURCE_DIR}/uci_config.h.in ${CMAKE_SOURCE_DIR}/uci_config.h )
13
14 INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})
15
16 SET(LIB_SOURCES libuci.c file.c util.c delta.c parse.c blob.c)
17
18 ADD_LIBRARY(uci SHARED ${LIB_SOURCES})
19 TARGET_LINK_LIBRARIES(uci ubox)
20 SET_TARGET_PROPERTIES(uci PROPERTIES OUTPUT_NAME uci)
21
22 ADD_EXECUTABLE(cli cli.c)
23 SET_TARGET_PROPERTIES(cli PROPERTIES OUTPUT_NAME uci)
24 TARGET_LINK_LIBRARIES(cli uci)
25
26 ADD_LIBRARY(ucimap STATIC ucimap.c)
27
28 ADD_SUBDIRECTORY(lua)
29
30 INSTALL(FILES uci.h uci_config.h uci_blob.h ucimap.h
31 DESTINATION include
32 )
33
34 INSTALL(TARGETS uci cli
35 ARCHIVE DESTINATION lib
36 LIBRARY DESTINATION lib
37 RUNTIME DESTINATION bin
38 )
39