iOS framework headers doesn't preserve folder hierarchy
If I have a include header hierarchy as follows:
.
└── mylib
├── header.h - My libs header
├── header2.h
└── service
└── header.h - A header with same name as in folder above
and use:
SET(MY_HEADERS
mylib/header.h
mylib/header2.h
mylib/service/header.h
)
SET_TARGET_PROPERTIES(mylibtarget
PROPERTIES
FRAMEWORK TRUE
MACOSX_RPATH ON
...
PUBLIC_HEADER "${MY_HEADERS}"
...
)
I end up with a framework that has following structure:
.
└── mylib.framework
├── Headers
│ ├── header.h
│ └── header2.h
├── Info.plist
└── mylib
i.e. the root include hierarchy has been flattened, and not only that, the header.h in the framework is the "last" header.h in the include, the one in the service subfolder !! What I of course really should have is:
.
└── mylib.framework
├── Headers
│ ├── header.h
│ ├── header2.h
│ └── service
│ └── header.h
├── Info.plist
└── mylib
This is with cmake 3.7.1 on Mac OS X 10.11.6 and Xcode 8.2.1.