summaryrefslogtreecommitdiff
path: root/image/backends/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'image/backends/CMakeLists.txt')
-rw-r--r--image/backends/CMakeLists.txt16
1 files changed, 14 insertions, 2 deletions
diff --git a/image/backends/CMakeLists.txt b/image/backends/CMakeLists.txt
index f3c7f5d..726d4eb 100644
--- a/image/backends/CMakeLists.txt
+++ b/image/backends/CMakeLists.txt
@@ -1,4 +1,16 @@
set(BACKEND_SRCS
- ${CMAKE_CURRENT_SOURCE_DIR}/basic.cc
- PARENT_SCOPE
+ basic.cc
)
+
+set(BACKEND_LIBS "")
+
+find_package(LibArchive)
+
+if(LibArchive_FOUND)
+ list(APPEND BACKEND_SRCS tar.cc)
+ list(APPEND BACKEND_LIBS ${LibArchive_LIBRARIES})
+endif()
+
+add_library(hi-backends ${BACKEND_SRCS})
+target_link_libraries(hi-backends ${BACKEND_LIBS})
+install(TARGETS hi-backends DESTINATION lib)