You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Get rid of the singular (*_INCLUDE_DIR and *_LIBRARY) variables and
standardize on the plural ones, since that's also what's used by
CMake's FindICU module (which was added in 3.7).
- Use PKG_CONFIG_FOUND instead of PKGCONFIG_FOUND, since that's what's
documented in CMake's FindPkgConfig module. (The latter will be set by
the find_package call, so it's not incorrect, but it's clearer to use
the documented variable.)
- Search for the headers and libraries even if pkg-config can't find the
module, since e.g. we might have ICU somewhere in our CMake search
path but might not have the pkg-config module for it. We're only using
the pkg-config results as search hints anyway. (This might result in
an empty HINTS argument to find_path and find_library, but CMake seems
to handle that fine.) *This should be the only functional change.*
- Remove ICU_${MODULE}_DEFINITIONS, since it's never used anywhere.
- Don't add the *_INCLUDEDIR and *_LIBDIR variables to the hints, since
they should be the same as the corresponding *_INCLUDE_DIRS and
*_LIBRARY_DIRS variables (since we're only searching for a single
module).
The only intended functional change, as mentioned above, is that we can
now successfully find ICU if its include and library directories are in
the CMake search path but its pkg-config module isn't, which might be
the case in certain cross-compilation or hermetic build scenarios. (It's
compounded by CMake only looking for pkg-config modules in
CMAKE_PREFIX_PATH and not CMAKE_SYSTEM_PREFIX_PATH, which I asked about
in https://cmake.org/pipermail/cmake/2018-August/068109.html).
0 commit comments