[OpenWrt-Devel] [PATCH] cmake: Fix cli shared linking against ubox

Andre Castro andre.castro.sw at gmail.com
Fri Feb 2 07:04:44 EST 2018


The 'ubox' library used in 'cli' target is not using the output of the
'find_library' command. This is a problem when the 'ubox' library is not
located on the standard system library locations.

Use the CMake variable 'ubox', output of 'find_library' call that points
to the library found on the system, instead of hardcoding the library's
name to 'ubox'.

Signed-off-by: Andre Castro <andre.castro.sw at gmail.com>
---
repo: git://git.openwrt.org/project/uci.git

 CMakeLists.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 2df6fa7..170eb0b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -36,7 +36,7 @@ SET_TARGET_PROPERTIES(cli PROPERTIES OUTPUT_NAME uci)
 IF(BUILD_STATIC)
   TARGET_LINK_LIBRARIES(cli uci-static ${ubox-static})
 ELSE(BUILD_STATIC)
-  TARGET_LINK_LIBRARIES(cli uci ubox)
+  TARGET_LINK_LIBRARIES(cli uci ${ubox})
 ENDIF(BUILD_STATIC)
 
 ADD_LIBRARY(ucimap STATIC ucimap.c)
-- 
2.15.1
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


More information about the openwrt-devel mailing list