Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Building framework should have an option to put the header files in Headers/boost #26

Closed
mobileben opened this issue Jun 4, 2018 · 9 comments
Assignees

Comments

@mobileben
Copy link
Contributor

Some libraries such as cpprestsdk expect boost to have "boost" in the path. For example: "boost/align.hpp".

It would be nice to have a switch to be able to build it this way.

Note that I use the static libs. But I'm working on iOS compatibility with cpprestsdk and wanted to test that my changes work with a boost framework.

https://github.com/Microsoft/cpprestsdk/wiki/How-to-build-for-iOS

They actually now recommend your repo (although they didn't provide a link, it's referenced).

@mobileben
Copy link
Contributor Author

I can create pull request for you if you want.

@faithfracture
Copy link
Owner

It's interesting that this is actually a problem. My project expects boost headers to be located in <boost/libname>, but I've never had a problem using the framework as is.

I can totally add an option to do that though. (Depending on how it affects my project, I may just make it the default, since it's more correct anyways.)

@mobileben
Copy link
Contributor Author

Heh totally (meaning you should prioritize your projects). I was thinking you would just add an argument to handle that case.

It doesn't bother me since I use the static libs and modified cpprestsdk to also take the static libs. I was just checking the framework for completeness before doing a pull request on that project.

But since they mentioned your repo, thought I'd give the heads up.

@faithfracture
Copy link
Owner

Oh, they do mention it. That's cool.

My thought was that I'd make this the default and provide a parameter to switch back to the current behavior, so I don't break everyone else's projects. (But again, I'll only do that if it doesn't blow my project up. Selfish, I know :) )

@faithfracture
Copy link
Owner

They're using the old GIST too... I think I'll create an issue with them to use this repo instead, since that one doesn't work with the current version of Xcode (and I don't think it has for a while...)

@mobileben
Copy link
Contributor Author

As a forewarning, they are slow to respond it seems regarding anything iOS. And it isn't clear to me why they didn't even put a link. I actually gave them a link to it here microsoft/cpprestsdk#436

Heh, be selfish ;). That's what forks are for. Anyways thanks, you saved me a ton of time. I'm usually the guy that has to decipher all the autoconf and do the static lib builds. But this was one of the rare times I could actually use something right out of the box. So it has been super helpful.

If you want me to test building and using on one of your branches, just let me know, I'll be happy to donate some CPU cycles.

@aksswami
Copy link

aksswami commented Jun 6, 2018

Just to point out, I also faced the same issue. I am also trying to use cpprestsdk across my desktop and mobile client and initially used their documentation for compiling boost for macOS and iOS, which point to outdated gist.

Anyway thanks for great work @faithfracture, As I am new to C++ and everything, this really helps a lot.

@mobileben I would really like to get in touch with you for this as you are also doing similar stuff. Thanks guys.

@faithfracture
Copy link
Owner

Ok, so it looks like when you include a framework in an Xcode project it assumes that everything in the Headers directory are already under a root directory with the same name of the framework. I.E., if the framework is called boost.framework, it's assumed that everything in the Headers directory will be included as "boost/someheader.hpp". So, I did not make having headers be under a boost parent directory the default. You will instead need to pass the --framework-headers-root flag to the script.

Fixed in commit 9d3b873

mobileben pushed a commit to mobileben/Apple-Boost-BuildScript that referenced this issue Jun 6, 2018
@aksswami
Copy link

aksswami commented Jun 7, 2018

Thanks for quick response and update @faithfracture

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants