Welcome to mirror list, hosted at ThFree Co, Russian Federation.

CMakeLists.txt - git.openwrt.org/project/libubox.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 752a7bf9906545171013821d1adb572bed85fc48 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
cmake_minimum_required(VERSION 2.8)

PROJECT(ubox C)
ADD_DEFINITIONS(-Os -Wall -Werror --std=gnu99 -g3)

SET(SOURCES avl.c blob.c blobmsg.c hash.c uhtbl.c uloop.c)
IF("${CMAKE_SYSTEM}" MATCHES "Linux")
  SET(SOURCES ${SOURCES} unl.c)
ENDIF("${CMAKE_SYSTEM}" MATCHES "Linux")

ADD_LIBRARY(ubox SHARED ${SOURCES})

IF("${CMAKE_SYSTEM}" MATCHES "Linux")
  TARGET_LINK_LIBRARIES(ubox nl-tiny)
ENDIF("${CMAKE_SYSTEM}" MATCHES "Linux")

SET(CMAKE_INSTALL_PREFIX /usr)

FILE(GLOB headers *.h)
INSTALL(FILES ${headers}
	DESTINATION include/libubox
)
INSTALL(TARGETS ubox
	LIBRARY DESTINATION lib
)