option(BUILD_shared "build a shared expat library" ON)
option(EXPAT_BUILD_DOCS "build man page for xmlwf" ${_EXPAT_BUILD_DOCS_DEFAULT})
option(EXPAT_BUILD_FUZZERS "build fuzzers for the expat library" OFF)
-option(USE_libbsd "utilize libbsd (for arc4random_buf)" OFF)
+option(EXPAT_WITH_LIBBSD "utilize libbsd (for arc4random_buf)" OFF)
option(INSTALL "install expat files in cmake install target" ON)
set(XML_CONTEXT_BYTES 1024 CACHE STRING "Define to specify how much context to retain around the current parse point")
option(XML_DTD "Define to make parameter entity parsing functionality available" ON)
#
# Environment checks
#
-if(USE_libbsd)
+if(EXPAT_WITH_LIBBSD)
find_library(LIB_BSD NAMES bsd)
if(NOT LIB_BSD)
- message(SEND_ERROR "USE_libbsd option is enabled, but libbsd was not found")
+ message(SEND_ERROR "EXPAT_WITH_LIBBSD option is enabled, but libbsd was not found")
else()
set(HAVE_LIBBSD TRUE)
endif()
endif(BUILD_shared)
add_library(expat ${_SHARED} ${expat_SRCS})
-if(USE_libbsd)
+if(EXPAT_WITH_LIBBSD)
target_link_libraries(expat ${LIB_BSD})
endif()
else()
message(STATUS " getrandom ................ ${HAVE_GETRANDOM}")
message(STATUS " syscall SYS_getrandom .... ${HAVE_SYSCALL_GETRANDOM}")
- message(STATUS " libbsd ................... ${USE_libbsd}")
+ message(STATUS " libbsd ................... ${EXPAT_WITH_LIBBSD}")
message(STATUS " /dev/random .............. ${XML_DEV_URANDOM}")
endif()
message(STATUS "")