From 34ce16c2653d02fcef6a297a2a61112dbf693922 Mon Sep 17 00:00:00 2001 From: Kimball Thurston Date: Wed, 6 Nov 2019 23:20:20 +1300 Subject: [PATCH] Fix issue with drive letter under windows The get_filename_component gets stuck under windows when finding the parent directory for a drive letter. This basically reverts to using the full path, which is more likely to be ok under windows Signed-off-by: Kimball Thurston --- PyIlmBase/CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/PyIlmBase/CMakeLists.txt b/PyIlmBase/CMakeLists.txt index 71a1301383..6110486a13 100644 --- a/PyIlmBase/CMakeLists.txt +++ b/PyIlmBase/CMakeLists.txt @@ -63,7 +63,9 @@ function(PYILMBASE_EXTRACT_REL_SITEARCH varname pyver pyexe pysitearch) get_filename_component(_nexedir ${_exedir} DIRECTORY) string(FIND ${pysitearch} ${_nexedir} _findloc) if (_nexedir STREQUAL _exedir) - message(FATAL_ERROR "Unable to get parent directory for ${_exedir}") + message(WARNING "Unable to get parent directory for ${_exedir}, using absolute python site arch folder ${pysitearch}") + set(_elen -1) + break() else() set(_exedir ${_nexedir}) endif()