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

Allow specifying the Boost version to use for the host binaries #9

Open
janoc opened this issue Jun 5, 2015 · 4 comments
Open

Allow specifying the Boost version to use for the host binaries #9

janoc opened this issue Jun 5, 2015 · 4 comments

Comments

@janoc
Copy link

janoc commented Jun 5, 2015

Right now the Boost is autodetected by the host subprojects (osvr_json_to_c). Unfortunately, if that version is not suitable (e.g. built for different compiler version, lacking static/dynamic libraries, etc), it is difficult to point CMake to the correct version, because the usual BOOST_ROOT environment variable is not taken into account and the top level defines -DBOOST_ROOT and -DBOOST_LIBRARYDIR are not passed to the subproject.

An acceptable solution for this corner case would be documenting that it is possible to edit the CMakeLists.txt file for the osvr_json_to_c project and put the following before the find_package(Boost ...) statement

set(BOOST_ROOT "path to Boost")
set(BOOST_LIBRARYDIR "path to the libraries")

It is a kludge, but it will save a lot of headscratching for people having multiple versions of Boost installed.

@rpavlik
Copy link
Member

rpavlik commented Jul 7, 2015

Would it make sense to pass any BOOST_ROOT and BOOST_LIBRARYDIR defined for the superproject to the host-platform projects?

@janoc
Copy link
Author

janoc commented Jul 7, 2015

I think there needs to be two sets of those variables - one for host projects and one for Android as they will likely use different Boost versions installed in different places.

@aalmada
Copy link

aalmada commented Apr 11, 2016

I'm struggling to build this project on Visual Studio 2015 because of these variables. What Boost version am I suposed to have on my Windows machine? Should I use BOOST_ROOT or BOOST_LIBRARYDIR? I asked for help on Gitter but didn't get much attention there.

@janoc
Copy link
Author

janoc commented Apr 13, 2016

@aalmada Careful, this is an Android build. You need to have Crystax NDK which includes Android version of Boost, the variables are not taken into account there. You haven't said which part of your build failed, so I am only guessing you mean the Windows part.

The variables described above are used to build the host-only tools like the json descriptor pre-compiler. BOOST_ROOT specifies where did you install Boost and BOOST_LIBRARYDIR specifies where are the Boost libraries - that is usually a different folder if you are using a precompiled Boost in Windows. So yes, you should most likely set both.

BTW, Visual Studio 2015 will not compile OSVR yet, there are some template issues, so don't be surprised if things fail.

And finally, this is not really a support forum, but a bug tracker - please use the Gitter chat for support questions, otherwise it makes hard to keep track of genuine bugs.

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

No branches or pull requests

3 participants