diff --git a/ios/DModemKit/Package.swift b/ios/DModemKit/Package.swift index 4f46149..54381d7 100644 --- a/ios/DModemKit/Package.swift +++ b/ios/DModemKit/Package.swift @@ -20,11 +20,15 @@ let engineLinking: [LinkerSetting] = [ ]), .linkedLibrary("dmodem_engine"), .linkedLibrary("dmodem_sip"), .linkedLibrary("re"), .linkedLibrary("ssl"), .linkedLibrary("crypto"), .linkedLibrary("stdc++"), .linkedLibrary("dl"), - .linkedLibrary("m"), + .linkedLibrary("m"), .linkedLibrary("resolv"), ] #else let engine: Target = .binaryTarget(name: "DModemEngine", path: "../../build-apple/DModemEngine.xcframework") -let engineLinking: [LinkerSetting] = [.linkedLibrary("c++")] +let engineLinking: [LinkerSetting] = [ + .linkedLibrary("c++"), .linkedLibrary("resolv"), + // libre asks the system for its DNS servers (srv.c, SCDynamicStore) + .linkedFramework("SystemConfiguration"), .linkedFramework("CoreFoundation"), +] #endif let package = Package( diff --git a/ios/DModemSmoke/Package.swift b/ios/DModemSmoke/Package.swift index 9039447..c6934f9 100644 --- a/ios/DModemSmoke/Package.swift +++ b/ios/DModemSmoke/Package.swift @@ -14,7 +14,11 @@ let package = Package( .testTarget( name: "DModemSmokeTests", dependencies: ["DModemEngine"], - linkerSettings: [.linkedLibrary("c++")] + linkerSettings: [ + .linkedLibrary("c++"), .linkedLibrary("resolv"), + // libre asks macOS for its DNS servers (srv.c, SCDynamicStore) + .linkedFramework("SystemConfiguration"), .linkedFramework("CoreFoundation"), + ] ), ] ) diff --git a/ios/build-native.sh b/ios/build-native.sh index 476a62e..3c157fb 100755 --- a/ios/build-native.sh +++ b/ios/build-native.sh @@ -32,7 +32,10 @@ build() { -DCMAKE_OSX_DEPLOYMENT_TARGET="$min" \ -DDMODEM_CRYPTO=mbedtls if [ "$system" = iOS ]; then - set -- "$@" -DCMAKE_SYSTEM_NAME=iOS + # (no app bundles: D-Modem-RE's dmodemd, which is never built + # here, is an executable that CMake would make a bundle on iOS, + # and its install rule has no BUNDLE DESTINATION for one) + set -- "$@" -DCMAKE_SYSTEM_NAME=iOS -DCMAKE_MACOSX_BUNDLE=OFF fi cmake "$@" cmake --build "$dir/build" --target dmodem_engine