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.
This commit is contained in:
Mark Salisbury
2017-11-01 17:21:18 -06:00
parent 9d742defd9
commit f61052ad39
+2
View File
@@ -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")