Przeglądaj źródła

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.
Mark Salisbury 8 lat temu
rodzic
commit
f61052ad39
1 zmienionych plików z 2 dodań i 0 usunięć
  1. 2 0
      Modules/FindBZip2.cmake

+ 2 - 0
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")