-
Notifications
You must be signed in to change notification settings - Fork 8
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
Finding Boost libraries when building #4
Comments
Yeah... finding boost on Windows is always a pain in the neck. My cmake code for dealing with custom boost directories dates back quite a while, it's very possible that it doesn't work any more. These days, you only encounter Windows programmers once in a blue moon, so it hasn't been a priority, and Windows programmers are used to having to manually tweak everything to make things work. The CMake code that takes care of this is found in the BoilerplateMacros.cmake module file, and it reads as follows:
You could just remove the if-statement and replace the three set-commands with hard-coded paths to your particular distribution and build of boost. But I would highly appreciate it if you could suggest (or make a pull request) a replacement for this bit of code that would work with current boost Windows distributions. I just don't have access to a Windows computer to test it out myself, so I'd appreciate it if you could work that out. |
In Windows if the CUSTOM_BOOST_PATH is a top-level Boost installation, then the include directory is CUSTOM_BOOST_PATH/boost and the library directory is CUSTOM_BOOST_PATH/libs. This is true for every Windows Boost distribution. I do not know CMake well enough to know how it distinguishes between Windows and any other OS, which I would have to know to change the code above. If you make the change based on the information above, since I suspect you know CMake much better than I do, and put it on some git branch of templight-tools, I will be glad to test it for you under Windows. Otherwise I will search how to ask CMake if it is executing under Windows or not, fork your code, and create a pull request once my testing is complete. |
Three active users here, two using Windows 😄
http://www.cmake.org/cmake/help/v3.2/variable/CMAKE_HOST_WIN32.html |
The entire CUSTOM_BOOST_PATH will not work at all. This is because you need Boost_LIBRARIES to also be set in your logic. I manage to get templight_convert.exe built by setting BOOST_ROOT and BOOST_LIBRARYDIR correctly to a Boost 1.49 distribution where I had built the needed libs. BTW your build fails on the latest versions of Boost. |
It has been some time since I used Boost with CMake under Windows but it worked right out of the box for me back then. Reading through BoilerplateMacros.cmake I noticed some things that might relate to this issue:
|
See details in Pull Request #8 to compile. |
Attempting to configure cmake for building the tools it cannot find my Boost libraries. Your doc mentions that the Boost headers are off of the main Boost directory as 'include/boost/' but that has never been the case in Boost distributions on Windows. There the Boost headers are in the 'boost' subdirectory and the Boost libraries are in the 'lib' subdirectory. If I have a Boost directory at 'C:\Utilities\Boost\boost_1_57_0' what do I specify to get the tools built in cmake ?
The text was updated successfully, but these errors were encountered: