From f61052ad390773610e14367c14fb53ad2e6b789e Mon Sep 17 00:00:00 2001 From: Mark Salisbury Date: Wed, 1 Nov 2017 17:21:18 -0600 Subject: 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. --- Modules/FindBZip2.cmake | 2 ++ 1 file changed, 2 insertions(+) (limited to 'Modules/FindBZip2.cmake') 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") -- cgit v1.2.1