cmake: fix out of tree hal build fail

Fix out of tree building hal fail with different drive on windows.

Signed-off-by: Jim Tan <KuoChun.Tan@ite.com.tw>
This commit is contained in:
Jim Tan 2021-12-24 13:41:58 +08:00 committed by Marti Bolivar
commit c31cb0075a

View file

@ -404,6 +404,9 @@ macro(zephyr_library_get_current_dir_lib_name base lib_name)
# Replace / with __ (driver/serial => driver__serial)
string(REGEX REPLACE "/" "__" name ${name})
# Replace : with __ (C:/zephyrproject => C____zephyrproject)
string(REGEX REPLACE ":" "__" name ${name})
set(${lib_name} ${name})
endmacro()