Remove cmake leftovers
Thanks @The-King-of-Toasters Fixes #65 Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
This commit is contained in:
parent
0899a9689e
commit
f94c799e02
|
@ -1,46 +0,0 @@
|
||||||
option(NEW_DOC "Build new man pages and HTML documentation" ON)
|
|
||||||
|
|
||||||
# == Build documentation ==
|
|
||||||
# Stolen from https://issues.apache.org/jira/secure/attachment/12455612/AVRO-470.patch
|
|
||||||
if (NEW_DOC)
|
|
||||||
set (MAN_SRC
|
|
||||||
compton.1.asciidoc
|
|
||||||
compton-trans.1.asciidoc
|
|
||||||
)
|
|
||||||
|
|
||||||
find_program(ASCIIDOC_EXEC asciidoc)
|
|
||||||
find_program(ASCIIDOC_A2X_EXEC a2x)
|
|
||||||
if (ASCIIDOC_EXEC AND ASCIIDOC_A2X_EXEC)
|
|
||||||
foreach(_file ${MAN_SRC})
|
|
||||||
# get_filename_component() does not handle ".1.asciidoc"
|
|
||||||
# correctly
|
|
||||||
string(REPLACE ".asciidoc" "" _file_we "${_file}")
|
|
||||||
set(_file_path "${CMAKE_CURRENT_SOURCE_DIR}/${_file}")
|
|
||||||
set(_html_out "${_file_we}.html")
|
|
||||||
set(_man_out "${_file_we}")
|
|
||||||
add_custom_target(compton_man_${_file_we} ALL
|
|
||||||
COMMAND ${ASCIIDOC_A2X_EXEC} --format manpage
|
|
||||||
"${_file_path}"
|
|
||||||
DEPENDS "${_file_path}"
|
|
||||||
)
|
|
||||||
add_custom_command(
|
|
||||||
OUTPUT "${_html_out}"
|
|
||||||
COMMAND ${ASCIIDOC_EXEC} -o "${_html_out}" "${_file_path}"
|
|
||||||
DEPENDS "${_file_path}"
|
|
||||||
)
|
|
||||||
add_custom_target(compton_html_${_file_we} ALL
|
|
||||||
DEPENDS "${_html_out}"
|
|
||||||
)
|
|
||||||
endforeach(_file)
|
|
||||||
else(ASCIIDOC_EXEC AND ASCIIDOC_A2X_EXEC)
|
|
||||||
message(WARNING "asciidoc/a2x not found. New man pages and HTML documentation will not be built.")
|
|
||||||
endif(ASCIIDOC_EXEC AND ASCIIDOC_A2X_EXEC)
|
|
||||||
endif(NEW_DOC)
|
|
||||||
|
|
||||||
# == Install ==
|
|
||||||
include(GNUInstallDirs)
|
|
||||||
|
|
||||||
install(FILES
|
|
||||||
"compton.1"
|
|
||||||
"compton-trans.1"
|
|
||||||
DESTINATION "${CMAKE_INSTALL_MANDIR}/man1" COMPONENT doc)
|
|
|
@ -1,36 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
|
|
||||||
# Test script for CMake build
|
|
||||||
|
|
||||||
BASE_DIR=$(dirname "$0")/..
|
|
||||||
. "${BASE_DIR}/functions.sh"
|
|
||||||
|
|
||||||
BUILD_DIR="build"
|
|
||||||
|
|
||||||
cmake_prepare() {
|
|
||||||
[ ! -e "CMakeLists.txt" ] && ln -s {_,}CMakeLists.txt
|
|
||||||
}
|
|
||||||
|
|
||||||
cmake_build() {
|
|
||||||
einfo Building compton with cmake $@
|
|
||||||
|
|
||||||
[ -e "${BUILD_DIR}" ] && rm -r "${BUILD_DIR}"
|
|
||||||
mkdir "${BUILD_DIR}" && cd "${BUILD_DIR}" || die
|
|
||||||
cmake ${@} .. || die
|
|
||||||
make VERBOSE=1 -B || die
|
|
||||||
cd -
|
|
||||||
|
|
||||||
einfo Build completed successfully
|
|
||||||
}
|
|
||||||
|
|
||||||
show_build_help_msg() {
|
|
||||||
"${BUILD_DIR}/compton" -h | less
|
|
||||||
}
|
|
||||||
|
|
||||||
main() {
|
|
||||||
cmake_prepare
|
|
||||||
cmake_build "${@}"
|
|
||||||
# show_build_help_msg
|
|
||||||
}
|
|
||||||
|
|
||||||
main "${@}"
|
|
Loading…
Reference in New Issue