]> git.proxmox.com Git - ceph.git/blame - ceph/src/zstd/build/cmake/contrib/gen_html/CMakeLists.txt
import 15.2.0 Octopus source
[ceph.git] / ceph / src / zstd / build / cmake / contrib / gen_html / CMakeLists.txt
CommitLineData
11fdf7f2
TL
1# ################################################################
2# Copyright (c) 2015-present, Yann Collet, Facebook, Inc.
3# All rights reserved.
4#
5# This source code is licensed under both the BSD-style license (found in the
6# LICENSE file in the root directory of this source tree) and the GPLv2 (found
7# in the COPYING file in the root directory of this source tree).
8# ################################################################
9
9f95a23c
TL
10project(gen_html)
11include(GetZstdLibraryVersion)
11fdf7f2 12
9f95a23c 13set(CMAKE_INCLUDE_CURRENT_DIR TRUE)
11fdf7f2
TL
14
15# Define programs directory, where sources and header files are located
9f95a23c
TL
16set(LIBRARY_DIR ${ZSTD_SOURCE_DIR}/lib)
17set(PROGRAMS_DIR ${ZSTD_SOURCE_DIR}/programs)
18set(GENHTML_DIR ${ZSTD_SOURCE_DIR}/contrib/gen_html)
19set(GENHTML_BINARY ${PROJECT_BINARY_DIR}/gen_html${CMAKE_EXECUTABLE_SUFFIX})
20include_directories(${PROGRAMS_DIR} ${LIBRARY_DIR} ${LIBRARY_DIR}/common ${GENHTML_DIR})
11fdf7f2 21
9f95a23c 22add_executable(gen_html ${GENHTML_DIR}/gen_html.cpp)
11fdf7f2
TL
23
24GetZstdLibraryVersion(${LIBRARY_DIR}/zstd.h VMAJOR VMINOR VRELEASE)
9f95a23c
TL
25set(LIBVERSION "${VMAJOR}.${VMINOR}.${VRELEASE}")
26add_custom_target(zstd_manual.html ALL
11fdf7f2
TL
27 ${GENHTML_BINARY} "${LIBVERSION}" "${LIBRARY_DIR}/zstd.h" "${PROJECT_BINARY_DIR}/zstd_manual.html"
28 DEPENDS gen_html COMMENT "Update zstd manual")
29
9f95a23c 30install(FILES "${PROJECT_BINARY_DIR}/zstd_manual.html" DESTINATION "${CMAKE_INSTALL_DOCDIR}")