summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorA. Wilcox <AWilcox@Wilcox-Tech.com>2020-06-22 21:50:55 -0500
committerA. Wilcox <AWilcox@Wilcox-Tech.com>2020-06-22 21:50:55 -0500
commit55b3c85949c8a3bd7486a8a1b0a63b7bfbfde973 (patch)
tree07a204f531b057b54d8538b3e51e4e04bafbf6e0
parentc7a38e3e9ab868526b2953d3094c4be8da5ed97c (diff)
downloadhorizon-55b3c85949c8a3bd7486a8a1b0a63b7bfbfde973.tar.gz
horizon-55b3c85949c8a3bd7486a8a1b0a63b7bfbfde973.tar.bz2
horizon-55b3c85949c8a3bd7486a8a1b0a63b7bfbfde973.tar.xz
horizon-55b3c85949c8a3bd7486a8a1b0a63b7bfbfde973.zip
CMake: Add BUILD_ISO option to toggle ISO generation support
-rw-r--r--image/CMakeLists.txt6
-rw-r--r--image/backends/CMakeLists.txt5
2 files changed, 9 insertions, 2 deletions
diff --git a/image/CMakeLists.txt b/image/CMakeLists.txt
index 7a0a440..ed6a042 100644
--- a/image/CMakeLists.txt
+++ b/image/CMakeLists.txt
@@ -1,3 +1,5 @@
+option(BUILD_ISO "Enable ISO backend" ON)
+
add_subdirectory(backends)
set(IMG_SRCS
@@ -17,4 +19,6 @@ include_directories(${Boost_INCLUDE_DIR})
target_link_libraries(hscript-image hscript hi-backends ${Boost_LIBRARIES})
install(TARGETS hscript-image DESTINATION bin)
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/creator.1 DESTINATION share/man/man1 RENAME hscript-image.1)
-install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/iso-share/ DESTINATION share/horizon/iso)
+if(BUILD_ISO)
+ install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/iso-share/ DESTINATION share/horizon/iso)
+endif(BUILD_ISO)
diff --git a/image/backends/CMakeLists.txt b/image/backends/CMakeLists.txt
index 325fddf..790895e 100644
--- a/image/backends/CMakeLists.txt
+++ b/image/backends/CMakeLists.txt
@@ -1,6 +1,5 @@
set(BACKEND_SRCS
basic.cc
- iso.cc
)
set(BACKEND_LIBS "")
@@ -12,6 +11,10 @@ if(LibArchive_FOUND)
list(APPEND BACKEND_LIBS ${LibArchive_LIBRARIES})
endif()
+if(BUILD_ISO)
+ list(APPEND BACKEND_SRCS iso.cc)
+endif(BUILD_ISO)
+
add_library(hi-backends ${BACKEND_SRCS})
target_link_libraries(hi-backends ${BACKEND_LIBS})
install(TARGETS hi-backends DESTINATION lib)