diff --git a/Package.swift b/Package.swift index 0446a73a..4d1a6bec 100644 --- a/Package.swift +++ b/Package.swift @@ -27,20 +27,20 @@ let package = Package( .target( name: "YogaKit", dependencies: ["Yoga"], - path: ".", - exclude: ["YogaKit/Source/YGLayoutExtensions.swift"], - sources: ["YogaKit/Source"], - publicHeadersPath: "YogaKit/Source", + path: "YogaKit", + exclude: ["Source/YGLayoutExtensions.swift"], + sources: ["Source"], + publicHeadersPath: "Source/modulemap", cSettings: [ - .headerSearchPath(".") + .headerSearchPath("..") ]), .target( name: "Yoga", - path: ".", - sources: ["yoga"], - publicHeadersPath: "yoga/include", + path: "yoga", + sources: ["."], + publicHeadersPath: "modulemap", cSettings: [ - .headerSearchPath(".") + .headerSearchPath("..") ]) ], cLanguageStandard: .gnu11, diff --git a/YogaKit/Source/UIView+Yoga.h b/YogaKit/Source/UIView+Yoga.h index d115baf8..b3c2c2f9 100644 --- a/YogaKit/Source/UIView+Yoga.h +++ b/YogaKit/Source/UIView+Yoga.h @@ -14,7 +14,7 @@ #import #endif -#import "YGLayout.h" +#import "YogaKit.h" NS_ASSUME_NONNULL_BEGIN diff --git a/YogaKit/Source/YGLayout+Private.h b/YogaKit/Source/YGLayout+Private.h index 0588d950..a511149d 100644 --- a/YogaKit/Source/YGLayout+Private.h +++ b/YogaKit/Source/YGLayout+Private.h @@ -5,8 +5,8 @@ * LICENSE file in the root directory of this source tree. */ -#import -#import "YGLayout.h" +#import "../../yoga/Yoga.h" +#import "YogaKit.h" @interface YGLayout () diff --git a/YogaKit/Source/YGLayout.h b/YogaKit/Source/YogaKit.h similarity index 98% rename from YogaKit/Source/YGLayout.h rename to YogaKit/Source/YogaKit.h index 55f00836..5e4f3631 100644 --- a/YogaKit/Source/YGLayout.h +++ b/YogaKit/Source/YogaKit.h @@ -13,9 +13,9 @@ #import #endif -#import -#import -#import +#import "../../yoga/YGEnums.h" +#import "../../yoga/YGMacros.h" +#import "../../yoga/Yoga.h" YG_EXTERN_C_BEGIN diff --git a/YogaKit/Source/YGLayout.m b/YogaKit/Source/YogaKit.m similarity index 100% rename from YogaKit/Source/YGLayout.m rename to YogaKit/Source/YogaKit.m diff --git a/YogaKit/Source/modulemap/YogaKit-umbrella.h b/YogaKit/Source/modulemap/YogaKit-umbrella.h new file mode 100644 index 00000000..eab3f408 --- /dev/null +++ b/YogaKit/Source/modulemap/YogaKit-umbrella.h @@ -0,0 +1,2 @@ +#import "../YogaKit.h" +#import "../UIView+Yoga.h" diff --git a/YogaKit/Source/modulemap/module.modulemap b/YogaKit/Source/modulemap/module.modulemap new file mode 100644 index 00000000..c956df7d --- /dev/null +++ b/YogaKit/Source/modulemap/module.modulemap @@ -0,0 +1,4 @@ +module YogaKit { + umbrella header "YogaKit-umbrella.h" + export * +} diff --git a/yoga/modulemap/Yoga-umbrella.h b/yoga/modulemap/Yoga-umbrella.h new file mode 100644 index 00000000..2c8877ac --- /dev/null +++ b/yoga/modulemap/Yoga-umbrella.h @@ -0,0 +1,8 @@ +#ifdef __OBJC__ +#import +#endif + +#import "../YGEnums.h" +#import "../YGMacros.h" +#import "../YGValue.h" +#import "../Yoga.h" diff --git a/yoga/modulemap/module.modulemap b/yoga/modulemap/module.modulemap new file mode 100644 index 00000000..89ae11c1 --- /dev/null +++ b/yoga/modulemap/module.modulemap @@ -0,0 +1,4 @@ +module Yoga [extern_c] { + umbrella header "Yoga-umbrella.h" + export * +}