diff --git a/cmake/MatlabWrap.cmake b/cmake/MatlabWrap.cmake index 55b7cdb..f565e8e 100644 --- a/cmake/MatlabWrap.cmake +++ b/cmake/MatlabWrap.cmake @@ -229,7 +229,9 @@ function(wrap_library_internal interfaceHeader moduleName linkLibraries extraInc if(UNIX) set(GTWRAP_PATH_SEPARATOR ":") else() - set(GTWRAP_PATH_SEPARATOR ";") + # Escaped: an unescaped ";" is CMake's list separator, so it would split + # the quoted PYTHONPATH argument below instead of joining two path entries. + set(GTWRAP_PATH_SEPARATOR "\\;") endif() # Set boost serialization flag for the python script call below. diff --git a/cmake/PybindWrap.cmake b/cmake/PybindWrap.cmake index 2c98b69..9721c8d 100644 --- a/cmake/PybindWrap.cmake +++ b/cmake/PybindWrap.cmake @@ -60,7 +60,9 @@ function( if(UNIX) set(GTWRAP_PATH_SEPARATOR ":") else() - set(GTWRAP_PATH_SEPARATOR ";") + # Escaped: an unescaped ";" is CMake's list separator, so it would split + # the quoted PYTHONPATH argument below instead of joining two path entries. + set(GTWRAP_PATH_SEPARATOR "\\;") endif() # Create a copy of interface_headers so we can freely manipulate it