ubi: fix false positive in volume_find
[project/fstools.git] / CMakeLists.txt
index 8234b44..5211bcd 100644 (file)
@@ -12,6 +12,7 @@ ADD_LIBRARY(fstools SHARED
                libfstools/volume.c
                libfstools/mtd.c
                libfstools/mount.c
+               libfstools/ubi.c
                libfstools/find.c)
 TARGET_LINK_LIBRARIES(fstools ubox)
 INSTALL(TARGETS fstools LIBRARY DESTINATION lib)
@@ -32,6 +33,15 @@ ADD_LIBRARY(ubi-utils STATIC
                libubi/libubi.c
                libubi/libubi-tiny.c
                libubi/ubiutils-common.c)
+INSTALL(TARGETS ubi-utils ARCHIVE DESTINATION lib)
+
+SET_TARGET_PROPERTIES(ubi-utils PROPERTIES COMPILE_FLAGS
+               "-ffunction-sections -fdata-sections")
+
+INSTALL(FILES libubi/libubi-tiny.h libubi/libubi.h libubi/ubi-media.h
+               libubi/ubi-user.h libubi/ubi-media.h
+       DESTINATION include
+)
 
 ADD_EXECUTABLE(mount_root mount_root.c)
 TARGET_LINK_LIBRARIES(mount_root fstools)