sh/jshn.sh: fix json_get_var() and json_get_type() to not return cached values
[project/libubox.git] / CMakeLists.txt
index 9e8f093..eb112af 100644 (file)
@@ -8,7 +8,7 @@ IF(APPLE)
   LINK_DIRECTORIES(/opt/local/lib)
 ENDIF()
 
-SET(SOURCES avl.c blob.c blobmsg.c uloop.c usock.c)
+SET(SOURCES avl.c avl-cmp.c blob.c blobmsg.c uloop.c usock.c vlist.c)
 
 ADD_LIBRARY(ubox SHARED ${SOURCES})
 
@@ -26,7 +26,18 @@ find_library(json json)
 IF(EXISTS ${json})
        ADD_LIBRARY(blobmsg_json SHARED blobmsg_json.c)
        TARGET_LINK_LIBRARIES(blobmsg_json ubox json)
-       INSTALL(TARGETS blobmsg_json
+
+       ADD_EXECUTABLE(jshn jshn.c)
+       TARGET_LINK_LIBRARIES(jshn json)
+
+       INSTALL(TARGETS blobmsg_json jshn
                LIBRARY DESTINATION lib
+               RUNTIME DESTINATION bin
        )
+
+       FILE(GLOB scripts sh/*.sh)
+       INSTALL(FILES ${scripts}
+               DESTINATION share/libubox
+       )
+
 ENDIF()