Merge pull request #1513 from darlinghq/mig_fix

Mig Fixes
This commit is contained in:
CuriousTommy 2024-05-11 12:18:04 -07:00 committed by GitHub
commit f46eb721c1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 7 additions and 2 deletions

View File

@ -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 ()

View File

@ -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}