mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-10-19 23:01:22 -06:00
ENH: deps: update some import libraries
1. update openssl to 3.1 2. update zlib to 1.2.13 3. update expat to 2.5 Change-Id: I46ac38f8e5acab4abae42645a56eec7d9381865e (cherry picked from commit 34013820d325c41e1514d0f334f3c2be53145852)
This commit is contained in:
parent
50f9edec5c
commit
0a064e980b
29 changed files with 8617 additions and 5673 deletions
61
deps/EXPAT/expat/CMakeLists.txt
vendored
61
deps/EXPAT/expat/CMakeLists.txt
vendored
|
@ -2,6 +2,65 @@ cmake_minimum_required(VERSION 3.0)
|
|||
|
||||
project(EXPAT)
|
||||
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/ConfigureChecks.cmake)
|
||||
|
||||
macro(expat_shy_set var default cache type desc)
|
||||
# Macro expat_shy_set came into life because:
|
||||
# - Expat was previously using an inconsistent mix of CMake's native set()
|
||||
# and option() to define public build time options.
|
||||
# - option() is more friendly than set() with regard to configuring an
|
||||
# external project that is pulled in by means of add_subdirectory() --
|
||||
# see comments in issue #597 -- so we wanted to get away from set().
|
||||
# - option() auto-converts non-bool values to bool when writing to the CMake
|
||||
# cache, so we needed something that supports non-bool better and hence
|
||||
# wanted to get away from plain option(), too.
|
||||
#
|
||||
# As a result, this function serves as a hybrid between CMake's regular set()
|
||||
# and option(): from set() it takes support for non-bool types and the function
|
||||
# name and signature whereas from option() (with policy CMP0077 mode NEW) it
|
||||
# takes being shy when a value has previously been defined for that variable.
|
||||
#
|
||||
# So that resolves all need for set(.. FORCE) when pulling in Expat by means of
|
||||
# add_subdirectory().
|
||||
#
|
||||
if(NOT ${cache} STREQUAL "CACHE")
|
||||
message(SEND_ERROR "Macro usage is: expat_shy_set(var default CACHE type desc)")
|
||||
endif()
|
||||
|
||||
if(DEFINED ${var})
|
||||
# NOTE: The idea is to (ideally) only add to the cache if
|
||||
# there is no cache entry, yet. "if(DEFINED CACHE{var})"
|
||||
# requires CMake >=3.14.
|
||||
if(CMAKE_VERSION VERSION_GREATER_EQUAL "3.14" AND NOT DEFINED "CACHE{${var}}")
|
||||
set("${var}" "${${var}}" CACHE "${type}" "${desc}")
|
||||
endif()
|
||||
else()
|
||||
set("${var}" "${default}" CACHE "${type}" "${desc}")
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
if(NOT WIN32)
|
||||
expat_shy_set(EXPAT_WITH_GETRANDOM "AUTO" CACHE STRING "Make use of getrandom function (ON|OFF|AUTO) [default=AUTO]")
|
||||
expat_shy_set(EXPAT_WITH_SYS_GETRANDOM "AUTO" CACHE STRING "Make use of syscall SYS_getrandom (ON|OFF|AUTO) [default=AUTO]")
|
||||
endif()
|
||||
|
||||
macro(evaluate_detection_results use_ref have_ref thing_lower thing_title)
|
||||
if(${use_ref} AND NOT (${use_ref} STREQUAL "AUTO") AND NOT ${have_ref})
|
||||
message(SEND_ERROR
|
||||
"Use of ${thing_lower} was enforced by ${use_ref}=ON but it could not be found.")
|
||||
elseif(NOT ${use_ref} AND ${have_ref})
|
||||
message("${thing_title} was found but it will not be used due to ${use_ref}=OFF.")
|
||||
set(${have_ref} 0)
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
if(NOT WIN32)
|
||||
evaluate_detection_results(EXPAT_WITH_GETRANDOM HAVE_GETRANDOM "function getrandom" "Function getrandom")
|
||||
evaluate_detection_results(EXPAT_WITH_SYS_GETRANDOM HAVE_SYSCALL_GETRANDOM "syscall SYS_getrandom" "Syscall SYS_getrandom")
|
||||
endif()
|
||||
|
||||
configure_file(expat_configure.h.cmake "${CMAKE_CURRENT_BINARY_DIR}/expat_configure.h")
|
||||
|
||||
if (BUILD_SHARED_LIBS AND MSVC)
|
||||
set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
|
||||
endif()
|
||||
|
@ -12,7 +71,7 @@ add_library(expat
|
|||
xmltok.c
|
||||
)
|
||||
|
||||
target_include_directories(expat PRIVATE ${PROJECT_SOURCE_DIR})
|
||||
target_include_directories(expat PRIVATE ${PROJECT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR})
|
||||
|
||||
include(GNUInstallDirs)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue