mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2025-01-30 23:00:59 +00:00
Revert "Remove zlib"
This reverts commit d874a1fd14
.
Conflicts:
* CMakeLists.txt:
* ENABLE_ZLIB_SUPPORT: there has been a change immediately after
where it was removed. Just re-add what was removed.
* tests/CMakeLists.txt:
* ENABLE_ZLIB_SUPPORT: there has been a change immediately after
where it was removed. Just re-add what was removed.
This commit is contained in:
parent
70824f2c9e
commit
5bb8bec1de
|
@ -8,6 +8,8 @@ endif()
|
||||||
# Set the project root directory.
|
# Set the project root directory.
|
||||||
set(MBEDTLS_DIR ${CMAKE_CURRENT_SOURCE_DIR})
|
set(MBEDTLS_DIR ${CMAKE_CURRENT_SOURCE_DIR})
|
||||||
|
|
||||||
|
option(ENABLE_ZLIB_SUPPORT "Build mbed TLS with zlib library." OFF)
|
||||||
|
|
||||||
option(ENABLE_PROGRAMS "Build mbed TLS programs." ON)
|
option(ENABLE_PROGRAMS "Build mbed TLS programs." ON)
|
||||||
|
|
||||||
option(UNSAFE_BUILD "Allow unsafe builds. These builds ARE NOT SECURE." OFF)
|
option(UNSAFE_BUILD "Allow unsafe builds. These builds ARE NOT SECURE." OFF)
|
||||||
|
@ -179,6 +181,14 @@ endif()
|
||||||
include_directories(include/)
|
include_directories(include/)
|
||||||
include_directories(library/)
|
include_directories(library/)
|
||||||
|
|
||||||
|
if(ENABLE_ZLIB_SUPPORT)
|
||||||
|
find_package(ZLIB)
|
||||||
|
|
||||||
|
if(ZLIB_FOUND)
|
||||||
|
include_directories(${ZLIB_INCLUDE_DIR})
|
||||||
|
endif(ZLIB_FOUND)
|
||||||
|
endif(ENABLE_ZLIB_SUPPORT)
|
||||||
|
|
||||||
add_subdirectory(include)
|
add_subdirectory(include)
|
||||||
|
|
||||||
add_subdirectory(3rdparty)
|
add_subdirectory(3rdparty)
|
||||||
|
|
|
@ -148,6 +148,10 @@ if(HAIKU)
|
||||||
set(libs ${libs} network)
|
set(libs ${libs} network)
|
||||||
endif(HAIKU)
|
endif(HAIKU)
|
||||||
|
|
||||||
|
if(ENABLE_ZLIB_SUPPORT)
|
||||||
|
set(libs ${libs} ${ZLIB_LIBRARIES})
|
||||||
|
endif(ENABLE_ZLIB_SUPPORT)
|
||||||
|
|
||||||
if(LINK_WITH_PTHREAD)
|
if(LINK_WITH_PTHREAD)
|
||||||
set(libs ${libs} pthread)
|
set(libs ${libs} pthread)
|
||||||
endif()
|
endif()
|
||||||
|
|
|
@ -44,6 +44,11 @@ EXEXT=
|
||||||
SHARED_SUFFIX=
|
SHARED_SUFFIX=
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
# Zlib shared library extensions:
|
||||||
|
ifdef ZLIB
|
||||||
|
LOCAL_LDFLAGS += -lz
|
||||||
|
endif
|
||||||
|
|
||||||
APPS = \
|
APPS = \
|
||||||
aes/aescrypt2$(EXEXT) \
|
aes/aescrypt2$(EXEXT) \
|
||||||
aes/crypt_and_hash$(EXEXT) \
|
aes/crypt_and_hash$(EXEXT) \
|
||||||
|
|
|
@ -2,6 +2,10 @@ set(libs
|
||||||
mbedtls
|
mbedtls
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if(ENABLE_ZLIB_SUPPORT)
|
||||||
|
set(libs ${libs} ${ZLIB_LIBRARIES})
|
||||||
|
endif(ENABLE_ZLIB_SUPPORT)
|
||||||
|
|
||||||
add_executable(selftest selftest.c)
|
add_executable(selftest selftest.c)
|
||||||
target_link_libraries(selftest ${libs})
|
target_link_libraries(selftest ${libs})
|
||||||
|
|
||||||
|
|
|
@ -9,6 +9,10 @@ if(NOT DEFINED MBEDTLS_DIR)
|
||||||
set(MBEDTLS_DIR ${CMAKE_SOURCE_DIR})
|
set(MBEDTLS_DIR ${CMAKE_SOURCE_DIR})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if(ENABLE_ZLIB_SUPPORT)
|
||||||
|
set(libs ${libs} ${ZLIB_LIBRARIES})
|
||||||
|
endif(ENABLE_ZLIB_SUPPORT)
|
||||||
|
|
||||||
find_package(PythonInterp)
|
find_package(PythonInterp)
|
||||||
if(NOT PYTHONINTERP_FOUND)
|
if(NOT PYTHONINTERP_FOUND)
|
||||||
message(FATAL_ERROR "Cannot build test suites without Python 2 or 3")
|
message(FATAL_ERROR "Cannot build test suites without Python 2 or 3")
|
||||||
|
|
|
@ -55,6 +55,11 @@ SHARED_SUFFIX=
|
||||||
PYTHON ?= python2
|
PYTHON ?= python2
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
# Zlib shared library extensions:
|
||||||
|
ifdef ZLIB
|
||||||
|
LOCAL_LDFLAGS += -lz
|
||||||
|
endif
|
||||||
|
|
||||||
# A test application is built for each suites/test_suite_*.data file.
|
# A test application is built for each suites/test_suite_*.data file.
|
||||||
# Application name is same as .data file's base name and can be
|
# Application name is same as .data file's base name and can be
|
||||||
# constructed by stripping path 'suites/' and extension .data.
|
# constructed by stripping path 'suites/' and extension .data.
|
||||||
|
|
Loading…
Reference in a new issue