summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Salisbury <mark.salisbury@hp.com>2017-10-26 15:46:06 (GMT)
committerBrad King <brad.king@kitware.com>2017-10-27 14:52:14 (GMT)
commit3d42c3eda2ed65e1b510d76f28330b42263edffa (patch)
treeaea1a72614f1d2fb4d0ea63ca4315f51f1f1b8a8
parent8b100985984e81a5636494bad0faa9630450ac73 (diff)
downloadCMake-3d42c3eda2ed65e1b510d76f28330b42263edffa.zip
CMake-3d42c3eda2ed65e1b510d76f28330b42263edffa.tar.gz
CMake-3d42c3eda2ed65e1b510d76f28330b42263edffa.tar.bz2
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`.
-rw-r--r--Modules/FindFreetype.cmake3
1 files changed, 3 insertions, 0 deletions
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)