libubi-utils: export static library
authorDaniel Golle <daniel@makrotopia.org>
Tue, 20 May 2014 00:43:51 +0000 (02:43 +0200)
committerDaniel Golle <daniel@makrotopia.org>
Tue, 20 May 2014 13:00:37 +0000 (15:00 +0200)
uboot-envtools will use parts of libubi-utils in the near future
to allow native r/w support of ubi-volume backed environments.

Install libubi-utils.a as well as the headers needed so uboot-envtools
can link libubi-utils.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
CMakeLists.txt

index c1e5a09c633a4d2bfee9a97dffd6163e4b3ba5dd..5211bcdc8a18fb59fc2351767591411fd42c00f7 100644 (file)
@@ -33,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)