]> granicus.if.org Git - libexpat/commitdiff
CMake: Fix visibility of EXPAT_WITH_LIBBSD and EXPAT_*RANDOM*
authorSebastian Pipping <sebastian@pipping.org>
Wed, 9 Oct 2019 20:43:46 +0000 (22:43 +0200)
committerSebastian Pipping <sebastian@pipping.org>
Sat, 12 Oct 2019 21:22:24 +0000 (23:22 +0200)
expat/CMakeLists.txt

index 2084424a38ec3710ed59051ca3b10e034ffeeecb..a05eff2b0c5f93c77726155d32eb7c579b67dbaa 100644 (file)
@@ -47,7 +47,9 @@ option(EXPAT_BUILD_TESTS "build the tests for expat library" ON)
 option(EXPAT_SHARED_LIBS "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(EXPAT_WITH_LIBBSD "utilize libbsd (for arc4random_buf)" OFF)
+if(UNIX OR _EXPAT_HELP)
+    option(EXPAT_WITH_LIBBSD "utilize libbsd (for arc4random_buf)" OFF)
+endif()
 option(EXPAT_ENABLE_INSTALL "install expat files in cmake install target" ON)
 set(EXPAT_CONTEXT_BYTES 1024 CACHE STRING "Define to specify how much context to retain around the current parse point")
 mark_as_advanced(EXPAT_CONTEXT_BYTES)
@@ -56,7 +58,7 @@ mark_as_advanced(EXPAT_DTD)
 option(EXPAT_NS "Define to make XML Namespaces functionality available" ON)
 mark_as_advanced(EXPAT_NS)
 option(EXPAT_WARNINGS_AS_ERRORS "Treat all compiler warnings as errors" OFF)
-if(NOT WIN32 OR _EXPAT_HELP)
+if(UNIX OR _EXPAT_HELP)
     option(EXPAT_DEV_URANDOM "Define to include code reading entropy from `/dev/urandom'." ON)
     set(EXPAT_WITH_GETRANDOM "AUTO" CACHE STRING
             "Make use of getrandom function (ON|OFF|AUTO) [default=AUTO]")