Browse Source

cmake: Fix cli shared linking against ubox

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@gmail.com>
Andre Castro 6 years ago
parent
commit
4c4d343caa
1 changed files with 1 additions and 1 deletions
  1. 1 1
      CMakeLists.txt

+ 1 - 1
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)