summaryrefslogtreecommitdiff
path: root/Modules/FindFreetype.cmake
diff options
context:
space:
mode:
authorMark Salisbury <mark.salisbury@hp.com>2017-10-26 09:46:06 -0600
committerBrad King <brad.king@kitware.com>2017-10-27 10:52:14 -0400
commit3d42c3eda2ed65e1b510d76f28330b42263edffa (patch)
treeaea1a72614f1d2fb4d0ea63ca4315f51f1f1b8a8 /Modules/FindFreetype.cmake
parent8b100985984e81a5636494bad0faa9630450ac73 (diff)
downloadcmake-3d42c3eda2ed65e1b510d76f28330b42263edffa.tar.gz
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`.
Diffstat (limited to 'Modules/FindFreetype.cmake')
-rw-r--r--Modules/FindFreetype.cmake3
1 files changed, 3 insertions, 0 deletions
diff --git a/Modules/FindFreetype.cmake b/Modules/FindFreetype.cmake
index 0e6d33645b..2acb4bc2fc 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)