diff options
author | Mark Salisbury <mark.salisbury@hp.com> | 2017-11-01 17:21:18 -0600 |
---|---|---|
committer | Mark Salisbury <mark.salisbury@hp.com> | 2017-11-01 17:21:18 -0600 |
commit | f61052ad390773610e14367c14fb53ad2e6b789e (patch) | |
tree | 170fd8d9f1f2d5c2d18d5cc23b9aff1231dfb794 | |
parent | 9d742defd925e63eefe37e22f61c22bdec49c044 (diff) | |
download | cmake-f61052ad390773610e14367c14fb53ad2e6b789e.tar.gz |
FindBZip2: Normalize slashes when legacy BZIP2_LIBRARIES is specified
On Windows if you specify the library path using a regular Windows
path with backslashes, FindBZip2 announces that it found the library,
but the value is reported with backslashes instead of forward slashes.
This breaks assumptions elsewhere in CMake. Convert slashes explicitly.
-rw-r--r-- | Modules/FindBZip2.cmake | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Modules/FindBZip2.cmake b/Modules/FindBZip2.cmake index d2307f131c..0375b099a5 100644 --- a/Modules/FindBZip2.cmake +++ b/Modules/FindBZip2.cmake @@ -38,6 +38,8 @@ if (NOT BZIP2_LIBRARIES) include(${CMAKE_CURRENT_LIST_DIR}/SelectLibraryConfigurations.cmake) SELECT_LIBRARY_CONFIGURATIONS(BZIP2) +else () + file(TO_CMAKE_PATH "${BZIP2_LIBRARIES}" BZIP2_LIBRARIES) endif () if (BZIP2_INCLUDE_DIR AND EXISTS "${BZIP2_INCLUDE_DIR}/bzlib.h") |