Skip to content

Commit

Permalink
fix CMake build w.r.t. Asciidoc
Browse files Browse the repository at this point in the history
remove references to "xmlto"
  • Loading branch information
f18m committed Oct 24, 2023
1 parent 1a65229 commit 1dfae07
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 32 deletions.
10 changes: 8 additions & 2 deletions CMakeLists.txt
Expand Up @@ -770,7 +770,7 @@ elseif(CMAKE_SYSTEM_NAME MATCHES "Darwin")
add_definitions(-D_DARWIN_C_SOURCE)
endif()

find_package(AsciiDoc)
find_package(AsciiDoctor)

cmake_dependent_option(WITH_DOC "Build Reference Guide documentation(requires DocBook)" ON "ASCIIDOC_FOUND;NOT WIN32"
OFF) # Do not build docs on Windows due to issues with symlinks
Expand Down Expand Up @@ -1255,9 +1255,15 @@ endif()
option(WITH_DOCS "Build html docs" ON)
if(WITH_DOCS)
file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/doc)
file(
GLOB asciidoc_files
RELATIVE ${CMAKE_CURRENT_BINARY_DIR}/
"${CMAKE_CURRENT_SOURCE_DIR}/doc/*.adoc")
string(REPLACE ".txt" ".html" html_files ${asciidoc_files})
add_custom_command(
OUTPUT ${html_files}
COMMAND asciidoctor -b html -azmq_version=${ZMQ_VERSION} *.adoc
DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${src}
DEPENDS ${asciidoc_files}
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
COMMENT "Generating ${html}")
endif()
Expand Down
26 changes: 0 additions & 26 deletions builds/cmake/Modules/FindAsciiDoc.cmake

This file was deleted.

23 changes: 23 additions & 0 deletions builds/cmake/Modules/FindAsciiDoctor.cmake
@@ -0,0 +1,23 @@
# - Find Asciidoctor
# this module looks for asciidoctor
#
# ASCIIDOCTOR_EXECUTABLE - the full path to asciidoc
# ASCIIDOCTOR_FOUND - If false, don't attempt to use asciidoc.
set (PROGRAMFILESX86 "PROGRAMFILES(X86)")

find_program(ASCIIDOCTOR_EXECUTABLE asciidoctor asciidoctor
PATHS "$ENV{ASCIIDOCTOR_ROOT}"
"$ENV{PROGRAMW6432}/asciidoctor"
"$ENV{PROGRAMFILES}/asciidoctor"
"$ENV{${PROGRAMFILESX86}}/asciidoctor")

find_program(A2X_EXECUTABLE a2x
PATHS "$ENV{ASCIIDOCTOR_ROOT}"
"$ENV{PROGRAMW6432}/asciidoctor"
"$ENV{PROGRAMFILES}/asciidoctor"
"$ENV{${PROGRAMFILESX86}}/asciidoctor")


include(FindPackageHandleStandardArgs)
find_package_handle_standard_ARGS(AsciiDoctor REQUIRED_VARS ASCIIDOCTOR_EXECUTABLE)
mark_as_advanced(ASCIIDOCTOR_EXECUTABLE)
5 changes: 1 addition & 4 deletions configure.ac
Expand Up @@ -76,10 +76,7 @@ PKG_PROG_PKG_CONFIG
m4_pattern_forbid([^PKG_[A-Z_]+$], [missing some pkg-config macros (pkg-config package)])

# Libtool configuration for different targets. See acinclude.m4
AC_ARG_VAR([XMLTO], [path to xmlto command])
AC_PATH_PROG([XMLTO], [xmlto])
AC_ARG_VAR([ASCIIDOC], [path to asciidoc command])
AC_PATH_PROG([ASCIIDOC], [asciidoc])
AC_CHECK_TOOL([ASCIIDOCTOR], [asciidoctor])
LIBZMQ_CONFIG_LIBTOOL
AC_LIBTOOL_WIN32_DLL
AC_PROG_LIBTOOL
Expand Down

0 comments on commit 1dfae07

Please sign in to comment.