-
Notifications
You must be signed in to change notification settings - Fork 191
Setting public headers for Xcode framework target #66
Comments
Try to install headers to Just for your information there are few fixes in latest CMake version that allow creating frameworks without hacks/workarounds (just using CMake). I haven't tried it yet, but if it works okay |
Still using make 3.3 cmake_minimum_required(VERSION 3.3) I added the FRAMEWORK property
Then I built using the following command
This created a Framework with 'public.h' in the Headers folder located at:
But this only appears to be a MAC OS X framework not a fat Framework, I ran the file command:
result was:
I also tried --toolchain ios-9-2 but the framework still appears to be created only for x86_64 |
This is by design. Fat library created only for iOS.
I will test latest CMake version with few improvements, may be will create an example. |
Okay, I think I know what is the problem here.
Which can be fixed by next CMake code:
Are you sure you're using patched CMake version? |
Example with framework and native Xcode project updated: |
Great! I have successfully built and linked the ios-dynamic-framework project. I did have to use patched CMake version, I tried with the latest 3.5.0-rc2 CMake but that failed to build the Fat framework bundle. I'm going to try and replicate the project setup to my own library repo. |
With CMake 3.5+ you have to use |
I have replicated the demo project setup on my own repo, I did not copy over the custom jenkins.py as I am just trying to build a dynamic library component, I am calling build.py directly with:
The build is successful and the lib binary now reports as a Fat lib and the public header is copied over to the framework/Headers folder. I have noticed that if I build with --config Debug, that 'd' gets appended to the project name for all folders and files and it also causes the public header not to get copied to framework/Headers (unless I install it to an include/'d' folder. Is there a way to prevent the 'd' suffix getting added and maybe create the framework under a debug or release folder depending on the --config value. |
Set it in command line |
Both iOS and OSX framework builds are working, thanks. |
I have built the 02-library example for Xcode with the following command:
build.py --clear --toolchain xcode --framework
This built a Framework, but it does not have any public headers in the framework Headers folder.
I added a public.h file to the example and added the following entry in the CMakeLists.txt
When building the public.h file is copied to '_install/xcode/lib/'
But the build fails with the error:
What is the correct way to configure the public headers for a framework build.
The text was updated successfully, but these errors were encountered: