mirror of
https://github.com/libexpat/libexpat.git
synced 2025-04-12 15:52:55 +00:00
CMake: Rename USE_libbsd to EXPAT_WITH_LIBBSD
This commit is contained in:
parent
0c6508b9f6
commit
20bb6ed0b3
2 changed files with 6 additions and 6 deletions
|
@ -47,7 +47,7 @@ option(EXPAT_BUILD_TESTS "build the tests for expat library" ON)
|
|||
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)
|
||||
|
@ -72,10 +72,10 @@ endif()
|
|||
#
|
||||
# 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()
|
||||
|
@ -243,7 +243,7 @@ else(BUILD_shared)
|
|||
endif(BUILD_shared)
|
||||
|
||||
add_library(expat ${_SHARED} ${expat_SRCS})
|
||||
if(USE_libbsd)
|
||||
if(EXPAT_WITH_LIBBSD)
|
||||
target_link_libraries(expat ${LIB_BSD})
|
||||
endif()
|
||||
|
||||
|
@ -467,7 +467,7 @@ if(WIN32)
|
|||
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 "")
|
||||
|
|
|
@ -21,7 +21,7 @@ check_symbol_exists("getpagesize" "unistd.h" HAVE_GETPAGESIZE)
|
|||
check_symbol_exists("mmap" "sys/mman.h" HAVE_MMAP)
|
||||
check_symbol_exists("getrandom" "sys/random.h" HAVE_GETRANDOM)
|
||||
|
||||
if(USE_libbsd)
|
||||
if(EXPAT_WITH_LIBBSD)
|
||||
set(CMAKE_REQUIRED_LIBRARIES "${LIB_BSD}")
|
||||
set(_bsd "bsd/")
|
||||
else()
|
||||
|
|
Loading…
Add table
Reference in a new issue