mirror of
https://github.com/darlinghq/darling.git
synced 2024-11-26 22:00:29 +00:00
commit
f46eb721c1
@ -28,8 +28,10 @@ macro(generate_architecture)
|
||||
|
||||
if (BUILD_TARGET_64BIT)
|
||||
set(APPLE_TARGET_TRIPLET_PRIMARY ${APPLE_TARGET_TRIPLET_64BIT})
|
||||
set(APPLE_ARCH_PRIMARY ${APPLE_ARCH_64BIT})
|
||||
elseif (BUILD_TARGET_32BIT)
|
||||
set(APPLE_TARGET_TRIPLET_PRIMARY ${APPLE_TARGET_TRIPLET_32BIT})
|
||||
set(APPLE_ARCH_PRIMARY ${APPLE_ARCH_32BIT})
|
||||
else ()
|
||||
set(APPLE_TARGET_TRIPLET_PRIMARY "")
|
||||
endif ()
|
||||
|
@ -38,12 +38,15 @@ function(mig defFileName)
|
||||
if (NOT MIG_MULTIARCH)
|
||||
set(MIG_MULTIARCH_NO_SUFFIX 1)
|
||||
if (NOT MIG_ARCH)
|
||||
set(MIG_MULTIARCH "i386")
|
||||
set(MIG_MULTIARCH "${APPLE_ARCH_PRIMARY}")
|
||||
else()
|
||||
set(MIG_MULTIARCH "${MIG_ARCH}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# TODO: Add support for multi-triplet targets
|
||||
set(MIG_TARGET_TRIPLET_PRIMARY "${APPLE_TARGET_TRIPLET_PRIMARY}")
|
||||
|
||||
foreach(MIG_ARCH ${MIG_MULTIARCH})
|
||||
if (MIG_MULTIARCH_NO_SUFFIX)
|
||||
set(MIG_ARCH_SUFFIX "")
|
||||
@ -61,7 +64,7 @@ function(mig defFileName)
|
||||
/bin/mkdir -p ${CMAKE_CURRENT_BINARY_DIR}/${dirName} \;
|
||||
${MIG_EXECUTABLE}
|
||||
-arch ${MIG_ARCH}
|
||||
-target ${MIG_ARCH}
|
||||
-target ${MIG_TARGET_TRIPLET_PRIMARY}
|
||||
-user ${CMAKE_CURRENT_BINARY_DIR}/${relativeName}${MIG_ARCH_SUFFIX}${MIG_USER_SOURCE_SUFFIX}
|
||||
-header ${CMAKE_CURRENT_BINARY_DIR}/${relativeName}${MIG_ARCH_SUFFIX}${MIG_USER_HEADER_SUFFIX}
|
||||
-server ${CMAKE_CURRENT_BINARY_DIR}/${relativeName}${MIG_ARCH_SUFFIX}${MIG_SERVER_SOURCE_SUFFIX}
|
||||
|
Loading…
Reference in New Issue
Block a user