-
Notifications
You must be signed in to change notification settings - Fork 844
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
Add "gflags" import target which copies properties from ${gflags_LIBRARIES} target #110
Comments
schuhschuh
added a commit
that referenced
this issue
Mar 25, 2015
The gflags_TARGET contains the name of the originally exported import target whose properties are copied over to the "gflags" import target.
schuhschuh
added a commit
that referenced
this issue
Mar 25, 2015
The gflags_TARGET variable contains the name of the originally exported import target. The "gflags" import target contains a copy of the relevant properties of this import target created by CMake. The gflags_LIBRARIES variable can be used to be consistent with other packages, but is otherwise no longer needed. In most cases, "target_link_libraries(foo gflags)" should be used.
schuhschuh
added a commit
that referenced
this issue
Mar 25, 2015
schuhschuh
added a commit
that referenced
this issue
Mar 25, 2015
alexsmac
added a commit
to ceres-solver/ceres-solver
that referenced
this issue
Aug 9, 2015
- gflags <= 2.1.2 has a bug in its exported gflags-config.cmake: gflags/gflags#110 whereby it sets gflags_LIBRARIES to a non-existent 'gflags' target. - This causes linker errors if gflags is installed in a non-standard location (as otherwise CMake resolves gflags to -lgflags which links if gflags is installed somewhere on the current path). - We now check for this case, and search for the correct gflags imported target and update gflags_LIBRARIES to reference it if found, otherwise proceed on to the original manual search to try to find gflags. Change-Id: Iceccc3ee53c7c2010e41cc45255f966e7b13d526
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The use of gflags_LIBRARIES is merely a workaround. It would be nicer to have a "gflags" import target for the (requested) default variant of the gflags library (i.e., static vs. shared and threaded vs. serial).
The text was updated successfully, but these errors were encountered: