-
-
Notifications
You must be signed in to change notification settings - Fork 6.7k
cmake: rename LDAP dependency config variables to match Find modules #15255
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
Conversation
cmake: rename variables to resemble Find modules more strip prefix from LDAP, LBER customization vars
Consider an update of the Release Notes: This change didn't enable manual configuration, but it changed the name of the configuration variables. Noticed in preparing the update of the vcpkg port which made use of the old variables. if(NOT DEFINED LDAP_LIBRARY)
set(LDAP_LIBRARY "ldap" CACHE STRING "Name or full path to ldap library")
endif() don't provide added value unless you want to ensure plain CMake variables precedence over cache variables. FTR vcpkg had if(NOT CURL_DISABLE_LDAP AND NOT WIN32)
find_package(PkgConfig REQUIRED)
pkg_check_modules(LDAP REQUIRED ldap)
set(HAVE_LIBLDAP 1)
set(CMAKE_LDAP_INCLUDE_DIR "${LDAP_INCLUDE_DIRS}")
set(CMAKE_LDAP_LIB "${LDAP_LINK_LIBRARIES}" CACHE STRING "")
pkg_check_modules(LBER REQUIRED lber)
set(HAVE_LIBLBER 1)
set(CMAKE_LBER_LIB "${LBER_LINK_LIBRARIES}" CACHE STRING "")
endif() not as a patch but as |
Reported-by: Kai Pastor Bug: #15255 (comment) Follow-up to 2c90f7f #15255
Thanks. That's unexpected. A Set(VAR "") does not actually set VAR to "". I'd not have renamed knowing that, but a planned PR to convert to a Find Updated this PR's message/title and the entry in RELEASE-NOTES. I hope |
It is important to realize the difference between cache variables (global, cached, input) and normal variables (scoped), and what takes precedence. A An That's why Lines 2087 to 2090 in 380790b
|
LGTM. |
Also add cleanup `unset()`s where missing. Reported-by: Kai Pastor Bug: #15255 (comment) Follow-up to 8b09138 #14610 Closes #15497
Via these configuration values: - `LDAP_LIBRARY` - `LDAP_LBER_LIBRARY` - `LDAP_INCLUDE_DIR` Following the naming scheme used in `Find` modules. Cherry-picked from curl#15157 Closes curl#15255
Reported-by: Kai Pastor Bug: curl#15255 (comment) Follow-up to 2c90f7f curl#15255
Also add cleanup `unset()`s where missing. Reported-by: Kai Pastor Bug: curl#15255 (comment) Follow-up to 8b09138 curl#14610 Closes curl#15497
CMAKE_LDAP_LIB
→LDAP_LIBRARY
CMAKE_LBER_LIB
→LDAP_LBER_LIBRARY
CMAKE_LDAP_INCLUDE_DIR
→LDAP_INCLUDE_DIR
This entry was previously titled:
cmake: allow manual configuration for LDAP
It also intended to allow manual override for these variables, but
it turns out this was already possible without this change. This
leaves the renames as the notable updates.
Cherry-picked from #15157