X-Git-Url: http://git.archive.openwrt.org/?a=blobdiff_plain;f=CMakeLists.txt;h=58381da7f34b69c2c7f0618c853e5bce6b0c22ed;hb=2a9edb464215d17c61fdaa6fbd97c99f1f130812;hp=f24fee9b6d67eae0a043cb1eb25d43d1f3e2c5ab;hpb=dffbc09baf71b294185a36048166d00066d433b5;p=project%2Flibubox.git diff --git a/CMakeLists.txt b/CMakeLists.txt index f24fee9..58381da 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -7,19 +7,14 @@ ADD_DEFINITIONS(-Os -Wall -Werror --std=gnu99 -g3 -Wmissing-declarations) OPTION(BUILD_LUA "build Lua plugin" ON) -IF(APPLE) - INCLUDE_DIRECTORIES(/opt/local/include) - LINK_DIRECTORIES(/opt/local/lib) -ENDIF() - INCLUDE(FindPkgConfig) -PKG_CHECK_MODULES(JSONC json-c json) +PKG_CHECK_MODULES(JSONC json-c) IF(JSONC_FOUND) ADD_DEFINITIONS(-DJSONC) INCLUDE_DIRECTORIES(${JSONC_INCLUDE_DIRS}) ENDIF() -SET(SOURCES avl.c avl-cmp.c blob.c blobmsg.c uloop.c usock.c ustream.c ustream-fd.c vlist.c utils.c safe_list.c runqueue.c md5.c kvlist.c) +SET(SOURCES avl.c avl-cmp.c blob.c blobmsg.c uloop.c usock.c ustream.c ustream-fd.c vlist.c utils.c safe_list.c runqueue.c md5.c kvlist.c ulog.c) ADD_LIBRARY(ubox SHARED ${SOURCES}) ADD_LIBRARY(ubox-static STATIC ${SOURCES}) @@ -44,8 +39,9 @@ INSTALL(TARGETS ubox ubox-static ) ADD_SUBDIRECTORY(lua) +ADD_SUBDIRECTORY(examples) -find_library(json NAMES json-c json) +find_library(json NAMES json-c) IF(EXISTS ${json}) ADD_LIBRARY(blobmsg_json SHARED blobmsg_json.c) TARGET_LINK_LIBRARIES(blobmsg_json ubox ${json})