From b71fd28a93051be9d2cdd72f1a0f526222f26964 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Sun, 25 May 2014 22:00:58 +0200 Subject: [PATCH] ubox: only link libraries that are actually used Signed-off-by: Felix Fietkau --- CMakeLists.txt | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 69c000d..9c3032f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -11,28 +11,27 @@ IF(APPLE) ENDIF() find_library(json NAMES json-c json) -SET(LIBS ubox uci ubus ${json} blobmsg_json) IF(DEBUG) ADD_DEFINITIONS(-DDEBUG -g3) ENDIF() ADD_EXECUTABLE(kmodloader kmodloader.c) -TARGET_LINK_LIBRARIES(kmodloader ${LIBS}) +TARGET_LINK_LIBRARIES(kmodloader ubox) INSTALL(TARGETS kmodloader RUNTIME DESTINATION sbin ) ADD_EXECUTABLE(board board.c) -TARGET_LINK_LIBRARIES(board ${LIBS}) +TARGET_LINK_LIBRARIES(board ubox ${json} blobmsg_json) INSTALL(TARGETS board RUNTIME DESTINATION sbin ) ADD_EXECUTABLE(lsbloader lsbloader.c) -TARGET_LINK_LIBRARIES(lsbloader ${LIBS}) +TARGET_LINK_LIBRARIES(lsbloader ubox ubus) INSTALL(TARGETS lsbloader RUNTIME DESTINATION sbin @@ -44,19 +43,19 @@ INSTALL(TARGETS validate ) ADD_EXECUTABLE(validate_data validate/cli.c) -TARGET_LINK_LIBRARIES(validate_data ${LIBS} validate) +TARGET_LINK_LIBRARIES(validate_data ubox uci validate) INSTALL(TARGETS validate_data RUNTIME DESTINATION sbin ) ADD_EXECUTABLE(logd log/logd.c log/syslog.c) -TARGET_LINK_LIBRARIES(logd ${LIBS}) +TARGET_LINK_LIBRARIES(logd ubox ubus) INSTALL(TARGETS logd RUNTIME DESTINATION sbin ) ADD_EXECUTABLE(logread log/logread.c) -TARGET_LINK_LIBRARIES(logread ${LIBS}) +TARGET_LINK_LIBRARIES(logread ubox ubus ${json} blobmsg_json) INSTALL(TARGETS logread RUNTIME DESTINATION sbin ) -- 2.25.1