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`.
This commit is contained in:
Mark Salisbury
2017-10-26 09:46:06 -06:00
committed by Brad King
parent 8b10098598
commit 3d42c3eda2
+3
View File
@@ -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)