-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
The sln file generated by cmake should be called "glog.sln" instead of "google-glog.sln" #149
Comments
You're mixing up two things. The project name and the install location. You want to default the install location on Windows to And what exactly fails in your case? |
Yes I understand I can change It fails when I am configuring Ceres with cmake. The FindGlog.cmake in Ceres is expecting glog to be installed in C:\Program Files (x86)\glog instead of C:\Program Files (x86)\google-glog. Also I am making the assumption that the sln name and the install folder will be the same by default, other libraries like Eigen, Gflags all behaved this way. |
Since you run CMake anyway, you can automate the process by setting
|
This workaround is acceptable but still slightly inconvenient. Just wondering, what is the main reason that it's not desired to change from google-glog to glog? I filed an issue on Ceres and hopefully they will change if glog is not willing to change. There has to be consistency between Ceres and glog since both are all from Google. |
There are no critical reasons besides that this would require to change project's name making it inconsistent with the already provided Visual Studio solution. However, in general I agree that the install location should default to |
Thanks. I look forward to the update of changing the default install location to |
Ceres was able to accommodate and add in another search option for |
Hi, as one of the Ceres' maintainers I thought I would add my 2c here. In general, CMake best-practice is that the project() name should really match the installed name for precisely this reason, so I think the correct solution is to change project(google-glog) to project(glog). An interim solution for clients is to use the NAMES option to find_package() as follows:
this forces find_package() to repeat the search of all prefixes using the names 'google-glog' and 'glog' when expanding each prefix. Unfortunately both must be specified, as 'google-glog' is required for Windows (by default) and 'glog' is required for all other OSs. I've pushed a CL for Ceres which does exactly this, once we have confirmation from @jasjuang that it works on Windows (as none of the Ceres maintainers use Windows) we will merge it. |
- glog has a bug in its CMakeLists.txt whereby it uses ‘google-glog’ as its project() name in its CMakeLists.txt, but exports itself as ‘glog’ which results in an install prefix on Windows which contains ‘google-glog’ instead of ‘glog’ which breaks find_package(glog). This has been raised as a glog issue here: google/glog#149. - We now force find_package(glog) to search glog using both ‘google-glog’ (for Windows) & ‘glog’ (for all other OSs). Change-Id: I6c0edccdec405200eaa0fea1476b574e73bd3f14
Fixed in #152. |
I am on windows 10 with visual studio 2015. When I go through the standard procedure of
It generates a solution file called google-glog.sln. The problem is when I build the entire solution and build the INSTALL project, glog got installed to C:\Program Files (x86)\google-glog
but
in other google created repository Ceres it is expecting glog to be installed in C:\Program Files (x86)\glog, thus causing it to fail. Can someone change the default name of the sln to glog.sln?
The text was updated successfully, but these errors were encountered: