mirror of
https://github.com/jmcnamara/libxlsxwriter.git
synced 2026-05-15 06:06:09 -06:00
Fix including xlsxwriter as a CocoaPod on macOS.
Explanation for this change: Previously, CocoaPods would set up the framework target such that `xlsxwriter.h` would appear in the framework's main directory, alongside the `xlsxwriter` binary. It appears that the `codesign` utility only expects binaries in that directory, though, with all headers being in the `Headers` subdirectory (otherwise it fails with an `xlsxwriter.h: code object is not signed at all` message). This change modifies the header_mappings_dir to ensure that `xlsxwriter.h` is in `Headers`, with all other headers in `Headers/xlsxwriter`, and adjusts the paths in the module map accordingly. In addition, the umbrella header is modified to include Foundation rather than UIKit, as the former is sufficient to compile the module while the latter is not available on macOS.
This commit is contained in:
parent
11a89ec05a
commit
f678acce98
3 changed files with 4 additions and 4 deletions
|
|
@ -1,4 +1,4 @@
|
|||
#import <UIKit/UIKit.h>
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
#import "../xlsxwriter.h"
|
||||
#import "app.h"
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
framework module xlsxwriter {
|
||||
umbrella header "libxlsxwriter-umbrella.h"
|
||||
header "../xlsxwriter.h"
|
||||
umbrella header "xlsxwriter/libxlsxwriter-umbrella.h"
|
||||
header "xlsxwriter.h"
|
||||
|
||||
export *
|
||||
module * { export * }
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ Pod::Spec.new do |s|
|
|||
s.source_files = "src/**/*.c", "third_party/**/{zip.c,ioapi.c,tmpfileplus.c}", "include/**/*.h"
|
||||
|
||||
s.header_dir = "xlsxwriter"
|
||||
s.header_mappings_dir = "include/xlsxwriter"
|
||||
s.header_mappings_dir = "include"
|
||||
s.library = "z"
|
||||
s.compiler_flags = "-DNOCRYPT=1", "-DNOUNCRYPT=1"
|
||||
s.pod_target_xcconfig = { 'USER_HEADER_SEARCH_PATHS' => '${PODS_ROOT}/libxlsxwriter/include' }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue