mirror of
https://github.com/platformio/platformio-core.git
synced 2025-07-30 01:57:13 +02:00
CLion: Improve project portability using "${CMAKE_CURRENT_LIST_DIR}" instead of USER_HOME
This commit is contained in:
@ -1,12 +1,12 @@
|
|||||||
% def _normalize_path(path):
|
% def _normalize_path(path):
|
||||||
% if user_home_dir in path:
|
% if project_dir in path:
|
||||||
|
% path = path.replace(project_dir, "${CMAKE_CURRENT_LIST_DIR}")
|
||||||
|
% elif user_home_dir in path:
|
||||||
% if "windows" in systype:
|
% if "windows" in systype:
|
||||||
% path = path.replace(user_home_dir, "$ENV{HOMEDRIVE}$ENV{HOMEPATH}")
|
% path = path.replace(user_home_dir, "$ENV{HOMEDRIVE}$ENV{HOMEPATH}")
|
||||||
% else:
|
% else:
|
||||||
% path = path.replace(user_home_dir, "$ENV{HOME}")
|
% path = path.replace(user_home_dir, "$ENV{HOME}")
|
||||||
% end
|
% end
|
||||||
% elif project_dir in path:
|
|
||||||
% path = path.replace(project_dir, "${CMAKE_CURRENT_LIST_DIR}")
|
|
||||||
% end
|
% end
|
||||||
% return path.replace("\\", "/")
|
% return path.replace("\\", "/")
|
||||||
% end
|
% end
|
||||||
|
Reference in New Issue
Block a user