|
| 1 | +cmake_minimum_required(VERSION 3.26) |
| 2 | +project(ltfs LANGUAGES C) |
| 3 | +set(VERSION "2.5.0.0 (Prelim cmake)") |
| 4 | +set(CMAKE_EXPORT_COMPILE_COMMANDS ON) |
| 5 | +set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/.cmake") |
| 6 | + |
| 7 | +if(NOT CMAKE_BUILD_TYPE MATCHES "Debug|Release") |
| 8 | + set(CMAKE_BUILD_TYPE Debug) |
| 9 | +endif() |
| 10 | + |
| 11 | +# Add dependencies |
| 12 | +include(GNUInstallDirs REQUIRED) |
| 13 | +include(LTFSUtils REQUIRED) |
| 14 | +find_package(Threads REQUIRED) |
| 15 | +find_package(ICU COMPONENTS uc) |
| 16 | +find_package(LibXml2 REQUIRED) |
| 17 | +find_package(FUSE REQUIRED) |
| 18 | +find_package(UUID REQUIRED) |
| 19 | +find_package(NetSNMP) |
| 20 | +# Configure project |
| 21 | +set(DEFAULT_TAPE "" CACHE STRING "default tape backend plugin, e.g. sg, iokit, cam, scsipi-ibmtape") |
| 22 | +set(DEFAULT_IOSCHED "unified" CACHE STRING "default I/O scheduler plugin, e.g. unified") |
| 23 | +set(DEFAULT_KMI "none" CACHE STRING "default key manager interface plugin, e.g. none") |
| 24 | +option(MSG_CHECK "compile in message checking mode (may be binary is defunct)" OFF) |
| 25 | +option(POSIXLINK_ONLY "compile with livelink mode support" ON) |
| 26 | +option(USE_NEW_LOCKING "use new locking system or not" ON) |
| 27 | +option(ENABLE_LIN_TAPE "support IBM's lin_tape driver or not" OFF) |
| 28 | +option(SUPPORT_BUGGY_IFS "support buggy I/Fs for tape drivers" OFF) |
| 29 | +option(INDENT_INDEXES "enable xml indentation for index" OFF) |
| 30 | +option(FORMAT_SPEC25 "support format spec 2.5 or not" OFF) |
| 31 | +option(ICU_6X "force to use ICU6x (unorm2) functions" OFF) |
| 32 | +option(HAVE_XML_PARSE_HUGE "enable xml parsing with huge file support" OFF) |
| 33 | +option_tape_backend() |
| 34 | +option_unorm2() |
| 35 | +add_compile_definitions(_GNU_SOURCE __CMAKE_BUILD) |
| 36 | + |
| 37 | +# Generate targets and configrations |
| 38 | +add_subdirectory(messages) |
| 39 | +add_subdirectory(src) |
| 40 | +add_subdirectory(conf) |
| 41 | +add_subdirectory(man) |
| 42 | +configure_file(ltfs.pc.in ltfs.pc) |
0 commit comments