From 880f3c59f5d61456f592ef7276ea595ade49df34 Mon Sep 17 00:00:00 2001 From: Byeong Gwan Date: Mon, 17 Nov 2025 23:01:21 +0900 Subject: [PATCH] [ios] backport from 4.3-beta: expose explict module for c & cpp (#2975) * [ios] backport from 4.3-beta: expose explict module for c & cpp - standard user can import spine-c based api as usual - dedicated swift/cpp user can import cpp interface with explict import and enabling cpp interp - objective-c user can import cpp using objective-c++ * [ios] expose `SpineCppLite` so that the library user can build there own runtime based on swift package => macOS, spriteKit texture --- Package.swift | 4 ++++ .../Sources/SpineCppLite/include/module.modulemap | 13 +++++++++++-- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/Package.swift b/Package.swift index 5b2d78785..201d35c0e 100644 --- a/Package.swift +++ b/Package.swift @@ -18,6 +18,10 @@ let package = Package( .library( name: "Spine", targets: ["SpineModule"] + ), + .library( + name: "SpineCppLite", + targets: ["SpineCppLite"] ) ], targets: [ diff --git a/spine-ios/Sources/SpineCppLite/include/module.modulemap b/spine-ios/Sources/SpineCppLite/include/module.modulemap index c79fa7471..17f1dd153 100644 --- a/spine-ios/Sources/SpineCppLite/include/module.modulemap +++ b/spine-ios/Sources/SpineCppLite/include/module.modulemap @@ -1,4 +1,13 @@ module SpineCppLite { - header "spine-cpp-lite.h" - export * + use c + export c + explicit module cpp { + umbrella header "spine/spine.h" + requires cplusplus11 + export * + } + explicit module c { + header "spine-cpp-lite.h" + export * + } }