11function (find_platform_cores)
22
3+ # Avoid searching system's PATH as the SDK's general `Libraries` directory
4+ # may be used instead of the platform's directory
35 find_file (ARDUINO_CMAKE_PLATFORM_CORES_PATH
46 NAMES cores
57 PATHS ${ARDUINO_CMAKE_PLATFORM_PATH}
68 DOC "Path to directory containing the Platform's core sources"
9+ NO_SYSTEM_ENVIRONMENT_PATH
710 NO_CMAKE_FIND_ROOT_PATH )
811
912 set (core_list "" )
@@ -24,10 +27,13 @@ endfunction()
2427
2528function (find_platform_variants)
2629
30+ # Avoid searching system's PATH as the SDK's general `Libraries` directory
31+ # may be used instead of the platform's directory
2732 find_file (ARDUINO_CMAKE_PLATFORM_VARIANTS_PATH
2833 NAMES variants
2934 PATHS ${ARDUINO_CMAKE_PLATFORM_PATH}
3035 DOC "Path to directory containing the Platform's variant sources"
36+ NO_SYSTEM_ENVIRONMENT_PATH
3137 NO_CMAKE_FIND_ROOT_PATH )
3238 file (GLOB sub-dir ${ARDUINO_CMAKE_PLATFORM_VARIANTS_PATH} /*)
3339
@@ -50,50 +56,65 @@ endfunction()
5056
5157function (find_platform_bootloaders)
5258
59+ # Avoid searching system's PATH as the SDK's general `Libraries` directory
60+ # may be used instead of the platform's directory
5361 find_file (ARDUINO_CMAKE_PLATFORM_BOOTLOADERS_PATH
5462 NAMES bootloaders
5563 PATHS ${ARDUINO_CMAKE_PLATFORM_PATH}
5664 DOC "Path to directory containing the Platform's bootloader images and sources"
65+ NO_SYSTEM_ENVIRONMENT_PATH
5766 NO_CMAKE_FIND_ROOT_PATH )
5867
5968endfunction ()
6069
6170function (find_platform_programmers)
6271
72+ # Avoid searching system's PATH as the SDK's general `Libraries` directory
73+ # may be used instead of the platform's directory
6374 find_file (ARDUINO_CMAKE_PLATFORM_PROGRAMMERS_PATH
6475 NAMES programmers.txt
6576 PATHS ${ARDUINO_CMAKE_PLATFORM_PATH}
6677 DOC "Path to Platform's programmers definition file"
78+ NO_SYSTEM_ENVIRONMENT_PATH
6779 NO_CMAKE_FIND_ROOT_PATH )
6880
6981endfunction ()
7082
7183function (find_platform_boards)
7284
85+ # Avoid searching system's PATH as the SDK's general `Libraries` directory
86+ # may be used instead of the platform's directory
7387 find_file (ARDUINO_CMAKE_PLATFORM_BOARDS_PATH
7488 NAMES boards.txt
7589 PATHS ${ARDUINO_CMAKE_PLATFORM_PATH}
7690 DOC "Path to Platform's boards definition file"
91+ NO_SYSTEM_ENVIRONMENT_PATH
7792 NO_CMAKE_FIND_ROOT_PATH )
7893
7994endfunction ()
8095
8196function (find_platform_properties_file)
8297
98+ # Avoid searching system's PATH as the SDK's general `Libraries` directory
99+ # may be used instead of the platform's directory
83100 find_file (ARDUINO_CMAKE_PLATFORM_PROPERTIES_FILE_PATH
84101 NAMES platform.txt
85102 PATHS ${ARDUINO_CMAKE_PLATFORM_PATH}
86103 DOC "Path to Platform's properties file"
104+ NO_SYSTEM_ENVIRONMENT_PATH
87105 NO_CMAKE_FIND_ROOT_PATH )
88106
89107endfunction ()
90108
91109function (find_platform_libraries)
92110
111+ # Avoid searching system's PATH as the SDK's general `Libraries` directory
112+ # may be used instead of the platform's directory
93113 find_file (ARDUINO_CMAKE_PLATFORM_LIBRARIES_PATH
94114 NAMES libraries
95115 PATHS ${ARDUINO_CMAKE_PLATFORM_PATH}
96116 DOC "Path to platform directory containing the Arduino libraries"
117+ NO_SYSTEM_ENVIRONMENT_PATH
97118 NO_CMAKE_FIND_ROOT_PATH )
98119
99120 file (GLOB sub-dir "${ARDUINO_CMAKE_PLATFORM_LIBRARIES_PATH} /*" )
0 commit comments