summaryrefslogtreecommitdiffstats
path: root/Modules/FindBZip2.cmake
diff options
context:
space:
mode:
authorMark Salisbury <mark.salisbury@hp.com>2017-11-01 23:21:18 (GMT)
committerMark Salisbury <mark.salisbury@hp.com>2017-11-01 23:21:18 (GMT)
commitf61052ad390773610e14367c14fb53ad2e6b789e (patch)
tree170fd8d9f1f2d5c2d18d5cc23b9aff1231dfb794 /Modules/FindBZip2.cmake
parent9d742defd925e63eefe37e22f61c22bdec49c044 (diff)
downloadCMake-f61052ad390773610e14367c14fb53ad2e6b789e.zip
CMake-f61052ad390773610e14367c14fb53ad2e6b789e.tar.gz
CMake-f61052ad390773610e14367c14fb53ad2e6b789e.tar.bz2
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.
Diffstat (limited to 'Modules/FindBZip2.cmake')
-rw-r--r--Modules/FindBZip2.cmake2
1 files changed, 2 insertions, 0 deletions
diff --git a/Modules/FindBZip2.cmake b/Modules/FindBZip2.cmake
index d2307f1..0375b09 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")