mirror of
https://github.com/isar/libmdbx.git
synced 2025-01-30 15:02:05 +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()
|
else()
|
||||||
set(SUBPROJECT OFF)
|
set(SUBPROJECT OFF)
|
||||||
set(NOT_SUBPROJECT ON)
|
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)
|
project(libmdbx C)
|
||||||
if(NOT MDBX_AMALGAMATED_SOURCE AND NOT DEFINED BUILD_TESTING)
|
if(NOT MDBX_AMALGAMATED_SOURCE AND NOT DEFINED BUILD_TESTING)
|
||||||
set(BUILD_TESTING ON)
|
set(BUILD_TESTING ON)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user