Build: Add support for Apple frameworks

Signed-off-by: Treata11 <treata11@yahoo.com>
This commit is contained in:
Treata11
2025-01-21 20:58:27 +03:30
parent f7c7553e4f
commit 897cec3876
2 changed files with 53 additions and 3 deletions
+9 -2
View File
@@ -7,7 +7,7 @@
# in the COPYING file in the root directory of this source tree).
# ################################################################
cmake_minimum_required(VERSION 3.10 FATAL_ERROR)
cmake_minimum_required(VERSION 3.14 FATAL_ERROR)
# As of 2018-12-26 ZSTD has been validated to build with cmake version 3.13.2 new policies.
# Set and use the newest cmake policies that are validated to work
@@ -30,8 +30,11 @@ set(LIBRARY_DIR ${ZSTD_SOURCE_DIR}/lib)
include(GetZstdLibraryVersion)
GetZstdLibraryVersion(${LIBRARY_DIR}/zstd.h zstd_VERSION_MAJOR zstd_VERSION_MINOR zstd_VERSION_PATCH)
set(ZSTD_SHORT_VERSION "${zstd_VERSION_MAJOR}.${zstd_VERSION_MINOR}")
set(ZSTD_FULL_VERSION "${zstd_VERSION_MAJOR}.${zstd_VERSION_MINOR}.${zstd_VERSION_PATCH}")
project(zstd
VERSION "${zstd_VERSION_MAJOR}.${zstd_VERSION_MINOR}.${zstd_VERSION_PATCH}"
VERSION "${ZSTD_FULL_VERSION}"
LANGUAGES C # Main library is in C
ASM # And ASM
CXX # Testing contributed code also utilizes CXX
@@ -82,6 +85,10 @@ else ()
add_definitions(-DZSTD_LEGACY_SUPPORT=0)
endif ()
if (APPLE)
option(ZSTD_FRAMEWORK "Build as Apple Frameworks" OFF)
endif ()
if (ANDROID)
set(ZSTD_MULTITHREAD_SUPPORT_DEFAULT OFF)
# Old versions of bionic libc don't have fseeko/ftello