From 3d42c3eda2ed65e1b510d76f28330b42263edffa Mon Sep 17 00:00:00 2001 From: Mark Salisbury Date: Thu, 26 Oct 2017 09:46:06 -0600 Subject: FindFreetype: Normalize slashes when legacy FREETYPE_LIBRARY is specified On Windows if you specify the library path using a regular Windows path with backslashes, FindFreetype 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 since we have no `find_library` call for `FREETYPE_LIBRARY`. --- Modules/FindFreetype.cmake | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Modules/FindFreetype.cmake b/Modules/FindFreetype.cmake index 0e6d336..2acb4bc 100644 --- a/Modules/FindFreetype.cmake +++ b/Modules/FindFreetype.cmake @@ -115,6 +115,9 @@ if(NOT FREETYPE_LIBRARY) ) include(${CMAKE_CURRENT_LIST_DIR}/SelectLibraryConfigurations.cmake) select_library_configurations(FREETYPE) +else() + # on Windows, ensure paths are in canonical format (forward slahes): + file(TO_CMAKE_PATH "${FREETYPE_LIBRARY}" FREETYPE_LIBRARY) endif() unset(FREETYPE_FIND_ARGS) -- cgit v0.12