From 7577ec06a48b0791c55cc5b145b62a920acda2aa Mon Sep 17 00:00:00 2001 From: Whitehole <5395186+whiteh0le@users.noreply.github.com> Date: Mon, 16 Feb 2026 15:20:48 +0100 Subject: [PATCH] Fix compiling draco from paths containing special characters --- cmake/draco_install.cmake | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/cmake/draco_install.cmake b/cmake/draco_install.cmake index c08a943b..7aa0b190 100644 --- a/cmake/draco_install.cmake +++ b/cmake/draco_install.cmake @@ -31,16 +31,15 @@ macro(draco_setup_install_target) foreach(file ${draco_sources}) if(file MATCHES "h$") - list(APPEND draco_api_includes ${file}) + # Strip $draco_src_root from the file paths: we need to install relative to + # $include_directory. + file(RELATIVE_PATH relative_file ${draco_src_root} ${file}) + list(APPEND draco_api_includes ${relative_file}) endif() endforeach() list(REMOVE_DUPLICATES draco_api_includes) - # Strip $draco_src_root from the file paths: we need to install relative to - # $include_directory. - list(TRANSFORM draco_api_includes REPLACE "${draco_src_root}/" "") - foreach(draco_api_include ${draco_api_includes}) get_filename_component(file_directory ${draco_api_include} DIRECTORY) set(target_directory "${includes_path}/draco/${file_directory}")