Skip to content

Commit

Permalink
fix: Added Obj-C support check in generated bundle header files (#999)
Browse files Browse the repository at this point in the history
This commit adds check for presence of ObjC support in currently used
compiler. If not, skips SWIFTPM_MODULE_BUNDLE macros altogether.

fixes #998

Co-authored-by: Krypt <me@mail>
Co-authored-by: Chuck Grindel <[email protected]>
  • Loading branch information
3 people committed Apr 8, 2024
1 parent 69daf5f commit 1029c2d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions swiftpkg/internal/ObjcResourceBundleAccessor.h.tmpl
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#ifdef __OBJC__
#import <Foundation/Foundation.h>

#if __cplusplus
Expand All @@ -11,3 +12,4 @@ NSBundle* {MODULE_NAME}_SWIFTPM_MODULE_BUNDLE(void);
#if __cplusplus
}
#endif
#endif

0 comments on commit 1029c2d

Please sign in to comment.