mirror of
https://github.com/isar/libmdbx.git
synced 2025-01-29 10:58:22 +08:00
mdbx-cmake: поддержка MacOS universal binaries.
Thank Alain Picard (Castor Technologies) so much for this patch and supporting the Java bindings!
This commit is contained in:
parent
340bd080c9
commit
fc85d1c61f
@ -216,6 +216,20 @@ if(DEFINED PROJECT_NAME AND NOT MDBX_FORCE_BUILD_AS_MAIN_PROJECT)
|
||||
else()
|
||||
set(SUBPROJECT OFF)
|
||||
set(NOT_SUBPROJECT ON)
|
||||
|
||||
# Setup Apple stuff which should be set prior to the first project() or enable_language()
|
||||
if(APPLE)
|
||||
# Enable universal binaries for macOS (target arm64 and x86_64)
|
||||
if(NOT DEFINED CMAKE_OSX_ARCHITECTURES)
|
||||
set(CMAKE_OSX_ARCHITECTURES "arm64;x86_64")
|
||||
endif()
|
||||
|
||||
# Set the minimum macOS deployment target if not already defined
|
||||
if(NOT DEFINED CMAKE_OSX_DEPLOYMENT_TARGET)
|
||||
set(CMAKE_OSX_DEPLOYMENT_TARGET "13.0")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
project(libmdbx C)
|
||||
if(NOT MDBX_AMALGAMATED_SOURCE AND NOT DEFINED BUILD_TESTING)
|
||||
set(BUILD_TESTING ON)
|
||||
|
Loading…
x
Reference in New Issue
Block a user